Merge lp:~dorian-kemps/unifield-server/US-4274 into lp:unifield-server
- US-4274
- Merge into trunk
Proposed by
jftempo
Status: | Merged |
---|---|
Merged at revision: | 4920 |
Proposed branch: | lp:~dorian-kemps/unifield-server/US-4274 |
Merge into: | lp:unifield-server |
Diff against target: |
1425 lines (+585/-272) 16 files modified
bin/addons/delivery_mechanism/delivery_mechanism.py (+1/-0) bin/addons/msf_profile/i18n/fr_MF.po (+139/-0) bin/addons/msf_supply_doc_export/msf_supply_doc_export.py (+7/-2) bin/addons/msf_supply_doc_export/report/report_po_follow_up.rml (+53/-37) bin/addons/msf_supply_doc_export/report/report_po_follow_up_xls.mako (+48/-17) bin/addons/sales_followup/report/ir_follow_up_location_report.py (+19/-36) bin/addons/sales_followup/report/ir_follow_up_location_report.rml (+57/-47) bin/addons/sales_followup/report/ir_follow_up_location_report_xls.mako (+8/-3) bin/addons/sales_followup/report/sale_follow_up_multi_report.rml (+68/-42) bin/addons/sales_followup/report/sale_follow_up_multi_report_xls.mako (+140/-42) bin/addons/sales_followup/report/sale_follow_up_report_multi.py (+34/-22) bin/addons/sales_followup/wizard/ir_followup_location_wizard.py (+5/-11) bin/addons/sales_followup/wizard/ir_followup_location_wizard_view.xml (+0/-1) bin/addons/sales_followup/wizard/sale_followup_multi_wizard.py (+5/-11) bin/addons/sales_followup/wizard/sale_followup_multi_wizard_view.xml (+0/-1) bin/addons/stock_override/stock.py (+1/-0) |
To merge this branch: | bzr merge lp:~dorian-kemps/unifield-server/US-4274 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
UniField Reviewer Team | Pending | ||
Review via email: mp+343388@code.launchpad.net |
Commit message
Description of the change
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/delivery_mechanism/delivery_mechanism.py' | |||
2 | --- bin/addons/delivery_mechanism/delivery_mechanism.py 2018-04-20 07:14:38 +0000 | |||
3 | +++ bin/addons/delivery_mechanism/delivery_mechanism.py 2018-05-17 08:41:16 +0000 | |||
4 | @@ -1142,6 +1142,7 @@ | |||
5 | 1142 | sol_to_relink = self.pool.get('sale.order.line').search(cr, uid, [ | 1142 | sol_to_relink = self.pool.get('sale.order.line').search(cr, uid, [ |
6 | 1143 | ('product_uom_qty', '=', out_move.product_qty - uom_partial_qty), | 1143 | ('product_uom_qty', '=', out_move.product_qty - uom_partial_qty), |
7 | 1144 | ('line_number', '=', out_move.sale_line_id.line_number), | 1144 | ('line_number', '=', out_move.sale_line_id.line_number), |
8 | 1145 | ('order_id', '=', out_move.picking_id.sale_id.id), | ||
9 | 1145 | ], context=context) | 1146 | ], context=context) |
10 | 1146 | if sol_to_relink: | 1147 | if sol_to_relink: |
11 | 1147 | move_values.update({'sale_line_id': sol_to_relink[0],}) | 1148 | move_values.update({'sale_line_id': sol_to_relink[0],}) |
12 | 1148 | 1149 | ||
13 | === modified file 'bin/addons/msf_profile/i18n/fr_MF.po' | |||
14 | --- bin/addons/msf_profile/i18n/fr_MF.po 2018-04-27 09:58:55 +0000 | |||
15 | +++ bin/addons/msf_profile/i18n/fr_MF.po 2018-05-17 08:41:16 +0000 | |||
16 | @@ -107535,6 +107535,132 @@ | |||
17 | 107535 | msgid "The account %s - %s cannot be used as Account Payable." | 107535 | msgid "The account %s - %s cannot be used as Account Payable." |
18 | 107536 | msgstr "Le compte %s - %s ne peut pas être utilisé comme Compte Fournisseur." | 107536 | msgstr "Le compte %s - %s ne peut pas être utilisé comme Compte Fournisseur." |
19 | 107537 | 107537 | ||
20 | 107538 | #. modules: msf_supply_doc_export, sales_followup | ||
21 | 107539 | #: report:po.follow.up_rml:0 | ||
22 | 107540 | #: report:addons/sales_followup/report/ir_follow_up_location_report_xls.mako:280 | ||
23 | 107541 | #: report:ir.follow.up.location.report_pdf:0 | ||
24 | 107542 | #: report:addons/sales_followup/report/sale_follow_up_multi_report_xls.mako:231 | ||
25 | 107543 | #: report:sales.follow.up.multi.report_pdf:0 | ||
26 | 107544 | msgid "Line Status" | ||
27 | 107545 | msgstr "Statut de la ligne" | ||
28 | 107546 | |||
29 | 107547 | #. module: sales_followup | ||
30 | 107548 | #: field:ir.followup.location.wizard,cancel_ok:0 | ||
31 | 107549 | #: field:sale.followup.multi.wizard,cancel_ok:0 | ||
32 | 107550 | msgid "Cancelled" | ||
33 | 107551 | msgstr "Annulé" | ||
34 | 107552 | |||
35 | 107553 | #. modules: purchase, purchase_override, sale | ||
36 | 107554 | #: selection:purchase.order.line,state:0 | ||
37 | 107555 | #: selection:purchase.order.merged.line,state:0 | ||
38 | 107556 | #: selection:sale.order.line,state:0 | ||
39 | 107557 | msgid "Cancelled-r" | ||
40 | 107558 | msgstr "Annulé-r" | ||
41 | 107559 | |||
42 | 107560 | #. modules: msf_order_date, purchase, documents_done, sale, purchase_override, stock_forecast, purchase_allocation_report, sourcing | ||
43 | 107561 | #: selection:documents.done.wizard,display_state:0 | ||
44 | 107562 | #: selection:sale.order.line,so_state_stored:0 | ||
45 | 107563 | #: selection:purchase.order,state:0 | ||
46 | 107564 | #: selection:purchase.order.line,order_state_purchase_order_line:0 | ||
47 | 107565 | #: selection:purchase.order.line,po_state_stored:0 | ||
48 | 107566 | #: selection:purchase.order.line.allocation.report,state:0 | ||
49 | 107567 | #: selection:purchase.order.merged.line,order_state_purchase_order_line:0 | ||
50 | 107568 | #: selection:purchase.order.merged.line,po_state_stored:0 | ||
51 | 107569 | #: selection:sale.order,state:0 | ||
52 | 107570 | #: selection:sale.order,state_hidden_sale_order:0 | ||
53 | 107571 | #: selection:sale.order.leave.close,order_state:0 | ||
54 | 107572 | #: selection:sale.report,state:0 | ||
55 | 107573 | #: selection:sale.order.line,sale_order_state:0 | ||
56 | 107574 | #: selection:stock.forecast.line,state:0 | ||
57 | 107575 | msgid "Draft-p" | ||
58 | 107576 | msgstr "Brouillon-p" | ||
59 | 107577 | |||
60 | 107578 | #. modules: msf_order_date, purchase, documents_done, sale, purchase_override, stock_forecast, purchase_allocation_report, sourcing | ||
61 | 107579 | #: selection:documents.done.wizard,display_state:0 | ||
62 | 107580 | #: selection:sale.order.line,so_state_stored:0 | ||
63 | 107581 | #: selection:purchase.order,state:0 | ||
64 | 107582 | #: selection:purchase.order.line,order_state_purchase_order_line:0 | ||
65 | 107583 | #: selection:purchase.order.line,po_state_stored:0 | ||
66 | 107584 | #: selection:purchase.order.line.allocation.report,state:0 | ||
67 | 107585 | #: selection:purchase.order.merged.line,order_state_purchase_order_line:0 | ||
68 | 107586 | #: selection:purchase.order.merged.line,po_state_stored:0 | ||
69 | 107587 | #: selection:sale.order,state:0 | ||
70 | 107588 | #: selection:sale.order,state_hidden_sale_order:0 | ||
71 | 107589 | #: selection:sale.order.leave.close,order_state:0 | ||
72 | 107590 | #: selection:sale.report,state:0 | ||
73 | 107591 | #: selection:sale.order.line,sale_order_state:0 | ||
74 | 107592 | #: selection:stock.forecast.line,state:0 | ||
75 | 107593 | msgid "Validated-p" | ||
76 | 107594 | msgstr "Validé-p" | ||
77 | 107595 | |||
78 | 107596 | #. modules: purchase, purchase_override | ||
79 | 107597 | #: selection:purchase.order.line,state:0 | ||
80 | 107598 | #: selection:purchase.order.merged.line,state:0 | ||
81 | 107599 | msgid "Validated-n" | ||
82 | 107600 | msgstr "Validé-n" | ||
83 | 107601 | |||
84 | 107602 | #. modules: purchase, purchase_override, sale | ||
85 | 107603 | #: selection:purchase.order.line,state:0 | ||
86 | 107604 | #: selection:purchase.order.merged.line,state:0 | ||
87 | 107605 | #: selection:sale.order.line,state:0 | ||
88 | 107606 | msgid "Sourced-v" | ||
89 | 107607 | msgstr "Sourcé-v" | ||
90 | 107608 | |||
91 | 107609 | #. modules: msf_order_date, purchase, documents_done, sale, purchase_override, stock_forecast, purchase_allocation_report, sourcing | ||
92 | 107610 | #: selection:documents.done.wizard,display_state:0 | ||
93 | 107611 | #: selection:sale.order.line,so_state_stored:0 | ||
94 | 107612 | #: selection:purchase.order,state:0 | ||
95 | 107613 | #: selection:purchase.order.line,order_state_purchase_order_line:0 | ||
96 | 107614 | #: selection:purchase.order.line,po_state_stored:0 | ||
97 | 107615 | #: selection:purchase.order.line.allocation.report,state:0 | ||
98 | 107616 | #: selection:purchase.order.merged.line,order_state_purchase_order_line:0 | ||
99 | 107617 | #: selection:purchase.order.merged.line,po_state_stored:0 | ||
100 | 107618 | #: selection:sale.order,state:0 | ||
101 | 107619 | #: selection:sale.order,state_hidden_sale_order:0 | ||
102 | 107620 | #: selection:sale.order.leave.close,order_state:0 | ||
103 | 107621 | #: selection:sale.report,state:0 | ||
104 | 107622 | #: selection:sale.order.line,sale_order_state:0 | ||
105 | 107623 | #: selection:stock.forecast.line,state:0 | ||
106 | 107624 | msgid "Sourced-p" | ||
107 | 107625 | msgstr "Sourcé-p" | ||
108 | 107626 | |||
109 | 107627 | #. modules: purchase, purchase_override, sale | ||
110 | 107628 | #: selection:purchase.order.line,state:0 | ||
111 | 107629 | #: selection:purchase.order.merged.line,state:0 | ||
112 | 107630 | #: selection:sale.order.line,state:0 | ||
113 | 107631 | msgid "Sourced-n" | ||
114 | 107632 | msgstr "Sourcé-n" | ||
115 | 107633 | |||
116 | 107634 | #. module: sale | ||
117 | 107635 | #: field:sale.order.line,set_as_sourced_n:0 | ||
118 | 107636 | msgid "Sourced-n line" | ||
119 | 107637 | msgstr "Ligne sourcée-n" | ||
120 | 107638 | |||
121 | 107639 | #. modules: purchase, purchase_override, sale | ||
122 | 107640 | #: selection:purchase.order.line,state:0 | ||
123 | 107641 | #: selection:purchase.order.merged.line,state:0 | ||
124 | 107642 | #: selection:sale.order.line,state:0 | ||
125 | 107643 | msgid "Sourced-sy" | ||
126 | 107644 | msgstr "Sourcé-sy" | ||
127 | 107645 | |||
128 | 107646 | #. modules: msf_order_date, purchase, documents_done, sale, purchase_override, stock_forecast, purchase_allocation_report, sourcing | ||
129 | 107647 | #: selection:documents.done.wizard,display_state:0 | ||
130 | 107648 | #: selection:sale.order.line,so_state_stored:0 | ||
131 | 107649 | #: selection:purchase.order,state:0 | ||
132 | 107650 | #: selection:purchase.order.line,order_state_purchase_order_line:0 | ||
133 | 107651 | #: selection:purchase.order.line,po_state_stored:0 | ||
134 | 107652 | #: selection:purchase.order.line.allocation.report,state:0 | ||
135 | 107653 | #: selection:purchase.order.merged.line,order_state_purchase_order_line:0 | ||
136 | 107654 | #: selection:purchase.order.merged.line,po_state_stored:0 | ||
137 | 107655 | #: selection:sale.order,state:0 | ||
138 | 107656 | #: selection:sale.order,state_hidden_sale_order:0 | ||
139 | 107657 | #: selection:sale.order.leave.close,order_state:0 | ||
140 | 107658 | #: selection:sale.report,state:0 | ||
141 | 107659 | #: selection:sale.order.line,sale_order_state:0 | ||
142 | 107660 | #: selection:stock.forecast.line,state:0 | ||
143 | 107661 | msgid "Confirmed-p" | ||
144 | 107662 | msgstr "Confirmé-p" | ||
145 | 107663 | |||
146 | 107538 | #. module: account_mcdb | 107664 | #. module: account_mcdb |
147 | 107539 | #: field:account.mcdb,display_mcdb_load_button:0 | 107665 | #: field:account.mcdb,display_mcdb_load_button:0 |
148 | 107540 | msgid "Display the Load button" | 107666 | msgid "Display the Load button" |
149 | @@ -107673,3 +107799,16 @@ | |||
150 | 107673 | #: sql_constraint:account.move.line:0 | 107799 | #: sql_constraint:account.move.line:0 |
151 | 107674 | msgid "Wrong credit or debit value in booking currency!" | 107800 | msgid "Wrong credit or debit value in booking currency!" |
152 | 107675 | msgstr "Valeur de crédit ou débit erronée en devise d'enregistrement !" | 107801 | msgstr "Valeur de crédit ou débit erronée en devise d'enregistrement !" |
153 | 107802 | |||
154 | 107803 | #. module: sales_followup | ||
155 | 107804 | #: report:addons/sales_followup/report/ir_follow_up_location_report_xls.mako:281 | ||
156 | 107805 | #: report:addons/sales_followup/report/sale_follow_up_multi_report_xls.mako:230 | ||
157 | 107806 | msgid "Doc. Status" | ||
158 | 107807 | msgstr "Statut du Doc." | ||
159 | 107808 | |||
160 | 107809 | #. modules: msf_supply_doc_export, sales_followup | ||
161 | 107810 | #: report:po.follow.up_rml:0 | ||
162 | 107811 | #: report:ir.follow.up.location.report_pdf:0 | ||
163 | 107812 | #: report:sales.follow.up.multi.report_pdf:0 | ||
164 | 107813 | msgid "Doc. Status:" | ||
165 | 107814 | msgstr "Statut du Doc.:" | ||
166 | 107676 | 107815 | ||
167 | === modified file 'bin/addons/msf_supply_doc_export/msf_supply_doc_export.py' | |||
168 | --- bin/addons/msf_supply_doc_export/msf_supply_doc_export.py 2018-04-19 07:36:42 +0000 | |||
169 | +++ bin/addons/msf_supply_doc_export/msf_supply_doc_export.py 2018-05-17 08:41:16 +0000 | |||
170 | @@ -485,6 +485,7 @@ | |||
171 | 485 | report_line['order_ref'] = '' | 485 | report_line['order_ref'] = '' |
172 | 486 | report_line['order_created'] = '' | 486 | report_line['order_created'] = '' |
173 | 487 | report_line['order_confirmed_date'] = '' | 487 | report_line['order_confirmed_date'] = '' |
174 | 488 | report_line['raw_state'] = analytic_line.get('raw_state') | ||
175 | 488 | report_line['line_status'] = '' | 489 | report_line['line_status'] = '' |
176 | 489 | report_line['state'] = '' | 490 | report_line['state'] = '' |
177 | 490 | report_line['order_status'] = '' | 491 | report_line['order_status'] = '' |
178 | @@ -542,6 +543,7 @@ | |||
179 | 542 | 'order_ref': order.name or '', | 543 | 'order_ref': order.name or '', |
180 | 543 | 'order_created': order.date_order or '', | 544 | 'order_created': order.date_order or '', |
181 | 544 | 'order_confirmed_date': order.delivery_confirmed_date or '', | 545 | 'order_confirmed_date': order.delivery_confirmed_date or '', |
182 | 546 | 'raw_state': line.state, | ||
183 | 545 | 'line_status': get_sel(self.cr, self.uid, 'purchase.order.line', 'state', line.state, {}) or '', | 547 | 'line_status': get_sel(self.cr, self.uid, 'purchase.order.line', 'state', line.state, {}) or '', |
184 | 546 | 'state': line.state_to_display or '', | 548 | 'state': line.state_to_display or '', |
185 | 547 | 'order_status': self._get_states().get(order.state, ''), | 549 | 'order_status': self._get_states().get(order.state, ''), |
186 | @@ -567,6 +569,7 @@ | |||
187 | 567 | 'order_ref': order.name or '', | 569 | 'order_ref': order.name or '', |
188 | 568 | 'order_created': order.date_order or '', | 570 | 'order_created': order.date_order or '', |
189 | 569 | 'order_confirmed_date': order.delivery_confirmed_date or '', | 571 | 'order_confirmed_date': order.delivery_confirmed_date or '', |
190 | 572 | 'raw_state': line.state, | ||
191 | 570 | 'order_status': self._get_states().get(order.state, ''), | 573 | 'order_status': self._get_states().get(order.state, ''), |
192 | 571 | 'line_status': first_line and get_sel(self.cr, self.uid, 'purchase.order.line', 'state', line.state, {}) or '', | 574 | 'line_status': first_line and get_sel(self.cr, self.uid, 'purchase.order.line', 'state', line.state, {}) or '', |
193 | 572 | 'state': line.state_to_display or '', | 575 | 'state': line.state_to_display or '', |
194 | @@ -598,6 +601,7 @@ | |||
195 | 598 | 'order_ref': order.name or '', | 601 | 'order_ref': order.name or '', |
196 | 599 | 'order_created': order.date_order or '', | 602 | 'order_created': order.date_order or '', |
197 | 600 | 'order_confirmed_date': order.delivery_confirmed_date or '', | 603 | 'order_confirmed_date': order.delivery_confirmed_date or '', |
198 | 604 | 'raw_state': line.state, | ||
199 | 601 | 'order_status': self._get_states().get(order.state, ''), | 605 | 'order_status': self._get_states().get(order.state, ''), |
200 | 602 | 'line_status': first_line and get_sel(self.cr, self.uid, 'purchase.order.line', 'state', line.state, {}) or '', | 606 | 'line_status': first_line and get_sel(self.cr, self.uid, 'purchase.order.line', 'state', line.state, {}) or '', |
201 | 603 | 'state': line.state_to_display or '', | 607 | 'state': line.state_to_display or '', |
202 | @@ -629,6 +633,7 @@ | |||
203 | 629 | 'order_ref': order.name or '', | 633 | 'order_ref': order.name or '', |
204 | 630 | 'order_created': order.date_order or '', | 634 | 'order_created': order.date_order or '', |
205 | 631 | 'order_confirmed_date': order.delivery_confirmed_date or '', | 635 | 'order_confirmed_date': order.delivery_confirmed_date or '', |
206 | 636 | 'raw_state': line.state, | ||
207 | 632 | 'order_status': self._get_states().get(order.state, ''), | 637 | 'order_status': self._get_states().get(order.state, ''), |
208 | 633 | 'line_status': get_sel(self.cr, self.uid, 'purchase.order.line', 'state', line.state, {}) or '', | 638 | 'line_status': get_sel(self.cr, self.uid, 'purchase.order.line', 'state', line.state, {}) or '', |
209 | 634 | 'state': line.state_to_display or '', | 639 | 'state': line.state_to_display or '', |
210 | @@ -657,7 +662,7 @@ | |||
211 | 657 | dist_id = po_line.order_id.analytic_distribution_id.id # get it from the header | 662 | dist_id = po_line.order_id.analytic_distribution_id.id # get it from the header |
212 | 658 | ccdl_ids = ccdl_obj.search(self.cr, self.uid, [('distribution_id','=',dist_id)]) | 663 | ccdl_ids = ccdl_obj.search(self.cr, self.uid, [('distribution_id','=',dist_id)]) |
213 | 659 | ccdl_rows = ccdl_obj.browse(self.cr, self.uid, ccdl_ids) | 664 | ccdl_rows = ccdl_obj.browse(self.cr, self.uid, ccdl_ids) |
215 | 660 | dist_lines = [{'cost_center': ccdl.analytic_id.code,'destination': ccdl.destination_id.code} for ccdl in ccdl_rows] | 665 | dist_lines = [{'cost_center': ccdl.analytic_id.code,'destination': ccdl.destination_id.code, 'raw_state': po_line.state} for ccdl in ccdl_rows] |
216 | 661 | if not dist_lines: | 666 | if not dist_lines: |
217 | 662 | dist_lines = [{'cost_center': '','destination': ''}] | 667 | dist_lines = [{'cost_center': '','destination': ''}] |
218 | 663 | return dist_lines | 668 | return dist_lines |
219 | @@ -690,7 +695,7 @@ | |||
220 | 690 | return self.datas.get('report_header')[1] | 695 | return self.datas.get('report_header')[1] |
221 | 691 | 696 | ||
222 | 692 | def getPOLineHeaders(self): | 697 | def getPOLineHeaders(self): |
224 | 693 | return ['Order Ref', 'Item','Code','Description','Qty ordered','UoM','Qty received','IN','Qty backorder','Unit Price','IN unit price', 'Created', 'Confirmed Delivery', 'Line State', 'Order State', 'Destination','Cost Center'] | 698 | return ['Order Ref', 'Item', 'Code', 'Description', 'Qty ordered', 'UoM', 'Qty received', 'IN', 'Qty backorder', 'Unit Price', 'IN unit price', 'Created', 'Confirmed Delivery', 'Doc. Status', 'Line Status', 'Destination', 'Cost Center'] |
225 | 694 | 699 | ||
226 | 695 | 700 | ||
227 | 696 | 701 | ||
228 | 697 | 702 | ||
229 | === modified file 'bin/addons/msf_supply_doc_export/report/report_po_follow_up.rml' | |||
230 | --- bin/addons/msf_supply_doc_export/report/report_po_follow_up.rml 2018-04-19 07:36:42 +0000 | |||
231 | +++ bin/addons/msf_supply_doc_export/report/report_po_follow_up.rml 2018-05-17 08:41:16 +0000 | |||
232 | @@ -34,8 +34,11 @@ | |||
233 | 34 | <paraStyle name="P2" fontName="Helvetica" fontSize="8.0" leading="10"/> | 34 | <paraStyle name="P2" fontName="Helvetica" fontSize="8.0" leading="10"/> |
234 | 35 | <paraStyle name="P3" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER"/> | 35 | <paraStyle name="P3" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER"/> |
235 | 36 | <paraStyle name="P4" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT"/> | 36 | <paraStyle name="P4" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT"/> |
236 | 37 | <paraStyle name="P4Grey" textColor="#747474" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT"/> | ||
237 | 37 | <paraStyle name="P4Center" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER"/> | 38 | <paraStyle name="P4Center" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER"/> |
238 | 39 | <paraStyle name="P4CenterGrey" textColor="#747474" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER"/> | ||
239 | 38 | <paraStyle name="P4Left" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT"/> | 40 | <paraStyle name="P4Left" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT"/> |
240 | 41 | <paraStyle name="P4LeftGrey" textColor="#747474" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT"/> | ||
241 | 39 | <paraStyle name="P5" fontName="Helvetica" fontSize="8.0" leading="10"/> | 42 | <paraStyle name="P5" fontName="Helvetica" fontSize="8.0" leading="10"/> |
242 | 40 | <paraStyle name="Standard" fontName="Helvetica"/> | 43 | <paraStyle name="Standard" fontName="Helvetica"/> |
243 | 41 | <paraStyle name="Heading" fontName="Helvetica" fontSize="14.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/> | 44 | <paraStyle name="Heading" fontName="Helvetica" fontSize="14.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/> |
244 | @@ -60,7 +63,7 @@ | |||
245 | 60 | <td><para style="P2">Report Run Date: [[getRunParmsRML('run_date')]]</para></td> | 63 | <td><para style="P2">Report Run Date: [[getRunParmsRML('run_date')]]</para></td> |
246 | 61 | <td><para style="P2">PO Date From: [[getRunParmsRML('date_from')]]</para></td> | 64 | <td><para style="P2">PO Date From: [[getRunParmsRML('date_from')]]</para></td> |
247 | 62 | <td><para style="P2">PO Date To: [[getRunParmsRML('date_thru')]]</para></td> | 65 | <td><para style="P2">PO Date To: [[getRunParmsRML('date_thru')]]</para></td> |
249 | 63 | <td><para style="P2">PO State: [[getRunParmsRML('state')]]</para></td> | 66 | <td><para style="P2">Doc. Status: [[getRunParmsRML('state')]]</para></td> |
250 | 64 | <td><para style="P2">Supplier: [[getRunParmsRML('supplier')]]</para></td> | 67 | <td><para style="P2">Supplier: [[getRunParmsRML('supplier')]]</para></td> |
251 | 65 | </tr> | 68 | </tr> |
252 | 66 | </blockTable> | 69 | </blockTable> |
253 | @@ -119,49 +122,62 @@ | |||
254 | 119 | <para style="P3">Cost Center</para> | 122 | <para style="P3">Cost Center</para> |
255 | 120 | </td> | 123 | </td> |
256 | 121 | <td> | 124 | <td> |
258 | 122 | <para style="P3">State</para> | 125 | <para style="P3">Line Status</para> |
259 | 123 | </td> | 126 | </td> |
260 | 124 | </tr> | 127 | </tr> |
261 | 125 | <tr> | 128 | <tr> |
262 | 126 | <para style="P4">[[ repeatIn(getPOLines(o.id), 'line') ]]</para> | 129 | <para style="P4">[[ repeatIn(getPOLines(o.id), 'line') ]]</para> |
263 | 127 | <td> | 130 | <td> |
298 | 128 | <para style="P4Center">[[ line['item'] ]]</para> | 131 | <para style="P4Center">[[ line['raw_state'] not in ['cancel', 'cancel_r'] and line['item'] or removeParentNode('para') ]]</para> |
299 | 129 | </td> | 132 | <para style="P4CenterGrey">[[ line['raw_state'] in ['cancel', 'cancel_r'] and line['item'] or removeParentNode('para') ]]</para> |
300 | 130 | <td> | 133 | </td> |
301 | 131 | <para style="P4Left">[[ line['code'] ]]</para> | 134 | <td> |
302 | 132 | </td> | 135 | <para style="P4Left">[[ line['raw_state'] not in ['cancel', 'cancel_r'] and line['code'] or removeParentNode('para') ]]</para> |
303 | 133 | <td> | 136 | <para style="P4LeftGrey">[[ line['raw_state'] in ['cancel', 'cancel_r'] and line['code'] or removeParentNode('para') ]]</para> |
304 | 134 | <para style="P4Left">[[ line['description'] ]]</para> | 137 | </td> |
305 | 135 | </td> | 138 | <td> |
306 | 136 | <td> | 139 | <para style="P4Left">[[ line['raw_state'] not in ['cancel', 'cancel_r'] and line['description'] or removeParentNode('para') ]]</para> |
307 | 137 | <para style="P4Center">[[ line['qty_ordered'] ]]</para> | 140 | <para style="P4LeftGrey">[[ line['raw_state'] in ['cancel', 'cancel_r'] and line['description'] or removeParentNode('para') ]]</para> |
308 | 138 | </td> | 141 | </td> |
309 | 139 | <td> | 142 | <td> |
310 | 140 | <para style="P4Center">[[ line['uom'] ]]</para> | 143 | <para style="P4Center">[[ line['raw_state'] not in ['cancel', 'cancel_r'] and line['qty_ordered'] or removeParentNode('para') ]]</para> |
311 | 141 | </td> | 144 | <para style="P4CenterGrey">[[ line['raw_state'] in ['cancel', 'cancel_r'] and line['qty_ordered'] or removeParentNode('para') ]]</para> |
312 | 142 | <td> | 145 | </td> |
313 | 143 | <para style="P4Center">[[ line['qty_received'] ]]</para> | 146 | <td> |
314 | 144 | </td> | 147 | <para style="P4Center">[[ line['raw_state'] not in ['cancel', 'cancel_r'] and line['uom'] or removeParentNode('para') ]]</para> |
315 | 145 | <td> | 148 | <para style="P4CenterGrey">[[ line['raw_state'] in ['cancel', 'cancel_r'] and line['uom'] or removeParentNode('para') ]]</para> |
316 | 146 | <para style="P4Center">[[ line['in'] ]]</para> | 149 | </td> |
317 | 147 | </td> | 150 | <td> |
318 | 148 | <td> | 151 | <para style="P4Center">[[ line['raw_state'] not in ['cancel', 'cancel_r'] and line['qty_received'] or removeParentNode('para') ]]</para> |
319 | 149 | <para style="P4Center">[[ line['qty_backordered'] ]]</para> | 152 | <para style="P4CenterGrey">[[ line['raw_state'] in ['cancel', 'cancel_r'] and line['qty_received'] or removeParentNode('para') ]]</para> |
320 | 150 | </td> | 153 | </td> |
321 | 151 | <td> | 154 | <td> |
322 | 152 | <para style="P4Center">[[ line['unit_price'] ]]</para> | 155 | <para style="P4Center">[[ line['raw_state'] not in ['cancel', 'cancel_r'] and line['in'] or removeParentNode('para') ]]</para> |
323 | 153 | </td> | 156 | <para style="P4CenterGrey">[[ line['raw_state'] in ['cancel', 'cancel_r'] and line['in'] or removeParentNode('para') ]]</para> |
324 | 154 | <td> | 157 | </td> |
325 | 155 | <para style="P4Center">[[ line['in_unit_price'] ]]</para> | 158 | <td> |
326 | 156 | </td> | 159 | <para style="P4Center">[[ line['raw_state'] not in ['cancel', 'cancel_r'] and line['qty_backordered'] or removeParentNode('para') ]]</para> |
327 | 157 | <td> | 160 | <para style="P4CenterGrey">[[ line['raw_state'] in ['cancel', 'cancel_r'] and line['qty_backordered'] or removeParentNode('para') ]]</para> |
328 | 158 | <para style="P4Center">[[ line['destination'] ]]</para> | 161 | </td> |
329 | 159 | </td> | 162 | <td> |
330 | 160 | <td> | 163 | <para style="P4Center">[[ line['raw_state'] not in ['cancel', 'cancel_r'] and line['unit_price'] or removeParentNode('para') ]]</para> |
331 | 161 | <para style="P4Center">[[ line['cost_centre'] ]]</para> | 164 | <para style="P4CenterGrey">[[ line['raw_state'] in ['cancel', 'cancel_r'] and line['unit_price'] or removeParentNode('para') ]]</para> |
332 | 165 | </td> | ||
333 | 166 | <td> | ||
334 | 167 | <para style="P4Center">[[ line['raw_state'] not in ['cancel', 'cancel_r'] and line['in_unit_price'] or removeParentNode('para') ]]</para> | ||
335 | 168 | <para style="P4CenterGrey">[[ line['raw_state'] in ['cancel', 'cancel_r'] and line['in_unit_price'] or removeParentNode('para') ]]</para> | ||
336 | 169 | </td> | ||
337 | 170 | <td> | ||
338 | 171 | <para style="P4Center">[[ line['raw_state'] not in ['cancel', 'cancel_r'] and line['destination'] or removeParentNode('para') ]]</para> | ||
339 | 172 | <para style="P4CenterGrey">[[ line['raw_state'] in ['cancel', 'cancel_r'] and line['destination'] or removeParentNode('para') ]]</para> | ||
340 | 173 | </td> | ||
341 | 174 | <td> | ||
342 | 175 | <para style="P4Center">[[ line['raw_state'] not in ['cancel', 'cancel_r'] and line['cost_centre'] or removeParentNode('para') ]]</para> | ||
343 | 176 | <para style="P4CenterGrey">[[ line['raw_state'] in ['cancel', 'cancel_r'] and line['cost_centre'] or removeParentNode('para') ]]</para> | ||
344 | 162 | </td> | 177 | </td> |
345 | 163 | <td> | 178 | <td> |
347 | 164 | <para style="P4Center">[[ line['state'] ]]</para> | 179 | <para style="P4Center">[[ line['raw_state'] not in ['cancel', 'cancel_r'] and line['state'] or removeParentNode('para') ]]</para> |
348 | 180 | <para style="P4CenterGrey">[[ line['raw_state'] in ['cancel', 'cancel_r'] and line['state'] or removeParentNode('para') ]]</para> | ||
349 | 165 | </td> | 181 | </td> |
350 | 166 | </tr> | 182 | </tr> |
351 | 167 | 183 | ||
352 | 168 | 184 | ||
353 | === modified file 'bin/addons/msf_supply_doc_export/report/report_po_follow_up_xls.mako' | |||
354 | --- bin/addons/msf_supply_doc_export/report/report_po_follow_up_xls.mako 2018-04-19 07:36:42 +0000 | |||
355 | +++ bin/addons/msf_supply_doc_export/report/report_po_follow_up_xls.mako 2018-05-17 08:41:16 +0000 | |||
356 | @@ -64,6 +64,17 @@ | |||
357 | 64 | <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" /> | 64 | <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" /> |
358 | 65 | </Borders> | 65 | </Borders> |
359 | 66 | </Style> | 66 | </Style> |
360 | 67 | |||
361 | 68 | <Style ss:ID="line_grey"> | ||
362 | 69 | <Alignment ss:Horizontal="Center" ss:Vertical="Center" ss:WrapText="1"/> | ||
363 | 70 | <Borders> | ||
364 | 71 | <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
365 | 72 | <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
366 | 73 | <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
367 | 74 | <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
368 | 75 | </Borders> | ||
369 | 76 | <Font ss:Color="#747474"/> | ||
370 | 77 | </Style> | ||
371 | 67 | 78 | ||
372 | 68 | <Style ss:ID="short_date"> | 79 | <Style ss:ID="short_date"> |
373 | 69 | <Alignment ss:Horizontal="Center" ss:Vertical="Center" ss:WrapText="1"/> | 80 | <Alignment ss:Horizontal="Center" ss:Vertical="Center" ss:WrapText="1"/> |
374 | @@ -137,23 +148,43 @@ | |||
375 | 137 | 148 | ||
376 | 138 | % for line in getPOLines(o.id): | 149 | % for line in getPOLines(o.id): |
377 | 139 | <Row ss:AutoFitHeight="1"> | 150 | <Row ss:AutoFitHeight="1"> |
395 | 140 | <Cell ss:StyleID="line"><Data ss:Type="String">${(line['order_ref'])|x}</Data></Cell> | 151 | % if line['raw_state'] in ['cancel', 'cancel_r']: |
396 | 141 | <Cell ss:StyleID="line"><Data ss:Type="Number">${(line['item'])|x}</Data></Cell> | 152 | <Cell ss:StyleID="line_grey"><Data ss:Type="String">${(line['order_ref'])|x}</Data></Cell> |
397 | 142 | <Cell ss:StyleID="line"><Data ss:Type="String">${(line['code'])|x}</Data></Cell> | 153 | <Cell ss:StyleID="line_grey"><Data ss:Type="Number">${(line['item'])|x}</Data></Cell> |
398 | 143 | <Cell ss:StyleID="line"><Data ss:Type="String">${(line['description'])|x}</Data></Cell> | 154 | <Cell ss:StyleID="line_grey"><Data ss:Type="String">${(line['code'])|x}</Data></Cell> |
399 | 144 | <Cell ss:StyleID="line"><Data ss:Type="Number">${(line['qty_ordered'])|x}</Data></Cell> | 155 | <Cell ss:StyleID="line_grey"><Data ss:Type="String">${(line['description'])|x}</Data></Cell> |
400 | 145 | <Cell ss:StyleID="line"><Data ss:Type="String">${(line['uom'])|x}</Data></Cell> | 156 | <Cell ss:StyleID="line_grey"><Data ss:Type="Number">${(line['qty_ordered'])|x}</Data></Cell> |
401 | 146 | <Cell ss:StyleID="line"><Data ss:Type="Number">${(line['qty_received'])|x}</Data></Cell> | 157 | <Cell ss:StyleID="line_grey"><Data ss:Type="String">${(line['uom'])|x}</Data></Cell> |
402 | 147 | <Cell ss:StyleID="line"><Data ss:Type="String">${(line['in'])|x}</Data></Cell> | 158 | <Cell ss:StyleID="line_grey"><Data ss:Type="Number">${(line['qty_received'])|x}</Data></Cell> |
403 | 148 | <Cell ss:StyleID="line"><Data ss:Type="Number">${(line['qty_backordered'])|x}</Data></Cell> | 159 | <Cell ss:StyleID="line_grey"><Data ss:Type="String">${(line['in'])|x}</Data></Cell> |
404 | 149 | <Cell ss:StyleID="line"><Data ss:Type="Number">${(line['unit_price'])|x}</Data></Cell> | 160 | <Cell ss:StyleID="line_grey"><Data ss:Type="Number">${(line['qty_backordered'])|x}</Data></Cell> |
405 | 150 | <Cell ss:StyleID="line"><Data ss:Type="Number">${(line['in_unit_price'])|x}</Data></Cell> | 161 | <Cell ss:StyleID="line_grey"><Data ss:Type="Number">${(line['unit_price'])|x}</Data></Cell> |
406 | 151 | <Cell ss:StyleID="line"><Data ss:Type="String">${(line['order_created'])|x}</Data></Cell> | 162 | <Cell ss:StyleID="line_grey"><Data ss:Type="Number">${(line['in_unit_price'])|x}</Data></Cell> |
407 | 152 | <Cell ss:StyleID="line"><Data ss:Type="String">${(line['order_confirmed_date'])|x}</Data></Cell> | 163 | <Cell ss:StyleID="line_grey"><Data ss:Type="String">${(line['order_created'])|x}</Data></Cell> |
408 | 153 | <Cell ss:StyleID="line"><Data ss:Type="String">${(line['state'])|x}</Data></Cell> | 164 | <Cell ss:StyleID="line_grey"><Data ss:Type="String">${(line['order_confirmed_date'])|x}</Data></Cell> |
409 | 154 | <Cell ss:StyleID="line"><Data ss:Type="String">${(line['order_status'])|x}</Data></Cell> | 165 | <Cell ss:StyleID="line_grey"><Data ss:Type="String">${(line['order_status'])|x}</Data></Cell> |
410 | 155 | <Cell ss:StyleID="line"><Data ss:Type="String">${(line['destination'])|x}</Data></Cell> | 166 | <Cell ss:StyleID="line_grey"><Data ss:Type="String">${(line['state'])|x}</Data></Cell> |
411 | 156 | <Cell ss:StyleID="line"><Data ss:Type="String">${(line['cost_centre'])|x}</Data></Cell> | 167 | <Cell ss:StyleID="line_grey"><Data ss:Type="String">${(line['destination'])|x}</Data></Cell> |
412 | 168 | <Cell ss:StyleID="line_grey"><Data ss:Type="String">${(line['cost_centre'])|x}</Data></Cell> | ||
413 | 169 | % else: | ||
414 | 170 | <Cell ss:StyleID="line"><Data ss:Type="String">${(line['order_ref'])|x}</Data></Cell> | ||
415 | 171 | <Cell ss:StyleID="line"><Data ss:Type="Number">${(line['item'])|x}</Data></Cell> | ||
416 | 172 | <Cell ss:StyleID="line"><Data ss:Type="String">${(line['code'])|x}</Data></Cell> | ||
417 | 173 | <Cell ss:StyleID="line"><Data ss:Type="String">${(line['description'])|x}</Data></Cell> | ||
418 | 174 | <Cell ss:StyleID="line"><Data ss:Type="Number">${(line['qty_ordered'])|x}</Data></Cell> | ||
419 | 175 | <Cell ss:StyleID="line"><Data ss:Type="String">${(line['uom'])|x}</Data></Cell> | ||
420 | 176 | <Cell ss:StyleID="line"><Data ss:Type="Number">${(line['qty_received'])|x}</Data></Cell> | ||
421 | 177 | <Cell ss:StyleID="line"><Data ss:Type="String">${(line['in'])|x}</Data></Cell> | ||
422 | 178 | <Cell ss:StyleID="line"><Data ss:Type="Number">${(line['qty_backordered'])|x}</Data></Cell> | ||
423 | 179 | <Cell ss:StyleID="line"><Data ss:Type="Number">${(line['unit_price'])|x}</Data></Cell> | ||
424 | 180 | <Cell ss:StyleID="line"><Data ss:Type="Number">${(line['in_unit_price'])|x}</Data></Cell> | ||
425 | 181 | <Cell ss:StyleID="line"><Data ss:Type="String">${(line['order_created'])|x}</Data></Cell> | ||
426 | 182 | <Cell ss:StyleID="line"><Data ss:Type="String">${(line['order_confirmed_date'])|x}</Data></Cell> | ||
427 | 183 | <Cell ss:StyleID="line"><Data ss:Type="String">${(line['order_status'])|x}</Data></Cell> | ||
428 | 184 | <Cell ss:StyleID="line"><Data ss:Type="String">${(line['state'])|x}</Data></Cell> | ||
429 | 185 | <Cell ss:StyleID="line"><Data ss:Type="String">${(line['destination'])|x}</Data></Cell> | ||
430 | 186 | <Cell ss:StyleID="line"><Data ss:Type="String">${(line['cost_centre'])|x}</Data></Cell> | ||
431 | 187 | %endif | ||
432 | 157 | </Row> | 188 | </Row> |
433 | 158 | % endfor | 189 | % endfor |
434 | 159 | % endfor | 190 | % endfor |
435 | 160 | 191 | ||
436 | === modified file 'bin/addons/sales_followup/report/ir_follow_up_location_report.py' | |||
437 | --- bin/addons/sales_followup/report/ir_follow_up_location_report.py 2017-09-08 15:57:28 +0000 | |||
438 | +++ bin/addons/sales_followup/report/ir_follow_up_location_report.py 2018-05-17 08:41:16 +0000 | |||
439 | @@ -177,27 +177,15 @@ | |||
440 | 177 | cdd = False | 177 | cdd = False |
441 | 178 | from_stock = line.type == 'make_to_stock' | 178 | from_stock = line.type == 'make_to_stock' |
442 | 179 | cancel_in_moves = [] | 179 | cancel_in_moves = [] |
447 | 180 | if line.procurement_id and line.procurement_id.purchase_id: | 180 | linked_pol = self.pool.get('purchase.order.line').search(self.cr, self.uid, [('linked_sol_id', '=', line.id)]) |
448 | 181 | po_name = line.procurement_id.purchase_id.name | 181 | if linked_pol: |
449 | 182 | cdd = line.procurement_id.purchase_id.delivery_confirmed_date | 182 | linked_pol = self.pool.get('purchase.order.line').browse(self.cr, self.uid, linked_pol)[0] |
450 | 183 | cancel_in_moves = self.cancel_in_line(line.procurement_id.purchase_id.id, line.product_id.id) | 183 | po_name = linked_pol.order_id.name |
451 | 184 | cdd = linked_pol.order_id.delivery_confirmed_date | ||
452 | 185 | cancel_in_moves = self.cancel_in_line(linked_pol.order_id.id, line.product_id.id) | ||
453 | 184 | if not cdd and line.order_id.delivery_confirmed_date: | 186 | if not cdd and line.order_id.delivery_confirmed_date: |
454 | 185 | cdd = line.order_id.delivery_confirmed_date | 187 | cdd = line.order_id.delivery_confirmed_date |
455 | 186 | 188 | ||
456 | 187 | |||
457 | 188 | # fetch the move in case the line doesn't have move_ids | ||
458 | 189 | # if no move found for this line, it's set to False | ||
459 | 190 | # to display a grayed line when it is cancelled | ||
460 | 191 | current_line_state = line.state | ||
461 | 192 | if line.order_id.state == 'cancel': | ||
462 | 193 | current_line_state = 'cancel' | ||
463 | 194 | elif line.procurement_id.purchase_id and line.procurement_id.purchase_id.state == 'cancel': | ||
464 | 195 | current_line_state = 'cancel' | ||
465 | 196 | elif line.procurement_id.move_id and \ | ||
466 | 197 | (line.procurement_id.move_id.state == 'cancel' or line.procurement_id.move_id.picking_id.state == 'cancel'): | ||
467 | 198 | current_line_state = 'cancel' | ||
468 | 199 | |||
469 | 200 | |||
470 | 201 | # cancel IN at line level: qty on IR line is adjusted | 189 | # cancel IN at line level: qty on IR line is adjusted |
471 | 202 | # cancel all IN: qty on IR is untouched | 190 | # cancel all IN: qty on IR is untouched |
472 | 203 | for cancel_in in cancel_in_moves: | 191 | for cancel_in in cancel_in_moves: |
473 | @@ -213,13 +201,14 @@ | |||
474 | 213 | if len(line.move_ids) == 0: | 201 | if len(line.move_ids) == 0: |
475 | 214 | line_moves, int_name = self._get_move_from_line(line, line.product_id.id, line.order_id.name) | 202 | line_moves, int_name = self._get_move_from_line(line, line.product_id.id, line.order_id.name) |
476 | 215 | 203 | ||
477 | 204 | data = { | ||
478 | 205 | 'state': line.state, | ||
479 | 206 | 'state_display': line.state_to_display, | ||
480 | 207 | } | ||
481 | 208 | |||
482 | 216 | if len(line.move_ids) > 0: | 209 | if len(line.move_ids) > 0: |
483 | 217 | for move in sorted(line.move_ids, cmp=lambda x, y: cmp(sort_state.get(x.state, 0), sort_state.get(y.state, 0)) or cmp(x.id, y.id)): | 210 | for move in sorted(line.move_ids, cmp=lambda x, y: cmp(sort_state.get(x.state, 0), sort_state.get(y.state, 0)) or cmp(x.id, y.id)): |
489 | 218 | current_move_line_state = current_line_state | 211 | m_type = move.state in ('cancel', 'cancel_r') or move.product_qty != 0.00 and move.picking_id.type == 'out' |
485 | 219 | if move.state == 'cancel' or move.picking_id.state == 'cancel': | ||
486 | 220 | current_move_line_state = 'cancel' | ||
487 | 221 | |||
488 | 222 | m_type = current_move_line_state == 'cancel' or move.product_qty != 0.00 and move.picking_id.type == 'out' | ||
490 | 223 | ppl = move.picking_id.subtype == 'packing' and move.picking_id.shipment_id and not self._is_returned(move) | 212 | ppl = move.picking_id.subtype == 'packing' and move.picking_id.shipment_id and not self._is_returned(move) |
491 | 224 | ppl_not_shipped = move.picking_id.subtype == 'ppl' and move.picking_id.state not in ('cancel', 'done') | 213 | ppl_not_shipped = move.picking_id.subtype == 'ppl' and move.picking_id.state not in ('cancel', 'done') |
492 | 225 | s_out = move.picking_id.subtype == 'standard' and move.location_dest_id.usage == 'customer' | 214 | s_out = move.picking_id.subtype == 'standard' and move.location_dest_id.usage == 'customer' |
493 | @@ -238,7 +227,7 @@ | |||
494 | 238 | delivery_order = move.picking_id.name | 227 | delivery_order = move.picking_id.name |
495 | 239 | if move.picking_id.state != 'done': | 228 | if move.picking_id.state != 'done': |
496 | 240 | delivery_order = '-' | 229 | delivery_order = '-' |
498 | 241 | data = { | 230 | data.update({ |
499 | 242 | 'po_name': po_name, | 231 | 'po_name': po_name, |
500 | 243 | 'cdd': cdd, | 232 | 'cdd': cdd, |
501 | 244 | 'line_number': line.line_number, | 233 | 'line_number': line.line_number, |
502 | @@ -247,10 +236,9 @@ | |||
503 | 247 | 'product_code': line.product_id.code or '-', | 236 | 'product_code': line.product_id.code or '-', |
504 | 248 | 'is_delivered': False, | 237 | 'is_delivered': False, |
505 | 249 | 'delivery_order': delivery_order, | 238 | 'delivery_order': delivery_order, |
506 | 250 | 'current_line_state': current_move_line_state, | ||
507 | 251 | 'packing': '-', | 239 | 'packing': '-', |
508 | 252 | 'shipment': '-', | 240 | 'shipment': '-', |
510 | 253 | } | 241 | }) |
511 | 254 | if first_line: | 242 | if first_line: |
512 | 255 | data.update({ | 243 | data.update({ |
513 | 256 | 'uom_id': line.product_uom.name, | 244 | 'uom_id': line.product_uom.name, |
514 | @@ -346,9 +334,6 @@ | |||
515 | 346 | m_index += 1 | 334 | m_index += 1 |
516 | 347 | elif line_moves and (len(line.move_ids) == 0 and line.procurement_id.move_id): | 335 | elif line_moves and (len(line.move_ids) == 0 and line.procurement_id.move_id): |
517 | 348 | for line_move in line_moves: | 336 | for line_move in line_moves: |
518 | 349 | if line_move.state == 'cancel' or line_move.picking_id.state == 'cancel': | ||
519 | 350 | current_line_state = 'cancel' | ||
520 | 351 | |||
521 | 352 | m_type = line_move.product_qty != 0.00 | 337 | m_type = line_move.product_qty != 0.00 |
522 | 353 | 338 | ||
523 | 354 | if m_type: | 339 | if m_type: |
524 | @@ -363,7 +348,7 @@ | |||
525 | 363 | delivery_order = int_name.get(line_move.id) or line_move.picking_id.name | 348 | delivery_order = int_name.get(line_move.id) or line_move.picking_id.name |
526 | 364 | if 'INT' in line_move.picking_id.name and line_move.picking_id.state != 'done': | 349 | if 'INT' in line_move.picking_id.name and line_move.picking_id.state != 'done': |
527 | 365 | delivery_order = '-' | 350 | delivery_order = '-' |
529 | 366 | data = { | 351 | data.update({ |
530 | 367 | 'po_name': po_name, | 352 | 'po_name': po_name, |
531 | 368 | 'cdd': cdd, | 353 | 'cdd': cdd, |
532 | 369 | 'line_number': line.line_number, | 354 | 'line_number': line.line_number, |
533 | @@ -372,8 +357,7 @@ | |||
534 | 372 | 'product_code': line.product_id.code or '-', | 357 | 'product_code': line.product_id.code or '-', |
535 | 373 | 'is_delivered': False, | 358 | 'is_delivered': False, |
536 | 374 | 'delivery_order': delivery_order, | 359 | 'delivery_order': delivery_order, |
539 | 375 | 'current_line_state': current_line_state, | 360 | }) |
538 | 376 | } | ||
540 | 377 | if first_line: | 361 | if first_line: |
541 | 378 | data.update({ | 362 | data.update({ |
542 | 379 | 'uom_id': line.product_uom.name, | 363 | 'uom_id': line.product_uom.name, |
543 | @@ -408,7 +392,7 @@ | |||
544 | 408 | m_index += 1 | 392 | m_index += 1 |
545 | 409 | else: # No move found | 393 | else: # No move found |
546 | 410 | if first_line: | 394 | if first_line: |
548 | 411 | data = { | 395 | data.update({ |
549 | 412 | 'line_number': line.line_number, | 396 | 'line_number': line.line_number, |
550 | 413 | 'line_comment': line.comment or '-', | 397 | 'line_comment': line.comment or '-', |
551 | 414 | 'po_name': po_name, | 398 | 'po_name': po_name, |
552 | @@ -420,10 +404,9 @@ | |||
553 | 420 | 'delivered_qty': 0.00, | 404 | 'delivered_qty': 0.00, |
554 | 421 | 'delivered_uom': '-', | 405 | 'delivered_uom': '-', |
555 | 422 | 'delivery_order': '-', | 406 | 'delivery_order': '-', |
556 | 423 | 'current_line_state': current_line_state, | ||
557 | 424 | 'backordered_qty': line.product_uom_qty if line.order_id.state != 'cancel' else 0.00, | 407 | 'backordered_qty': line.product_uom_qty if line.order_id.state != 'cancel' else 0.00, |
558 | 425 | 'cdd': cdd, | 408 | 'cdd': cdd, |
560 | 426 | } | 409 | }) |
561 | 427 | lines.append(data) | 410 | lines.append(data) |
562 | 428 | 411 | ||
563 | 429 | # Put the backorderd qty on the first line | 412 | # Put the backorderd qty on the first line |
564 | @@ -444,7 +427,7 @@ | |||
565 | 444 | lines[fl_index]['extra_qty'] = abs(bo_qty) if line.order_id.state != 'cancel' else 0.00 | 427 | lines[fl_index]['extra_qty'] = abs(bo_qty) if line.order_id.state != 'cancel' else 0.00 |
566 | 445 | 428 | ||
567 | 446 | for ln in lines: | 429 | for ln in lines: |
569 | 447 | if only_bo and (ln.get('backordered_qty', 0.00) <= 0.00 or ln.get('current_line_state') == 'cancel'): | 430 | if only_bo and (ln.get('backordered_qty', 0.00) <= 0.00 or line.state in ('cancel', 'cancel_r')): |
570 | 448 | continue | 431 | continue |
571 | 449 | yield ln | 432 | yield ln |
572 | 450 | 433 | ||
573 | 451 | 434 | ||
574 | === modified file 'bin/addons/sales_followup/report/ir_follow_up_location_report.rml' | |||
575 | --- bin/addons/sales_followup/report/ir_follow_up_location_report.rml 2017-09-07 10:21:05 +0000 | |||
576 | +++ bin/addons/sales_followup/report/ir_follow_up_location_report.rml 2018-05-17 08:41:16 +0000 | |||
577 | @@ -182,7 +182,7 @@ | |||
578 | 182 | 182 | ||
579 | 183 | <section> | 183 | <section> |
580 | 184 | [[ repeatIn(getOrders(r, only_bo=r.only_bo), 'o', 'section') ]] | 184 | [[ repeatIn(getOrders(r, only_bo=r.only_bo), 'o', 'section') ]] |
582 | 185 | <blockTable colWidths="32.0,80.0,130.0,110.0,45.0,45.0,45.0,45.0,45.0,75.0,60.0,60.0" style="LinesTable" repeatRows="2"> | 185 | <blockTable colWidths="32.0,80.0,130.0,110.0,45.0,40.0,45.0,40.0,45.0,70.0,41.0,47.0,47.0" style="LinesTable" repeatRows="2"> |
583 | 186 | <tr> | 186 | <tr> |
584 | 187 | <td colspan="2"> | 187 | <td colspan="2"> |
585 | 188 | <para style="Lines">Order ref:</para> | 188 | <para style="Lines">Order ref:</para> |
586 | @@ -191,7 +191,7 @@ | |||
587 | 191 | <para style="Lines">[[ o.name ]]</para> | 191 | <para style="Lines">[[ o.name ]]</para> |
588 | 192 | </td> | 192 | </td> |
589 | 193 | <td> | 193 | <td> |
591 | 194 | <para style="Lines">Status: [[ getSel(o, 'state') ]] Requestor: [[ o.requestor or '' ]]</para> | 194 | <para style="Lines">Doc. Status: [[ getSel(o, 'state') ]] Requestor: [[ o.requestor or '' ]]</para> |
592 | 195 | </td> | 195 | </td> |
593 | 196 | <td> | 196 | <td> |
594 | 197 | <para style="Lines">Location Requestor: [[ o.location_requestor_id.name ]]</para> | 197 | <para style="Lines">Location Requestor: [[ o.location_requestor_id.name ]]</para> |
595 | @@ -220,6 +220,9 @@ | |||
596 | 220 | <td> | 220 | <td> |
597 | 221 | <para style="Lines"></para> | 221 | <para style="Lines"></para> |
598 | 222 | </td> | 222 | </td> |
599 | 223 | <td> | ||
600 | 224 | <para style="Lines"></para> | ||
601 | 225 | </td> | ||
602 | 223 | </tr> | 226 | </tr> |
603 | 224 | <tr> | 227 | <tr> |
604 | 225 | <td> | 228 | <td> |
605 | @@ -253,6 +256,9 @@ | |||
606 | 253 | <para style="Lines"><i>Delivery Order</i></para> | 256 | <para style="Lines"><i>Delivery Order</i></para> |
607 | 254 | </td> | 257 | </td> |
608 | 255 | <td> | 258 | <td> |
609 | 259 | <para style="Lines"><i>Line Status</i></para> | ||
610 | 260 | </td> | ||
611 | 261 | <td> | ||
612 | 256 | <para style="Lines"><i>CDD</i></para> | 262 | <para style="Lines"><i>CDD</i></para> |
613 | 257 | </td> | 263 | </td> |
614 | 258 | <td> | 264 | <td> |
615 | @@ -262,53 +268,57 @@ | |||
616 | 262 | <tr> | 268 | <tr> |
617 | 263 | [[ repeatIn(getLines(o, only_bo=r.only_bo), 'line') ]] | 269 | [[ repeatIn(getLines(o, only_bo=r.only_bo), 'line') ]] |
618 | 264 | <td> | 270 | <td> |
662 | 265 | <para style="LinesBlue">[[ line.get('current_line_state') != 'cancel' and line.get('line_number', '-') or removeParentNode('para') ]]</para> | 271 | <para style="LinesBlue">[[ line.get('state') not in ['cancel', 'cancel_r'] and line.get('line_number', '-') or removeParentNode('para') ]]</para> |
663 | 266 | <para style="LinesGrey">[[ line.get('current_line_state') == 'cancel' and line.get('line_number', '-') or removeParentNode('para') ]]</para> | 272 | <para style="LinesGrey">[[ line.get('state') in ['cancel', 'cancel_r'] and line.get('line_number', '-') or removeParentNode('para') ]]</para> |
664 | 267 | </td> | 273 | </td> |
665 | 268 | <td> | 274 | <td> |
666 | 269 | <para style="LinesBlue">[[ line.get('current_line_state') != 'cancel' and line.get('product_code', '-') or removeParentNode('para') ]]</para> | 275 | <para style="LinesBlue">[[ line.get('state') not in ['cancel', 'cancel_r'] and line.get('product_code', '-') or removeParentNode('para') ]]</para> |
667 | 270 | <para style="LinesGrey">[[ line.get('current_line_state') == 'cancel' and line.get('product_code', '-') or removeParentNode('para') ]]</para> | 276 | <para style="LinesGrey">[[ line.get('state') in ['cancel', 'cancel_r'] and line.get('product_code', '-') or removeParentNode('para') ]]</para> |
668 | 271 | </td> | 277 | </td> |
669 | 272 | <td> | 278 | <td> |
670 | 273 | <para style="LinesBlue">[[ line.get('current_line_state') != 'cancel' and line.get('product_name', '-') or removeParentNode('para') ]]</para> | 279 | <para style="LinesBlue">[[ line.get('state') not in ['cancel', 'cancel_r'] and line.get('product_name', '-') or removeParentNode('para') ]]</para> |
671 | 274 | <para style="LinesGrey">[[ line.get('current_line_state') == 'cancel' and line.get('product_name', '-') or removeParentNode('para') ]]</para> | 280 | <para style="LinesGrey">[[ line.get('state') in ['cancel', 'cancel_r'] and line.get('product_name', '-') or removeParentNode('para') ]]</para> |
672 | 275 | </td> | 281 | </td> |
673 | 276 | <td> | 282 | <td> |
674 | 277 | <para style="LinesBlue">[[ line.get('current_line_state') != 'cancel' and line.get('line_comment', '-') or removeParentNode('para') ]]</para> | 283 | <para style="LinesBlue">[[ line.get('state') not in ['cancel', 'cancel_r'] and line.get('line_comment', '-') or removeParentNode('para') ]]</para> |
675 | 278 | <para style="LinesGrey">[[ line.get('current_line_state') == 'cancel' and line.get('line_comment', '-') or removeParentNode('para') ]]</para> | 284 | <para style="LinesGrey">[[ line.get('state') in ['cancel', 'cancel_r'] and line.get('line_comment', '-') or removeParentNode('para') ]]</para> |
676 | 279 | </td> | 285 | </td> |
677 | 280 | <td> | 286 | <td> |
678 | 281 | <para style="LinesBlue">[[ line.get('current_line_state') != 'cancel' and (line.get('ordered_qty') and formatLang(line['ordered_qty']) or 'N/A') or removeParentNode('para') ]]</para> | 287 | <para style="LinesBlue">[[ line.get('state') not in ['cancel', 'cancel_r'] and (line.get('ordered_qty') and formatLang(line['ordered_qty']) or 'N/A') or removeParentNode('para') ]]</para> |
679 | 282 | <para style="LinesGrey">[[ line.get('current_line_state') == 'cancel' and (line.get('ordered_qty') and formatLang(line['ordered_qty']) or 'N/A') or removeParentNode('para') ]]</para> | 288 | <para style="LinesGrey">[[ line.get('state') in ['cancel', 'cancel_r'] and (line.get('ordered_qty') and formatLang(line['ordered_qty']) or 'N/A') or removeParentNode('para') ]]</para> |
680 | 283 | </td> | 289 | </td> |
681 | 284 | <td> | 290 | <td> |
682 | 285 | <para style="LinesBlue">[[ line.get('current_line_state') != 'cancel' and line.get('uom_id', '-') or removeParentNode('para') ]]</para> | 291 | <para style="LinesBlue">[[ line.get('state') not in ['cancel', 'cancel_r'] and line.get('uom_id', '-') or removeParentNode('para') ]]</para> |
683 | 286 | <para style="LinesGrey">[[ line.get('current_line_state') == 'cancel' and line.get('uom_id', '-') or removeParentNode('para') ]]</para> | 292 | <para style="LinesGrey">[[ line.get('state') in ['cancel', 'cancel_r'] and line.get('uom_id', '-') or removeParentNode('para') ]]</para> |
684 | 287 | </td> | 293 | </td> |
685 | 288 | <td> | 294 | <td> |
686 | 289 | <para style="LinesBlue">[[ line.get('current_line_state') != 'cancel' and formatLang(line.get('delivered_qty', 0.00)) or removeParentNode('para') ]]</para> | 295 | <para style="LinesBlue">[[ line.get('state') not in ['cancel', 'cancel_r'] and formatLang(line.get('delivered_qty', 0.00)) or removeParentNode('para') ]]</para> |
687 | 290 | <para style="LinesGrey">[[ line.get('current_line_state') == 'cancel' and formatLang(line.get('delivered_qty', 0.00)) or removeParentNode('para') ]]</para> | 296 | <para style="LinesGrey">[[ line.get('state') in ['cancel', 'cancel_r'] and formatLang(line.get('delivered_qty', 0.00)) or removeParentNode('para') ]]</para> |
688 | 291 | </td> | 297 | </td> |
689 | 292 | <td> | 298 | <td> |
690 | 293 | <para style="LinesBlue">[[ line.get('current_line_state') != 'cancel' and line.get('delivered_uom', '-') or removeParentNode('para') ]]</para> | 299 | <para style="LinesBlue">[[ line.get('state') not in ['cancel', 'cancel_r'] and line.get('delivered_uom', '-') or removeParentNode('para') ]]</para> |
691 | 294 | <para style="LinesGrey">[[ line.get('current_line_state') == 'cancel' and line.get('delivered_uom', '-') or removeParentNode('para') ]]</para> | 300 | <para style="LinesGrey">[[ line.get('state') in ['cancel', 'cancel_r'] and line.get('delivered_uom', '-') or removeParentNode('para') ]]</para> |
692 | 295 | </td> | 301 | </td> |
693 | 296 | <td> | 302 | <td> |
694 | 297 | <para style="LinesBlue">[[ line.get('current_line_state') != 'cancel' and (line.get('extra_qty', 0) == 0 and formatLang(line.get('backordered_qty', 0.00)) or removeParentNode('para')) or removeParentNode('para') ]]</para> | 303 | <para style="LinesBlue">[[ line.get('state') not in ['cancel', 'cancel_r'] and (line.get('extra_qty', 0) == 0 and formatLang(line.get('backordered_qty', 0.00)) or removeParentNode('para')) or removeParentNode('para') ]]</para> |
695 | 298 | <para style="LinesBlue">[[ line.get('current_line_state') != 'cancel' and (line.get('extra_qty', 0) and formatLang(line.get('backordered_qty', 0.00)) or removeParentNode('para')) or removeParentNode('para') ]] (+[[ formatLang(abs(line.get('extra_qty', 0.00))) ]])</para> | 304 | <para style="LinesBlue">[[ line.get('state') not in ['cancel', 'cancel_r'] and (line.get('extra_qty', 0) and formatLang(line.get('backordered_qty', 0.00)) or removeParentNode('para')) or removeParentNode('para') ]] (+[[ formatLang(abs(line.get('extra_qty', 0.00))) ]])</para> |
696 | 299 | <para style="LinesGrey">[[ line.get('current_line_state') == 'cancel' and '-' or removeParentNode('para') ]]</para> | 305 | <para style="LinesGrey">[[ line.get('state') in ['cancel', 'cancel_r'] and '-' or removeParentNode('para') ]]</para> |
697 | 300 | </td> | 306 | </td> |
698 | 301 | <td> | 307 | <td> |
699 | 302 | <para style="LinesBlue">[[ line.get('current_line_state') != 'cancel' and line.get('delivery_order', '-') or removeParentNode('para') ]]</para> | 308 | <para style="LinesBlue">[[ line.get('state') not in ['cancel', 'cancel_r'] and line.get('delivery_order', '-') or removeParentNode('para') ]]</para> |
700 | 303 | <para style="LinesGrey">[[ line.get('current_line_state') == 'cancel' and line.get('delivery_order', '-') or removeParentNode('para') ]]</para> | 309 | <para style="LinesGrey">[[ line.get('state') in ['cancel', 'cancel_r'] and line.get('delivery_order', '-') or removeParentNode('para') ]]</para> |
701 | 304 | </td> | 310 | </td> |
702 | 305 | <td> | 311 | <td> |
703 | 306 | <para style="LinesBlue">[[ line.get('current_line_state') != 'cancel' and (line.get('cdd', '') and formatLang(line['cdd'], date=True) or 'N/A') or removeParentNode('para') ]]</para> | 312 | <para style="LinesBlue">[[ line.get('state') not in ['cancel', 'cancel_r'] and line.get('state_display', '-') or removeParentNode('para') ]]</para> |
704 | 307 | <para style="LinesGrey">[[ line.get('current_line_state') == 'cancel' and (line.get('cdd', '') and formatLang(line['cdd'], date=True) or 'N/A') or removeParentNode('para') ]]</para> | 313 | <para style="LinesGrey">[[ line.get('state') in ['cancel', 'cancel_r'] and line.get('state_display', '-') or removeParentNode('para') ]]</para> |
705 | 314 | </td> | ||
706 | 315 | <td> | ||
707 | 316 | <para style="LinesBlue">[[ line.get('state') not in ['cancel', 'cancel_r'] and (line.get('cdd', '') and formatLang(line['cdd'], date=True) or 'N/A') or removeParentNode('para') ]]</para> | ||
708 | 317 | <para style="LinesGrey">[[ line.get('state') in ['cancel', 'cancel_r'] and (line.get('cdd', '') and formatLang(line['cdd'], date=True) or 'N/A') or removeParentNode('para') ]]</para> | ||
709 | 308 | </td> | 318 | </td> |
710 | 309 | <td> | 319 | <td> |
713 | 310 | <para style="LinesBlue">[[ line.get('current_line_state') != 'cancel' and (line.get('rts', '') and formatLang(line['rts'], date=True) or 'N/A') or removeParentNode('para') ]]</para> | 320 | <para style="LinesBlue">[[ line.get('state') not in ['cancel', 'cancel_r'] and (line.get('rts', '') and formatLang(line['rts'], date=True) or 'N/A') or removeParentNode('para') ]]</para> |
714 | 311 | <para style="LinesGrey">[[ line.get('current_line_state') == 'cancel' and (line.get('rts', '') and formatLang(line['rts'], date=True) or 'N/A') or removeParentNode('para') ]]</para> | 321 | <para style="LinesGrey">[[ line.get('state') in ['cancel', 'cancel_r'] and (line.get('rts', '') and formatLang(line['rts'], date=True) or 'N/A') or removeParentNode('para') ]]</para> |
715 | 312 | </td> | 322 | </td> |
716 | 313 | </tr> | 323 | </tr> |
717 | 314 | </blockTable> | 324 | </blockTable> |
718 | 315 | 325 | ||
719 | === modified file 'bin/addons/sales_followup/report/ir_follow_up_location_report_xls.mako' | |||
720 | --- bin/addons/sales_followup/report/ir_follow_up_location_report_xls.mako 2017-09-07 10:21:05 +0000 | |||
721 | +++ bin/addons/sales_followup/report/ir_follow_up_location_report_xls.mako 2018-05-17 08:41:16 +0000 | |||
722 | @@ -176,7 +176,9 @@ | |||
723 | 176 | <Column ss:AutoFitWidth="1" ss:Width="100.0" /> | 176 | <Column ss:AutoFitWidth="1" ss:Width="100.0" /> |
724 | 177 | ## PO ref | 177 | ## PO ref |
725 | 178 | <Column ss:AutoFitWidth="1" ss:Width="150.0" /> | 178 | <Column ss:AutoFitWidth="1" ss:Width="150.0" /> |
727 | 179 | ## Status | 179 | ## Doc. Status |
728 | 180 | <Column ss:AutoFitWidth="1" ss:Width="60.75" /> | ||
729 | 181 | ## Line Status | ||
730 | 180 | <Column ss:AutoFitWidth="1" ss:Width="60.75" /> | 182 | <Column ss:AutoFitWidth="1" ss:Width="60.75" /> |
731 | 181 | ## Received | 183 | ## Received |
732 | 182 | <Column ss:AutoFitWidth="1" ss:Width="54.75" /> | 184 | <Column ss:AutoFitWidth="1" ss:Width="54.75" /> |
733 | @@ -276,7 +278,8 @@ | |||
734 | 276 | _('Requestor'), | 278 | _('Requestor'), |
735 | 277 | _('Origin'), | 279 | _('Origin'), |
736 | 278 | _('PO ref'), | 280 | _('PO ref'), |
738 | 279 | _('Status'), | 281 | _('Doc. Status'), |
739 | 282 | _('Line Status'), | ||
740 | 280 | _('Received'), | 283 | _('Received'), |
741 | 281 | _('RDD'), | 284 | _('RDD'), |
742 | 282 | _('Item'), | 285 | _('Item'), |
743 | @@ -303,13 +306,14 @@ | |||
744 | 303 | % for o in getOrders(r): | 306 | % for o in getOrders(r): |
745 | 304 | % for line in getLines(o): | 307 | % for line in getLines(o): |
746 | 305 | <Row ss:Height="11.25"> | 308 | <Row ss:Height="11.25"> |
748 | 306 | %if line.get('current_line_state', '') == 'cancel': | 309 | %if line.get('state', '') in ['cancel', 'cancel_r']: |
749 | 307 | <Cell ss:StyleID="line_left_grey"><Data ss:Type="String">${o.name|x}</Data></Cell> | 310 | <Cell ss:StyleID="line_left_grey"><Data ss:Type="String">${o.name|x}</Data></Cell> |
750 | 308 | <Cell ss:StyleID="line_left_grey"><Data ss:Type="String">${o.location_requestor_id.name|x}</Data></Cell> | 311 | <Cell ss:StyleID="line_left_grey"><Data ss:Type="String">${o.location_requestor_id.name|x}</Data></Cell> |
751 | 309 | <Cell ss:StyleID="line_left_grey"><Data ss:Type="String">${o.requestor or ''|x}</Data></Cell> | 312 | <Cell ss:StyleID="line_left_grey"><Data ss:Type="String">${o.requestor or ''|x}</Data></Cell> |
752 | 310 | <Cell ss:StyleID="line_left_grey"><Data ss:Type="String">${o.origin or ''|x}</Data></Cell> | 313 | <Cell ss:StyleID="line_left_grey"><Data ss:Type="String">${o.origin or ''|x}</Data></Cell> |
753 | 311 | <Cell ss:StyleID="line_left_grey"><Data ss:Type="String">${line.get('po_name', '')|x}</Data></Cell> | 314 | <Cell ss:StyleID="line_left_grey"><Data ss:Type="String">${line.get('po_name', '')|x}</Data></Cell> |
754 | 312 | <Cell ss:StyleID="line_left_grey"><Data ss:Type="String">${getSel(o, 'state')|x}</Data></Cell> | 315 | <Cell ss:StyleID="line_left_grey"><Data ss:Type="String">${getSel(o, 'state')|x}</Data></Cell> |
755 | 316 | <Cell ss:StyleID="line_left_grey"><Data ss:Type="String">${line.get('state_display', '-')|x}</Data></Cell> | ||
756 | 313 | <Cell ss:StyleID="line_left_grey"><Data ss:Type="String">${saleUstr(formatLang(o.date_order, date=True))|x}</Data></Cell> | 317 | <Cell ss:StyleID="line_left_grey"><Data ss:Type="String">${saleUstr(formatLang(o.date_order, date=True))|x}</Data></Cell> |
757 | 314 | <Cell ss:StyleID="line_left_grey"><Data ss:Type="String">${o.delivery_requested_date and saleUstr(formatLang(o.delivery_requested_date, date=True)) or ''|x}</Data></Cell> | 318 | <Cell ss:StyleID="line_left_grey"><Data ss:Type="String">${o.delivery_requested_date and saleUstr(formatLang(o.delivery_requested_date, date=True)) or ''|x}</Data></Cell> |
758 | 315 | <Cell ss:StyleID="line_center_grey"><Data ss:Type="String">${line.get('line_number', '-')|x}</Data></Cell> | 319 | <Cell ss:StyleID="line_center_grey"><Data ss:Type="String">${line.get('line_number', '-')|x}</Data></Cell> |
759 | @@ -339,6 +343,7 @@ | |||
760 | 339 | <Cell ss:StyleID="line_left"><Data ss:Type="String">${o.origin or ''|x}</Data></Cell> | 343 | <Cell ss:StyleID="line_left"><Data ss:Type="String">${o.origin or ''|x}</Data></Cell> |
761 | 340 | <Cell ss:StyleID="line_left"><Data ss:Type="String">${line.get('po_name', '')|x}</Data></Cell> | 344 | <Cell ss:StyleID="line_left"><Data ss:Type="String">${line.get('po_name', '')|x}</Data></Cell> |
762 | 341 | <Cell ss:StyleID="line_left"><Data ss:Type="String">${getSel(o, 'state')|x}</Data></Cell> | 345 | <Cell ss:StyleID="line_left"><Data ss:Type="String">${getSel(o, 'state')|x}</Data></Cell> |
763 | 346 | <Cell ss:StyleID="line_left"><Data ss:Type="String">${line.get('state_display', '-')|x}</Data></Cell> | ||
764 | 342 | <Cell ss:StyleID="line_left"><Data ss:Type="String">${saleUstr(formatLang(o.date_order, date=True))|x}</Data></Cell> | 347 | <Cell ss:StyleID="line_left"><Data ss:Type="String">${saleUstr(formatLang(o.date_order, date=True))|x}</Data></Cell> |
765 | 343 | <Cell ss:StyleID="line_left"><Data ss:Type="String">${o.delivery_requested_date and saleUstr(formatLang(o.delivery_requested_date, date=True)) or ''|x}</Data></Cell> | 348 | <Cell ss:StyleID="line_left"><Data ss:Type="String">${o.delivery_requested_date and saleUstr(formatLang(o.delivery_requested_date, date=True)) or ''|x}</Data></Cell> |
766 | 344 | <Cell ss:StyleID="line_center"><Data ss:Type="String">${line.get('line_number', '-')|x}</Data></Cell> | 349 | <Cell ss:StyleID="line_center"><Data ss:Type="String">${line.get('line_number', '-')|x}</Data></Cell> |
767 | 345 | 350 | ||
768 | === modified file 'bin/addons/sales_followup/report/sale_follow_up_multi_report.rml' | |||
769 | --- bin/addons/sales_followup/report/sale_follow_up_multi_report.rml 2017-09-22 15:31:55 +0000 | |||
770 | +++ bin/addons/sales_followup/report/sale_follow_up_multi_report.rml 2018-05-17 08:41:16 +0000 | |||
771 | @@ -66,6 +66,7 @@ | |||
772 | 66 | <paraStyle name="Lines" fontName="Helvetica" fontSize="6.0" alignment="LEFT" leading="7.0" /> | 66 | <paraStyle name="Lines" fontName="Helvetica" fontSize="6.0" alignment="LEFT" leading="7.0" /> |
773 | 67 | <paraStyle name="UnderLines" fontName="Helvetica-Bold" fontSize="6.0" alignment="LEFT" leading="7.0" /> | 67 | <paraStyle name="UnderLines" fontName="Helvetica-Bold" fontSize="6.0" alignment="LEFT" leading="7.0" /> |
774 | 68 | <paraStyle name="LinesBlue" textColor="blue" fontName="Helvetica" fontSize="6.0" alignment="LEFT" leading="7.0" /> | 68 | <paraStyle name="LinesBlue" textColor="blue" fontName="Helvetica" fontSize="6.0" alignment="LEFT" leading="7.0" /> |
775 | 69 | <paraStyle name="LinesGrey" textColor="#747474" fontName="Helvetica" fontSize="6.0" alignment="LEFT" leading="7.0" /> | ||
776 | 69 | <paraStyle name="LinesGreen" textColor="green" fontName="Helvetica" fontSize="6.0" alignment="LEFT" leading="7.0" /> | 70 | <paraStyle name="LinesGreen" textColor="green" fontName="Helvetica" fontSize="6.0" alignment="LEFT" leading="7.0" /> |
777 | 70 | 71 | ||
778 | 71 | </stylesheet> | 72 | </stylesheet> |
779 | @@ -169,16 +170,16 @@ | |||
780 | 169 | 170 | ||
781 | 170 | <section> | 171 | <section> |
782 | 171 | [[ repeatIn(getOrders(r, grouped=True, only_bo=r.only_bo), 'o', 'section') ]] | 172 | [[ repeatIn(getOrders(r, grouped=True, only_bo=r.only_bo), 'o', 'section') ]] |
784 | 172 | <blockTable colWidths="32.0,90.0,150.0,50.0,30.0,50.0,50.0,50.0,50.0,60.0,60.0,50.0,50.0" style="LinesTable" repeatRows="2"> | 173 | <blockTable colWidths="32.0,80.0,135.0,45.0,30.0,50.0,50.0,50.0,50.0,41.0,55.0,60.0,47.0,47.0" style="LinesTable" repeatRows="2"> |
785 | 173 | <tr> | 174 | <tr> |
786 | 174 | <td colspan="2"> | 175 | <td colspan="2"> |
787 | 175 | <para style="Lines">Order ref:</para> | 176 | <para style="Lines">Order ref:</para> |
788 | 176 | </td> | 177 | </td> |
789 | 177 | <td> | 178 | <td> |
791 | 178 | <para style="Lines">[[ o.name ]] Status: [[ getSel(o, 'state') ]]</para> | 179 | <para style="Lines">[[ o.name ]] </para> |
792 | 179 | </td> | 180 | </td> |
793 | 180 | <td> | 181 | <td> |
795 | 181 | <para style="Lines"></para> | 182 | <para style="Lines">Doc. Status: [[ getSel(o, 'state') ]]</para> |
796 | 182 | </td> | 183 | </td> |
797 | 183 | <td> | 184 | <td> |
798 | 184 | <para style="Lines">Received: [[ formatLang(o.date_order, date=True) ]]</para> | 185 | <para style="Lines">Received: [[ formatLang(o.date_order, date=True) ]]</para> |
799 | @@ -199,6 +200,9 @@ | |||
800 | 199 | <para style="Lines"></para> | 200 | <para style="Lines"></para> |
801 | 200 | </td> | 201 | </td> |
802 | 201 | <td> | 202 | <td> |
803 | 203 | <para style="Lines"></para> | ||
804 | 204 | </td> | ||
805 | 205 | <td> | ||
806 | 202 | <para style="Lines"># Items: [[ getProducts(o) ]]</para> | 206 | <para style="Lines"># Items: [[ getProducts(o) ]]</para> |
807 | 203 | </td> | 207 | </td> |
808 | 204 | <td> | 208 | <td> |
809 | @@ -237,6 +241,9 @@ | |||
810 | 237 | <para style="Lines"><i>Qty to deliver</i></para> | 241 | <para style="Lines"><i>Qty to deliver</i></para> |
811 | 238 | </td> | 242 | </td> |
812 | 239 | <td> | 243 | <td> |
813 | 244 | <para style="Lines"><i>Line Status</i></para> | ||
814 | 245 | </td> | ||
815 | 246 | <td> | ||
816 | 240 | <para style="Lines"><i>Transport</i></para> | 247 | <para style="Lines"><i>Transport</i></para> |
817 | 241 | </td> | 248 | </td> |
818 | 242 | <td> | 249 | <td> |
819 | @@ -252,45 +259,64 @@ | |||
820 | 252 | <tr> | 259 | <tr> |
821 | 253 | [[ repeatIn(getLines(o, grouped=True, only_bo=r.only_bo), 'line') ]] | 260 | [[ repeatIn(getLines(o, grouped=True, only_bo=r.only_bo), 'line') ]] |
822 | 254 | <td> | 261 | <td> |
862 | 255 | <para style="LinesBlue">[[ line.get('line_number', '-') ]]</para> | 262 | <para style="LinesBlue">[[ line.get('state') not in ['cancel', 'cancel_r'] and line.get('line_number', '-') or removeParentNode('para') ]]</para> |
863 | 256 | </td> | 263 | <para style="LinesGrey">[[ line.get('state') in ['cancel', 'cancel_r'] and line.get('line_number', '-') or removeParentNode('para') ]]</para> |
864 | 257 | <td> | 264 | </td> |
865 | 258 | <para style="LinesBlue">[[ line.get('product_code', '-') ]]</para> | 265 | <td> |
866 | 259 | </td> | 266 | <para style="LinesBlue">[[ line.get('state') not in ['cancel', 'cancel_r'] and line.get('product_code', '-') or removeParentNode('para') ]]</para> |
867 | 260 | <td> | 267 | <para style="LinesGrey">[[ line.get('state') in ['cancel', 'cancel_r'] and line.get('product_code', '-') or removeParentNode('para') ]]</para> |
868 | 261 | <para style="LinesBlue">[[ line.get('product_name', '-') ]]</para> | 268 | </td> |
869 | 262 | </td> | 269 | <td> |
870 | 263 | <td> | 270 | <para style="LinesBlue">[[ line.get('state') not in ['cancel', 'cancel_r'] and line.get('product_name', '-') or removeParentNode('para') ]]</para> |
871 | 264 | <para style="LinesBlue">[[ line.get('ordered_qty') and formatLang(line['ordered_qty']) or 'N/A' ]]</para> | 271 | <para style="LinesGrey">[[ line.get('state') in ['cancel', 'cancel_r'] and line.get('product_name', '-') or removeParentNode('para') ]]</para> |
872 | 265 | </td> | 272 | </td> |
873 | 266 | <td> | 273 | <td> |
874 | 267 | <para style="LinesBlue">[[ line.get('uom_id', '-') ]]</para> | 274 | <para style="LinesBlue">[[ line.get('state') not in ['cancel', 'cancel_r'] and (line.get('ordered_qty') and formatLang(line['ordered_qty']) or 'N/A') or removeParentNode('para') ]]</para> |
875 | 268 | </td> | 275 | <para style="LinesGrey">[[ line.get('state') in ['cancel', 'cancel_r'] and (line.get('ordered_qty') and formatLang(line['ordered_qty']) or 'N/A') or removeParentNode('para') ]]</para> |
876 | 269 | <td> | 276 | </td> |
877 | 270 | <para style="LinesBlue">[[ formatLang(line.get('delivered_qty', 0.00)) ]]</para> | 277 | <td> |
878 | 271 | </td> | 278 | <para style="LinesBlue">[[ line.get('state') not in ['cancel', 'cancel_r'] and line.get('uom_id', '-') or removeParentNode('para') ]]</para> |
879 | 272 | <td> | 279 | <para style="LinesGrey">[[ line.get('state') in ['cancel', 'cancel_r'] and line.get('uom_id', '-') or removeParentNode('para') ]]</para> |
880 | 273 | <para style="LinesBlue">[[ line.get('delivered_uom', '') ]]</para> | 280 | </td> |
881 | 274 | </td> | 281 | <td> |
882 | 275 | <td> | 282 | <para style="LinesBlue">[[ line.get('state') not in ['cancel', 'cancel_r'] and formatLang(line.get('delivered_qty', 0.00)) or removeParentNode('para') ]]</para> |
883 | 276 | <para style="LinesBlue">[[ line.get('packing', '') ]]</para> | 283 | <para style="LinesGrey">[[ line.get('state') in ['cancel', 'cancel_r'] and formatLang(line.get('delivered_qty', 0.00)) or removeParentNode('para') ]]</para> |
884 | 277 | </td> | 284 | </td> |
885 | 278 | <td> | 285 | <td> |
886 | 279 | <para style="LinesBlue">[[ line.get('extra_qty', 0) == 0 and formatLang(line.get('backordered_qty', 0.00)) or removeParentNode('para') ]]</para> | 286 | <para style="LinesBlue">[[ line.get('state') not in ['cancel', 'cancel_r'] and line.get('delivered_uom', '-') or removeParentNode('para') ]]</para> |
887 | 280 | <para style="LinesBlue">[[ line.get('extra_qty', 0) and formatLang(line.get('backordered_qty', 0.00)) or removeParentNode('para') ]] (+[[ formatLang(abs(line.get('extra_qty', 0.00))) ]])</para> | 287 | <para style="LinesGrey">[[ line.get('state') in ['cancel', 'cancel_r'] and line.get('delivered_uom', '-') or removeParentNode('para') ]]</para> |
888 | 281 | </td> | 288 | </td> |
889 | 282 | <td> | 289 | <td> |
890 | 283 | <para style="LinesBlue">[[ line.get('transport', '') and getSel(line['transport'], 'transport_type') or '' ]]</para> | 290 | <para style="LinesBlue">[[ line.get('state') not in ['cancel', 'cancel_r'] and line.get('packing', '-') or removeParentNode('para') ]]</para> |
891 | 284 | </td> | 291 | <para style="LinesGrey">[[ line.get('state') in ['cancel', 'cancel_r'] and line.get('packing', '-') or removeParentNode('para') ]]</para> |
892 | 285 | <td> | 292 | </td> |
893 | 286 | <para style="LinesBlue">[[ not line.get('is_delivered') and line.get('shipment', '') or removeParentNode('para') ]]</para> | 293 | <td> |
894 | 287 | <para style="LinesGreen">[[ line.get('is_delivered') and line.get('shipment', '') or removeParentNode('para') ]]</para> | 294 | <para style="LinesBlue">[[ line.get('state') not in ['cancel', 'cancel_r'] and (line.get('extra_qty', 0) == 0 and formatLang(line.get('backordered_qty', 0.00)) or removeParentNode('para')) or removeParentNode('para') ]]</para> |
895 | 288 | </td> | 295 | <para style="LinesGrey">[[ line.get('state') in ['cancel', 'cancel_r'] and (line.get('extra_qty', 0) == 0 and formatLang(line.get('backordered_qty', 0.00)) or removeParentNode('para')) or removeParentNode('para') ]]</para> |
896 | 289 | <td> | 296 | <para style="LinesBlue">[[ line.get('state') not in ['cancel', 'cancel_r'] and (line.get('extra_qty', 0) and formatLang(line.get('backordered_qty', 0.00)) or removeParentNode('para')) or removeParentNode('para') ]] (+[[ formatLang(abs(line.get('extra_qty', 0.00))) ]])</para> |
897 | 290 | <para style="LinesBlue">[[ line.get('eta', '') and formatLang(line['eta'], date=True) or 'N/A' ]]</para> | 297 | <para style="LinesGrey">[[ line.get('state') in ['cancel', 'cancel_r'] and (line.get('extra_qty', 0) and formatLang(line.get('backordered_qty', 0.00)) or removeParentNode('para')) or removeParentNode('para') ]] (+[[ formatLang(abs(line.get('extra_qty', 0.00))) ]])</para> |
898 | 291 | </td> | 298 | </td> |
899 | 292 | <td> | 299 | <td> |
900 | 293 | <para style="LinesBlue">[[ line.get('rts', '') and formatLang(line['rts'], date=True) or 'N/A' ]]</para> | 300 | <para style="LinesBlue">[[ line.get('state') not in ['cancel', 'cancel_r'] and line.get('state_display', '-') or removeParentNode('para') ]]</para> |
901 | 301 | <para style="LinesGrey">[[ line.get('state') in ['cancel', 'cancel_r'] and line.get('state_display', '-') or removeParentNode('para') ]]</para> | ||
902 | 302 | </td> | ||
903 | 303 | <td> | ||
904 | 304 | <para style="LinesBlue">[[ line.get('state') not in ['cancel', 'cancel_r'] and (line.get('transport', '') and getSel(line['transport'], 'transport_type') or '-') or removeParentNode('para') ]]</para> | ||
905 | 305 | <para style="LinesGrey">[[ line.get('state') in ['cancel', 'cancel_r'] and (line.get('transport', '') and getSel(line['transport'], 'transport_type') or '-') or removeParentNode('para') ]]</para> | ||
906 | 306 | </td> | ||
907 | 307 | <td> | ||
908 | 308 | <para style="LinesBlue">[[ line.get('state') not in ['cancel', 'cancel_r'] and (not line.get('is_delivered') and line.get('shipment', '') or removeParentNode('para')) or removeParentNode('para') ]]</para> | ||
909 | 309 | <para style="LinesGrey">[[ line.get('state') in ['cancel', 'cancel_r'] and (not line.get('is_delivered') and line.get('shipment', '') or removeParentNode('para')) or removeParentNode('para') ]]</para> | ||
910 | 310 | <para style="LinesGreen">[[ line.get('state') not in ['cancel', 'cancel_r'] and (line.get('is_delivered') and line.get('shipment', '') or removeParentNode('para')) or removeParentNode('para') ]]</para> | ||
911 | 311 | <para style="LinesGrey">[[ line.get('state') in ['cancel', 'cancel_r'] and (line.get('is_delivered') and line.get('shipment', '') or removeParentNode('para')) or removeParentNode('para') ]]</para> | ||
912 | 312 | </td> | ||
913 | 313 | <td> | ||
914 | 314 | <para style="LinesBlue">[[ line.get('state') not in ['cancel', 'cancel_r'] and (line.get('eta', '') and formatLang(line['eta'], date=True) or 'N/A') or removeParentNode('para') ]]</para> | ||
915 | 315 | <para style="LinesGrey">[[ line.get('state') in ['cancel', 'cancel_r'] and (line.get('eta', '') and formatLang(line['eta'], date=True) or 'N/A') or removeParentNode('para') ]]</para> | ||
916 | 316 | </td> | ||
917 | 317 | <td> | ||
918 | 318 | <para style="LinesBlue">[[ line.get('state') not in ['cancel', 'cancel_r'] and (line.get('rts', '') and formatLang(line['rts'], date=True) or 'N/A') or removeParentNode('para') ]]</para> | ||
919 | 319 | <para style="LinesGrey">[[ line.get('state') in ['cancel', 'cancel_r'] and (line.get('rts', '') and formatLang(line['rts'], date=True) or 'N/A') or removeParentNode('para') ]]</para> | ||
920 | 294 | </td> | 320 | </td> |
921 | 295 | </tr> | 321 | </tr> |
922 | 296 | </blockTable> | 322 | </blockTable> |
923 | 297 | 323 | ||
924 | === modified file 'bin/addons/sales_followup/report/sale_follow_up_multi_report_xls.mako' | |||
925 | --- bin/addons/sales_followup/report/sale_follow_up_multi_report_xls.mako 2017-06-07 10:13:18 +0000 | |||
926 | +++ bin/addons/sales_followup/report/sale_follow_up_multi_report_xls.mako 2018-05-17 08:41:16 +0000 | |||
927 | @@ -111,6 +111,56 @@ | |||
928 | 111 | <NumberFormat ss:Format="Short Date" /> | 111 | <NumberFormat ss:Format="Short Date" /> |
929 | 112 | <Font ss:Color="#0000FF" /> | 112 | <Font ss:Color="#0000FF" /> |
930 | 113 | </Style> | 113 | </Style> |
931 | 114 | |||
932 | 115 | <Style ss:ID="line_left_grey"> | ||
933 | 116 | <Alignment ss:Horizontal="Left" ss:Vertical="Bottom"/> | ||
934 | 117 | <Borders> | ||
935 | 118 | <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/> | ||
936 | 119 | <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/> | ||
937 | 120 | <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/> | ||
938 | 121 | <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/> | ||
939 | 122 | </Borders> | ||
940 | 123 | <Font ss:Size="8" ss:Color="#747474"/> | ||
941 | 124 | </Style> | ||
942 | 125 | <Style ss:ID="line_right_grey"> | ||
943 | 126 | <Alignment ss:Horizontal="Right" ss:Vertical="Bottom"/> | ||
944 | 127 | <Borders> | ||
945 | 128 | <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/> | ||
946 | 129 | <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/> | ||
947 | 130 | <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/> | ||
948 | 131 | <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/> | ||
949 | 132 | </Borders> | ||
950 | 133 | <Font ss:Size="8" ss:Color="#747474"/> | ||
951 | 134 | <NumberFormat ss:Format="#,##0.00"/> | ||
952 | 135 | </Style> | ||
953 | 136 | <Style ss:ID="line_center_grey"> | ||
954 | 137 | <Alignment ss:Horizontal="Center" ss:Vertical="Bottom"/> | ||
955 | 138 | <Borders> | ||
956 | 139 | <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/> | ||
957 | 140 | <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/> | ||
958 | 141 | <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/> | ||
959 | 142 | <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/> | ||
960 | 143 | </Borders> | ||
961 | 144 | <Font ss:Size="8" ss:Color="#747474"/> | ||
962 | 145 | <NumberFormat ss:Format="#,##0.00"/> | ||
963 | 146 | </Style> | ||
964 | 147 | <Style ss:ID="line_left_date_grey"> | ||
965 | 148 | <Alignment ss:Horizontal="Right" ss:Vertical="Bottom"/> | ||
966 | 149 | <NumberFormat ss:Format="Short Date" /> | ||
967 | 150 | <Borders> | ||
968 | 151 | <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/> | ||
969 | 152 | <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/> | ||
970 | 153 | <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/> | ||
971 | 154 | <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/> | ||
972 | 155 | </Borders> | ||
973 | 156 | <Font ss:Size="8" ss:Color="#747474"/> | ||
974 | 157 | </Style> | ||
975 | 158 | |||
976 | 159 | <Style ss:ID="short_date_grey"> | ||
977 | 160 | <Alignment ss:Horizontal="Left" ss:Vertical="Center" ss:WrapText="1" /> | ||
978 | 161 | <NumberFormat ss:Format="Short Date" /> | ||
979 | 162 | <Font ss:Color="#747474" /> | ||
980 | 163 | </Style> | ||
981 | 114 | </Styles> | 164 | </Styles> |
982 | 115 | 165 | ||
983 | 116 | 166 | ||
984 | @@ -123,7 +173,9 @@ | |||
985 | 123 | <Column ss:AutoFitWidth="1" ss:Width="170.0" /> | 173 | <Column ss:AutoFitWidth="1" ss:Width="170.0" /> |
986 | 124 | ## PO ref | 174 | ## PO ref |
987 | 125 | <Column ss:AutoFitWidth="1" ss:Width="150.0" /> | 175 | <Column ss:AutoFitWidth="1" ss:Width="150.0" /> |
989 | 126 | ## Status | 176 | ## Doc. Status |
990 | 177 | <Column ss:AutoFitWidth="1" ss:Width="60.75" /> | ||
991 | 178 | ## Line Status | ||
992 | 127 | <Column ss:AutoFitWidth="1" ss:Width="60.75" /> | 179 | <Column ss:AutoFitWidth="1" ss:Width="60.75" /> |
993 | 128 | ## Received | 180 | ## Received |
994 | 129 | <Column ss:AutoFitWidth="1" ss:Width="54.75" /> | 181 | <Column ss:AutoFitWidth="1" ss:Width="54.75" /> |
995 | @@ -225,7 +277,8 @@ | |||
996 | 225 | _('Order ref'), | 277 | _('Order ref'), |
997 | 226 | _('Customer ref'), | 278 | _('Customer ref'), |
998 | 227 | _('PO ref'), | 279 | _('PO ref'), |
1000 | 228 | _('Status'), | 280 | _('Doc. Status'), |
1001 | 281 | _('Line Status'), | ||
1002 | 229 | _('Received'), | 282 | _('Received'), |
1003 | 230 | _('RDD'), | 283 | _('RDD'), |
1004 | 231 | _('Item'), | 284 | _('Item'), |
1005 | @@ -254,46 +307,91 @@ | |||
1006 | 254 | % for o in getOrders(r): | 307 | % for o in getOrders(r): |
1007 | 255 | % for line in getLines(o, grouped=True): | 308 | % for line in getLines(o, grouped=True): |
1008 | 256 | <Row ss:Height="11.25"> | 309 | <Row ss:Height="11.25"> |
1049 | 257 | <Cell ss:StyleID="line_left"><Data ss:Type="String">${o.name|x}</Data></Cell> | 310 | %if line.get('state', '') in ['cancel', 'cancel_r']: |
1050 | 258 | <Cell ss:StyleID="line_left"><Data ss:Type="String">${o.client_order_ref or ''|x}</Data></Cell> | 311 | <Cell ss:StyleID="line_left_grey"><Data ss:Type="String">${o.name|x}</Data></Cell> |
1051 | 259 | <Cell ss:StyleID="line_left"><Data ss:Type="String">${line.get('po_name', '')|x}</Data></Cell> | 312 | <Cell ss:StyleID="line_left_grey"><Data ss:Type="String">${o.client_order_ref or ''|x}</Data></Cell> |
1052 | 260 | <Cell ss:StyleID="line_left"><Data ss:Type="String">${getSel(o, 'state')|x}</Data></Cell> | 313 | <Cell ss:StyleID="line_left_grey"><Data ss:Type="String">${line.get('po_name', '')|x}</Data></Cell> |
1053 | 261 | <Cell ss:StyleID="line_left"><Data ss:Type="String">${saleUstr(formatLang(o.date_order, date=True))|x}</Data></Cell> | 314 | <Cell ss:StyleID="line_left_grey"><Data ss:Type="String">${getSel(o, 'state')|x}</Data></Cell> |
1054 | 262 | <Cell ss:StyleID="line_left"><Data ss:Type="String">${o.delivery_requested_date and saleUstr(formatLang(o.delivery_requested_date, date=True)) or ''|x}</Data></Cell> | 315 | <Cell ss:StyleID="line_left_grey"><Data ss:Type="String">${line.get('state_display', '-')|x}</Data></Cell> |
1055 | 263 | <Cell ss:StyleID="line_center"><Data ss:Type="String">${line.get('line_number', '-')|x}</Data></Cell> | 316 | <Cell ss:StyleID="line_left_grey"><Data ss:Type="String">${saleUstr(formatLang(o.date_order, date=True))|x}</Data></Cell> |
1056 | 264 | <Cell ss:StyleID="line_left"><Data ss:Type="String">${line.get('product_code', '-') or ''|x}</Data></Cell> | 317 | <Cell ss:StyleID="line_left_grey"><Data ss:Type="String">${o.delivery_requested_date and saleUstr(formatLang(o.delivery_requested_date, date=True)) or ''|x}</Data></Cell> |
1057 | 265 | <Cell ss:StyleID="line_left"><Data ss:Type="String">${line.get('product_name', '-') or ''|x}</Data></Cell> | 318 | <Cell ss:StyleID="line_center_grey"><Data ss:Type="String">${line.get('line_number', '-')|x}</Data></Cell> |
1058 | 266 | % if line.get('ordered_qty'): | 319 | <Cell ss:StyleID="line_left_grey"><Data ss:Type="String">${line.get('product_code', '-') or ''|x}</Data></Cell> |
1059 | 267 | <Cell ss:StyleID="line_right"><Data ss:Type="Number">${line.get('ordered_qty')}</Data></Cell> | 320 | <Cell ss:StyleID="line_left_grey"><Data ss:Type="String">${line.get('product_name', '-') or ''|x}</Data></Cell> |
1060 | 268 | % else: | 321 | % if line.get('ordered_qty'): |
1061 | 269 | <Cell ss:StyleID="line_left"><Data ss:Type="String">N/A</Data></Cell> | 322 | <Cell ss:StyleID="line_right_grey"><Data ss:Type="Number">${line.get('ordered_qty')}</Data></Cell> |
1062 | 270 | % endif | 323 | % else: |
1063 | 271 | <Cell ss:StyleID="line_left"><Data ss:Type="String">${line.get('uom_id', '-')|x}</Data></Cell> | 324 | <Cell ss:StyleID="line_left_grey"><Data ss:Type="String">N/A</Data></Cell> |
1064 | 272 | % if line.get('delivered_qty'): | 325 | % endif |
1065 | 273 | <Cell ss:StyleID="line_right"><Data ss:Type="Number">${line.get('delivered_qty')}</Data></Cell> | 326 | <Cell ss:StyleID="line_left_grey"><Data ss:Type="String">${line.get('uom_id', '-')|x}</Data></Cell> |
1066 | 274 | % else: | 327 | % if line.get('delivered_qty'): |
1067 | 275 | <Cell ss:StyleID="line_left"><Data ss:Type="String">N/A</Data></Cell> | 328 | <Cell ss:StyleID="line_right_grey"><Data ss:Type="Number">${line.get('delivered_qty')}</Data></Cell> |
1068 | 276 | % endif | 329 | % else: |
1069 | 277 | <Cell ss:StyleID="line_left"><Data ss:Type="String">${line.get('delivered_uom', '')|x}</Data></Cell> | 330 | <Cell ss:StyleID="line_left_grey"><Data ss:Type="String">N/A</Data></Cell> |
1070 | 278 | <Cell ss:StyleID="line_left"><Data ss:Type="String">${line.get('packing', '')|x}</Data></Cell> | 331 | % endif |
1071 | 279 | % if line.get('extra_qty', False): | 332 | <Cell ss:StyleID="line_left_grey"><Data ss:Type="String">${line.get('delivered_uom', '')|x}</Data></Cell> |
1072 | 280 | <Cell ss:StyleID="line_left"><Data ss:Type="String">${line.get('backordered_qty', 0.00)} (+${line.get('extra_qty', 0.00)|x})</Data></Cell> | 333 | <Cell ss:StyleID="line_left_grey"><Data ss:Type="String">${line.get('packing', '')|x}</Data></Cell> |
1073 | 281 | % else: | 334 | % if line.get('extra_qty', False): |
1074 | 282 | <Cell ss:StyleID="line_right"><Data ss:Type="Number">${line.get('backordered_qty')}</Data></Cell> | 335 | <Cell ss:StyleID="line_left_grey"><Data ss:Type="String">${line.get('backordered_qty', 0.00)} (+${line.get('extra_qty', 0.00)|x})</Data></Cell> |
1075 | 283 | % endif | 336 | % else: |
1076 | 284 | % if o.transport_type and o.transport_type not in (False, 'False', ''): | 337 | <Cell ss:StyleID="line_right_grey"><Data ss:Type="Number">${line.get('backordered_qty')}</Data></Cell> |
1077 | 285 | <Cell ss:StyleID="line_left"><Data ss:Type="String">${getSel(o, 'transport_type')|x}</Data></Cell> | 338 | % endif |
1078 | 286 | % else: | 339 | % if o.transport_type and o.transport_type not in (False, 'False', ''): |
1079 | 287 | <Cell ss:StyleID="line_left"><Data ss:Type="String"></Data></Cell> | 340 | <Cell ss:StyleID="line_left_grey"><Data ss:Type="String">${getSel(o, 'transport_type')|x}</Data></Cell> |
1080 | 288 | % endif | 341 | % else: |
1081 | 289 | % if line.get('is_delivered'): | 342 | <Cell ss:StyleID="line_left_grey"><Data ss:Type="String"></Data></Cell> |
1082 | 290 | <Cell ss:StyleID="line_left_green"><Data ss:Type="String">${line.get('shipment', '')|x}</Data></Cell> | 343 | % endif |
1083 | 291 | % else: | 344 | % if line.get('is_delivered'): |
1084 | 292 | <Cell ss:StyleID="line_left"><Data ss:Type="String">${line.get('shipment', '')|x}</Data></Cell> | 345 | <Cell ss:StyleID="line_left_grey"><Data ss:Type="String">${line.get('shipment', '')|x}</Data></Cell> |
1085 | 293 | % endif | 346 | % else: |
1086 | 294 | <Cell ss:StyleID="line_left"><Data ss:Type="String">${line.get('cdd', False) not in (False, 'False') and saleUstr(formatLang(line.get('cdd'), date=True)) or ''|x}</Data></Cell> | 347 | <Cell ss:StyleID="line_left_grey"><Data ss:Type="String">${line.get('shipment', '')|x}</Data></Cell> |
1087 | 295 | <Cell ss:StyleID="line_left"><Data ss:Type="String">${line.get('eta', False) not in (False, 'False') and saleUstr(formatLang(line.get('eta'), date=True)) or ''|x}</Data></Cell> | 348 | % endif |
1088 | 296 | <Cell ss:StyleID="line_left"><Data ss:Type="String">${line.get('rts', False) not in (False, 'False') and saleUstr(formatLang(line.get('rts'), date=True)) or ''|x}</Data></Cell> | 349 | <Cell ss:StyleID="line_left_grey"><Data ss:Type="String">${line.get('cdd', False) not in (False, 'False') and saleUstr(formatLang(line.get('cdd'), date=True)) or ''|x}</Data></Cell> |
1089 | 350 | <Cell ss:StyleID="line_left_grey"><Data ss:Type="String">${line.get('eta', False) not in (False, 'False') and saleUstr(formatLang(line.get('eta'), date=True)) or ''|x}</Data></Cell> | ||
1090 | 351 | <Cell ss:StyleID="line_left_grey"><Data ss:Type="String">${line.get('rts', False) not in (False, 'False') and saleUstr(formatLang(line.get('rts'), date=True)) or ''|x}</Data></Cell> | ||
1091 | 352 | % else: | ||
1092 | 353 | <Cell ss:StyleID="line_left"><Data ss:Type="String">${o.name|x}</Data></Cell> | ||
1093 | 354 | <Cell ss:StyleID="line_left"><Data ss:Type="String">${o.client_order_ref or ''|x}</Data></Cell> | ||
1094 | 355 | <Cell ss:StyleID="line_left"><Data ss:Type="String">${line.get('po_name', '')|x}</Data></Cell> | ||
1095 | 356 | <Cell ss:StyleID="line_left"><Data ss:Type="String">${getSel(o, 'state')|x}</Data></Cell> | ||
1096 | 357 | <Cell ss:StyleID="line_left"><Data ss:Type="String">${line.get('state_display', '-')|x}</Data></Cell> | ||
1097 | 358 | <Cell ss:StyleID="line_left"><Data ss:Type="String">${saleUstr(formatLang(o.date_order, date=True))|x}</Data></Cell> | ||
1098 | 359 | <Cell ss:StyleID="line_left"><Data ss:Type="String">${o.delivery_requested_date and saleUstr(formatLang(o.delivery_requested_date, date=True)) or ''|x}</Data></Cell> | ||
1099 | 360 | <Cell ss:StyleID="line_center"><Data ss:Type="String">${line.get('line_number', '-')|x}</Data></Cell> | ||
1100 | 361 | <Cell ss:StyleID="line_left"><Data ss:Type="String">${line.get('product_code', '-') or ''|x}</Data></Cell> | ||
1101 | 362 | <Cell ss:StyleID="line_left"><Data ss:Type="String">${line.get('product_name', '-') or ''|x}</Data></Cell> | ||
1102 | 363 | % if line.get('ordered_qty'): | ||
1103 | 364 | <Cell ss:StyleID="line_right"><Data ss:Type="Number">${line.get('ordered_qty')}</Data></Cell> | ||
1104 | 365 | % else: | ||
1105 | 366 | <Cell ss:StyleID="line_left"><Data ss:Type="String">N/A</Data></Cell> | ||
1106 | 367 | % endif | ||
1107 | 368 | <Cell ss:StyleID="line_left"><Data ss:Type="String">${line.get('uom_id', '-')|x}</Data></Cell> | ||
1108 | 369 | % if line.get('delivered_qty'): | ||
1109 | 370 | <Cell ss:StyleID="line_right"><Data ss:Type="Number">${line.get('delivered_qty')}</Data></Cell> | ||
1110 | 371 | % else: | ||
1111 | 372 | <Cell ss:StyleID="line_left"><Data ss:Type="String">N/A</Data></Cell> | ||
1112 | 373 | % endif | ||
1113 | 374 | <Cell ss:StyleID="line_left"><Data ss:Type="String">${line.get('delivered_uom', '')|x}</Data></Cell> | ||
1114 | 375 | <Cell ss:StyleID="line_left"><Data ss:Type="String">${line.get('packing', '')|x}</Data></Cell> | ||
1115 | 376 | % if line.get('extra_qty', False): | ||
1116 | 377 | <Cell ss:StyleID="line_left"><Data ss:Type="String">${line.get('backordered_qty', 0.00)} (+${line.get('extra_qty', 0.00)|x})</Data></Cell> | ||
1117 | 378 | % else: | ||
1118 | 379 | <Cell ss:StyleID="line_right"><Data ss:Type="Number">${line.get('backordered_qty')}</Data></Cell> | ||
1119 | 380 | % endif | ||
1120 | 381 | % if o.transport_type and o.transport_type not in (False, 'False', ''): | ||
1121 | 382 | <Cell ss:StyleID="line_left"><Data ss:Type="String">${getSel(o, 'transport_type')|x}</Data></Cell> | ||
1122 | 383 | % else: | ||
1123 | 384 | <Cell ss:StyleID="line_left"><Data ss:Type="String"></Data></Cell> | ||
1124 | 385 | % endif | ||
1125 | 386 | % if line.get('is_delivered'): | ||
1126 | 387 | <Cell ss:StyleID="line_left_green"><Data ss:Type="String">${line.get('shipment', '')|x}</Data></Cell> | ||
1127 | 388 | % else: | ||
1128 | 389 | <Cell ss:StyleID="line_left"><Data ss:Type="String">${line.get('shipment', '')|x}</Data></Cell> | ||
1129 | 390 | % endif | ||
1130 | 391 | <Cell ss:StyleID="line_left"><Data ss:Type="String">${line.get('cdd', False) not in (False, 'False') and saleUstr(formatLang(line.get('cdd'), date=True)) or ''|x}</Data></Cell> | ||
1131 | 392 | <Cell ss:StyleID="line_left"><Data ss:Type="String">${line.get('eta', False) not in (False, 'False') and saleUstr(formatLang(line.get('eta'), date=True)) or ''|x}</Data></Cell> | ||
1132 | 393 | <Cell ss:StyleID="line_left"><Data ss:Type="String">${line.get('rts', False) not in (False, 'False') and saleUstr(formatLang(line.get('rts'), date=True)) or ''|x}</Data></Cell> | ||
1133 | 394 | % endif | ||
1134 | 297 | </Row> | 395 | </Row> |
1135 | 298 | % endfor | 396 | % endfor |
1136 | 299 | 397 | ||
1137 | 300 | 398 | ||
1138 | === modified file 'bin/addons/sales_followup/report/sale_follow_up_report_multi.py' | |||
1139 | --- bin/addons/sales_followup/report/sale_follow_up_report_multi.py 2017-09-14 08:41:12 +0000 | |||
1140 | +++ bin/addons/sales_followup/report/sale_follow_up_report_multi.py 2018-05-17 08:41:16 +0000 | |||
1141 | @@ -121,7 +121,7 @@ | |||
1142 | 121 | fl_index = 0 | 121 | fl_index = 0 |
1143 | 122 | m_index = 0 | 122 | m_index = 0 |
1144 | 123 | bo_qty = line.product_uom_qty | 123 | bo_qty = line.product_uom_qty |
1146 | 124 | po_name = '' | 124 | po_name = '-' |
1147 | 125 | cdd = False | 125 | cdd = False |
1148 | 126 | linked_pol = self.pool.get('purchase.order.line').search(self.cr, self.uid, [('linked_sol_id', '=', line.id)]) | 126 | linked_pol = self.pool.get('purchase.order.line').search(self.cr, self.uid, [('linked_sol_id', '=', line.id)]) |
1149 | 127 | if linked_pol: | 127 | if linked_pol: |
1150 | @@ -131,12 +131,16 @@ | |||
1151 | 131 | if not cdd and line.order_id.delivery_confirmed_date: | 131 | if not cdd and line.order_id.delivery_confirmed_date: |
1152 | 132 | cdd = line.order_id.delivery_confirmed_date | 132 | cdd = line.order_id.delivery_confirmed_date |
1153 | 133 | 133 | ||
1154 | 134 | data = { | ||
1155 | 135 | 'state': line.state, | ||
1156 | 136 | 'state_display': line.state_to_display, | ||
1157 | 137 | } | ||
1158 | 138 | |||
1159 | 134 | for move in line.move_ids: | 139 | for move in line.move_ids: |
1160 | 135 | m_type = move.product_qty != 0.00 and move.picking_id.type == 'out' | 140 | m_type = move.product_qty != 0.00 and move.picking_id.type == 'out' |
1161 | 136 | ppl = move.picking_id.subtype == 'packing' and move.picking_id.shipment_id and not self._is_returned(move) | 141 | ppl = move.picking_id.subtype == 'packing' and move.picking_id.shipment_id and not self._is_returned(move) |
1162 | 137 | ppl_not_shipped = move.picking_id.subtype == 'ppl' and move.picking_id.state not in ('cancel', 'done') | 142 | ppl_not_shipped = move.picking_id.subtype == 'ppl' and move.picking_id.state not in ('cancel', 'done') |
1163 | 138 | s_out = move.picking_id.subtype == 'standard' and move.state == 'done' and move.location_dest_id.usage == 'customer' | 143 | s_out = move.picking_id.subtype == 'standard' and move.state == 'done' and move.location_dest_id.usage == 'customer' |
1164 | 139 | |||
1165 | 140 | if m_type and (ppl or s_out or ppl_not_shipped): | 144 | if m_type and (ppl or s_out or ppl_not_shipped): |
1166 | 141 | # bo_qty < 0 if we receipt (IN) more quantities then expected (FO): | 145 | # bo_qty < 0 if we receipt (IN) more quantities then expected (FO): |
1167 | 142 | bo_qty -= self.pool.get('product.uom')._compute_qty( | 146 | bo_qty -= self.pool.get('product.uom')._compute_qty( |
1168 | @@ -146,7 +150,7 @@ | |||
1169 | 146 | move.product_qty, | 150 | move.product_qty, |
1170 | 147 | line.product_uom.id, | 151 | line.product_uom.id, |
1171 | 148 | ) | 152 | ) |
1173 | 149 | data = { | 153 | data.update({ |
1174 | 150 | 'po_name': po_name, | 154 | 'po_name': po_name, |
1175 | 151 | 'cdd': cdd, | 155 | 'cdd': cdd, |
1176 | 152 | 'line_number': line.line_number, | 156 | 'line_number': line.line_number, |
1177 | @@ -154,7 +158,7 @@ | |||
1178 | 154 | 'product_code': line.product_id.code, | 158 | 'product_code': line.product_id.code, |
1179 | 155 | 'is_delivered': False, | 159 | 'is_delivered': False, |
1180 | 156 | 'backordered_qty': 0.00, | 160 | 'backordered_qty': 0.00, |
1182 | 157 | } | 161 | }) |
1183 | 158 | if first_line: | 162 | if first_line: |
1184 | 159 | data.update({ | 163 | data.update({ |
1185 | 160 | 'uom_id': line.product_uom.name, | 164 | 'uom_id': line.product_uom.name, |
1186 | @@ -169,15 +173,15 @@ | |||
1187 | 169 | is_delivered = False | 173 | is_delivered = False |
1188 | 170 | is_shipment_done = False | 174 | is_shipment_done = False |
1189 | 171 | if ppl: | 175 | if ppl: |
1192 | 172 | packing = move.picking_id.previous_step_id.name or '' | 176 | packing = move.picking_id.previous_step_id.name or '-' |
1193 | 173 | shipment = move.picking_id.shipment_id and move.picking_id.shipment_id.name or '' | 177 | shipment = move.picking_id.shipment_id and move.picking_id.shipment_id.name or '-' |
1194 | 174 | eta = datetime.strptime(move.picking_id.shipment_id.shipment_actual_date[0:10], '%Y-%m-%d') | 178 | eta = datetime.strptime(move.picking_id.shipment_id.shipment_actual_date[0:10], '%Y-%m-%d') |
1195 | 175 | eta += timedelta(days=line.order_id.partner_id.supplier_lt or 0.00) | 179 | eta += timedelta(days=line.order_id.partner_id.supplier_lt or 0.00) |
1196 | 176 | is_delivered = move.picking_id.shipment_id.state == 'delivered' or False | 180 | is_delivered = move.picking_id.shipment_id.state == 'delivered' or False |
1197 | 177 | is_shipment_done = move.picking_id.shipment_id.state == 'done' or False | 181 | is_shipment_done = move.picking_id.shipment_id.state == 'done' or False |
1198 | 178 | else: | 182 | else: |
1201 | 179 | packing = move.picking_id.name or '' | 183 | packing = move.picking_id.name or '-' |
1202 | 180 | shipment = '' | 184 | shipment = '-' |
1203 | 181 | 185 | ||
1204 | 182 | if not grouped: | 186 | if not grouped: |
1205 | 183 | key = (packing, shipment, move.product_uom.name) | 187 | key = (packing, shipment, move.product_uom.name) |
1206 | @@ -188,21 +192,21 @@ | |||
1207 | 188 | 'shipment': shipment, | 192 | 'shipment': shipment, |
1208 | 189 | 'is_delivered': is_delivered, | 193 | 'is_delivered': is_delivered, |
1209 | 190 | 'delivered_qty': not only_bo and (is_shipment_done or is_delivered) and move.product_qty or 0.00, | 194 | 'delivered_qty': not only_bo and (is_shipment_done or is_delivered) and move.product_qty or 0.00, |
1211 | 191 | 'delivered_uom': not only_bo and (is_shipment_done or is_delivered) and move.product_uom.name or '', | 195 | 'delivered_uom': not only_bo and (is_shipment_done or is_delivered) and move.product_uom.name or '-', |
1212 | 192 | 'backordered_qty': not is_shipment_done and not is_delivered and line.order_id.state != 'cancel' and move.product_qty or 0.00, | 196 | 'backordered_qty': not is_shipment_done and not is_delivered and line.order_id.state != 'cancel' and move.product_qty or 0.00, |
1213 | 193 | 'rts': not only_bo and move.picking_id.shipment_id and move.picking_id.shipment_id.shipment_expected_date[0:10] or '', | 197 | 'rts': not only_bo and move.picking_id.shipment_id and move.picking_id.shipment_id.shipment_expected_date[0:10] or '', |
1214 | 194 | 'eta': not only_bo and eta and eta.strftime('%Y-%m-%d'), | 198 | 'eta': not only_bo and eta and eta.strftime('%Y-%m-%d'), |
1216 | 195 | 'transport': not only_bo and move.picking_id.shipment_id and move.picking_id.shipment_id.transport_type or '', | 199 | 'transport': not only_bo and move.picking_id.shipment_id and move.picking_id.shipment_id.transport_type, |
1217 | 196 | }) | 200 | }) |
1218 | 197 | else: | 201 | else: |
1219 | 198 | if move.picking_id.type == 'out' and move.picking_id.subtype == 'packing': | 202 | if move.picking_id.type == 'out' and move.picking_id.subtype == 'packing': |
1220 | 199 | packing = move.picking_id.previous_step_id.name | 203 | packing = move.picking_id.previous_step_id.name |
1222 | 200 | shipment = move.picking_id.shipment_id.name or '' | 204 | shipment = move.picking_id.shipment_id.name or '-' |
1223 | 201 | is_shipment_done = move.picking_id.shipment_id.state == 'done' | 205 | is_shipment_done = move.picking_id.shipment_id.state == 'done' |
1224 | 202 | else: | 206 | else: |
1226 | 203 | shipment = move.picking_id.name or '' | 207 | shipment = move.picking_id.name or '-' |
1227 | 204 | is_shipment_done = move.picking_id.state == 'done' | 208 | is_shipment_done = move.picking_id.state == 'done' |
1229 | 205 | packing = '' | 209 | packing = '-' |
1230 | 206 | if not grouped: | 210 | if not grouped: |
1231 | 207 | key = (packing, False, move.product_uom.name) | 211 | key = (packing, False, move.product_uom.name) |
1232 | 208 | else: | 212 | else: |
1233 | @@ -211,18 +215,24 @@ | |||
1234 | 211 | data.update({ | 215 | data.update({ |
1235 | 212 | 'packing': packing, | 216 | 'packing': packing, |
1236 | 213 | 'delivered_qty': is_shipment_done and move.product_qty or 0.00, | 217 | 'delivered_qty': is_shipment_done and move.product_qty or 0.00, |
1238 | 214 | 'delivered_uom': is_shipment_done and move.product_uom.name or '', | 218 | 'delivered_uom': is_shipment_done and move.product_uom.name or '-', |
1239 | 215 | 'rts': line.order_id.ready_to_ship_date, | 219 | 'rts': line.order_id.ready_to_ship_date, |
1240 | 216 | 'shipment': shipment, | 220 | 'shipment': shipment, |
1241 | 217 | }) | 221 | }) |
1242 | 218 | 222 | ||
1244 | 219 | if key in keys: | 223 | if key in keys and lines: |
1245 | 220 | for rline in lines: | 224 | for rline in lines: |
1246 | 221 | if rline['packing'] == key[0] and rline['shipment'] == key[1] and rline['delivered_uom'] == key[2]: | 225 | if rline['packing'] == key[0] and rline['shipment'] == key[1] and rline['delivered_uom'] == key[2]: |
1247 | 222 | if not grouped or (grouped and line.line_number == key[3]): | 226 | if not grouped or (grouped and line.line_number == key[3]): |
1248 | 223 | rline.update({ | 227 | rline.update({ |
1249 | 224 | 'delivered_qty': rline['delivered_qty'] + data['delivered_qty'], | 228 | 'delivered_qty': rline['delivered_qty'] + data['delivered_qty'], |
1250 | 225 | }) | 229 | }) |
1251 | 230 | if rline['packing'] == key[0] and rline['shipment'] == key[1] and move.product_uom.name == key[2]\ | ||
1252 | 231 | and (ppl_not_shipped or not is_shipment_done): | ||
1253 | 232 | if not grouped or (grouped and line.line_number == key[3]): | ||
1254 | 233 | rline.update({ | ||
1255 | 234 | 'backordered_qty': rline['backordered_qty'] + data['backordered_qty'], | ||
1256 | 235 | }) | ||
1257 | 226 | else: | 236 | else: |
1258 | 227 | keys.append(key) | 237 | keys.append(key) |
1259 | 228 | lines.append(data) | 238 | lines.append(data) |
1260 | @@ -230,23 +240,25 @@ | |||
1261 | 230 | fl_index = m_index | 240 | fl_index = m_index |
1262 | 231 | m_index += 1 | 241 | m_index += 1 |
1263 | 232 | 242 | ||
1264 | 243 | # reset the data to prevent delivered_qty problem when line is split in PICK | ||
1265 | 244 | data = {} | ||
1266 | 245 | |||
1267 | 233 | # No move found | 246 | # No move found |
1268 | 234 | if first_line: | 247 | if first_line: |
1270 | 235 | data = { | 248 | data.update({ |
1271 | 236 | 'line_number': line.line_number, | 249 | 'line_number': line.line_number, |
1272 | 237 | 'po_name': po_name, | 250 | 'po_name': po_name, |
1273 | 238 | 'product_code': line.product_id.default_code, | 251 | 'product_code': line.product_id.default_code, |
1274 | 239 | 'product_name': line.product_id.name, | 252 | 'product_name': line.product_id.name, |
1275 | 240 | 'uom_id': line.product_uom.name, | 253 | 'uom_id': line.product_uom.name, |
1276 | 241 | 'ordered_qty': line.product_uom_qty, | 254 | 'ordered_qty': line.product_uom_qty, |
1278 | 242 | 'rts': line.order_id.state not in ('draft', 'validated', 'cancel') and line.order_id.ready_to_ship_date or '', | 255 | 'rts': line.order_id.state not in ('draft', 'validated', 'cancel') and line.order_id.ready_to_ship_date, |
1279 | 243 | 'delivered_qty': 0.00, | 256 | 'delivered_qty': 0.00, |
1281 | 244 | 'delivered_uom': '', | 257 | 'delivered_uom': '-', |
1282 | 245 | 'backordered_qty': line.product_uom_qty if line.order_id.state != 'cancel' else 0.00, | 258 | 'backordered_qty': line.product_uom_qty if line.order_id.state != 'cancel' else 0.00, |
1283 | 246 | 'cdd': cdd, | 259 | 'cdd': cdd, |
1285 | 247 | } | 260 | }) |
1286 | 248 | lines.append(data) | 261 | lines.append(data) |
1287 | 249 | |||
1288 | 250 | # Put the backorderd qty on the first line | 262 | # Put the backorderd qty on the first line |
1289 | 251 | if not lines: | 263 | if not lines: |
1290 | 252 | continue | 264 | continue |
1291 | @@ -266,8 +278,8 @@ | |||
1292 | 266 | }) | 278 | }) |
1293 | 267 | if not first_line: | 279 | if not first_line: |
1294 | 268 | lines[fl_index].update({ | 280 | lines[fl_index].update({ |
1297 | 269 | 'shipment': '', | 281 | 'shipment': '-', |
1298 | 270 | 'packing': '', | 282 | 'packing': '-', |
1299 | 271 | }) | 283 | }) |
1300 | 272 | 284 | ||
1301 | 273 | elif bo_qty < 0: | 285 | elif bo_qty < 0: |
1302 | 274 | 286 | ||
1303 | === modified file 'bin/addons/sales_followup/wizard/ir_followup_location_wizard.py' | |||
1304 | --- bin/addons/sales_followup/wizard/ir_followup_location_wizard.py 2017-08-22 12:23:43 +0000 | |||
1305 | +++ bin/addons/sales_followup/wizard/ir_followup_location_wizard.py 2018-05-17 08:41:16 +0000 | |||
1306 | @@ -81,14 +81,11 @@ | |||
1307 | 81 | 'confirmed_ok': fields.boolean( | 81 | 'confirmed_ok': fields.boolean( |
1308 | 82 | string='Confirmed', | 82 | string='Confirmed', |
1309 | 83 | ), | 83 | ), |
1310 | 84 | 'exception_ok': fields.boolean( | ||
1311 | 85 | string='Exception', | ||
1312 | 86 | ), | ||
1313 | 87 | 'closed_ok': fields.boolean( | 84 | 'closed_ok': fields.boolean( |
1314 | 88 | string='Closed', | 85 | string='Closed', |
1315 | 89 | ), | 86 | ), |
1316 | 90 | 'cancel_ok': fields.boolean( | 87 | 'cancel_ok': fields.boolean( |
1318 | 91 | string='Cancel', | 88 | string='Cancelled', |
1319 | 92 | ), | 89 | ), |
1320 | 93 | 'only_bo': fields.boolean( | 90 | 'only_bo': fields.boolean( |
1321 | 94 | string='Pending order lines only (PDF)', | 91 | string='Pending order lines only (PDF)', |
1322 | @@ -115,19 +112,16 @@ | |||
1323 | 115 | state_domain = [] | 112 | state_domain = [] |
1324 | 116 | 113 | ||
1325 | 117 | if wizard.draft_ok: | 114 | if wizard.draft_ok: |
1327 | 118 | state_domain.append('draft') | 115 | state_domain.extend(['draft', 'draft_p']) |
1328 | 119 | 116 | ||
1329 | 120 | if wizard.validated_ok: | 117 | if wizard.validated_ok: |
1331 | 121 | state_domain.extend(['validated', 'waiting_date']) | 118 | state_domain.extend(['validated', 'validated_p']) |
1332 | 122 | 119 | ||
1333 | 123 | if wizard.sourced_ok: | 120 | if wizard.sourced_ok: |
1335 | 124 | state_domain.append('sourced') | 121 | state_domain.extend(['sourced', 'sourced_p']) |
1336 | 125 | 122 | ||
1337 | 126 | if wizard.confirmed_ok: | 123 | if wizard.confirmed_ok: |
1342 | 127 | state_domain.extend(['manual', 'progress']) | 124 | state_domain.extend(['confirmed', 'confirmed_p']) |
1339 | 128 | |||
1340 | 129 | if wizard.exception_ok: | ||
1341 | 130 | state_domain.extend(['shipping_except', 'invoice_except']) | ||
1343 | 131 | 125 | ||
1344 | 132 | if wizard.closed_ok: | 126 | if wizard.closed_ok: |
1345 | 133 | state_domain.append('done') | 127 | state_domain.append('done') |
1346 | 134 | 128 | ||
1347 | === modified file 'bin/addons/sales_followup/wizard/ir_followup_location_wizard_view.xml' | |||
1348 | --- bin/addons/sales_followup/wizard/ir_followup_location_wizard_view.xml 2017-08-22 15:47:17 +0000 | |||
1349 | +++ bin/addons/sales_followup/wizard/ir_followup_location_wizard_view.xml 2018-05-17 08:41:16 +0000 | |||
1350 | @@ -20,7 +20,6 @@ | |||
1351 | 20 | <field name="validated_ok" /> | 20 | <field name="validated_ok" /> |
1352 | 21 | <field name="sourced_ok" /> | 21 | <field name="sourced_ok" /> |
1353 | 22 | <field name="confirmed_ok" /> | 22 | <field name="confirmed_ok" /> |
1354 | 23 | <field name="exception_ok" /> | ||
1355 | 24 | <field name="closed_ok" /> | 23 | <field name="closed_ok" /> |
1356 | 25 | <field name="cancel_ok" /> | 24 | <field name="cancel_ok" /> |
1357 | 26 | </group> | 25 | </group> |
1358 | 27 | 26 | ||
1359 | === modified file 'bin/addons/sales_followup/wizard/sale_followup_multi_wizard.py' | |||
1360 | --- bin/addons/sales_followup/wizard/sale_followup_multi_wizard.py 2016-04-20 14:10:30 +0000 | |||
1361 | +++ bin/addons/sales_followup/wizard/sale_followup_multi_wizard.py 2018-05-17 08:41:16 +0000 | |||
1362 | @@ -88,14 +88,11 @@ | |||
1363 | 88 | 'confirmed_ok': fields.boolean( | 88 | 'confirmed_ok': fields.boolean( |
1364 | 89 | string='Confirmed', | 89 | string='Confirmed', |
1365 | 90 | ), | 90 | ), |
1366 | 91 | 'exception_ok': fields.boolean( | ||
1367 | 92 | string='Exception', | ||
1368 | 93 | ), | ||
1369 | 94 | 'closed_ok': fields.boolean( | 91 | 'closed_ok': fields.boolean( |
1370 | 95 | string='Closed', | 92 | string='Closed', |
1371 | 96 | ), | 93 | ), |
1372 | 97 | 'cancel_ok': fields.boolean( | 94 | 'cancel_ok': fields.boolean( |
1374 | 98 | string='Cancel', | 95 | string='Cancelled', |
1375 | 99 | ), | 96 | ), |
1376 | 100 | 'only_bo': fields.boolean( | 97 | 'only_bo': fields.boolean( |
1377 | 101 | string='Pending order lines only (PDF)', | 98 | string='Pending order lines only (PDF)', |
1378 | @@ -122,19 +119,16 @@ | |||
1379 | 122 | state_domain = [] | 119 | state_domain = [] |
1380 | 123 | 120 | ||
1381 | 124 | if wizard.draft_ok: | 121 | if wizard.draft_ok: |
1383 | 125 | state_domain.append('draft') | 122 | state_domain.extend(['draft', 'draft_p']) |
1384 | 126 | 123 | ||
1385 | 127 | if wizard.validated_ok: | 124 | if wizard.validated_ok: |
1387 | 128 | state_domain.extend(['validated', 'waiting_date']) | 125 | state_domain.extend(['validated', 'validated_p']) |
1388 | 129 | 126 | ||
1389 | 130 | if wizard.sourced_ok: | 127 | if wizard.sourced_ok: |
1391 | 131 | state_domain.append('sourced') | 128 | state_domain.extend(['sourced', 'sourced_p']) |
1392 | 132 | 129 | ||
1393 | 133 | if wizard.confirmed_ok: | 130 | if wizard.confirmed_ok: |
1398 | 134 | state_domain.extend(['manual', 'progress']) | 131 | state_domain.extend(['confirmed', 'confirmed_p']) |
1395 | 135 | |||
1396 | 136 | if wizard.exception_ok: | ||
1397 | 137 | state_domain.extend(['shipping_except', 'invoice_except']) | ||
1399 | 138 | 132 | ||
1400 | 139 | if wizard.closed_ok: | 133 | if wizard.closed_ok: |
1401 | 140 | state_domain.append('done') | 134 | state_domain.append('done') |
1402 | 141 | 135 | ||
1403 | === modified file 'bin/addons/sales_followup/wizard/sale_followup_multi_wizard_view.xml' | |||
1404 | --- bin/addons/sales_followup/wizard/sale_followup_multi_wizard_view.xml 2016-04-20 14:10:30 +0000 | |||
1405 | +++ bin/addons/sales_followup/wizard/sale_followup_multi_wizard_view.xml 2018-05-17 08:41:16 +0000 | |||
1406 | @@ -20,7 +20,6 @@ | |||
1407 | 20 | <field name="validated_ok" /> | 20 | <field name="validated_ok" /> |
1408 | 21 | <field name="sourced_ok" /> | 21 | <field name="sourced_ok" /> |
1409 | 22 | <field name="confirmed_ok" /> | 22 | <field name="confirmed_ok" /> |
1410 | 23 | <field name="exception_ok" /> | ||
1411 | 24 | <field name="closed_ok" /> | 23 | <field name="closed_ok" /> |
1412 | 25 | <field name="cancel_ok" /> | 24 | <field name="cancel_ok" /> |
1413 | 26 | </group> | 25 | </group> |
1414 | 27 | 26 | ||
1415 | === modified file 'bin/addons/stock_override/stock.py' | |||
1416 | --- bin/addons/stock_override/stock.py 2017-11-13 08:37:20 +0000 | |||
1417 | +++ bin/addons/stock_override/stock.py 2018-05-17 08:41:16 +0000 | |||
1418 | @@ -1721,6 +1721,7 @@ | |||
1419 | 1721 | ('product_uom', '=', loc['uom_id']), | 1721 | ('product_uom', '=', loc['uom_id']), |
1420 | 1722 | ('line_number', '=', move['line_number']), | 1722 | ('line_number', '=', move['line_number']), |
1421 | 1723 | ('location_id', '=', loc['location_id']), | 1723 | ('location_id', '=', loc['location_id']), |
1422 | 1724 | ('sale_line_id', '=', move['sale_line_id'] and move['sale_line_id'][0] or False), | ||
1423 | 1724 | ('location_dest_id', '=', move['location_dest_id'][0]), | 1725 | ('location_dest_id', '=', move['location_dest_id'][0]), |
1424 | 1725 | ('prodlot_id', '=', loc['prodlot_id'])], | 1726 | ('prodlot_id', '=', loc['prodlot_id'])], |
1425 | 1726 | context=context) | 1727 | context=context) |