summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models/purchasing_job.py
diff options
context:
space:
mode:
authorMiqdad <ahmadmiqdad27@gmail.com>2025-07-18 00:02:17 +0700
committerMiqdad <ahmadmiqdad27@gmail.com>2025-07-18 00:02:17 +0700
commit08f599f8a96fb445bebc7ab2eaa53f1972caa563 (patch)
treea1bacf7e8bf48f73315368a518c967528c706e0c /indoteknik_custom/models/purchasing_job.py
parent2b55913a52b05f3f62786d7ae56070e96878178c (diff)
parentf3fc6d3d1a4c5ac0b287e3bb7e1163b99393c728 (diff)
Merge branch 'odoo-backup' of https://bitbucket.org/altafixco/indoteknik-addons into tukar_guling
merge
Diffstat (limited to 'indoteknik_custom/models/purchasing_job.py')
-rw-r--r--indoteknik_custom/models/purchasing_job.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/indoteknik_custom/models/purchasing_job.py b/indoteknik_custom/models/purchasing_job.py
index ea2f46cb..58f1c067 100644
--- a/indoteknik_custom/models/purchasing_job.py
+++ b/indoteknik_custom/models/purchasing_job.py
@@ -26,6 +26,7 @@ class PurchasingJob(models.Model):
purchase_representative_id = fields.Many2one('res.users', string="Purchase Representative", readonly=True)
note = fields.Char(string="Note Detail")
date_po = fields.Datetime(string='Date PO', copy=False)
+ so_number = fields.Char(string='SO Number', copy=False)
def unlink(self):
# Example: Delete related records from the underlying model
@@ -66,6 +67,7 @@ class PurchasingJob(models.Model):
max(pjs.status_apo::text) AS status_apo,
max(pjs.note::text) AS note,
max(pjs.date_po::text) AS date_po,
+ pmp.so_number,
CASE
WHEN pmp.brand IN ('Tekiro', 'RYU', 'Rexco', 'RYU (Sparepart)') THEN 27
WHEN sub.vendor_id = 9688 THEN 397
@@ -83,7 +85,7 @@ class PurchasingJob(models.Model):
group by vso.product_id
) sub ON sub.product_id = pmp.product_id
WHERE pmp.action = 'kurang'::text AND sub.vendor_id IS NOT NULL
- GROUP BY pmp.product_id, pmp.brand, pmp.item_code, pmp.product, pmp.action, sub.vendor_id;
+ GROUP BY pmp.product_id, pmp.brand, pmp.item_code, pmp.product, pmp.action, sub.vendor_id, pmp.so_number;
""" % self._table)
def open_form_multi_generate_request_po(self):