summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiqdad <ahmadmiqdad27@gmail.com>2025-11-05 18:54:45 +0700
committerMiqdad <ahmadmiqdad27@gmail.com>2025-11-05 18:54:45 +0700
commit3ff3ddc67d4664871314462fb184a6fe369f3a63 (patch)
tree0a73b6bbb4df6089285326f246f40c55a19c5630
parent89fe1e885966d46b1e96829d3ecc1c009e0514b8 (diff)
<miqdad> disable show description for PO altama
-rwxr-xr-xindoteknik_custom/models/purchase_order.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/indoteknik_custom/models/purchase_order.py b/indoteknik_custom/models/purchase_order.py
index b9211276..8772dea9 100755
--- a/indoteknik_custom/models/purchase_order.py
+++ b/indoteknik_custom/models/purchase_order.py
@@ -118,17 +118,17 @@ class PurchaseOrder(models.Model):
show_description = fields.Boolean(
string='Show Description',
- compute='_compute_show_description'
+ compute='_compute_show_description',
+ default=True
)
- @api.depends('show_description')
+ @api.depends('partner_id')
def _compute_show_description(self):
for order in self:
- # Show desc false for altama only
- if order.partner_id == 5571:
+ if order.partner_id.id == 5571:
order.show_description = False
else:
- order.show_description = True
+ order.show_description = order.show_description
@api.onchange('show_description')
def onchange_show_description(self):