From afc15102bd80275566c847948c411abfd2faab50 Mon Sep 17 00:00:00 2001 From: Azka Nathan Date: Thu, 22 Aug 2024 13:49:41 +0700 Subject: add partner_id on approval date doc --- indoteknik_custom/models/approval_date_doc.py | 1 + indoteknik_custom/views/approval_date_doc.xml | 2 ++ 2 files changed, 3 insertions(+) diff --git a/indoteknik_custom/models/approval_date_doc.py b/indoteknik_custom/models/approval_date_doc.py index e00b7416..efd4ffed 100644 --- a/indoteknik_custom/models/approval_date_doc.py +++ b/indoteknik_custom/models/approval_date_doc.py @@ -20,6 +20,7 @@ class ApprovalDateDoc(models.Model): approve_date = fields.Datetime(string='Approve Date', copy=False) approve_by = fields.Many2one('res.users', string='Approve By', copy=False) sale_id = fields.Many2one('sale.order', string='Sale Order') + partner_id = fields.Many2one('res.partner', string='Partner', related='picking_id.partner_id') @api.onchange('picking_id') def onchange_picking_id(self): diff --git a/indoteknik_custom/views/approval_date_doc.xml b/indoteknik_custom/views/approval_date_doc.xml index ff375f14..58bf38d8 100644 --- a/indoteknik_custom/views/approval_date_doc.xml +++ b/indoteknik_custom/views/approval_date_doc.xml @@ -7,6 +7,7 @@ + @@ -34,6 +35,7 @@ + -- cgit v1.2.3