Skip to content

Commit

Permalink
[IMP] delivery_price_collection_cost_product_domain: use context orde…
Browse files Browse the repository at this point in the history
…r_id for product domain application in price computation
  • Loading branch information
GSLabIt committed Feb 4, 2025
1 parent 75115ee commit 44d872c
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,13 @@ def _get_price_from_picking(self, total, weight, volume, quantity):
return super()._get_price_from_picking(total, weight, volume, quantity)
price_dict = self._get_price_dict(total, weight, volume, quantity)
untaxed_in_dict = "untaxed_price" in price_dict
order = (
self.env["sale.order"].sudo().browse(self._context.get("order_id", False))
)
for line in self.price_rule_ids:
apply_product_domain_char = line.apply_product_domain
if apply_product_domain_char and self.order_id:
apply_product = self.order_id.order_line.product_id.search(
if apply_product_domain_char and order:
apply_product = order.order_line.product_id.search(
ast.literal_eval(apply_product_domain_char)
)
self.recompute_price_available(
Expand Down

0 comments on commit 44d872c

Please sign in to comment.