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.

133 lines
3.9 KiB

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