From dd51ce73e27cd7639b512a219e7bc68bb467b4d3 Mon Sep 17 00:00:00 2001 From: Miqdad Date: Thu, 6 Nov 2025 15:04:05 +0700 Subject: show desc false altama --- indoteknik_custom/models/automatic_purchase.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/indoteknik_custom/models/automatic_purchase.py b/indoteknik_custom/models/automatic_purchase.py index d9ec17f4..012d680a 100644 --- a/indoteknik_custom/models/automatic_purchase.py +++ b/indoteknik_custom/models/automatic_purchase.py @@ -239,7 +239,8 @@ class AutomaticPurchase(models.Model): 'picking_type_id': 28, 'date_order': current_time, 'from_apo': True, - 'note_description': 'Automatic PO' + 'note_description': 'Automatic PO', + 'show_description': False if vendor_id.id == 5571 else True, } new_po = self.env['purchase.order'].create(param_header) -- cgit v1.2.3 From 449a3f3a3acaeb0b950f57daee1067d70d483d90 Mon Sep 17 00:00:00 2001 From: Miqdad Date: Thu, 6 Nov 2025 15:04:16 +0700 Subject: show desc false altama --- indoteknik_custom/models/purchase_order.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/indoteknik_custom/models/purchase_order.py b/indoteknik_custom/models/purchase_order.py index 8772dea9..4475e777 100755 --- a/indoteknik_custom/models/purchase_order.py +++ b/indoteknik_custom/models/purchase_order.py @@ -118,17 +118,9 @@ class PurchaseOrder(models.Model): show_description = fields.Boolean( string='Show Description', - compute='_compute_show_description', default=True ) - @api.depends('partner_id') - def _compute_show_description(self): - for order in self: - if order.partner_id.id == 5571: - order.show_description = False - else: - order.show_description = order.show_description @api.onchange('show_description') def onchange_show_description(self): -- cgit v1.2.3 From ee9706c1f34c88ca2cfc32dbe7a90c38731166b1 Mon Sep 17 00:00:00 2001 From: Miqdad Date: Thu, 6 Nov 2025 15:12:45 +0700 Subject: show desc false altama --- indoteknik_custom/models/automatic_purchase.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indoteknik_custom/models/automatic_purchase.py b/indoteknik_custom/models/automatic_purchase.py index 012d680a..ce0328c4 100644 --- a/indoteknik_custom/models/automatic_purchase.py +++ b/indoteknik_custom/models/automatic_purchase.py @@ -240,7 +240,7 @@ class AutomaticPurchase(models.Model): 'date_order': current_time, 'from_apo': True, 'note_description': 'Automatic PO', - 'show_description': False if vendor_id.id == 5571 else True, + 'show_description': False if vendor_id == 5571 else True, } new_po = self.env['purchase.order'].create(param_header) -- cgit v1.2.3