summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models/purchasing_job.py
diff options
context:
space:
mode:
authorIT Fixcomart <it@fixcomart.co.id>2024-06-05 02:29:48 +0000
committerIT Fixcomart <it@fixcomart.co.id>2024-06-05 02:29:48 +0000
commitec4aefc64a9f42d1b40d03048fc384e158191218 (patch)
tree14d1fd1358ae41d65b9412fdfc0195c8dd9f20bd /indoteknik_custom/models/purchasing_job.py
parentabd7dd1ecc9246b1924dcf70b3ed41c964f3746f (diff)
parent9306992db370c793e8cab494038b0de5b61b600f (diff)
Merged in production (pull request #144)
Production
Diffstat (limited to 'indoteknik_custom/models/purchasing_job.py')
-rw-r--r--indoteknik_custom/models/purchasing_job.py15
1 files changed, 12 insertions, 3 deletions
diff --git a/indoteknik_custom/models/purchasing_job.py b/indoteknik_custom/models/purchasing_job.py
index 86f8afcc..373e469a 100644
--- a/indoteknik_custom/models/purchasing_job.py
+++ b/indoteknik_custom/models/purchasing_job.py
@@ -188,9 +188,18 @@ class OutstandingSales(models.Model):
tools.drop_view_if_exists(self.env.cr, self._table)
self.env.cr.execute("""
CREATE OR REPLACE VIEW v_sales_outstanding AS (
- select sm.id, sm.id as move_id, sp.id as picking_id, sm.product_id, so.id as sale_id,
- sol.id as sale_line_id, rp.id as partner_id, so.user_id as salesperson_id, so.partner_invoice_id,
- sp.origin, rp2.name as salesperson, coalesce(pp.default_code, pt.default_code) as item_code, pt.name as product,
+ select sm.id,
+ sm.id as move_id,
+ sp.id as picking_id,
+ sm.product_id,
+ so.id as sale_id,
+ sol.id as sale_line_id,
+ rp.id as partner_id,
+ so.user_id as salesperson_id,
+ so.partner_invoice_id,
+ sp.origin,
+ rp2.name as salesperson,
+ coalesce(pp.default_code, pt.default_code) as item_code, pt.name as product,
sm.product_uom_qty as outgoing, xm.x_name as brand, rp.name as invoice_partner
from stock_move sm
join stock_picking sp on sp.id = sm.picking_id