BL nb stock move

This commit is contained in:
2026-06-07 21:13:31 +02:00
parent 0a72076346
commit 65e9f4d7d6
5 changed files with 26 additions and 13 deletions

View File

@@ -922,6 +922,7 @@ class ContractClause(ModelSQL, ModelView):
(None, ''),
('bulk', 'Bulk'),
('container', 'Container'),
('tanker', 'Tanker'),
], "Cargo Mode")
variables = fields.Function(
fields.Char("Variables"), 'get_variables')
@@ -992,6 +993,7 @@ class ContractTemplate(ModelSQL, ModelView):
(None, ''),
('bulk', 'Bulk'),
('container', 'Container'),
('tanker', 'Tanker'),
], "Cargo Mode")
lines = fields.One2Many(
'contract.template.line', 'template', "Clauses")

View File

@@ -66,12 +66,13 @@ class Location(metaclass=PoolMeta):
if self.name == 'Transit':
return True
class Move(metaclass=PoolMeta):
__name__ = 'stock.move'
bldate = fields.Date("BL date")
lotqt = fields.One2Many('lot.qt','lot_move',"Lots")
lot = fields.Many2One('lot.lot',"Lot")
class Move(metaclass=PoolMeta):
__name__ = 'stock.move'
bldate = fields.Date("BL date")
blnumber = fields.Char("BL number")
lotqt = fields.One2Many('lot.qt','lot_move',"Lots")
lot = fields.Many2One('lot.lot',"Lot")
def get_linked_transit_move(self):
if self.from_location.is_transit():
@@ -736,6 +737,7 @@ class ShipmentIn(metaclass=PoolMeta):
('none', ''),
('bulk', 'Bulk'),
('container', 'Container'),
('tanker', 'Tanker'),
], 'Cargo Mode', required=True,
states={'invisible': Eval('transport_type') == 'truck'})
@@ -1984,12 +1986,15 @@ class ShipmentIn(metaclass=PoolMeta):
lot.lot_shipment_in = None
lot.lot_av = 'available'
Lot.save([lot])
elif sh.incoming_moves:
for m in sh.incoming_moves:
if sh.bl_date:
m.bldate = sh.bl_date
StockMove.save([m])
for lot in lots:
elif sh.incoming_moves:
for m in sh.incoming_moves:
if sh.bl_date:
m.bldate = sh.bl_date
if sh.bl_number:
m.blnumber = sh.bl_number
if sh.bl_date or sh.bl_number:
StockMove.save([m])
for lot in lots:
if lot.lot_type == 'physic':
lot.lot_status = 'transit'
Lot.save([lot])

View File

@@ -9,6 +9,8 @@ this repository contains the full copyright notices and license terms. -->
</xpath>
<xpath expr="/form/notebook/page[@id='move']/field[@name='planned_date']" position="replace">
<field name="bldate"/>
<label name="blnumber"/>
<field name="blnumber"/>
</xpath>
<xpath expr="/form/notebook/page[@id='move']/label[@name='planned_date']" position="replace">
<label name="bldate"/>

View File

@@ -5,5 +5,6 @@ this repository contains the full copyright notices and license terms. -->
<xpath expr="//field[@name='planned_date']" position="replace">
<field name="lot" optional="0"/>
<field name="bldate" optional="0"/>
<field name="blnumber" optional="0"/>
</xpath>
</data>

View File

@@ -2,10 +2,13 @@
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<data>
<xpath expr="/form/label[@name='supplier']" position="replace">
<label name="supplier" string="Broker"/>
</xpath>
<xpath expr="/form/field[@name='supplier']" position="after">
<!-- <label name="incoterm_location"/>
<field name="incoterm_location"/> -->
<label name="carrier_"/>
<label name="carrier_" string="SSCO/Owner"/>
<field name="carrier_"/>
<newline/>
<label name="from_location"/>