summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models/stock_picking.py
diff options
context:
space:
mode:
Diffstat (limited to 'indoteknik_custom/models/stock_picking.py')
-rw-r--r--indoteknik_custom/models/stock_picking.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/indoteknik_custom/models/stock_picking.py b/indoteknik_custom/models/stock_picking.py
index 0e6137eb..19ac25d0 100644
--- a/indoteknik_custom/models/stock_picking.py
+++ b/indoteknik_custom/models/stock_picking.py
@@ -73,8 +73,22 @@ class StockPicking(models.Model):
waybill_id = fields.One2many(comodel_name='airway.bill', inverse_name='do_id', string='Airway Bill')
purchase_representative_id = fields.Many2one('res.users', related='move_lines.purchase_line_id.order_id.user_id',
string="Purchase Representative", readonly=True)
+<<<<<<< HEAD
carrier_id = fields.Many2one('delivery.carrier', string='Shipping Method')
+=======
+ shipping_status = fields.Char(string='Shipping Status', compute="_compute_shipping_status")
+
+ def _compute_shipping_status(self):
+ for rec in self:
+ status = 'pending'
+ if rec.driver_departure_date and not rec.driver_arrival_date:
+ status = 'shipment'
+ elif rec.driver_departure_date and rec.driver_arrival_date:
+ status = 'completed'
+
+ rec.shipping_status = status
+>>>>>>> feature/voucher-group
def action_create_invoice_from_mr(self):
"""Create the invoice associated to the PO.
@@ -397,6 +411,7 @@ class StockPicking(models.Model):
'receiver_city': ''
},
'delivered': False,
+ 'status': self.shipping_status,
'waybill_number': self.delivery_tracking_no or '',
'delivery_status': None,
'eta': self.generate_eta_delivery(),