Skip to content

Commit

Permalink
[FIX] compatibility with price_security and product_pack with discoun…
Browse files Browse the repository at this point in the history
…t in lines
  • Loading branch information
nicomacr authored and docker-odoo committed Jan 23, 2025
1 parent d791132 commit c14d38f
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions product_pack/models/sale_order_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,3 +118,14 @@ def expand_none_detailed_pack(self):
'price_subtotal': price_unit * quantity,
}
self.pack_line_ids.create(vals)

def _get_real_price_currency(
self, product, rule_id, qty, uom, pricelist_id):
new_list_price, currency_id = super(
SaleOrderLine, self)._get_real_price_currency(
product, rule_id, qty, uom, pricelist_id)
if self.pack_parent_line_id and\
self.pack_parent_line_id.product_id.pack_price_type in [
'fixed_price', 'totalice_price']:
new_list_price = 0.0
return new_list_price, currency_id

0 comments on commit c14d38f

Please sign in to comment.