Merge lp:~unifield-team/unifield-server/us-1552 into lp:unifield-server

Proposed by jftempo
Status: Merged
Merged at revision: 4214
Proposed branch: lp:~unifield-team/unifield-server/us-1552
Merge into: lp:unifield-server
Diff against target: 53 lines (+9/-7)
1 file modified
bin/addons/msf_supply_doc_export/msf_supply_doc_export.py (+9/-7)
To merge this branch: bzr merge lp:~unifield-team/unifield-server/us-1552
Reviewer Review Type Date Requested Status
UniField Reviewer Team Pending
Review via email: mp+317103@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
=== modified file 'bin/addons/msf_supply_doc_export/msf_supply_doc_export.py'
--- bin/addons/msf_supply_doc_export/msf_supply_doc_export.py 2016-11-09 08:28:09 +0000
+++ bin/addons/msf_supply_doc_export/msf_supply_doc_export.py 2017-02-13 13:49:10 +0000
@@ -490,7 +490,7 @@
490 report_lines.extend(self.printAnalyticLines(analytic_lines))490 report_lines.extend(self.printAnalyticLines(analytic_lines))
491 first_line = False491 first_line = False
492492
493 for spsul in same_product_same_uom:493 for spsul in sorted(same_product_same_uom, key=lambda spsu: spsu.get('backorder_id'), reverse=True):
494 report_line = {494 report_line = {
495 'order_ref': order.name or '',495 'order_ref': order.name or '',
496 'order_created': order.date_order or '',496 'order_created': order.date_order or '',
@@ -511,14 +511,15 @@
511 }511 }
512512
513 report_lines.append(report_line)513 report_lines.append(report_line)
514
515 if spsul.get('backorder_id') and spsul.get('state') != 'done':
516 report_line['qty_backordered'] = spsul.get('product_qty', '')
514517
515 if first_line:518 if first_line:
516 if spsul.get('backorder_id') and spsul.get('state') != 'done':
517 report_line['qty_backordered'] = spsul.get('product_qty', '')
518 report_lines.extend(self.printAnalyticLines(analytic_lines))519 report_lines.extend(self.printAnalyticLines(analytic_lines))
519 first_line = False520 first_line = False
520521
521 for spl in same_product:522 for spl in sorted(same_product, key=lambda spsu: spsu.get('backorder_id'), reverse=True):
522 report_line = {523 report_line = {
523 'order_ref': order.name or '',524 'order_ref': order.name or '',
524 'order_created': order.date_order or '',525 'order_created': order.date_order or '',
@@ -538,10 +539,11 @@
538 'in_unit_price': spl.get('price_unit'),539 'in_unit_price': spl.get('price_unit'),
539 }540 }
540 report_lines.append(report_line)541 report_lines.append(report_line)
542
543 if spl.get('backorder_id') and spl.get('state') != 'done':
544 report_line['qty_backordered'] = spl.get('product_qty', '')
541545
542 if first_line:546 if first_line:
543 if spl.get('backorder_id') and spl.get('state') != 'done':
544 report_line['qty_backordered'] = spl.get('product_qty', '')
545 report_lines.extend(self.printAnalyticLines(analytic_lines))547 report_lines.extend(self.printAnalyticLines(analytic_lines))
546 first_line = False548 first_line = False
547549
@@ -597,7 +599,7 @@
597 AND599 AND
598 sm.picking_id = sp.id600 sm.picking_id = sp.id
599 ORDER BY601 ORDER BY
600 sp.name, sm.id asc''', tuple([po_line_id]))602 sp.name, sp.backorder_id, sm.id asc''', tuple([po_line_id]))
601 for res in self.cr.dictfetchall():603 for res in self.cr.dictfetchall():
602 yield res604 yield res
603605

Subscribers

People subscribed via source and target branches

to all changes: