From 1ea160934c67dd9e4ff2a160385f79cd5ad24946 Mon Sep 17 00:00:00 2001 From: Azka Nathan Date: Tue, 19 Sep 2023 13:23:57 +0700 Subject: add field email to so and sync email so with email partner_id, add field publish to product --- indoteknik_custom/models/sale_order.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indoteknik_custom/models/sale_order.py') diff --git a/indoteknik_custom/models/sale_order.py b/indoteknik_custom/models/sale_order.py index 8317e1fd..2d8d97bd 100755 --- a/indoteknik_custom/models/sale_order.py +++ b/indoteknik_custom/models/sale_order.py @@ -78,6 +78,7 @@ class SaleOrder(models.Model): amount_voucher_disc = fields.Float(string='Voucher Discount') source_id = fields.Many2one('utm.source', 'Source', domain="[('id', 'in', [32, 59, 60, 61])]") estimated_arrival_days = fields.Integer('Estimated Arrival Days', default=0) + email = fields.Char(string='Email') def _compute_purchase_total(self): for order in self: @@ -172,6 +173,7 @@ class SaleOrder(models.Model): self.npwp = parent_id.npwp self.sppkp = parent_id.sppkp self.customer_type = parent_id.customer_type + self.email = parent_id.email @api.onchange('partner_id') def onchange_partner_id(self): -- cgit v1.2.3