mirror of
https://github.com/OCA/contract.git
synced 2025-02-13 17:57:24 +02:00
[FIX] contract: proper condition for auto price
This commit is contained in:
@@ -193,7 +193,11 @@ class ContractAbstractContractLine(models.AbstractModel):
|
|||||||
from the pricelist otherwise.
|
from the pricelist otherwise.
|
||||||
"""
|
"""
|
||||||
for line in self:
|
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 = (
|
pricelist = (
|
||||||
line.contract_id.pricelist_id
|
line.contract_id.pricelist_id
|
||||||
or line.contract_id.partner_id.with_company(
|
or line.contract_id.partner_id.with_company(
|
||||||
|
|||||||
Reference in New Issue
Block a user