04.02.26
This commit is contained in:
@@ -245,7 +245,9 @@ class Fee(ModelSQL,ModelView):
|
||||
elif self.mode == 'perqt':
|
||||
return self.price
|
||||
elif self.mode == 'ppack':
|
||||
return self.price / self.unit.factor * self.get_unit().factor
|
||||
unit = self.get_unit()
|
||||
if unit and self.unit:
|
||||
return self.price / self.unit.factor * unit.factor
|
||||
elif self.mode == 'pprice' or self.mode == 'pcost':
|
||||
if self.line and self.price:
|
||||
return round(self.price * Decimal(self.line.unit_price) / 100,4)
|
||||
@@ -285,6 +287,8 @@ class Fee(ModelSQL,ModelView):
|
||||
# sign = -1
|
||||
if self.mode == 'lumpsum':
|
||||
return self.price * sign
|
||||
elif self.mode == 'ppack':
|
||||
return round(self.price * self.quantity,2)
|
||||
elif self.mode == 'perqt':
|
||||
if self.shipment_in:
|
||||
StockMove = Pool().get('stock.move')
|
||||
|
||||
Reference in New Issue
Block a user