diff options
| author | Miqdad <ahmadmiqdad27@gmail.com> | 2025-11-03 09:00:23 +0700 |
|---|---|---|
| committer | Miqdad <ahmadmiqdad27@gmail.com> | 2025-11-03 09:00:23 +0700 |
| commit | d636c09592c484fddd436e6881c5052fd06c028a (patch) | |
| tree | a737c27e2b3d826ec703c302deae0034be1e2244 | |
| parent | 3c552beb2a8bbe51fecff96d3221a4ee1dedbe8f (diff) | |
<Miqdad> add so num in transfer
| -rw-r--r-- | indoteknik_custom/models/stock_picking.py | 8 | ||||
| -rw-r--r-- | indoteknik_custom/views/stock_picking.xml | 1 |
2 files changed, 9 insertions, 0 deletions
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]] }" /> + <field name="so_num"/> </field> <field name="group_id" position="before"> <field name="date_reserved"/> |
