Skip to content

Commit

Permalink
[FIX] contract: proper condition for auto price
Browse files Browse the repository at this point in the history
  • Loading branch information
rvalyi committed Dec 11, 2024
1 parent a1725df commit 19c162b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion contract/models/abstract_contract_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,11 @@ def _compute_price_unit(self):
from the pricelist otherwise.
"""
for line in self:
if line.automatic_price and line.product_id:
if (
line.automatic_price
and line.product_id
and (line.contract_id.pricelist_id or line.contract_id.partner_id)
):
pricelist = (
line.contract_id.pricelist_id
or line.contract_id.partner_id.with_company(
Expand Down

0 comments on commit 19c162b

Please sign in to comment.