You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

119 lines
3.4 KiB

5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
  1. # Obeesdoo
  2. Specific module for the Beescoop
  3. ## Install odoo
  4. - cf. [install-odoo-linux-server.md](install-odoo-linux-server.md) (review)
  5. - cf. [install-odoo-linux.md](install-odoo.md) (review)
  6. - cf. [install-odoo-mac.md](install-odoo-mac.md)
  7. ## Setup obeesdoo
  8. ##### 1) clone repos
  9. ```
  10. $ cd projects
  11. $ git clone https://github.com/beescoop/Obeesdoo.git obeesdoo -b 12.0 --depth 1
  12. $ git clone https://github.com/coopiteasy/vertical-cooperative.git vertical-cooperative -b 12.0 --depth 1
  13. $ git clone https://github.com/coopiteasy/addons.git addons -b 12.0 --depth 1
  14. # $ git clone https://github.com/coopiteasy/procurement-addons procurement-addons -b 12.0 --depth 1
  15. $ git clone https://github.com/OCA/l10n-belgium -b 12.0 --depth 1
  16. $ git clone https://github.com/OCA/mis-builder -b 12.0 --depth 1
  17. $ git clone https://github.com/OCA/account-financial-tools -b 12.0 --depth 1
  18. $ git clone https://github.com/OCA/account-financial-reporting -b 12.0 --depth 1
  19. $ git clone https://github.com/OCA/web -b 12.0 --depth 1
  20. $ git clone https://github.com/OCA/website -b 12.0 --depth 1
  21. $ git clone https://github.com/OCA/server-tools -b 12.0 --depth 1
  22. $ git clone https://github.com/OCA/reporting-engine -b 12.0 --depth 1
  23. $ git clone https://github.com/OCA/bank-payment.git -b 12.0 --depth 1
  24. $ git clone https://github.com/OCA/pos.git -b 12.0 --depth 1
  25. ```
  26. todo: setup git submodules
  27. ##### 2) install wkhtmltopdf
  28. Download and install [wkhtmltopdf version 0.12.5](https://github.com/wkhtmltopdf/wkhtmltopdf/releases/0.12.5)
  29. ##### 3) set up the database and import production data.
  30. ```
  31. $ createuser -d odoo
  32. $ createdb beescoop -o odoo
  33. $ gunzip <dump-file>.sql.gz
  34. $ psql beescoop < <dump-file>.sql
  35. ```
  36. ##### 4) deactivate cron jobs and mails
  37. ```
  38. $ psql -d beescoop -c "UPDATE ir_cron SET active='f' WHERE active='t';"
  39. $ psql -d beescoop -c "update ir_mail_server set smtp_encryption='none', smtp_port=1025, smtp_host='localhost',smtp_user='', smtp_pass='';"
  40. $ psql -d beescoop -c "UPDATE fetchmail_server SET active='f', password='', server='localhost';"
  41. ```
  42. ##### 5) create odoo.conf
  43. ```
  44. $ export ODOO_HOME='~/projects'
  45. $ vi $ODOO_HOME/odoo.conf
  46. ```
  47. ```
  48. [options]
  49. ; This is the password that allows database operations:
  50. ; admin_passwd = admin
  51. debug=True
  52. dev=True
  53. db_host=False
  54. db_port=False
  55. db_user=odoo
  56. db_password=False
  57. addons_path=addons,openerp/addons,
  58. $ODOO_HOME/obeesdoo,
  59. $ODOO_HOME/vertical-cooperative,
  60. $ODOO_HOME/addons,
  61. # $ODOO_HOME/procurement-addons,
  62. $ODOO_HOME/l10n-belgium,
  63. $ODOO_HOME/mis-builder,
  64. $ODOO_HOME/web,
  65. $ODOO_HOME/website,
  66. $ODOO_HOME/server-tools,
  67. $ODOO_HOME/account-financial-reporting,
  68. $ODOO_HOME/account-financial-tools,
  69. $ODOO_HOME/bank-payment,
  70. $ODOO_HOME/pos,
  71. $ODOO_HOME/reporting-engine
  72. ```
  73. ##### 6) update database structure
  74. ```
  75. $ cd ~/projects/odoo
  76. $ psql -d beescoop -c "truncate product_scale_log"
  77. $ python odoo.py -c $ODOO_HOME/odoo.conf -u all -d beescoop --stop-after-init
  78. ```
  79. ### Troubleshoot
  80. Missing libraries
  81. ```
  82. pip install pycoda
  83. pip install xlsxwriter
  84. ```
  85. Can't update `product_scale_log` table (I did not write down the exact error)
  86. ```
  87. truncate table product_scale_log
  88. ```
  89. ## Migrate barcode
  90. ```sql
  91. insert into member_card (active, barcode, partner_id, responsible_id, activation_date) select 't', barcode, id, 1, '2016-01-01' from res_partner where barcode is not null;
  92. update res_partner set eater = 'worker_eater' where barcode is not null;
  93. ```