From 8eaffe2f3590e52b90835fada67460e119032dee Mon Sep 17 00:00:00 2001 From: Azka Nathan Date: Tue, 13 Aug 2024 14:08:54 +0700 Subject: approval date doc --- indoteknik_custom/models/stock_picking.py | 11 ++++++++++- indoteknik_custom/views/stock_picking.xml | 5 +++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/indoteknik_custom/models/stock_picking.py b/indoteknik_custom/models/stock_picking.py index c151a543..47ac3166 100644 --- a/indoteknik_custom/models/stock_picking.py +++ b/indoteknik_custom/models/stock_picking.py @@ -26,7 +26,6 @@ class StockPicking(models.Model): # Delivery Order driver_departure_date = fields.Datetime( string='Driver Departure Date', - readonly=True, copy=False ) driver_arrival_date = fields.Datetime( @@ -91,6 +90,16 @@ class StockPicking(models.Model): date_availability = fields.Datetime(string="Date Availability", copy=False, tracking=True) sale_order = fields.Char(string='Matches SO', copy=False) printed_sj = fields.Boolean('Printed Surat Jalan', help='flag which is internal use or not') + invoice_status = fields.Selection([ + ('upselling', 'Upselling Opportunity'), + ('invoiced', 'Fully Invoiced'), + ('to invoice', 'To Invoice'), + ('no', 'Nothing to Invoice') + ], string='Invoice Status', related="sale_id.invoice_status") + + @api.constrains('driver_departure_date') + def constrains_driver_departure_date(self): + self.date_doc_kirim = self.driver_departure_date def reset_status_printed(self): for rec in self: diff --git a/indoteknik_custom/views/stock_picking.xml b/indoteknik_custom/views/stock_picking.xml index 7567dda2..a58f3003 100644 --- a/indoteknik_custom/views/stock_picking.xml +++ b/indoteknik_custom/views/stock_picking.xml @@ -71,7 +71,8 @@ - + + - + -- cgit v1.2.3