diff options
| author | Azka Nathan <darizkyfaz@gmail.com> | 2025-07-07 10:52:44 +0700 |
|---|---|---|
| committer | Azka Nathan <darizkyfaz@gmail.com> | 2025-07-07 10:52:44 +0700 |
| commit | 8f07d24c8362cb6a4d5ded8f94b75c5057a5b025 (patch) | |
| tree | 6e4b3faa0c2cbb62acfb90331f879deac21f4b7f | |
| parent | 9b47eeef16249db9ba0950e54398c0c0373e350d (diff) | |
add receipt on searching shipment group
| -rw-r--r-- | fixco_custom/models/shipment_group.py | 1 | ||||
| -rw-r--r-- | fixco_custom/views/shipment_group.xml | 11 |
2 files changed, 12 insertions, 0 deletions
diff --git a/fixco_custom/models/shipment_group.py b/fixco_custom/models/shipment_group.py index 75a0f2d..b6ffbda 100644 --- a/fixco_custom/models/shipment_group.py +++ b/fixco_custom/models/shipment_group.py @@ -34,6 +34,7 @@ class ShipmentGroup(models.Model): shipment_line = fields.One2many('shipment.group.line', 'shipment_id', string='Shipment Group Lines', auto_join=True) picking_lines = fields.One2many('picking.line', 'shipment_id', string='Picking Lines', auto_join=True) related_count = fields.Integer(compute='_compute_related_count', string='Related Count') + receipt = fields.Char(string='Receipt', related='picking_lines.scan_receipt') def sync_product_to_picking_line(self): for shipment in self: diff --git a/fixco_custom/views/shipment_group.xml b/fixco_custom/views/shipment_group.xml index 8ebcef9..3edc432 100644 --- a/fixco_custom/views/shipment_group.xml +++ b/fixco_custom/views/shipment_group.xml @@ -74,6 +74,17 @@ </field> </record> + <record id="shipment_group_view_search" model="ir.ui.view"> + <field name="name">shipment.group.search.view</field> <!-- Made the name more descriptive --> + <field name="model">shipment.group</field> + <field name="arch" type="xml"> + <search string="Search Shipment Group"> + <field name="number"/> + <field name="receipt"/> + </search> + </field> + </record> + <record id="shipment_group_action" model="ir.actions.act_window"> <field name="name">Shipment Group</field> <field name="type">ir.actions.act_window</field> |
