Skip to content

Commit e3e58f9

Browse files
author
Robrecht Colson
committed
[MIG] purchase_allowed_product: Migration to 18.0
1 parent b05c8c7 commit e3e58f9

File tree

5 files changed

+7
-6
lines changed

5 files changed

+7
-6
lines changed

purchase_allowed_product/__manifest__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# © 2016 Chafique DELLI @ Akretion
22
# © 2017 Today Mourad EL HADJ MIMOUNE @ Akretion
33
# 2020 Manuel Calero - Tecnativa
4+
# 2025 Robrecht Colson - Gumbys
45
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
56
{
67
"name": "Purchase and Invoice Allowed Product",

purchase_allowed_product/models/product.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Copyright 2017 Today Mourad EL HADJ MIMOUNE @ Akretion
22
# Copyright 2020 Tecnativa - Manuel Calero
33
# Copyright 2020 Tecnativa - Pedro M. Baeza
4+
# Copyright 2025 Gumbys - Robrecht Colson
45
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
56

67
from odoo import api, models
@@ -16,7 +17,6 @@ def _search(
1617
offset=0,
1718
limit=None,
1819
order=None,
19-
access_rights_uid=None,
2020
):
2121
if self.env.context.get("use_only_supplied_product"):
2222
restrict_supplier_id = self.env.context.get("restrict_supplier_id")
@@ -38,5 +38,4 @@ def _search(
3838
offset=offset,
3939
limit=limit,
4040
order=order,
41-
access_rights_uid=access_rights_uid,
4241
)

purchase_allowed_product/tests/test_purchase_allowed_product.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
# Copyright 2017 Today Mourad EL HADJ MIMOUNE @ Akretion
22
# Copyright 2020 Tecnativa - Pedro M. Baeza
3+
# Copyright 2025 Gumbys - Robrecht Colson
34
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
45

5-
6-
from odoo.tests.common import Form, TransactionCase
6+
from odoo.tests import Form
7+
from odoo.tests.common import TransactionCase
78

89

910
class TestPurchaseAllowedProduct(TransactionCase):

purchase_allowed_product/views/account_move_views.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
/>
1313
</xpath>
1414
<xpath
15-
expr="//field[@name='invoice_line_ids']/tree/field[@name='product_id']"
15+
expr="//field[@name='invoice_line_ids']/list/field[@name='product_id']"
1616
position="attributes"
1717
>
1818
<attribute name="context">

purchase_allowed_product/views/purchase_order_views.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<field name="use_only_supplied_product" widget="boolean_toggle" />
99
</xpath>
1010
<xpath
11-
expr="//field[@name='order_line']/tree/field[@name='product_id']"
11+
expr="//field[@name='order_line']/list/field[@name='product_id']"
1212
position="attributes"
1313
>
1414
<attribute name="context" operation="update">

0 commit comments

Comments
 (0)