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.

120 lines
3.4 KiB

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