summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIT Fixcomart <it@fixcomart.co.id>2025-11-06 03:47:33 +0000
committerIT Fixcomart <it@fixcomart.co.id>2025-11-06 03:47:33 +0000
commitc37c06f2fa054e225a11972a0afbaf178f0ea8d0 (patch)
tree069cc517bd5f029336e6e62b962f3582049c2254
parentbe3c90b805dec1e178aa8cd70c187c79e3dd8443 (diff)
parent3ff3ddc67d4664871314462fb184a6fe369f3a63 (diff)
Merged in disable_desc_po_altama (pull request #457)
Disable desc po altama
-rwxr-xr-xindoteknik_custom/models/purchase_order.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/indoteknik_custom/models/purchase_order.py b/indoteknik_custom/models/purchase_order.py
index c2b15078..8772dea9 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',
+ 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):
if self.show_description == True: