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.

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