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.

114 lines
3.2 KiB

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