summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAzka Nathan <darizkyfaz@gmail.com>2024-07-09 16:09:35 +0700
committerAzka Nathan <darizkyfaz@gmail.com>2024-07-09 16:09:35 +0700
commit591c0f5f424376df11bae6f52944d09627b129b4 (patch)
tree039da00f44d2c78e5ff9140eec32ab42b1d43a87
parenta8e8d2b14b4d039c5974250de96b84f6764d1bb6 (diff)
add related field from stock picking to sale order
-rwxr-xr-xindoteknik_custom/models/sale_order.py2
-rwxr-xr-xindoteknik_custom/views/sale_order.xml2
2 files changed, 4 insertions, 0 deletions
diff --git a/indoteknik_custom/models/sale_order.py b/indoteknik_custom/models/sale_order.py
index 4a40bccc..532e5b6c 100755
--- a/indoteknik_custom/models/sale_order.py
+++ b/indoteknik_custom/models/sale_order.py
@@ -101,6 +101,8 @@ class SaleOrder(models.Model):
], string='Web Approval', copy=False)
compute_fullfillment = fields.Boolean(string='Compute Fullfillment', compute="_compute_fullfillment")
note_ekspedisi = fields.Char(string="Note Ekspedisi")
+ date_kirim_ril = fields.Datetime(string='Tanggal Kirim di SJ', related='picking_ids.date_doc_kirim', copy=False)
+ date_driver_departure = fields.Datetime(string='Tanggal Kirim di SJ', related='picking_ids.driver_arrival_date', copy=False)
def open_form_multi_create_uang_muka(self):
action = self.env['ir.actions.act_window']._for_xml_id('indoteknik_custom.action_sale_order_multi_uangmuka')
diff --git a/indoteknik_custom/views/sale_order.xml b/indoteknik_custom/views/sale_order.xml
index ead6bc5c..283c1c24 100755
--- a/indoteknik_custom/views/sale_order.xml
+++ b/indoteknik_custom/views/sale_order.xml
@@ -223,6 +223,8 @@
<field name="client_order_ref"/>
<field name="so_status"/>
<field name="date_doc_kirim" string="Tgl Kirim"/>
+ <field name="date_kirim_ril" string="Tgl Kirim Real"/>
+ <field name="date_driver_departure" string="Arrival Date"/>
<field name="payment_type" optional="hide"/>
<field name="payment_status" optional="hide"/>
</field>