We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5822698 commit 5486e66Copy full SHA for 5486e66
product_pricelist_alternative/models/product_pricelist.py
@@ -67,6 +67,12 @@ def _compute_price_rule(
67
compute_price=True,
68
**kwargs,
69
):
70
+ # This context key is used in `sale.order::_recompute_prices()`,
71
+ # triggered by `action_update_prices()` button that recomputes
72
+ # the unit price of all products based on the new pricelist.
73
+ if self.env.context.get("force_price_recomputation"):
74
+ compute_price = True
75
+
76
res = super()._compute_price_rule(
77
products,
78
quantity,
@@ -76,7 +82,6 @@ def _compute_price_rule(
82
compute_price=compute_price,
83
84
)
79
-
80
85
# In some contexts we want to ignore alternative pricelists
81
86
# and return the original price
87
if self.env.context.get("skip_alternative_pricelist", False):
0 commit comments