diff --git a/shipment.py b/shipment.py index 66918ba..a6c057b 100755 --- a/shipment.py +++ b/shipment.py @@ -125,29 +125,29 @@ class InternalShipment(metaclass=PoolMeta): 'company': move.company.id, 'state': move.state, }]) - + @fields.depends('effective_date', 'from_location', 'to_location') def on_change_with_effective_start_date(self): if self.effective_date: return self.effective_date - + @classmethod def create(cls, vlist): shipments = super().create(vlist) cls._set_move_effective_date(shipments) return shipments - + @classmethod def write(cls, *args): super().write(*args) cls._set_move_effective_date(sum(args[::2], [])) - + @property def _move_effective_date(self): ''' Return the effective date for incoming moves and inventory_moves ''' - return self.effective_start_date, self.effective_date + return self.effective_start_date, self.effective_date @classmethod def _set_move_effective_date(cls, shipments): @@ -178,7 +178,7 @@ class InternalShipment(metaclass=PoolMeta): }) if to_write: Move.write(*to_write) - + def load_current_stock(self): pool = Pool() Internal = pool.get('stock.shipment.internal') @@ -212,7 +212,7 @@ class InternalShipment(metaclass=PoolMeta): 'moves': [('create', moves_target)], }) return 'end' - + class CreateInternalShipmentStart(ModelView): 'Create Internal Shipment Start' @@ -493,7 +493,7 @@ class ShipmentDetailedReport(Report): ) shipments_id = [model + ',' + str(sh['id']) for sh in shipments] fields_names = [ - 'product.account_category.name', 'product.name', 'product.cost_price', + 'product.account_category.name', 'product.name', 'product.code', 'product.cost_price', 'quantity', 'to_location.name', 'from_location.name', 'shipment.reference', 'effective_date', 'shipment.number' ] @@ -541,6 +541,7 @@ class ShipmentDetailedReport(Report): 'party': party, 'oc': oc, 'product': product['name'], + 'code': product['code'], 'cost_price': cost_price, 'category': category, 'category_ad': category_ad, diff --git a/shipment_detailed.fods b/shipment_detailed.fods index ea921aa..f5bc8b9 100755 Binary files a/shipment_detailed.fods and b/shipment_detailed.fods differ