diff options
| author | stephanchrst <stephanchrst@gmail.com> | 2022-09-16 10:28:29 +0700 |
|---|---|---|
| committer | stephanchrst <stephanchrst@gmail.com> | 2022-09-16 10:28:29 +0700 |
| commit | a2d3744ee28f5b87a76f9630ab96516feed3baad (patch) | |
| tree | cb06159218634c1a272a4304ab8e04e2bfafcbb1 | |
| parent | f116ba8966efbcc50accac2939a4bd7b53d00578 (diff) | |
add po number into sale monitoring
| -rwxr-xr-x | indoteknik_custom/models/sale_monitoring.py | 4 | ||||
| -rwxr-xr-x | indoteknik_custom/views/sale_monitoring.xml | 1 |
2 files changed, 4 insertions, 1 deletions
diff --git a/indoteknik_custom/models/sale_monitoring.py b/indoteknik_custom/models/sale_monitoring.py index 97e96e72..2ef23f39 100755 --- a/indoteknik_custom/models/sale_monitoring.py +++ b/indoteknik_custom/models/sale_monitoring.py @@ -17,6 +17,7 @@ class SaleMonitoring(models.Model): qty_so_invoiced = fields.Integer(string="Qty SO Invoiced") date_order = fields.Datetime(string="Date Order") status = fields.Char(string="Status") + po_number = fields.Char(string="PO Number") def init(self): tools.drop_view_if_exists(self.env.cr, self._table) @@ -41,7 +42,8 @@ class SaleMonitoring(models.Model): WHEN SUM(qty_so_delivered) <> SUM(qty_so) AND SUM(qty_so_delivered) <= 0 THEN 'SIAP KIRIM' WHEN SUM(qty_so_delivered) <> SUM(qty_so) THEN 'KIRIM SISANYA' ELSE 'Belum Invoiced' - END AS status + END AS status, + get_po_number(smd.sale_order_id) as po_number FROM sale_monitoring_detail smd GROUP BY smd.date_order, smd.sale_order_id, smd.partner_id, smd.user_id ) diff --git a/indoteknik_custom/views/sale_monitoring.xml b/indoteknik_custom/views/sale_monitoring.xml index e4139677..025e5d26 100755 --- a/indoteknik_custom/views/sale_monitoring.xml +++ b/indoteknik_custom/views/sale_monitoring.xml @@ -43,6 +43,7 @@ decoration-success="status == 'SIAP KIRIM' or status == 'KIRIM SISANYA'" decoration-info="status == 'Belum Invoiced'" /> + <field name="po_number"/> </group> <group> <field name="qty_so"/> |
