[FIX] website_quote: install sale_payment together with website_quote
Stable version of65a589eb54(reverted at935043dda1) 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:
@@ -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()
|
||||
|
||||
@@ -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',
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user