This commit is contained in:
2026-01-20 21:30:14 +01:00
parent 2269fc7709
commit 5e9141f03a
6 changed files with 23 additions and 1 deletions

View File

@@ -75,7 +75,7 @@
<record model="ir.model.button" id="auto_button1">
<field name="model">automation.document</field>
<field name="name">run_pipeline</field>
<field name="string">Run Full Pipeline</field>
<field name="string">Create Weight Report</field>
</record>
<record model="ir.model.button" id="auto_button2">
<field name="model">automation.document</field>

View File

@@ -116,6 +116,7 @@ def register():
stock.Location,
stock.InvoiceLine,
stock.ShipmentIn,
stock.ShipmentWR,
stock.ShipmentInternal,
stock.ShipmentOut,
stock.StatementOfFacts,

View File

@@ -361,6 +361,12 @@ class ShipmentContainer(ModelSQL, ModelView):
seal_no = fields.Char('Seal Number')
is_reefer = fields.Boolean('Reefer')
class ShipmentWR(ModelSQL,ModelView):
"Shipment WR"
__name__ = "shipment.wr"
shipment_in = fields.Many2One('stock.shipment.in',"Shipment In")
wr = fields.Many2One('weight.report',"WR")
class ShipmentIn(metaclass=PoolMeta):
__name__ = 'stock.shipment.in'
@@ -413,6 +419,7 @@ class ShipmentIn(metaclass=PoolMeta):
'shipment',
'Container'
)
shipment_wr = fields.One2Many('shipment.wr','shipment_in',"WR")
@classmethod
def __setup__(cls):

View File

@@ -38,6 +38,12 @@ this repository contains the full copyright notices and license terms. -->
<field name="model">stock.shipment.container</field>
<field name="type">tree</field>
<field name="name">shipment_container_tree</field>
</record>
<record model="ir.ui.view" id="shipment_wr_view_tree">
<field name="model">shipment.wr</field>
<field name="type">tree</field>
<field name="name">shipment_wr_tree</field>
</record>
<record model="ir.action.wizard" id="act_vf">

View File

@@ -109,4 +109,9 @@ this repository contains the full copyright notices and license terms. -->
<button name="compute" string="compute"/>
</page>
</xpath>
<xpath expr="//page[@id='other']" position="after">
<page string="Weight Report" col="4" id="wr">
<field name="wr" colspan="4" mode="tree" view_ids="purchase_trade.shipment_wr_view_tree"/>
</page>
</xpath>
</data>

View File

@@ -0,0 +1,3 @@
<tree>
<field name="wr"/>
</tree>