Merge lp:~unifield-team/unifield-wm/us-34 into lp:unifield-wm

Proposed by jftempo
Status: Merged
Merged at revision: 2416
Proposed branch: lp:~unifield-team/unifield-wm/us-34
Merge into: lp:unifield-wm
Diff against target: 146 lines (+33/-14)
2 files modified
msf_supply_doc_export/msf_supply_doc_export.py (+19/-4)
msf_supply_doc_export/report/report_po_follow_up_xls.mako (+14/-10)
To merge this branch: bzr merge lp:~unifield-team/unifield-wm/us-34
Reviewer Review Type Date Requested Status
UniField Reviewer Team Pending
Review via email: mp+252718@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 'msf_supply_doc_export/msf_supply_doc_export.py'
--- msf_supply_doc_export/msf_supply_doc_export.py 2014-11-14 10:45:42 +0000
+++ msf_supply_doc_export/msf_supply_doc_export.py 2015-03-12 10:46:41 +0000
@@ -383,9 +383,6 @@
383 def getRunParmsRML(self,key):383 def getRunParmsRML(self,key):
384 return self.datas['report_parms'][key]384 return self.datas['report_parms'][key]
385385
386 def getPOLineHeaders(self):
387 return ['Item','Code','Description','Qty ordered','UoM','Qty received','IN','Qty backorder','Unit Price','IN unit price','Destination','Cost Center']
388
389 def printAnalyticLines(self, analytic_lines):386 def printAnalyticLines(self, analytic_lines):
390 res = []387 res = []
391 # if additional analytic lines print them here.388 # if additional analytic lines print them here.
@@ -412,12 +409,14 @@
412 # TODO the multiplier is the value populated for no change in stock_move.price_unit409 # TODO the multiplier is the value populated for no change in stock_move.price_unit
413 # TODO it probably should be 1410 # TODO it probably should be 1
414 multiplier = 1.0000100000000001 411 multiplier = 1.0000100000000001
412 po_obj = self.pool.get('purchase.order')
415 pol_obj = self.pool.get('purchase.order.line')413 pol_obj = self.pool.get('purchase.order.line')
416 prod_obj = self.pool.get('product.product')414 prod_obj = self.pool.get('product.product')
417 uom_obj = self.pool.get('product.uom')415 uom_obj = self.pool.get('product.uom')
418 po_line_ids = pol_obj.search(self.cr, self.uid, [('order_id','=',po_id)], order='line_number')416 po_line_ids = pol_obj.search(self.cr, self.uid, [('order_id','=',po_id)], order='line_number')
419 po_lines = pol_obj.browse(self.cr, self.uid, po_line_ids)417 po_lines = pol_obj.browse(self.cr, self.uid, po_line_ids)
420 report_lines = []418 report_lines = []
419 order = po_obj.browse(self.cr, self.uid, po_id)
421 for line in po_lines:420 for line in po_lines:
422 in_lines = self.getAllLineIN(line.id)421 in_lines = self.getAllLineIN(line.id)
423 analytic_lines = self.getAnalyticLines(line)422 analytic_lines = self.getAnalyticLines(line)
@@ -438,6 +437,10 @@
438 # Display information of the initial reception437 # Display information of the initial reception
439 if not same_product_same_uom:438 if not same_product_same_uom:
440 report_line = {439 report_line = {
440 'order_ref': order.name or '',
441 'order_created': order.date_order or '',
442 'order_confirmed_date': order.delivery_confirmed_date or '',
443 'order_status': self._get_states().get(order.state, ''),
441 'item': line.line_number or '',444 'item': line.line_number or '',
442 'code': line.product_id.default_code or '',445 'code': line.product_id.default_code or '',
443 'description': line.product_id.name or '',446 'description': line.product_id.name or '',
@@ -457,6 +460,10 @@
457460
458 for spsul in same_product_same_uom:461 for spsul in same_product_same_uom:
459 report_line = {462 report_line = {
463 'order_ref': order.name or '',
464 'order_created': order.date_order or '',
465 'order_confirmed_date': order.delivery_confirmed_date or '',
466 'order_status': self._get_states().get(order.state, ''),
460 'item': first_line and line.line_number or '',467 'item': first_line and line.line_number or '',
461 'code': first_line and line.product_id.default_code or '',468 'code': first_line and line.product_id.default_code or '',
462 'description': first_line and line.product_id.name or '',469 'description': first_line and line.product_id.name or '',
@@ -481,6 +488,10 @@
481488
482 for spl in same_product:489 for spl in same_product:
483 report_line = {490 report_line = {
491 'order_ref': order.name or '',
492 'order_created': order.date_order or '',
493 'order_confirmed_date': order.delivery_confirmed_date or '',
494 'order_status': self._get_states().get(order.state, ''),
484 'item': first_line and line.line_number or '',495 'item': first_line and line.line_number or '',
485 'code': first_line and line.product_id.default_code or '',496 'code': first_line and line.product_id.default_code or '',
486 'description': first_line and line.product_id.name or '',497 'description': first_line and line.product_id.name or '',
@@ -505,6 +516,10 @@
505 for ol in other_product:516 for ol in other_product:
506 prod_brw = prod_obj.browse(self.cr, self.uid, ol.get('product_id'))517 prod_brw = prod_obj.browse(self.cr, self.uid, ol.get('product_id'))
507 report_line = {518 report_line = {
519 'order_ref': order.name or '',
520 'order_created': order.date_order or '',
521 'order_confirmed_date': order.delivery_confirmed_date or '',
522 'order_status': self._get_states().get(order.state, ''),
508 'item': line.line_number or '',523 'item': line.line_number or '',
509 'code': prod_brw.default_code or '',524 'code': prod_brw.default_code or '',
510 'description': prod_brw.name or '',525 'description': prod_brw.name or '',
@@ -560,7 +575,7 @@
560 return self.datas.get('report_header')[1]575 return self.datas.get('report_header')[1]
561576
562 def getPOLineHeaders(self):577 def getPOLineHeaders(self):
563 return ['Item','Code','Description','Qty ordered','UoM','Qty received','IN','Qty backorder','Unit Price','IN unit price','Destination','Cost Center']578 return ['Order Ref', 'Item','Code','Description','Qty ordered','UoM','Qty received','IN','Qty backorder','Unit Price','IN unit price', 'Created', 'Confirmed Delivery', 'Status', 'Destination','Cost Center']
564 579
565580
566581
567582
=== modified file 'msf_supply_doc_export/report/report_po_follow_up_xls.mako'
--- msf_supply_doc_export/report/report_po_follow_up_xls.mako 2014-11-07 10:52:52 +0000
+++ msf_supply_doc_export/report/report_po_follow_up_xls.mako 2015-03-12 10:46:41 +0000
@@ -81,6 +81,8 @@
81## definition of the columns' size81## definition of the columns' size
82<% nb_of_columns = 12 %>82<% nb_of_columns = 12 %>
83<Table x:FullColumns="1" x:FullRows="1">83<Table x:FullColumns="1" x:FullRows="1">
84 # Order name
85 <Column ss:AutoFitWidth="1" ss:Width="65" />
84 # Item86 # Item
85 <Column ss:AutoFitWidth="1" ss:Width="40" />87 <Column ss:AutoFitWidth="1" ss:Width="40" />
86 # Code88 # Code
@@ -101,6 +103,12 @@
101 <Column ss:AutoFitWidth="1" ss:Width="95" />103 <Column ss:AutoFitWidth="1" ss:Width="95" />
102 # IN Unit Price104 # IN Unit Price
103 <Column ss:AutoFitWidth="1" ss:Width="95" />105 <Column ss:AutoFitWidth="1" ss:Width="95" />
106 # Created (order)
107 <Columns ss:AutoFitWidth="1" ss:Width="95" />
108 # Delivery Confirmed (order)
109 <Columns ss:AutoFitWidth="1" ss:Width="95" />
110 # Status (order)
111 <Columns ss:AutoFitWidth="1" ss:Width="95" />
104 # Destination112 # Destination
105 <Column ss:AutoFitWidth="1" ss:Width="95" />113 <Column ss:AutoFitWidth="1" ss:Width="95" />
106 # Cost Center114 # Cost Center
@@ -116,16 +124,6 @@
116 <Cell ss:MergeAcross="1" ss:StyleID="mainheader"><Data ss:Type="String">Supplier: ${getRunParms()['supplier'] or '' |x}</Data></Cell>124 <Cell ss:MergeAcross="1" ss:StyleID="mainheader"><Data ss:Type="String">Supplier: ${getRunParms()['supplier'] or '' |x}</Data></Cell>
117 <Cell ss:MergeAcross="2" ss:StyleID="mainheader"><Data ss:Type="String">PO State: ${getRunParms()['state'] or '' | x}</Data></Cell>125 <Cell ss:MergeAcross="2" ss:StyleID="mainheader"><Data ss:Type="String">PO State: ${getRunParms()['state'] or '' | x}</Data></Cell>
118</Row>126</Row>
119<Row></Row>
120<Row></Row>
121
122% for o in objects:
123
124 <Row ss:AutoFitHeight="0" ss:Height="36">
125 % for header in getHeaderLine(o):
126 <Cell ss:MergeAcross="1" ss:StyleID="poheader"><Data ss:Type="String">${header |x}</Data></Cell>
127 % endfor
128 </Row>
129127
130 <Row ss:AutoFitHeight="1" > 128 <Row ss:AutoFitHeight="1" >
131 % for header in getPOLineHeaders():129 % for header in getPOLineHeaders():
@@ -133,8 +131,11 @@
133 % endfor 131 % endfor
134 </Row>132 </Row>
135 133
134% for o in objects:
135
136 % for line in getPOLines(o.id):136 % for line in getPOLines(o.id):
137 <Row ss:AutoFitHeight="1">137 <Row ss:AutoFitHeight="1">
138 <Cell ss:StyleID="line"><Data ss:Type="String">${(line['order_ref'])|x}</Data></Cell>
138 <Cell ss:StyleID="line"><Data ss:Type="Number">${(line['item'])|x}</Data></Cell>139 <Cell ss:StyleID="line"><Data ss:Type="Number">${(line['item'])|x}</Data></Cell>
139 <Cell ss:StyleID="line"><Data ss:Type="String">${(line['code'])|x}</Data></Cell>140 <Cell ss:StyleID="line"><Data ss:Type="String">${(line['code'])|x}</Data></Cell>
140 <Cell ss:StyleID="line"><Data ss:Type="String">${(line['description'])|x}</Data></Cell>141 <Cell ss:StyleID="line"><Data ss:Type="String">${(line['description'])|x}</Data></Cell>
@@ -145,6 +146,9 @@
145 <Cell ss:StyleID="line"><Data ss:Type="Number">${(line['qty_backordered'])|x}</Data></Cell>146 <Cell ss:StyleID="line"><Data ss:Type="Number">${(line['qty_backordered'])|x}</Data></Cell>
146 <Cell ss:StyleID="line"><Data ss:Type="Number">${(line['unit_price'])|x}</Data></Cell>147 <Cell ss:StyleID="line"><Data ss:Type="Number">${(line['unit_price'])|x}</Data></Cell>
147 <Cell ss:StyleID="line"><Data ss:Type="Number">${(line['in_unit_price'])|x}</Data></Cell>148 <Cell ss:StyleID="line"><Data ss:Type="Number">${(line['in_unit_price'])|x}</Data></Cell>
149 <Cell ss:StyleID="line"><Data ss:Type="String">${(line['order_created'])|x}</Data></Cell>
150 <Cell ss:StyleID="line"><Data ss:Type="String">${(line['order_confirmed_date'])|x}</Data></Cell>
151 <Cell ss:StyleID="line"><Data ss:Type="String">${(line['order_status'])|x}</Data></Cell>
148 <Cell ss:StyleID="line"><Data ss:Type="String">${(line['destination'])|x}</Data></Cell>152 <Cell ss:StyleID="line"><Data ss:Type="String">${(line['destination'])|x}</Data></Cell>
149 <Cell ss:StyleID="line"><Data ss:Type="String">${(line['cost_centre'])|x}</Data></Cell>153 <Cell ss:StyleID="line"><Data ss:Type="String">${(line['cost_centre'])|x}</Data></Cell>
150 </Row>154 </Row>

Subscribers

People subscribed via source and target branches