Set invoice progress of shipment cost line of sale always as 100%
Closes #13160
This commit is contained in:
@@ -436,6 +436,13 @@ class Line(metaclass=PoolMeta):
|
||||
shipment_cost_invoiced.append(shipment.id)
|
||||
return lines
|
||||
|
||||
@property
|
||||
def _invoice_remaining_quantity(self):
|
||||
quantity = super()._invoice_remaining_quantity
|
||||
if self.shipment_cost is not None:
|
||||
quantity = 0
|
||||
return quantity
|
||||
|
||||
def _get_invoice_line_quantity(self):
|
||||
quantity = super()._get_invoice_line_quantity()
|
||||
if self.shipment_cost is not None:
|
||||
|
||||
@@ -127,6 +127,8 @@ Sale products with cost on shipment::
|
||||
1.0
|
||||
>>> cost_line.amount
|
||||
Decimal('3.00')
|
||||
>>> cost_line.invoice_progress
|
||||
1.0
|
||||
>>> sale.click('confirm')
|
||||
>>> sale.click('process')
|
||||
>>> sale.state
|
||||
@@ -211,6 +213,8 @@ Sale products with cost on order::
|
||||
1.0
|
||||
>>> cost_line.amount
|
||||
Decimal('3.00')
|
||||
>>> cost_line.invoice_progress
|
||||
1.0
|
||||
>>> sale.click('confirm')
|
||||
>>> sale.click('process')
|
||||
>>> sale.state
|
||||
|
||||
Reference in New Issue
Block a user