[FIX] website_quote: install sale_payment together with website_quote

Stable version of 65a589eb54 (reverted
at 935043dda1) that doesn't cause the
following errors:

odoo.modules.graph: module website_quote: Unmet dependencies:
sale_payment

on existing databases without sale_payment installed.

A downside of this approach is that sale_payment can be uninstalled
without uninstalling website_quote. Adding an uninstall_hook to
sale_payment could solve that, but it wouldn't warn the user
website_quote would be removed in the "Uninstall module"
wizard. Keeping in mind this is only a temporary hack for stable,
keeping sale_payment installed in this case shouldn't cause any
issues.

opw-1847977
This commit is contained in:
Joren Van Onder
2018-05-23 13:51:15 -07:00
parent 02ee3fd88e
commit 1e21b79feb
2 changed files with 13 additions and 0 deletions
+9
View File
@@ -3,3 +3,12 @@
from . import controllers
from . import models
from odoo.api import Environment, SUPERUSER_ID
def _install_sale_payment(cr, registry):
env = Environment(cr, SUPERUSER_ID, {})
env['ir.module.module'].search([
('name', '=', 'sale_payment'),
('state', '=', 'uninstalled'),
]).button_install()
+4
View File
@@ -24,4 +24,8 @@
],
'qweb': ['static/src/xml/*.xml'],
'installable': True,
# needed because dependencies can't be changed in a stable version
# TODO in master: add sale_payment to depends and remove this
'post_init_hook': '_install_sale_payment',
}