diff options
Diffstat (limited to 'indoteknik_custom/models/procurement_monitoring_detail.py')
| -rw-r--r-- | indoteknik_custom/models/procurement_monitoring_detail.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/indoteknik_custom/models/procurement_monitoring_detail.py b/indoteknik_custom/models/procurement_monitoring_detail.py index 6031e04a..80e71304 100644 --- a/indoteknik_custom/models/procurement_monitoring_detail.py +++ b/indoteknik_custom/models/procurement_monitoring_detail.py @@ -22,6 +22,7 @@ class SaleMonitoringDetail(models.Model): date_order = fields.Datetime(string="Date Order") status = fields.Char(string="Status") po_ids = fields.Many2many('purchase.order', string='PO', compute='_compute_po') + note = fields.Char(string="Note") def _compute_po(self): for line in self: @@ -58,7 +59,8 @@ class SaleMonitoringDetail(models.Model): get_qty_available(sol.product_id) as qty_available, get_qty_reserved(so.id, sol.product_id) as qty_reserved, get_qty_po(so.id, sol.product_id) AS qty_po, - so.date_order AS date_order + so.date_order AS date_order, + sol.note_procurement as note FROM sale_order so JOIN sale_order_line sol ON sol.order_id = so.id JOIN product_product p ON p.id = sol.product_id @@ -66,7 +68,7 @@ class SaleMonitoringDetail(models.Model): WHERE pt.type IN ('consu','product') AND so.state IN ('sale','done') AND so.create_date >= '2022-08-10' - and so.so_status not in ('terproses') + and so.so_status not in('terproses') ) a --where a.qty_po < a.qty_so ) |
