diff --git a/account_payment_order/migrations/12.0.1.2.0/post-migration.py b/account_payment_order/migrations/12.0.1.2.0/post-migration.py
deleted file mode 100644
index 575e13c76..000000000
--- a/account_payment_order/migrations/12.0.1.2.0/post-migration.py
+++ /dev/null
@@ -1,18 +0,0 @@
-# Copyright 2019 Tecnativa - Pedro M. Baeza
-# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
-
-from openupgradelib import openupgrade
-
-
-@openupgrade.migrate()
-def migrate(env, version):
- openupgrade.set_xml_ids_noupdate_value(
- env,
- "account_payment_order",
- [
- "bank_payment_line_seq",
- "account_payment_line_seq",
- "account_payment_order_seq",
- ],
- True,
- )
diff --git a/account_payment_order/migrations/13.0.1.0.0/noupdate_changes.xml b/account_payment_order/migrations/13.0.1.0.0/noupdate_changes.xml
new file mode 100644
index 000000000..c0c9f5870
--- /dev/null
+++ b/account_payment_order/migrations/13.0.1.0.0/noupdate_changes.xml
@@ -0,0 +1,18 @@
+
+
+
+ ['|',('company_id','=',False),('company_id','in',company_ids)]
+
+
+ ['|',('company_id','=',False),('company_id','in',company_ids)]
+
+
+ ['|',('company_id','=',False),('company_id','in',company_ids)]
+
+
diff --git a/account_payment_order/migrations/13.0.1.0.0/post-migration.py b/account_payment_order/migrations/13.0.1.0.0/post-migration.py
new file mode 100644
index 000000000..a49b21956
--- /dev/null
+++ b/account_payment_order/migrations/13.0.1.0.0/post-migration.py
@@ -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_order", "migrations/13.0.1.0.0/noupdate_changes.xml"
+ )
diff --git a/account_payment_order/readme/CONTRIBUTORS.rst b/account_payment_order/readme/CONTRIBUTORS.rst
index 0a2cbd827..b5827224e 100644
--- a/account_payment_order/readme/CONTRIBUTORS.rst
+++ b/account_payment_order/readme/CONTRIBUTORS.rst
@@ -16,3 +16,4 @@
* `DynApps `_:
* Raf Ven
+* Andrea Stirpe
diff --git a/account_payment_order/security/payment_security.xml b/account_payment_order/security/payment_security.xml
index f9638412e..3513f33d7 100644
--- a/account_payment_order/security/payment_security.xml
+++ b/account_payment_order/security/payment_security.xml
@@ -16,21 +16,21 @@
['|', ('company_id', '=', False), ('company_id', 'child_of', [user.company_id.id])]
+ >['|', ('company_id', '=', False), ('company_id', 'in', company_ids)]
Payment line multi-company rule
['|', ('company_id', '=', False), ('company_id', 'child_of', [user.company_id.id])]
+ >['|', ('company_id', '=', False), ('company_id', 'in', company_ids)]
Bank payment line multi-company rule
['|', ('company_id', '=', False), ('company_id', 'child_of', [user.company_id.id])]
+ >['|', ('company_id', '=', False), ('company_id', 'in', company_ids)]