Skip to content

Commit 7d5f265

Browse files
[MIG] product_pricelist: Migration to 19.0
1 parent f520a6e commit 7d5f265

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

product_pricelist/__manifest__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
##############################################################################
2020
{
2121
"name": "Pricelists information on Products",
22-
"version": "18.0.1.0.0",
22+
"version": "19.0.1.0.0",
2323
"category": "Sales & Purchases",
2424
"sequence": 14,
2525
"author": "ADHOC SA",
@@ -34,7 +34,7 @@
3434
"views/product_pricelist_views.xml",
3535
],
3636
"demo": [],
37-
"installable": False,
37+
"installable": True,
3838
"auto_install": False,
3939
"application": False,
4040
}

product_pricelist/models/product_pricelist.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ class ProductPricelist(models.Model):
2121
def _compute_price(self):
2222
self = self.sudo()
2323
active_id = model = False
24-
if "pricelist_product_id" in self._context:
25-
active_id = self._context.get("pricelist_product_id")
24+
if "pricelist_product_id" in self.env.context:
25+
active_id = self.env.context.get("pricelist_product_id")
2626
model = "product.product"
27-
elif "pricelist_template_id" in self._context:
28-
active_id = self._context.get("pricelist_template_id")
27+
elif "pricelist_template_id" in self.env.context:
28+
active_id = self.env.context.get("pricelist_template_id")
2929
model = "product.template"
3030
else:
3131
self.price = 0.0

0 commit comments

Comments
 (0)