summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiqdad <ahmadmiqdad27@gmail.com>2025-11-06 15:18:47 +0700
committerMiqdad <ahmadmiqdad27@gmail.com>2025-11-06 15:18:47 +0700
commit2a7a5feac007f8b8e3c4a02754bd163c833fdc28 (patch)
treed058f1df7c98062dfea6ed29d5272f87b359ed42
parentaad9e13e0a1908dc8d14d86dfc67bdf9f8e006e7 (diff)
parentee9706c1f34c88ca2cfc32dbe7a90c38731166b1 (diff)
Merge branch 'odoo-backup' of https://bitbucket.org/altafixco/indoteknik-addons into cr_delivery_sj
merge
-rw-r--r--indoteknik_custom/models/automatic_purchase.py3
-rwxr-xr-xindoteknik_custom/models/purchase_order.py8
2 files changed, 2 insertions, 9 deletions
diff --git a/indoteknik_custom/models/automatic_purchase.py b/indoteknik_custom/models/automatic_purchase.py
index d9ec17f4..ce0328c4 100644
--- a/indoteknik_custom/models/automatic_purchase.py
+++ b/indoteknik_custom/models/automatic_purchase.py
@@ -239,7 +239,8 @@ class AutomaticPurchase(models.Model):
'picking_type_id': 28,
'date_order': current_time,
'from_apo': True,
- 'note_description': 'Automatic PO'
+ 'note_description': 'Automatic PO',
+ 'show_description': False if vendor_id == 5571 else True,
}
new_po = self.env['purchase.order'].create(param_header)
diff --git a/indoteknik_custom/models/purchase_order.py b/indoteknik_custom/models/purchase_order.py
index 8772dea9..4475e777 100755
--- a/indoteknik_custom/models/purchase_order.py
+++ b/indoteknik_custom/models/purchase_order.py
@@ -118,17 +118,9 @@ 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):