main #7

Merged
admin merged 620 commits from main into dev 2026-03-29 13:03:25 +00:00
Showing only changes of commit af89743b40 - Show all commits

View File

@@ -480,6 +480,7 @@ class ShipmentIn(metaclass=PoolMeta):
fee.mode = mode
fee.currency = curr
fee.unit = unit
fee.quantity = self.get_bales() or 1
fee.product = Product.get_by_name('Reweighing')
fee.price = price
Fee.save([fee])
@@ -859,6 +860,12 @@ class ShipmentIn(metaclass=PoolMeta):
def get_quantity(self,name=None):
if self.incoming_moves:
return sum([(e.quantity if e.quantity else 0) for e in self.incoming_moves])
def get_bales(self,name=None):
Lot = Pool().get('lot.lot')
lots = Lot.search(['lot_shipment_in','=',self.id])
if lots:
return sum([l.lot_qt for l in lots])
def get_unit(self,name=None):
if self.incoming_moves: