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