From 40b0e30d359c917b6b22f6fb385a23026a7393bd Mon Sep 17 00:00:00 2001 From: it-fixcomart Date: Thu, 16 Jan 2025 14:41:54 +0700 Subject: update code deskripsi read only efek ke note --- indoteknik_custom/models/sale_order_line.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/indoteknik_custom/models/sale_order_line.py b/indoteknik_custom/models/sale_order_line.py index 29a046fa..aed95aab 100644 --- a/indoteknik_custom/models/sale_order_line.py +++ b/indoteknik_custom/models/sale_order_line.py @@ -38,11 +38,11 @@ class SaleOrderLine(models.Model): md_vendor_id = fields.Many2one('res.partner', string='MD Vendor', readonly=True) margin_md = fields.Float(string='Margin MD') qty_free_bu = fields.Float(string='Free BU', compute='_get_qty_free_bandengan') - desc_updatable = fields.Boolean(string='desc boolean', default=False, compute='_get_desc_updatable') + desc_updatable = fields.Boolean(string='desc boolean', default=True, compute='_get_desc_updatable') def _get_desc_updatable(self): for line in self: - if line.product_id.id != 417724: + if line.product_id.id != 417724 and line.product_id.id: line.desc_updatable = False else: line.desc_updatable = True @@ -280,7 +280,7 @@ class SaleOrderLine(models.Model): (line.product_id.short_spesification if line.product_id.short_spesification else '') line.name = line_name line.weight = line.product_id.weight - if line.product_id.id != 417724: + if line.product_id.id != 417724 and line.product_id.id: line.desc_updatable = False else: line.desc_updatable = True -- cgit v1.2.3