diff options
| -rwxr-xr-x | indoteknik_custom/models/sale_order.py | 9 | ||||
| -rwxr-xr-x | indoteknik_custom/views/sale_order.xml | 1 |
2 files changed, 10 insertions, 0 deletions
diff --git a/indoteknik_custom/models/sale_order.py b/indoteknik_custom/models/sale_order.py index 48195b77..98468c4b 100755 --- a/indoteknik_custom/models/sale_order.py +++ b/indoteknik_custom/models/sale_order.py @@ -144,6 +144,15 @@ class SaleOrder(models.Model): ('PNR', 'Pareto Non Repeating'), ('NP', 'Non Pareto') ]) + shipping_method_picking = fields.Char(string='Shipping Method Picking', compute='_compute_shipping_method_picking') + + def _compute_shipping_method_picking(self): + for order in self: + if order.picking_ids: + carrier_names = order.picking_ids.mapped('carrier_id.name') + order.shipping_method_picking = ', '.join(filter(None, carrier_names)) + else: + order.shipping_method_picking = False @api.onchange('payment_status') def _is_continue_transaction(self): diff --git a/indoteknik_custom/views/sale_order.xml b/indoteknik_custom/views/sale_order.xml index 6a80d586..2a46901a 100755 --- a/indoteknik_custom/views/sale_order.xml +++ b/indoteknik_custom/views/sale_order.xml @@ -296,6 +296,7 @@ <field name="payment_type" optional="hide"/> <field name="payment_status" optional="hide"/> <field name="pareto_status" optional="hide"/> + <field name="shipping_method_picking" optional="hide"/> </field> </field> </record> |
