Commit 7fb618f7 authored by Javier Vega's avatar Javier Vega 🌮
Browse files

[FIX] multicompany issue due to old rule

parent a1352e69
Pipeline #89580 failed with stages
in 20 minutes and 33 seconds
......@@ -6,7 +6,7 @@
'summary': '''
Use Xunnel Bank to retrieve bank statements.
''',
'version': '13.0.1.0.10',
'version': '13.0.1.0.11',
'author': 'Jarsa Sistemas,Vauxoo',
'category': 'Accounting',
'website': 'http://www.xunnel.com',
......@@ -26,7 +26,6 @@
'data/config_parameters.xml',
'views/account_config_settings.xml',
'views/accountant_dashboard.xml',
'security/account_xunnel_security.xml',
'views/assets.xml',
'wizards/change_date.xml',
],
......
def delete_providers_rules(cr):
cr.execute("""
UPDATE ir_model_data set noupdate='f'
WHERE module='account_xunnel'
AND name=ANY(ARRAY[
'account_online_sync_provider_rule',
'account_online_sync_journal_rule'
]);
""")
def migrate(cr, version):
if not version:
return
delete_providers_rules(cr)
<?xml version="1.0" encoding="utf-8"?>
<odoo noupdate="1">
<!-- TODO remove this rules when PR https://github.com/odoo/enterprise/pull/2546 is merged-->
<record model="ir.rule" id="account_online_sync_provider_rule">
<field name="name">Account online provider company rule</field>
<field name="model_id" ref="model_account_online_provider"/>
<field name="global" eval="True"/>
<field name="domain_force">[('company_id','child_of',[user.company_id.id])]</field>
</record>
<record model="ir.rule" id="account_online_sync_journal_rule">
<field name="name">Account online journal company rule</field>
<field name="model_id" ref="model_account_online_journal"/>
<field name="global" eval="True"/>
<field name="domain_force">[('account_online_provider_id.company_id','child_of',[user.company_id.id])]</field>
</record>
</odoo>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment