diff options
| author | IT Fixcomart <it@fixcomart.co.id> | 2025-11-06 03:47:33 +0000 |
|---|---|---|
| committer | IT Fixcomart <it@fixcomart.co.id> | 2025-11-06 03:47:33 +0000 |
| commit | c37c06f2fa054e225a11972a0afbaf178f0ea8d0 (patch) | |
| tree | 069cc517bd5f029336e6e62b962f3582049c2254 | |
| parent | be3c90b805dec1e178aa8cd70c187c79e3dd8443 (diff) | |
| parent | 3ff3ddc67d4664871314462fb184a6fe369f3a63 (diff) | |
Merged in disable_desc_po_altama (pull request #457)
Disable desc po altama
| -rwxr-xr-x | indoteknik_custom/models/purchase_order.py | 11 |
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: |
