diff options
| author | Miqdad <ahmadmiqdad27@gmail.com> | 2025-11-05 18:54:45 +0700 |
|---|---|---|
| committer | Miqdad <ahmadmiqdad27@gmail.com> | 2025-11-05 18:54:45 +0700 |
| commit | 3ff3ddc67d4664871314462fb184a6fe369f3a63 (patch) | |
| tree | 0a73b6bbb4df6089285326f246f40c55a19c5630 | |
| parent | 89fe1e885966d46b1e96829d3ecc1c009e0514b8 (diff) | |
<miqdad> disable show description for PO altama
| -rwxr-xr-x | indoteknik_custom/models/purchase_order.py | 10 |
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): |
