mirror of
https://github.com/OCA/bank-payment.git
synced 2025-02-02 10:37:31 +02:00
[FIX] multicompany rule
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
<?xml version='1.0' encoding='utf-8' ?>
|
||||
<odoo>
|
||||
<record id="account_payment_mode_company_rule" model="ir.rule">
|
||||
<field
|
||||
name="domain_force"
|
||||
>['|',('company_id','=',False),('company_id','in',company_ids)]</field>
|
||||
</record>
|
||||
</odoo>
|
||||
11
account_payment_mode/migrations/13.0.1.0.0/post-migration.py
Normal file
11
account_payment_mode/migrations/13.0.1.0.0/post-migration.py
Normal file
@@ -0,0 +1,11 @@
|
||||
# Copyright 2020 Tecnativa - Pedro M. Baeza
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||
|
||||
from openupgradelib import openupgrade # pylint: disable=W7936
|
||||
|
||||
|
||||
@openupgrade.migrate()
|
||||
def migrate(env, version):
|
||||
openupgrade.load_data(
|
||||
env.cr, "account_payment_mode", "migrations/13.0.1.0.0/noupdate_changes.xml"
|
||||
)
|
||||
@@ -1,2 +1,3 @@
|
||||
* Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
* Eric Lembregts <eric@lembregts.eu>
|
||||
* Andrea Stirpe <a.stirpe@onestein.nl>
|
||||
|
||||
@@ -5,6 +5,6 @@
|
||||
<field name="model_id" ref="model_account_payment_mode" />
|
||||
<field
|
||||
name="domain_force"
|
||||
>['|', ('company_id', '=', False), ('company_id', 'child_of', [user.company_id.id])]</field>
|
||||
>['|', ('company_id', '=', False), ('company_id', 'in', company_ids)]</field>
|
||||
</record>
|
||||
</odoo>
|
||||
|
||||
Reference in New Issue
Block a user