From 5614f5f0fa0322089f17feeeeeb56af93bf76670 Mon Sep 17 00:00:00 2001 From: Azka Nathan Date: Thu, 5 Oct 2023 11:08:16 +0700 Subject: mandatory email --- indoteknik_custom/models/sale_order.py | 8 +++++--- indoteknik_custom/views/sale_order.xml | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'indoteknik_custom') diff --git a/indoteknik_custom/models/sale_order.py b/indoteknik_custom/models/sale_order.py index e201496a..93c63d56 100755 --- a/indoteknik_custom/models/sale_order.py +++ b/indoteknik_custom/models/sale_order.py @@ -392,9 +392,11 @@ class SaleOrder(models.Model): def _set_sppkp_npwp_contact(self): partner = self.partner_id.parent_id or self.partner_id - partner.customer_type = self.customer_type - partner.npwp = self.npwp - partner.sppkp = self.sppkp + if not partner.sppkp or not partner.npwp or not partner.email or partner.customer_type: + partner.customer_type = self.customer_type + partner.npwp = self.npwp + partner.sppkp = self.sppkp + partner.email = self.email def _compute_total_margin(self): for order in self: diff --git a/indoteknik_custom/views/sale_order.xml b/indoteknik_custom/views/sale_order.xml index 0d972ec1..e0e9ac54 100755 --- a/indoteknik_custom/views/sale_order.xml +++ b/indoteknik_custom/views/sale_order.xml @@ -48,7 +48,7 @@ - + -- cgit v1.2.3 From c6c1e26d35327b61a88b247ef94cfff9257b492a Mon Sep 17 00:00:00 2001 From: Rafi Zadanly Date: Thu, 5 Oct 2023 16:48:43 +0700 Subject: Add computed_price field on product pricelist --- indoteknik_custom/models/product_pricelist.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'indoteknik_custom') diff --git a/indoteknik_custom/models/product_pricelist.py b/indoteknik_custom/models/product_pricelist.py index 026977f8..144b8689 100644 --- a/indoteknik_custom/models/product_pricelist.py +++ b/indoteknik_custom/models/product_pricelist.py @@ -40,5 +40,4 @@ class ProductPricelistItem(models.Model): _inherit = 'product.pricelist.item' manufacture_id = fields.Many2one('x_manufactures', string='Manufacture') - - \ No newline at end of file + computed_price = fields.Float(string='Computed Price') \ No newline at end of file -- cgit v1.2.3