10.03.26
This commit is contained in:
@@ -804,7 +804,8 @@ class ShipmentIn(metaclass=PoolMeta):
|
||||
"FeeUnitPrice": float(fee.price),
|
||||
"ContractNumbers": sh.number,
|
||||
"OrderQuantityGW": float(sh.get_quantity()) if sh.get_quantity() else float(1),
|
||||
"NumberOfPackingBales": int(fee.quantity) if fee.quantity else int(1)
|
||||
"NumberOfPackingBales": int(fee.quantity) if fee.quantity else int(1),
|
||||
"ChunkKeyList": sh.get_chunk_key()
|
||||
}
|
||||
|
||||
logger.info("PAYLOAD:%s",so_payload)
|
||||
@@ -857,6 +858,10 @@ class ShipmentIn(metaclass=PoolMeta):
|
||||
def default_dashboard(cls):
|
||||
return 1
|
||||
|
||||
def get_chunk_key(self):
|
||||
keys = [m.lot.lot_chunk_key for m in self.incoming_moves if m.lot]
|
||||
return ",".join(map(str, keys)) if keys else None
|
||||
|
||||
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])
|
||||
|
||||
Reference in New Issue
Block a user