From ddaef3895870403548d032a892a3365de38c016c Mon Sep 17 00:00:00 2001 From: stephanchrst Date: Mon, 2 Jan 2023 15:31:46 +0700 Subject: add sales outstanding for monitoring outgoing qty, and add sales person, purchaser --- indoteknik_custom/models/purchase_outstanding.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indoteknik_custom/models/purchase_outstanding.py') diff --git a/indoteknik_custom/models/purchase_outstanding.py b/indoteknik_custom/models/purchase_outstanding.py index 0cdd9c39..018ab0ec 100644 --- a/indoteknik_custom/models/purchase_outstanding.py +++ b/indoteknik_custom/models/purchase_outstanding.py @@ -9,6 +9,7 @@ class PurchaseOutstanding(models.Model): id = fields.Integer() order_id = fields.Many2one('purchase.order', string='Nomor PO') partner_id = fields.Many2one('res.partner', String='Vendor') + user_id = fields.Many2one('res.users', string='Purchaser') date_order = fields.Datetime(string="Date Order") po_state = fields.Char(string='State') po_status = fields.Char(string='PO Status') @@ -20,7 +21,7 @@ class PurchaseOutstanding(models.Model): tools.drop_view_if_exists(self.env.cr, self._table) self.env.cr.execute(""" CREATE OR REPLACE VIEW %s AS( - select pol.id as id, po.id as order_id, po.partner_id, + select pol.id as id, po.id as order_id, po.partner_id, po.user_id, po.date_order, po.state as po_state, po.po_status, pol.product_id, pol.product_uom_qty, pol.qty_received from purchase_order_line pol -- cgit v1.2.3