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.

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