Merge lp:~dorian-kemps/unifield-server/US-9027 into lp:unifield-server

Proposed by jftempo
Status: Merged
Merged at revision: 6076
Proposed branch: lp:~dorian-kemps/unifield-server/US-9027
Merge into: lp:unifield-server
Diff against target: 34 lines (+16/-1)
1 file modified
bin/addons/sales_followup/report/ir_follow_up_location_report.py (+16/-1)
To merge this branch: bzr merge lp:~dorian-kemps/unifield-server/US-9027
Reviewer Review Type Date Requested Status
UniField Reviewer Team Pending
Review via email: mp+407697@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bin/addons/sales_followup/report/ir_follow_up_location_report.py'
2--- bin/addons/sales_followup/report/ir_follow_up_location_report.py 2021-06-29 10:22:06 +0000
3+++ bin/addons/sales_followup/report/ir_follow_up_location_report.py 2021-08-25 19:28:30 +0000
4@@ -339,6 +339,21 @@
5 for move in self.cr.fetchall():
6 received_qty += move[0]
7
8+ # Get the name of the linked INT
9+ int_name = False
10+ if not from_stock:
11+ self.cr.execute("""
12+ SELECT p.name FROM stock_move m
13+ LEFT JOIN stock_picking p ON m.picking_id = p.id
14+ LEFT JOIN purchase_order_line pl ON m.purchase_line_id = pl.id
15+ LEFT JOIN sale_order_line sl ON pl.linked_sol_id = sl.id
16+ WHERE m.state = 'done' AND p.type = 'internal' AND p.subtype = 'standard' AND sl.id = %s
17+ LIMIT 1
18+ """, (line.id,))
19+ int_info = self.cr.fetchone()
20+ if int_info:
21+ int_name = int_info[0]
22+
23 if first_line:
24 data = {
25 'state': line.state,
26@@ -353,7 +368,7 @@
27 'rts': line.order_id.state not in ('draft', 'validated', 'cancel') and line.order_id.ready_to_ship_date,
28 'delivered_qty': received_qty,
29 'delivered_uom': received_qty and line.product_uom.name or '-',
30- 'delivery_order': '-',
31+ 'delivery_order': int_name or '-',
32 'backordered_qty': line.order_id.state != 'cancel' and line.product_uom_qty - received_qty or 0.00,
33 'cdd': cdd,
34 }

Subscribers

People subscribed via source and target branches