summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models/purchasing_job.py
diff options
context:
space:
mode:
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):