Skip to content

Commit 0e719b2

Browse files
committed
[IMP] product_pricelist_alternative: force_price_recomputation
1 parent 5822698 commit 0e719b2

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

product_pricelist_alternative/__manifest__.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,15 @@
33

44
{
55
"name": "Product Pricelist Alternative",
6-
"version": "18.0.1.0.0",
6+
"version": "18.0.1.1.0",
77
"development_status": "Beta",
88
"category": "Product",
99
"summary": "Calculate product price based on alternative pricelists",
1010
"author": "Camptocamp, Odoo Community Association (OCA)",
1111
"website": "https://github.com/OCA/product-attribute",
1212
"license": "AGPL-3",
1313
"depends": [
14+
"sale",
1415
"product",
1516
],
1617
"data": [

product_pricelist_alternative/models/product_pricelist.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,10 @@ def _compute_price_rule(
6767
compute_price=True,
6868
**kwargs,
6969
):
70+
71+
if self.env.context.get("force_price_recomputation", False):
72+
compute_price = True
73+
7074
res = super()._compute_price_rule(
7175
products,
7276
quantity,
@@ -76,7 +80,6 @@ def _compute_price_rule(
7680
compute_price=compute_price,
7781
**kwargs,
7882
)
79-
8083
# In some contexts we want to ignore alternative pricelists
8184
# and return the original price
8285
if self.env.context.get("skip_alternative_pricelist", False):

0 commit comments

Comments
 (0)