From d636c09592c484fddd436e6881c5052fd06c028a Mon Sep 17 00:00:00 2001 From: Miqdad Date: Mon, 3 Nov 2025 09:00:23 +0700 Subject: add so num in transfer --- indoteknik_custom/models/stock_picking.py | 8 ++++++++ indoteknik_custom/views/stock_picking.xml | 1 + 2 files changed, 9 insertions(+) diff --git a/indoteknik_custom/models/stock_picking.py b/indoteknik_custom/models/stock_picking.py index 273fda82..c17fdbd5 100644 --- a/indoteknik_custom/models/stock_picking.py +++ b/indoteknik_custom/models/stock_picking.py @@ -198,6 +198,14 @@ class StockPicking(models.Model): ('partial_final', 'Partial Final'), ('full', 'Full'), ], string='Delivery Status', compute='_compute_delivery_status_detail', store=False) + so_num = fields.Char('SO Number', compute='_get_so_num') + + @api.depends('group_id') + def _get_so_num(self): + for record in self: + record.so_num = record.group_id.name + + @api.depends('move_line_ids_without_package.qty_done', 'move_line_ids_without_package.product_uom_qty', 'state') def _compute_delivery_status_detail(self): diff --git a/indoteknik_custom/views/stock_picking.xml b/indoteknik_custom/views/stock_picking.xml index 78594375..cc9469cb 100644 --- a/indoteknik_custom/views/stock_picking.xml +++ b/indoteknik_custom/views/stock_picking.xml @@ -180,6 +180,7 @@ 'required': [['is_internal_use', '=', True]] }" /> + -- cgit v1.2.3