[FIX] account_peppol: installation crash
The aim of this commit is to allow user to install `account_peppol` without facing a traceback. Context: The commit cffd0e9dd91376dd7fe4613f4fd94e659daaeef0 introduced a check based on a field introduced in the view by another module it depends on. The problem is that ticking the peppol checkbox install the `account_peppol` module but doesn't trigger an update of the `account_edi_ubl_cii` module. Before the commit: Impossible to installing `account_peppol`. After the commit: Installing `account_peppol` will update the view `account_edi_ubl_cii.account_move_send_form` if the field added by commit cffd0e9dd91376dd7fe4613f4fd94e659daaeef0 can't be found. opw-3874304 closes odoo/odoo#162677 X-original-commit: 465491d017ecf1c6efb26d3252471f17f4e9d856 Signed-off-by: Laurent Smet (las) <las@odoo.com> Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
This commit is contained in:
@@ -4,3 +4,8 @@
|
||||
from . import models
|
||||
from . import wizard
|
||||
from . import tools
|
||||
|
||||
def pre_init_hook(env):
|
||||
view = env.ref("account_edi_ubl_cii.account_move_send_form")
|
||||
if "ubl_partner_warning" not in view.arch:
|
||||
view.reset_arch(mode='hard')
|
||||
|
||||
@@ -30,5 +30,6 @@
|
||||
'web.assets_backend': [
|
||||
'account_peppol/static/src/components/**/*',
|
||||
],
|
||||
}
|
||||
},
|
||||
'pre_init_hook': 'pre_init_hook',
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user