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 | sol_to_relink = self.pool.get('sale.order.line').search(cr, uid, [ |
6 | ('product_uom_qty', '=', out_move.product_qty - uom_partial_qty), |
7 | ('line_number', '=', out_move.sale_line_id.line_number), |
8 | + ('order_id', '=', out_move.picking_id.sale_id.id), |
9 | ], context=context) |
10 | if sol_to_relink: |
11 | move_values.update({'sale_line_id': sol_to_relink[0],}) |
12 | |
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 | msgid "The account %s - %s cannot be used as Account Payable." |
18 | msgstr "Le compte %s - %s ne peut pas être utilisé comme Compte Fournisseur." |
19 | |
20 | +#. modules: msf_supply_doc_export, sales_followup |
21 | +#: report:po.follow.up_rml:0 |
22 | +#: report:addons/sales_followup/report/ir_follow_up_location_report_xls.mako:280 |
23 | +#: report:ir.follow.up.location.report_pdf:0 |
24 | +#: report:addons/sales_followup/report/sale_follow_up_multi_report_xls.mako:231 |
25 | +#: report:sales.follow.up.multi.report_pdf:0 |
26 | +msgid "Line Status" |
27 | +msgstr "Statut de la ligne" |
28 | + |
29 | +#. module: sales_followup |
30 | +#: field:ir.followup.location.wizard,cancel_ok:0 |
31 | +#: field:sale.followup.multi.wizard,cancel_ok:0 |
32 | +msgid "Cancelled" |
33 | +msgstr "Annulé" |
34 | + |
35 | +#. modules: purchase, purchase_override, sale |
36 | +#: selection:purchase.order.line,state:0 |
37 | +#: selection:purchase.order.merged.line,state:0 |
38 | +#: selection:sale.order.line,state:0 |
39 | +msgid "Cancelled-r" |
40 | +msgstr "Annulé-r" |
41 | + |
42 | +#. modules: msf_order_date, purchase, documents_done, sale, purchase_override, stock_forecast, purchase_allocation_report, sourcing |
43 | +#: selection:documents.done.wizard,display_state:0 |
44 | +#: selection:sale.order.line,so_state_stored:0 |
45 | +#: selection:purchase.order,state:0 |
46 | +#: selection:purchase.order.line,order_state_purchase_order_line:0 |
47 | +#: selection:purchase.order.line,po_state_stored:0 |
48 | +#: selection:purchase.order.line.allocation.report,state:0 |
49 | +#: selection:purchase.order.merged.line,order_state_purchase_order_line:0 |
50 | +#: selection:purchase.order.merged.line,po_state_stored:0 |
51 | +#: selection:sale.order,state:0 |
52 | +#: selection:sale.order,state_hidden_sale_order:0 |
53 | +#: selection:sale.order.leave.close,order_state:0 |
54 | +#: selection:sale.report,state:0 |
55 | +#: selection:sale.order.line,sale_order_state:0 |
56 | +#: selection:stock.forecast.line,state:0 |
57 | +msgid "Draft-p" |
58 | +msgstr "Brouillon-p" |
59 | + |
60 | +#. modules: msf_order_date, purchase, documents_done, sale, purchase_override, stock_forecast, purchase_allocation_report, sourcing |
61 | +#: selection:documents.done.wizard,display_state:0 |
62 | +#: selection:sale.order.line,so_state_stored:0 |
63 | +#: selection:purchase.order,state:0 |
64 | +#: selection:purchase.order.line,order_state_purchase_order_line:0 |
65 | +#: selection:purchase.order.line,po_state_stored:0 |
66 | +#: selection:purchase.order.line.allocation.report,state:0 |
67 | +#: selection:purchase.order.merged.line,order_state_purchase_order_line:0 |
68 | +#: selection:purchase.order.merged.line,po_state_stored:0 |
69 | +#: selection:sale.order,state:0 |
70 | +#: selection:sale.order,state_hidden_sale_order:0 |
71 | +#: selection:sale.order.leave.close,order_state:0 |
72 | +#: selection:sale.report,state:0 |
73 | +#: selection:sale.order.line,sale_order_state:0 |
74 | +#: selection:stock.forecast.line,state:0 |
75 | +msgid "Validated-p" |
76 | +msgstr "Validé-p" |
77 | + |
78 | +#. modules: purchase, purchase_override |
79 | +#: selection:purchase.order.line,state:0 |
80 | +#: selection:purchase.order.merged.line,state:0 |
81 | +msgid "Validated-n" |
82 | +msgstr "Validé-n" |
83 | + |
84 | +#. modules: purchase, purchase_override, sale |
85 | +#: selection:purchase.order.line,state:0 |
86 | +#: selection:purchase.order.merged.line,state:0 |
87 | +#: selection:sale.order.line,state:0 |
88 | +msgid "Sourced-v" |
89 | +msgstr "Sourcé-v" |
90 | + |
91 | +#. modules: msf_order_date, purchase, documents_done, sale, purchase_override, stock_forecast, purchase_allocation_report, sourcing |
92 | +#: selection:documents.done.wizard,display_state:0 |
93 | +#: selection:sale.order.line,so_state_stored:0 |
94 | +#: selection:purchase.order,state:0 |
95 | +#: selection:purchase.order.line,order_state_purchase_order_line:0 |
96 | +#: selection:purchase.order.line,po_state_stored:0 |
97 | +#: selection:purchase.order.line.allocation.report,state:0 |
98 | +#: selection:purchase.order.merged.line,order_state_purchase_order_line:0 |
99 | +#: selection:purchase.order.merged.line,po_state_stored:0 |
100 | +#: selection:sale.order,state:0 |
101 | +#: selection:sale.order,state_hidden_sale_order:0 |
102 | +#: selection:sale.order.leave.close,order_state:0 |
103 | +#: selection:sale.report,state:0 |
104 | +#: selection:sale.order.line,sale_order_state:0 |
105 | +#: selection:stock.forecast.line,state:0 |
106 | +msgid "Sourced-p" |
107 | +msgstr "Sourcé-p" |
108 | + |
109 | +#. modules: purchase, purchase_override, sale |
110 | +#: selection:purchase.order.line,state:0 |
111 | +#: selection:purchase.order.merged.line,state:0 |
112 | +#: selection:sale.order.line,state:0 |
113 | +msgid "Sourced-n" |
114 | +msgstr "Sourcé-n" |
115 | + |
116 | +#. module: sale |
117 | +#: field:sale.order.line,set_as_sourced_n:0 |
118 | +msgid "Sourced-n line" |
119 | +msgstr "Ligne sourcée-n" |
120 | + |
121 | +#. modules: purchase, purchase_override, sale |
122 | +#: selection:purchase.order.line,state:0 |
123 | +#: selection:purchase.order.merged.line,state:0 |
124 | +#: selection:sale.order.line,state:0 |
125 | +msgid "Sourced-sy" |
126 | +msgstr "Sourcé-sy" |
127 | + |
128 | +#. modules: msf_order_date, purchase, documents_done, sale, purchase_override, stock_forecast, purchase_allocation_report, sourcing |
129 | +#: selection:documents.done.wizard,display_state:0 |
130 | +#: selection:sale.order.line,so_state_stored:0 |
131 | +#: selection:purchase.order,state:0 |
132 | +#: selection:purchase.order.line,order_state_purchase_order_line:0 |
133 | +#: selection:purchase.order.line,po_state_stored:0 |
134 | +#: selection:purchase.order.line.allocation.report,state:0 |
135 | +#: selection:purchase.order.merged.line,order_state_purchase_order_line:0 |
136 | +#: selection:purchase.order.merged.line,po_state_stored:0 |
137 | +#: selection:sale.order,state:0 |
138 | +#: selection:sale.order,state_hidden_sale_order:0 |
139 | +#: selection:sale.order.leave.close,order_state:0 |
140 | +#: selection:sale.report,state:0 |
141 | +#: selection:sale.order.line,sale_order_state:0 |
142 | +#: selection:stock.forecast.line,state:0 |
143 | +msgid "Confirmed-p" |
144 | +msgstr "Confirmé-p" |
145 | + |
146 | #. module: account_mcdb |
147 | #: field:account.mcdb,display_mcdb_load_button:0 |
148 | msgid "Display the Load button" |
149 | @@ -107673,3 +107799,16 @@ |
150 | #: sql_constraint:account.move.line:0 |
151 | msgid "Wrong credit or debit value in booking currency!" |
152 | msgstr "Valeur de crédit ou débit erronée en devise d'enregistrement !" |
153 | + |
154 | +#. module: sales_followup |
155 | +#: report:addons/sales_followup/report/ir_follow_up_location_report_xls.mako:281 |
156 | +#: report:addons/sales_followup/report/sale_follow_up_multi_report_xls.mako:230 |
157 | +msgid "Doc. Status" |
158 | +msgstr "Statut du Doc." |
159 | + |
160 | +#. modules: msf_supply_doc_export, sales_followup |
161 | +#: report:po.follow.up_rml:0 |
162 | +#: report:ir.follow.up.location.report_pdf:0 |
163 | +#: report:sales.follow.up.multi.report_pdf:0 |
164 | +msgid "Doc. Status:" |
165 | +msgstr "Statut du Doc.:" |
166 | |
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 | report_line['order_ref'] = '' |
172 | report_line['order_created'] = '' |
173 | report_line['order_confirmed_date'] = '' |
174 | + report_line['raw_state'] = analytic_line.get('raw_state') |
175 | report_line['line_status'] = '' |
176 | report_line['state'] = '' |
177 | report_line['order_status'] = '' |
178 | @@ -542,6 +543,7 @@ |
179 | 'order_ref': order.name or '', |
180 | 'order_created': order.date_order or '', |
181 | 'order_confirmed_date': order.delivery_confirmed_date or '', |
182 | + 'raw_state': line.state, |
183 | 'line_status': get_sel(self.cr, self.uid, 'purchase.order.line', 'state', line.state, {}) or '', |
184 | 'state': line.state_to_display or '', |
185 | 'order_status': self._get_states().get(order.state, ''), |
186 | @@ -567,6 +569,7 @@ |
187 | 'order_ref': order.name or '', |
188 | 'order_created': order.date_order or '', |
189 | 'order_confirmed_date': order.delivery_confirmed_date or '', |
190 | + 'raw_state': line.state, |
191 | 'order_status': self._get_states().get(order.state, ''), |
192 | 'line_status': first_line and get_sel(self.cr, self.uid, 'purchase.order.line', 'state', line.state, {}) or '', |
193 | 'state': line.state_to_display or '', |
194 | @@ -598,6 +601,7 @@ |
195 | 'order_ref': order.name or '', |
196 | 'order_created': order.date_order or '', |
197 | 'order_confirmed_date': order.delivery_confirmed_date or '', |
198 | + 'raw_state': line.state, |
199 | 'order_status': self._get_states().get(order.state, ''), |
200 | 'line_status': first_line and get_sel(self.cr, self.uid, 'purchase.order.line', 'state', line.state, {}) or '', |
201 | 'state': line.state_to_display or '', |
202 | @@ -629,6 +633,7 @@ |
203 | 'order_ref': order.name or '', |
204 | 'order_created': order.date_order or '', |
205 | 'order_confirmed_date': order.delivery_confirmed_date or '', |
206 | + 'raw_state': line.state, |
207 | 'order_status': self._get_states().get(order.state, ''), |
208 | 'line_status': get_sel(self.cr, self.uid, 'purchase.order.line', 'state', line.state, {}) or '', |
209 | 'state': line.state_to_display or '', |
210 | @@ -657,7 +662,7 @@ |
211 | dist_id = po_line.order_id.analytic_distribution_id.id # get it from the header |
212 | ccdl_ids = ccdl_obj.search(self.cr, self.uid, [('distribution_id','=',dist_id)]) |
213 | ccdl_rows = ccdl_obj.browse(self.cr, self.uid, ccdl_ids) |
214 | - dist_lines = [{'cost_center': ccdl.analytic_id.code,'destination': ccdl.destination_id.code} for ccdl in ccdl_rows] |
215 | + dist_lines = [{'cost_center': ccdl.analytic_id.code,'destination': ccdl.destination_id.code, 'raw_state': po_line.state} for ccdl in ccdl_rows] |
216 | if not dist_lines: |
217 | dist_lines = [{'cost_center': '','destination': ''}] |
218 | return dist_lines |
219 | @@ -690,7 +695,7 @@ |
220 | return self.datas.get('report_header')[1] |
221 | |
222 | def getPOLineHeaders(self): |
223 | - 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'] |
224 | + 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 | |
226 | |
227 | |
228 | |
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 | <paraStyle name="P2" fontName="Helvetica" fontSize="8.0" leading="10"/> |
234 | <paraStyle name="P3" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER"/> |
235 | <paraStyle name="P4" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT"/> |
236 | + <paraStyle name="P4Grey" textColor="#747474" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT"/> |
237 | <paraStyle name="P4Center" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER"/> |
238 | + <paraStyle name="P4CenterGrey" textColor="#747474" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER"/> |
239 | <paraStyle name="P4Left" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT"/> |
240 | + <paraStyle name="P4LeftGrey" textColor="#747474" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT"/> |
241 | <paraStyle name="P5" fontName="Helvetica" fontSize="8.0" leading="10"/> |
242 | <paraStyle name="Standard" fontName="Helvetica"/> |
243 | <paraStyle name="Heading" fontName="Helvetica" fontSize="14.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/> |
244 | @@ -60,7 +63,7 @@ |
245 | <td><para style="P2">Report Run Date: [[getRunParmsRML('run_date')]]</para></td> |
246 | <td><para style="P2">PO Date From: [[getRunParmsRML('date_from')]]</para></td> |
247 | <td><para style="P2">PO Date To: [[getRunParmsRML('date_thru')]]</para></td> |
248 | - <td><para style="P2">PO State: [[getRunParmsRML('state')]]</para></td> |
249 | + <td><para style="P2">Doc. Status: [[getRunParmsRML('state')]]</para></td> |
250 | <td><para style="P2">Supplier: [[getRunParmsRML('supplier')]]</para></td> |
251 | </tr> |
252 | </blockTable> |
253 | @@ -119,49 +122,62 @@ |
254 | <para style="P3">Cost Center</para> |
255 | </td> |
256 | <td> |
257 | - <para style="P3">State</para> |
258 | + <para style="P3">Line Status</para> |
259 | </td> |
260 | </tr> |
261 | <tr> |
262 | <para style="P4">[[ repeatIn(getPOLines(o.id), 'line') ]]</para> |
263 | <td> |
264 | - <para style="P4Center">[[ line['item'] ]]</para> |
265 | - </td> |
266 | - <td> |
267 | - <para style="P4Left">[[ line['code'] ]]</para> |
268 | - </td> |
269 | - <td> |
270 | - <para style="P4Left">[[ line['description'] ]]</para> |
271 | - </td> |
272 | - <td> |
273 | - <para style="P4Center">[[ line['qty_ordered'] ]]</para> |
274 | - </td> |
275 | - <td> |
276 | - <para style="P4Center">[[ line['uom'] ]]</para> |
277 | - </td> |
278 | - <td> |
279 | - <para style="P4Center">[[ line['qty_received'] ]]</para> |
280 | - </td> |
281 | - <td> |
282 | - <para style="P4Center">[[ line['in'] ]]</para> |
283 | - </td> |
284 | - <td> |
285 | - <para style="P4Center">[[ line['qty_backordered'] ]]</para> |
286 | - </td> |
287 | - <td> |
288 | - <para style="P4Center">[[ line['unit_price'] ]]</para> |
289 | - </td> |
290 | - <td> |
291 | - <para style="P4Center">[[ line['in_unit_price'] ]]</para> |
292 | - </td> |
293 | - <td> |
294 | - <para style="P4Center">[[ line['destination'] ]]</para> |
295 | - </td> |
296 | - <td> |
297 | - <para style="P4Center">[[ line['cost_centre'] ]]</para> |
298 | + <para style="P4Center">[[ line['raw_state'] not in ['cancel', 'cancel_r'] and line['item'] or removeParentNode('para') ]]</para> |
299 | + <para style="P4CenterGrey">[[ line['raw_state'] in ['cancel', 'cancel_r'] and line['item'] or removeParentNode('para') ]]</para> |
300 | + </td> |
301 | + <td> |
302 | + <para style="P4Left">[[ line['raw_state'] not in ['cancel', 'cancel_r'] and line['code'] or removeParentNode('para') ]]</para> |
303 | + <para style="P4LeftGrey">[[ line['raw_state'] in ['cancel', 'cancel_r'] and line['code'] or removeParentNode('para') ]]</para> |
304 | + </td> |
305 | + <td> |
306 | + <para style="P4Left">[[ line['raw_state'] not in ['cancel', 'cancel_r'] and line['description'] or removeParentNode('para') ]]</para> |
307 | + <para style="P4LeftGrey">[[ line['raw_state'] in ['cancel', 'cancel_r'] and line['description'] or removeParentNode('para') ]]</para> |
308 | + </td> |
309 | + <td> |
310 | + <para style="P4Center">[[ line['raw_state'] not in ['cancel', 'cancel_r'] and line['qty_ordered'] or removeParentNode('para') ]]</para> |
311 | + <para style="P4CenterGrey">[[ line['raw_state'] in ['cancel', 'cancel_r'] and line['qty_ordered'] or removeParentNode('para') ]]</para> |
312 | + </td> |
313 | + <td> |
314 | + <para style="P4Center">[[ line['raw_state'] not in ['cancel', 'cancel_r'] and line['uom'] or removeParentNode('para') ]]</para> |
315 | + <para style="P4CenterGrey">[[ line['raw_state'] in ['cancel', 'cancel_r'] and line['uom'] or removeParentNode('para') ]]</para> |
316 | + </td> |
317 | + <td> |
318 | + <para style="P4Center">[[ line['raw_state'] not in ['cancel', 'cancel_r'] and line['qty_received'] or removeParentNode('para') ]]</para> |
319 | + <para style="P4CenterGrey">[[ line['raw_state'] in ['cancel', 'cancel_r'] and line['qty_received'] or removeParentNode('para') ]]</para> |
320 | + </td> |
321 | + <td> |
322 | + <para style="P4Center">[[ line['raw_state'] not in ['cancel', 'cancel_r'] and line['in'] or removeParentNode('para') ]]</para> |
323 | + <para style="P4CenterGrey">[[ line['raw_state'] in ['cancel', 'cancel_r'] and line['in'] or removeParentNode('para') ]]</para> |
324 | + </td> |
325 | + <td> |
326 | + <para style="P4Center">[[ line['raw_state'] not in ['cancel', 'cancel_r'] and line['qty_backordered'] or removeParentNode('para') ]]</para> |
327 | + <para style="P4CenterGrey">[[ line['raw_state'] in ['cancel', 'cancel_r'] and line['qty_backordered'] or removeParentNode('para') ]]</para> |
328 | + </td> |
329 | + <td> |
330 | + <para style="P4Center">[[ line['raw_state'] not in ['cancel', 'cancel_r'] and line['unit_price'] or removeParentNode('para') ]]</para> |
331 | + <para style="P4CenterGrey">[[ line['raw_state'] in ['cancel', 'cancel_r'] and line['unit_price'] or removeParentNode('para') ]]</para> |
332 | + </td> |
333 | + <td> |
334 | + <para style="P4Center">[[ line['raw_state'] not in ['cancel', 'cancel_r'] and line['in_unit_price'] or removeParentNode('para') ]]</para> |
335 | + <para style="P4CenterGrey">[[ line['raw_state'] in ['cancel', 'cancel_r'] and line['in_unit_price'] or removeParentNode('para') ]]</para> |
336 | + </td> |
337 | + <td> |
338 | + <para style="P4Center">[[ line['raw_state'] not in ['cancel', 'cancel_r'] and line['destination'] or removeParentNode('para') ]]</para> |
339 | + <para style="P4CenterGrey">[[ line['raw_state'] in ['cancel', 'cancel_r'] and line['destination'] or removeParentNode('para') ]]</para> |
340 | + </td> |
341 | + <td> |
342 | + <para style="P4Center">[[ line['raw_state'] not in ['cancel', 'cancel_r'] and line['cost_centre'] or removeParentNode('para') ]]</para> |
343 | + <para style="P4CenterGrey">[[ line['raw_state'] in ['cancel', 'cancel_r'] and line['cost_centre'] or removeParentNode('para') ]]</para> |
344 | </td> |
345 | <td> |
346 | - <para style="P4Center">[[ line['state'] ]]</para> |
347 | + <para style="P4Center">[[ line['raw_state'] not in ['cancel', 'cancel_r'] and line['state'] or removeParentNode('para') ]]</para> |
348 | + <para style="P4CenterGrey">[[ line['raw_state'] in ['cancel', 'cancel_r'] and line['state'] or removeParentNode('para') ]]</para> |
349 | </td> |
350 | </tr> |
351 | |
352 | |
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 | <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" /> |
358 | </Borders> |
359 | </Style> |
360 | + |
361 | + <Style ss:ID="line_grey"> |
362 | + <Alignment ss:Horizontal="Center" ss:Vertical="Center" ss:WrapText="1"/> |
363 | + <Borders> |
364 | + <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" /> |
365 | + <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1" /> |
366 | + <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1" /> |
367 | + <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" /> |
368 | + </Borders> |
369 | + <Font ss:Color="#747474"/> |
370 | + </Style> |
371 | |
372 | <Style ss:ID="short_date"> |
373 | <Alignment ss:Horizontal="Center" ss:Vertical="Center" ss:WrapText="1"/> |
374 | @@ -137,23 +148,43 @@ |
375 | |
376 | % for line in getPOLines(o.id): |
377 | <Row ss:AutoFitHeight="1"> |
378 | - <Cell ss:StyleID="line"><Data ss:Type="String">${(line['order_ref'])|x}</Data></Cell> |
379 | - <Cell ss:StyleID="line"><Data ss:Type="Number">${(line['item'])|x}</Data></Cell> |
380 | - <Cell ss:StyleID="line"><Data ss:Type="String">${(line['code'])|x}</Data></Cell> |
381 | - <Cell ss:StyleID="line"><Data ss:Type="String">${(line['description'])|x}</Data></Cell> |
382 | - <Cell ss:StyleID="line"><Data ss:Type="Number">${(line['qty_ordered'])|x}</Data></Cell> |
383 | - <Cell ss:StyleID="line"><Data ss:Type="String">${(line['uom'])|x}</Data></Cell> |
384 | - <Cell ss:StyleID="line"><Data ss:Type="Number">${(line['qty_received'])|x}</Data></Cell> |
385 | - <Cell ss:StyleID="line"><Data ss:Type="String">${(line['in'])|x}</Data></Cell> |
386 | - <Cell ss:StyleID="line"><Data ss:Type="Number">${(line['qty_backordered'])|x}</Data></Cell> |
387 | - <Cell ss:StyleID="line"><Data ss:Type="Number">${(line['unit_price'])|x}</Data></Cell> |
388 | - <Cell ss:StyleID="line"><Data ss:Type="Number">${(line['in_unit_price'])|x}</Data></Cell> |
389 | - <Cell ss:StyleID="line"><Data ss:Type="String">${(line['order_created'])|x}</Data></Cell> |
390 | - <Cell ss:StyleID="line"><Data ss:Type="String">${(line['order_confirmed_date'])|x}</Data></Cell> |
391 | - <Cell ss:StyleID="line"><Data ss:Type="String">${(line['state'])|x}</Data></Cell> |
392 | - <Cell ss:StyleID="line"><Data ss:Type="String">${(line['order_status'])|x}</Data></Cell> |
393 | - <Cell ss:StyleID="line"><Data ss:Type="String">${(line['destination'])|x}</Data></Cell> |
394 | - <Cell ss:StyleID="line"><Data ss:Type="String">${(line['cost_centre'])|x}</Data></Cell> |
395 | + % if line['raw_state'] in ['cancel', 'cancel_r']: |
396 | + <Cell ss:StyleID="line_grey"><Data ss:Type="String">${(line['order_ref'])|x}</Data></Cell> |
397 | + <Cell ss:StyleID="line_grey"><Data ss:Type="Number">${(line['item'])|x}</Data></Cell> |
398 | + <Cell ss:StyleID="line_grey"><Data ss:Type="String">${(line['code'])|x}</Data></Cell> |
399 | + <Cell ss:StyleID="line_grey"><Data ss:Type="String">${(line['description'])|x}</Data></Cell> |
400 | + <Cell ss:StyleID="line_grey"><Data ss:Type="Number">${(line['qty_ordered'])|x}</Data></Cell> |
401 | + <Cell ss:StyleID="line_grey"><Data ss:Type="String">${(line['uom'])|x}</Data></Cell> |
402 | + <Cell ss:StyleID="line_grey"><Data ss:Type="Number">${(line['qty_received'])|x}</Data></Cell> |
403 | + <Cell ss:StyleID="line_grey"><Data ss:Type="String">${(line['in'])|x}</Data></Cell> |
404 | + <Cell ss:StyleID="line_grey"><Data ss:Type="Number">${(line['qty_backordered'])|x}</Data></Cell> |
405 | + <Cell ss:StyleID="line_grey"><Data ss:Type="Number">${(line['unit_price'])|x}</Data></Cell> |
406 | + <Cell ss:StyleID="line_grey"><Data ss:Type="Number">${(line['in_unit_price'])|x}</Data></Cell> |
407 | + <Cell ss:StyleID="line_grey"><Data ss:Type="String">${(line['order_created'])|x}</Data></Cell> |
408 | + <Cell ss:StyleID="line_grey"><Data ss:Type="String">${(line['order_confirmed_date'])|x}</Data></Cell> |
409 | + <Cell ss:StyleID="line_grey"><Data ss:Type="String">${(line['order_status'])|x}</Data></Cell> |
410 | + <Cell ss:StyleID="line_grey"><Data ss:Type="String">${(line['state'])|x}</Data></Cell> |
411 | + <Cell ss:StyleID="line_grey"><Data ss:Type="String">${(line['destination'])|x}</Data></Cell> |
412 | + <Cell ss:StyleID="line_grey"><Data ss:Type="String">${(line['cost_centre'])|x}</Data></Cell> |
413 | + % else: |
414 | + <Cell ss:StyleID="line"><Data ss:Type="String">${(line['order_ref'])|x}</Data></Cell> |
415 | + <Cell ss:StyleID="line"><Data ss:Type="Number">${(line['item'])|x}</Data></Cell> |
416 | + <Cell ss:StyleID="line"><Data ss:Type="String">${(line['code'])|x}</Data></Cell> |
417 | + <Cell ss:StyleID="line"><Data ss:Type="String">${(line['description'])|x}</Data></Cell> |
418 | + <Cell ss:StyleID="line"><Data ss:Type="Number">${(line['qty_ordered'])|x}</Data></Cell> |
419 | + <Cell ss:StyleID="line"><Data ss:Type="String">${(line['uom'])|x}</Data></Cell> |
420 | + <Cell ss:StyleID="line"><Data ss:Type="Number">${(line['qty_received'])|x}</Data></Cell> |
421 | + <Cell ss:StyleID="line"><Data ss:Type="String">${(line['in'])|x}</Data></Cell> |
422 | + <Cell ss:StyleID="line"><Data ss:Type="Number">${(line['qty_backordered'])|x}</Data></Cell> |
423 | + <Cell ss:StyleID="line"><Data ss:Type="Number">${(line['unit_price'])|x}</Data></Cell> |
424 | + <Cell ss:StyleID="line"><Data ss:Type="Number">${(line['in_unit_price'])|x}</Data></Cell> |
425 | + <Cell ss:StyleID="line"><Data ss:Type="String">${(line['order_created'])|x}</Data></Cell> |
426 | + <Cell ss:StyleID="line"><Data ss:Type="String">${(line['order_confirmed_date'])|x}</Data></Cell> |
427 | + <Cell ss:StyleID="line"><Data ss:Type="String">${(line['order_status'])|x}</Data></Cell> |
428 | + <Cell ss:StyleID="line"><Data ss:Type="String">${(line['state'])|x}</Data></Cell> |
429 | + <Cell ss:StyleID="line"><Data ss:Type="String">${(line['destination'])|x}</Data></Cell> |
430 | + <Cell ss:StyleID="line"><Data ss:Type="String">${(line['cost_centre'])|x}</Data></Cell> |
431 | + %endif |
432 | </Row> |
433 | % endfor |
434 | % endfor |
435 | |
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 | cdd = False |
441 | from_stock = line.type == 'make_to_stock' |
442 | cancel_in_moves = [] |
443 | - if line.procurement_id and line.procurement_id.purchase_id: |
444 | - po_name = line.procurement_id.purchase_id.name |
445 | - cdd = line.procurement_id.purchase_id.delivery_confirmed_date |
446 | - cancel_in_moves = self.cancel_in_line(line.procurement_id.purchase_id.id, line.product_id.id) |
447 | + linked_pol = self.pool.get('purchase.order.line').search(self.cr, self.uid, [('linked_sol_id', '=', line.id)]) |
448 | + if linked_pol: |
449 | + linked_pol = self.pool.get('purchase.order.line').browse(self.cr, self.uid, linked_pol)[0] |
450 | + po_name = linked_pol.order_id.name |
451 | + cdd = linked_pol.order_id.delivery_confirmed_date |
452 | + cancel_in_moves = self.cancel_in_line(linked_pol.order_id.id, line.product_id.id) |
453 | if not cdd and line.order_id.delivery_confirmed_date: |
454 | cdd = line.order_id.delivery_confirmed_date |
455 | |
456 | - |
457 | - # fetch the move in case the line doesn't have move_ids |
458 | - # if no move found for this line, it's set to False |
459 | - # to display a grayed line when it is cancelled |
460 | - current_line_state = line.state |
461 | - if line.order_id.state == 'cancel': |
462 | - current_line_state = 'cancel' |
463 | - elif line.procurement_id.purchase_id and line.procurement_id.purchase_id.state == 'cancel': |
464 | - current_line_state = 'cancel' |
465 | - elif line.procurement_id.move_id and \ |
466 | - (line.procurement_id.move_id.state == 'cancel' or line.procurement_id.move_id.picking_id.state == 'cancel'): |
467 | - current_line_state = 'cancel' |
468 | - |
469 | - |
470 | # cancel IN at line level: qty on IR line is adjusted |
471 | # cancel all IN: qty on IR is untouched |
472 | for cancel_in in cancel_in_moves: |
473 | @@ -213,13 +201,14 @@ |
474 | if len(line.move_ids) == 0: |
475 | line_moves, int_name = self._get_move_from_line(line, line.product_id.id, line.order_id.name) |
476 | |
477 | + data = { |
478 | + 'state': line.state, |
479 | + 'state_display': line.state_to_display, |
480 | + } |
481 | + |
482 | if len(line.move_ids) > 0: |
483 | 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)): |
484 | - current_move_line_state = current_line_state |
485 | - if move.state == 'cancel' or move.picking_id.state == 'cancel': |
486 | - current_move_line_state = 'cancel' |
487 | - |
488 | - m_type = current_move_line_state == 'cancel' or move.product_qty != 0.00 and move.picking_id.type == 'out' |
489 | + m_type = move.state in ('cancel', 'cancel_r') or move.product_qty != 0.00 and move.picking_id.type == 'out' |
490 | ppl = move.picking_id.subtype == 'packing' and move.picking_id.shipment_id and not self._is_returned(move) |
491 | ppl_not_shipped = move.picking_id.subtype == 'ppl' and move.picking_id.state not in ('cancel', 'done') |
492 | s_out = move.picking_id.subtype == 'standard' and move.location_dest_id.usage == 'customer' |
493 | @@ -238,7 +227,7 @@ |
494 | delivery_order = move.picking_id.name |
495 | if move.picking_id.state != 'done': |
496 | delivery_order = '-' |
497 | - data = { |
498 | + data.update({ |
499 | 'po_name': po_name, |
500 | 'cdd': cdd, |
501 | 'line_number': line.line_number, |
502 | @@ -247,10 +236,9 @@ |
503 | 'product_code': line.product_id.code or '-', |
504 | 'is_delivered': False, |
505 | 'delivery_order': delivery_order, |
506 | - 'current_line_state': current_move_line_state, |
507 | 'packing': '-', |
508 | 'shipment': '-', |
509 | - } |
510 | + }) |
511 | if first_line: |
512 | data.update({ |
513 | 'uom_id': line.product_uom.name, |
514 | @@ -346,9 +334,6 @@ |
515 | m_index += 1 |
516 | elif line_moves and (len(line.move_ids) == 0 and line.procurement_id.move_id): |
517 | for line_move in line_moves: |
518 | - if line_move.state == 'cancel' or line_move.picking_id.state == 'cancel': |
519 | - current_line_state = 'cancel' |
520 | - |
521 | m_type = line_move.product_qty != 0.00 |
522 | |
523 | if m_type: |
524 | @@ -363,7 +348,7 @@ |
525 | delivery_order = int_name.get(line_move.id) or line_move.picking_id.name |
526 | if 'INT' in line_move.picking_id.name and line_move.picking_id.state != 'done': |
527 | delivery_order = '-' |
528 | - data = { |
529 | + data.update({ |
530 | 'po_name': po_name, |
531 | 'cdd': cdd, |
532 | 'line_number': line.line_number, |
533 | @@ -372,8 +357,7 @@ |
534 | 'product_code': line.product_id.code or '-', |
535 | 'is_delivered': False, |
536 | 'delivery_order': delivery_order, |
537 | - 'current_line_state': current_line_state, |
538 | - } |
539 | + }) |
540 | if first_line: |
541 | data.update({ |
542 | 'uom_id': line.product_uom.name, |
543 | @@ -408,7 +392,7 @@ |
544 | m_index += 1 |
545 | else: # No move found |
546 | if first_line: |
547 | - data = { |
548 | + data.update({ |
549 | 'line_number': line.line_number, |
550 | 'line_comment': line.comment or '-', |
551 | 'po_name': po_name, |
552 | @@ -420,10 +404,9 @@ |
553 | 'delivered_qty': 0.00, |
554 | 'delivered_uom': '-', |
555 | 'delivery_order': '-', |
556 | - 'current_line_state': current_line_state, |
557 | 'backordered_qty': line.product_uom_qty if line.order_id.state != 'cancel' else 0.00, |
558 | 'cdd': cdd, |
559 | - } |
560 | + }) |
561 | lines.append(data) |
562 | |
563 | # Put the backorderd qty on the first line |
564 | @@ -444,7 +427,7 @@ |
565 | lines[fl_index]['extra_qty'] = abs(bo_qty) if line.order_id.state != 'cancel' else 0.00 |
566 | |
567 | for ln in lines: |
568 | - if only_bo and (ln.get('backordered_qty', 0.00) <= 0.00 or ln.get('current_line_state') == 'cancel'): |
569 | + if only_bo and (ln.get('backordered_qty', 0.00) <= 0.00 or line.state in ('cancel', 'cancel_r')): |
570 | continue |
571 | yield ln |
572 | |
573 | |
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 | |
579 | <section> |
580 | [[ repeatIn(getOrders(r, only_bo=r.only_bo), 'o', 'section') ]] |
581 | - <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"> |
582 | + <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 | <tr> |
584 | <td colspan="2"> |
585 | <para style="Lines">Order ref:</para> |
586 | @@ -191,7 +191,7 @@ |
587 | <para style="Lines">[[ o.name ]]</para> |
588 | </td> |
589 | <td> |
590 | - <para style="Lines">Status: [[ getSel(o, 'state') ]] Requestor: [[ o.requestor or '' ]]</para> |
591 | + <para style="Lines">Doc. Status: [[ getSel(o, 'state') ]] Requestor: [[ o.requestor or '' ]]</para> |
592 | </td> |
593 | <td> |
594 | <para style="Lines">Location Requestor: [[ o.location_requestor_id.name ]]</para> |
595 | @@ -220,6 +220,9 @@ |
596 | <td> |
597 | <para style="Lines"></para> |
598 | </td> |
599 | + <td> |
600 | + <para style="Lines"></para> |
601 | + </td> |
602 | </tr> |
603 | <tr> |
604 | <td> |
605 | @@ -253,6 +256,9 @@ |
606 | <para style="Lines"><i>Delivery Order</i></para> |
607 | </td> |
608 | <td> |
609 | + <para style="Lines"><i>Line Status</i></para> |
610 | + </td> |
611 | + <td> |
612 | <para style="Lines"><i>CDD</i></para> |
613 | </td> |
614 | <td> |
615 | @@ -262,53 +268,57 @@ |
616 | <tr> |
617 | [[ repeatIn(getLines(o, only_bo=r.only_bo), 'line') ]] |
618 | <td> |
619 | - <para style="LinesBlue">[[ line.get('current_line_state') != 'cancel' and line.get('line_number', '-') or removeParentNode('para') ]]</para> |
620 | - <para style="LinesGrey">[[ line.get('current_line_state') == 'cancel' and line.get('line_number', '-') or removeParentNode('para') ]]</para> |
621 | - </td> |
622 | - <td> |
623 | - <para style="LinesBlue">[[ line.get('current_line_state') != 'cancel' and line.get('product_code', '-') or removeParentNode('para') ]]</para> |
624 | - <para style="LinesGrey">[[ line.get('current_line_state') == 'cancel' and line.get('product_code', '-') or removeParentNode('para') ]]</para> |
625 | - </td> |
626 | - <td> |
627 | - <para style="LinesBlue">[[ line.get('current_line_state') != 'cancel' and line.get('product_name', '-') or removeParentNode('para') ]]</para> |
628 | - <para style="LinesGrey">[[ line.get('current_line_state') == 'cancel' and line.get('product_name', '-') or removeParentNode('para') ]]</para> |
629 | - </td> |
630 | - <td> |
631 | - <para style="LinesBlue">[[ line.get('current_line_state') != 'cancel' and line.get('line_comment', '-') or removeParentNode('para') ]]</para> |
632 | - <para style="LinesGrey">[[ line.get('current_line_state') == 'cancel' and line.get('line_comment', '-') or removeParentNode('para') ]]</para> |
633 | - </td> |
634 | - <td> |
635 | - <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> |
636 | - <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> |
637 | - </td> |
638 | - <td> |
639 | - <para style="LinesBlue">[[ line.get('current_line_state') != 'cancel' and line.get('uom_id', '-') or removeParentNode('para') ]]</para> |
640 | - <para style="LinesGrey">[[ line.get('current_line_state') == 'cancel' and line.get('uom_id', '-') or removeParentNode('para') ]]</para> |
641 | - </td> |
642 | - <td> |
643 | - <para style="LinesBlue">[[ line.get('current_line_state') != 'cancel' and formatLang(line.get('delivered_qty', 0.00)) or removeParentNode('para') ]]</para> |
644 | - <para style="LinesGrey">[[ line.get('current_line_state') == 'cancel' and formatLang(line.get('delivered_qty', 0.00)) or removeParentNode('para') ]]</para> |
645 | - </td> |
646 | - <td> |
647 | - <para style="LinesBlue">[[ line.get('current_line_state') != 'cancel' and line.get('delivered_uom', '-') or removeParentNode('para') ]]</para> |
648 | - <para style="LinesGrey">[[ line.get('current_line_state') == 'cancel' and line.get('delivered_uom', '-') or removeParentNode('para') ]]</para> |
649 | - </td> |
650 | - <td> |
651 | - <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> |
652 | - <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> |
653 | - <para style="LinesGrey">[[ line.get('current_line_state') == 'cancel' and '-' or removeParentNode('para') ]]</para> |
654 | - </td> |
655 | - <td> |
656 | - <para style="LinesBlue">[[ line.get('current_line_state') != 'cancel' and line.get('delivery_order', '-') or removeParentNode('para') ]]</para> |
657 | - <para style="LinesGrey">[[ line.get('current_line_state') == 'cancel' and line.get('delivery_order', '-') or removeParentNode('para') ]]</para> |
658 | - </td> |
659 | - <td> |
660 | - <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> |
661 | - <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> |
662 | + <para style="LinesBlue">[[ line.get('state') not in ['cancel', 'cancel_r'] and line.get('line_number', '-') or removeParentNode('para') ]]</para> |
663 | + <para style="LinesGrey">[[ line.get('state') in ['cancel', 'cancel_r'] and line.get('line_number', '-') or removeParentNode('para') ]]</para> |
664 | + </td> |
665 | + <td> |
666 | + <para style="LinesBlue">[[ line.get('state') not in ['cancel', 'cancel_r'] and line.get('product_code', '-') or removeParentNode('para') ]]</para> |
667 | + <para style="LinesGrey">[[ line.get('state') in ['cancel', 'cancel_r'] and line.get('product_code', '-') or removeParentNode('para') ]]</para> |
668 | + </td> |
669 | + <td> |
670 | + <para style="LinesBlue">[[ line.get('state') not in ['cancel', 'cancel_r'] and line.get('product_name', '-') or removeParentNode('para') ]]</para> |
671 | + <para style="LinesGrey">[[ line.get('state') in ['cancel', 'cancel_r'] and line.get('product_name', '-') or removeParentNode('para') ]]</para> |
672 | + </td> |
673 | + <td> |
674 | + <para style="LinesBlue">[[ line.get('state') not in ['cancel', 'cancel_r'] and line.get('line_comment', '-') or removeParentNode('para') ]]</para> |
675 | + <para style="LinesGrey">[[ line.get('state') in ['cancel', 'cancel_r'] and line.get('line_comment', '-') or removeParentNode('para') ]]</para> |
676 | + </td> |
677 | + <td> |
678 | + <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 | + <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 | + </td> |
681 | + <td> |
682 | + <para style="LinesBlue">[[ line.get('state') not in ['cancel', 'cancel_r'] and line.get('uom_id', '-') or removeParentNode('para') ]]</para> |
683 | + <para style="LinesGrey">[[ line.get('state') in ['cancel', 'cancel_r'] and line.get('uom_id', '-') or removeParentNode('para') ]]</para> |
684 | + </td> |
685 | + <td> |
686 | + <para style="LinesBlue">[[ line.get('state') not in ['cancel', 'cancel_r'] and formatLang(line.get('delivered_qty', 0.00)) or removeParentNode('para') ]]</para> |
687 | + <para style="LinesGrey">[[ line.get('state') in ['cancel', 'cancel_r'] and formatLang(line.get('delivered_qty', 0.00)) or removeParentNode('para') ]]</para> |
688 | + </td> |
689 | + <td> |
690 | + <para style="LinesBlue">[[ line.get('state') not in ['cancel', 'cancel_r'] and line.get('delivered_uom', '-') or removeParentNode('para') ]]</para> |
691 | + <para style="LinesGrey">[[ line.get('state') in ['cancel', 'cancel_r'] and line.get('delivered_uom', '-') or removeParentNode('para') ]]</para> |
692 | + </td> |
693 | + <td> |
694 | + <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 | + <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 | + <para style="LinesGrey">[[ line.get('state') in ['cancel', 'cancel_r'] and '-' or removeParentNode('para') ]]</para> |
697 | + </td> |
698 | + <td> |
699 | + <para style="LinesBlue">[[ line.get('state') not in ['cancel', 'cancel_r'] and line.get('delivery_order', '-') or removeParentNode('para') ]]</para> |
700 | + <para style="LinesGrey">[[ line.get('state') in ['cancel', 'cancel_r'] and line.get('delivery_order', '-') or removeParentNode('para') ]]</para> |
701 | + </td> |
702 | + <td> |
703 | + <para style="LinesBlue">[[ line.get('state') not in ['cancel', 'cancel_r'] and line.get('state_display', '-') or removeParentNode('para') ]]</para> |
704 | + <para style="LinesGrey">[[ line.get('state') in ['cancel', 'cancel_r'] and line.get('state_display', '-') or removeParentNode('para') ]]</para> |
705 | + </td> |
706 | + <td> |
707 | + <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 | + <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 | </td> |
710 | <td> |
711 | - <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> |
712 | - <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> |
713 | + <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 | + <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 | </td> |
716 | </tr> |
717 | </blockTable> |
718 | |
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 | <Column ss:AutoFitWidth="1" ss:Width="100.0" /> |
724 | ## PO ref |
725 | <Column ss:AutoFitWidth="1" ss:Width="150.0" /> |
726 | - ## Status |
727 | + ## Doc. Status |
728 | + <Column ss:AutoFitWidth="1" ss:Width="60.75" /> |
729 | + ## Line Status |
730 | <Column ss:AutoFitWidth="1" ss:Width="60.75" /> |
731 | ## Received |
732 | <Column ss:AutoFitWidth="1" ss:Width="54.75" /> |
733 | @@ -276,7 +278,8 @@ |
734 | _('Requestor'), |
735 | _('Origin'), |
736 | _('PO ref'), |
737 | - _('Status'), |
738 | + _('Doc. Status'), |
739 | + _('Line Status'), |
740 | _('Received'), |
741 | _('RDD'), |
742 | _('Item'), |
743 | @@ -303,13 +306,14 @@ |
744 | % for o in getOrders(r): |
745 | % for line in getLines(o): |
746 | <Row ss:Height="11.25"> |
747 | - %if line.get('current_line_state', '') == 'cancel': |
748 | + %if line.get('state', '') in ['cancel', 'cancel_r']: |
749 | <Cell ss:StyleID="line_left_grey"><Data ss:Type="String">${o.name|x}</Data></Cell> |
750 | <Cell ss:StyleID="line_left_grey"><Data ss:Type="String">${o.location_requestor_id.name|x}</Data></Cell> |
751 | <Cell ss:StyleID="line_left_grey"><Data ss:Type="String">${o.requestor or ''|x}</Data></Cell> |
752 | <Cell ss:StyleID="line_left_grey"><Data ss:Type="String">${o.origin or ''|x}</Data></Cell> |
753 | <Cell ss:StyleID="line_left_grey"><Data ss:Type="String">${line.get('po_name', '')|x}</Data></Cell> |
754 | <Cell ss:StyleID="line_left_grey"><Data ss:Type="String">${getSel(o, 'state')|x}</Data></Cell> |
755 | + <Cell ss:StyleID="line_left_grey"><Data ss:Type="String">${line.get('state_display', '-')|x}</Data></Cell> |
756 | <Cell ss:StyleID="line_left_grey"><Data ss:Type="String">${saleUstr(formatLang(o.date_order, date=True))|x}</Data></Cell> |
757 | <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 | <Cell ss:StyleID="line_center_grey"><Data ss:Type="String">${line.get('line_number', '-')|x}</Data></Cell> |
759 | @@ -339,6 +343,7 @@ |
760 | <Cell ss:StyleID="line_left"><Data ss:Type="String">${o.origin or ''|x}</Data></Cell> |
761 | <Cell ss:StyleID="line_left"><Data ss:Type="String">${line.get('po_name', '')|x}</Data></Cell> |
762 | <Cell ss:StyleID="line_left"><Data ss:Type="String">${getSel(o, 'state')|x}</Data></Cell> |
763 | + <Cell ss:StyleID="line_left"><Data ss:Type="String">${line.get('state_display', '-')|x}</Data></Cell> |
764 | <Cell ss:StyleID="line_left"><Data ss:Type="String">${saleUstr(formatLang(o.date_order, date=True))|x}</Data></Cell> |
765 | <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 | <Cell ss:StyleID="line_center"><Data ss:Type="String">${line.get('line_number', '-')|x}</Data></Cell> |
767 | |
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 | <paraStyle name="Lines" fontName="Helvetica" fontSize="6.0" alignment="LEFT" leading="7.0" /> |
773 | <paraStyle name="UnderLines" fontName="Helvetica-Bold" fontSize="6.0" alignment="LEFT" leading="7.0" /> |
774 | <paraStyle name="LinesBlue" textColor="blue" fontName="Helvetica" fontSize="6.0" alignment="LEFT" leading="7.0" /> |
775 | + <paraStyle name="LinesGrey" textColor="#747474" fontName="Helvetica" fontSize="6.0" alignment="LEFT" leading="7.0" /> |
776 | <paraStyle name="LinesGreen" textColor="green" fontName="Helvetica" fontSize="6.0" alignment="LEFT" leading="7.0" /> |
777 | |
778 | </stylesheet> |
779 | @@ -169,16 +170,16 @@ |
780 | |
781 | <section> |
782 | [[ repeatIn(getOrders(r, grouped=True, only_bo=r.only_bo), 'o', 'section') ]] |
783 | - <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"> |
784 | + <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 | <tr> |
786 | <td colspan="2"> |
787 | <para style="Lines">Order ref:</para> |
788 | </td> |
789 | <td> |
790 | - <para style="Lines">[[ o.name ]] Status: [[ getSel(o, 'state') ]]</para> |
791 | + <para style="Lines">[[ o.name ]] </para> |
792 | </td> |
793 | <td> |
794 | - <para style="Lines"></para> |
795 | + <para style="Lines">Doc. Status: [[ getSel(o, 'state') ]]</para> |
796 | </td> |
797 | <td> |
798 | <para style="Lines">Received: [[ formatLang(o.date_order, date=True) ]]</para> |
799 | @@ -199,6 +200,9 @@ |
800 | <para style="Lines"></para> |
801 | </td> |
802 | <td> |
803 | + <para style="Lines"></para> |
804 | + </td> |
805 | + <td> |
806 | <para style="Lines"># Items: [[ getProducts(o) ]]</para> |
807 | </td> |
808 | <td> |
809 | @@ -237,6 +241,9 @@ |
810 | <para style="Lines"><i>Qty to deliver</i></para> |
811 | </td> |
812 | <td> |
813 | + <para style="Lines"><i>Line Status</i></para> |
814 | + </td> |
815 | + <td> |
816 | <para style="Lines"><i>Transport</i></para> |
817 | </td> |
818 | <td> |
819 | @@ -252,45 +259,64 @@ |
820 | <tr> |
821 | [[ repeatIn(getLines(o, grouped=True, only_bo=r.only_bo), 'line') ]] |
822 | <td> |
823 | - <para style="LinesBlue">[[ line.get('line_number', '-') ]]</para> |
824 | - </td> |
825 | - <td> |
826 | - <para style="LinesBlue">[[ line.get('product_code', '-') ]]</para> |
827 | - </td> |
828 | - <td> |
829 | - <para style="LinesBlue">[[ line.get('product_name', '-') ]]</para> |
830 | - </td> |
831 | - <td> |
832 | - <para style="LinesBlue">[[ line.get('ordered_qty') and formatLang(line['ordered_qty']) or 'N/A' ]]</para> |
833 | - </td> |
834 | - <td> |
835 | - <para style="LinesBlue">[[ line.get('uom_id', '-') ]]</para> |
836 | - </td> |
837 | - <td> |
838 | - <para style="LinesBlue">[[ formatLang(line.get('delivered_qty', 0.00)) ]]</para> |
839 | - </td> |
840 | - <td> |
841 | - <para style="LinesBlue">[[ line.get('delivered_uom', '') ]]</para> |
842 | - </td> |
843 | - <td> |
844 | - <para style="LinesBlue">[[ line.get('packing', '') ]]</para> |
845 | - </td> |
846 | - <td> |
847 | - <para style="LinesBlue">[[ line.get('extra_qty', 0) == 0 and formatLang(line.get('backordered_qty', 0.00)) or removeParentNode('para') ]]</para> |
848 | - <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> |
849 | - </td> |
850 | - <td> |
851 | - <para style="LinesBlue">[[ line.get('transport', '') and getSel(line['transport'], 'transport_type') or '' ]]</para> |
852 | - </td> |
853 | - <td> |
854 | - <para style="LinesBlue">[[ not line.get('is_delivered') and line.get('shipment', '') or removeParentNode('para') ]]</para> |
855 | - <para style="LinesGreen">[[ line.get('is_delivered') and line.get('shipment', '') or removeParentNode('para') ]]</para> |
856 | - </td> |
857 | - <td> |
858 | - <para style="LinesBlue">[[ line.get('eta', '') and formatLang(line['eta'], date=True) or 'N/A' ]]</para> |
859 | - </td> |
860 | - <td> |
861 | - <para style="LinesBlue">[[ line.get('rts', '') and formatLang(line['rts'], date=True) or 'N/A' ]]</para> |
862 | + <para style="LinesBlue">[[ line.get('state') not in ['cancel', 'cancel_r'] and line.get('line_number', '-') or removeParentNode('para') ]]</para> |
863 | + <para style="LinesGrey">[[ line.get('state') in ['cancel', 'cancel_r'] and line.get('line_number', '-') or removeParentNode('para') ]]</para> |
864 | + </td> |
865 | + <td> |
866 | + <para style="LinesBlue">[[ line.get('state') not in ['cancel', 'cancel_r'] and line.get('product_code', '-') or removeParentNode('para') ]]</para> |
867 | + <para style="LinesGrey">[[ line.get('state') in ['cancel', 'cancel_r'] and line.get('product_code', '-') or removeParentNode('para') ]]</para> |
868 | + </td> |
869 | + <td> |
870 | + <para style="LinesBlue">[[ line.get('state') not in ['cancel', 'cancel_r'] and line.get('product_name', '-') or removeParentNode('para') ]]</para> |
871 | + <para style="LinesGrey">[[ line.get('state') in ['cancel', 'cancel_r'] and line.get('product_name', '-') or removeParentNode('para') ]]</para> |
872 | + </td> |
873 | + <td> |
874 | + <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 | + <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 | + </td> |
877 | + <td> |
878 | + <para style="LinesBlue">[[ line.get('state') not in ['cancel', 'cancel_r'] and line.get('uom_id', '-') or removeParentNode('para') ]]</para> |
879 | + <para style="LinesGrey">[[ line.get('state') in ['cancel', 'cancel_r'] and line.get('uom_id', '-') or removeParentNode('para') ]]</para> |
880 | + </td> |
881 | + <td> |
882 | + <para style="LinesBlue">[[ line.get('state') not in ['cancel', 'cancel_r'] and formatLang(line.get('delivered_qty', 0.00)) or removeParentNode('para') ]]</para> |
883 | + <para style="LinesGrey">[[ line.get('state') in ['cancel', 'cancel_r'] and formatLang(line.get('delivered_qty', 0.00)) or removeParentNode('para') ]]</para> |
884 | + </td> |
885 | + <td> |
886 | + <para style="LinesBlue">[[ line.get('state') not in ['cancel', 'cancel_r'] and line.get('delivered_uom', '-') or removeParentNode('para') ]]</para> |
887 | + <para style="LinesGrey">[[ line.get('state') in ['cancel', 'cancel_r'] and line.get('delivered_uom', '-') or removeParentNode('para') ]]</para> |
888 | + </td> |
889 | + <td> |
890 | + <para style="LinesBlue">[[ line.get('state') not in ['cancel', 'cancel_r'] and line.get('packing', '-') or removeParentNode('para') ]]</para> |
891 | + <para style="LinesGrey">[[ line.get('state') in ['cancel', 'cancel_r'] and line.get('packing', '-') or removeParentNode('para') ]]</para> |
892 | + </td> |
893 | + <td> |
894 | + <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 | + <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 | + <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 | + <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 | + </td> |
899 | + <td> |
900 | + <para style="LinesBlue">[[ line.get('state') not in ['cancel', 'cancel_r'] and line.get('state_display', '-') or removeParentNode('para') ]]</para> |
901 | + <para style="LinesGrey">[[ line.get('state') in ['cancel', 'cancel_r'] and line.get('state_display', '-') or removeParentNode('para') ]]</para> |
902 | + </td> |
903 | + <td> |
904 | + <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 | + <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 | + </td> |
907 | + <td> |
908 | + <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 | + <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 | + <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 | + <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 | + </td> |
913 | + <td> |
914 | + <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 | + <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 | + </td> |
917 | + <td> |
918 | + <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 | + <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 | </td> |
921 | </tr> |
922 | </blockTable> |
923 | |
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 | <NumberFormat ss:Format="Short Date" /> |
929 | <Font ss:Color="#0000FF" /> |
930 | </Style> |
931 | + |
932 | + <Style ss:ID="line_left_grey"> |
933 | + <Alignment ss:Horizontal="Left" ss:Vertical="Bottom"/> |
934 | + <Borders> |
935 | + <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/> |
936 | + <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/> |
937 | + <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/> |
938 | + <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/> |
939 | + </Borders> |
940 | + <Font ss:Size="8" ss:Color="#747474"/> |
941 | + </Style> |
942 | + <Style ss:ID="line_right_grey"> |
943 | + <Alignment ss:Horizontal="Right" ss:Vertical="Bottom"/> |
944 | + <Borders> |
945 | + <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/> |
946 | + <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/> |
947 | + <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/> |
948 | + <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/> |
949 | + </Borders> |
950 | + <Font ss:Size="8" ss:Color="#747474"/> |
951 | + <NumberFormat ss:Format="#,##0.00"/> |
952 | + </Style> |
953 | + <Style ss:ID="line_center_grey"> |
954 | + <Alignment ss:Horizontal="Center" ss:Vertical="Bottom"/> |
955 | + <Borders> |
956 | + <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/> |
957 | + <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/> |
958 | + <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/> |
959 | + <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/> |
960 | + </Borders> |
961 | + <Font ss:Size="8" ss:Color="#747474"/> |
962 | + <NumberFormat ss:Format="#,##0.00"/> |
963 | + </Style> |
964 | + <Style ss:ID="line_left_date_grey"> |
965 | + <Alignment ss:Horizontal="Right" ss:Vertical="Bottom"/> |
966 | + <NumberFormat ss:Format="Short Date" /> |
967 | + <Borders> |
968 | + <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/> |
969 | + <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/> |
970 | + <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/> |
971 | + <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/> |
972 | + </Borders> |
973 | + <Font ss:Size="8" ss:Color="#747474"/> |
974 | + </Style> |
975 | + |
976 | + <Style ss:ID="short_date_grey"> |
977 | + <Alignment ss:Horizontal="Left" ss:Vertical="Center" ss:WrapText="1" /> |
978 | + <NumberFormat ss:Format="Short Date" /> |
979 | + <Font ss:Color="#747474" /> |
980 | + </Style> |
981 | </Styles> |
982 | |
983 | |
984 | @@ -123,7 +173,9 @@ |
985 | <Column ss:AutoFitWidth="1" ss:Width="170.0" /> |
986 | ## PO ref |
987 | <Column ss:AutoFitWidth="1" ss:Width="150.0" /> |
988 | - ## Status |
989 | + ## Doc. Status |
990 | + <Column ss:AutoFitWidth="1" ss:Width="60.75" /> |
991 | + ## Line Status |
992 | <Column ss:AutoFitWidth="1" ss:Width="60.75" /> |
993 | ## Received |
994 | <Column ss:AutoFitWidth="1" ss:Width="54.75" /> |
995 | @@ -225,7 +277,8 @@ |
996 | _('Order ref'), |
997 | _('Customer ref'), |
998 | _('PO ref'), |
999 | - _('Status'), |
1000 | + _('Doc. Status'), |
1001 | + _('Line Status'), |
1002 | _('Received'), |
1003 | _('RDD'), |
1004 | _('Item'), |
1005 | @@ -254,46 +307,91 @@ |
1006 | % for o in getOrders(r): |
1007 | % for line in getLines(o, grouped=True): |
1008 | <Row ss:Height="11.25"> |
1009 | - <Cell ss:StyleID="line_left"><Data ss:Type="String">${o.name|x}</Data></Cell> |
1010 | - <Cell ss:StyleID="line_left"><Data ss:Type="String">${o.client_order_ref or ''|x}</Data></Cell> |
1011 | - <Cell ss:StyleID="line_left"><Data ss:Type="String">${line.get('po_name', '')|x}</Data></Cell> |
1012 | - <Cell ss:StyleID="line_left"><Data ss:Type="String">${getSel(o, 'state')|x}</Data></Cell> |
1013 | - <Cell ss:StyleID="line_left"><Data ss:Type="String">${saleUstr(formatLang(o.date_order, date=True))|x}</Data></Cell> |
1014 | - <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> |
1015 | - <Cell ss:StyleID="line_center"><Data ss:Type="String">${line.get('line_number', '-')|x}</Data></Cell> |
1016 | - <Cell ss:StyleID="line_left"><Data ss:Type="String">${line.get('product_code', '-') or ''|x}</Data></Cell> |
1017 | - <Cell ss:StyleID="line_left"><Data ss:Type="String">${line.get('product_name', '-') or ''|x}</Data></Cell> |
1018 | - % if line.get('ordered_qty'): |
1019 | - <Cell ss:StyleID="line_right"><Data ss:Type="Number">${line.get('ordered_qty')}</Data></Cell> |
1020 | - % else: |
1021 | - <Cell ss:StyleID="line_left"><Data ss:Type="String">N/A</Data></Cell> |
1022 | - % endif |
1023 | - <Cell ss:StyleID="line_left"><Data ss:Type="String">${line.get('uom_id', '-')|x}</Data></Cell> |
1024 | - % if line.get('delivered_qty'): |
1025 | - <Cell ss:StyleID="line_right"><Data ss:Type="Number">${line.get('delivered_qty')}</Data></Cell> |
1026 | - % else: |
1027 | - <Cell ss:StyleID="line_left"><Data ss:Type="String">N/A</Data></Cell> |
1028 | - % endif |
1029 | - <Cell ss:StyleID="line_left"><Data ss:Type="String">${line.get('delivered_uom', '')|x}</Data></Cell> |
1030 | - <Cell ss:StyleID="line_left"><Data ss:Type="String">${line.get('packing', '')|x}</Data></Cell> |
1031 | - % if line.get('extra_qty', False): |
1032 | - <Cell ss:StyleID="line_left"><Data ss:Type="String">${line.get('backordered_qty', 0.00)} (+${line.get('extra_qty', 0.00)|x})</Data></Cell> |
1033 | - % else: |
1034 | - <Cell ss:StyleID="line_right"><Data ss:Type="Number">${line.get('backordered_qty')}</Data></Cell> |
1035 | - % endif |
1036 | - % if o.transport_type and o.transport_type not in (False, 'False', ''): |
1037 | - <Cell ss:StyleID="line_left"><Data ss:Type="String">${getSel(o, 'transport_type')|x}</Data></Cell> |
1038 | - % else: |
1039 | - <Cell ss:StyleID="line_left"><Data ss:Type="String"></Data></Cell> |
1040 | - % endif |
1041 | - % if line.get('is_delivered'): |
1042 | - <Cell ss:StyleID="line_left_green"><Data ss:Type="String">${line.get('shipment', '')|x}</Data></Cell> |
1043 | - % else: |
1044 | - <Cell ss:StyleID="line_left"><Data ss:Type="String">${line.get('shipment', '')|x}</Data></Cell> |
1045 | - % endif |
1046 | - <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> |
1047 | - <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> |
1048 | - <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> |
1049 | + %if line.get('state', '') in ['cancel', 'cancel_r']: |
1050 | + <Cell ss:StyleID="line_left_grey"><Data ss:Type="String">${o.name|x}</Data></Cell> |
1051 | + <Cell ss:StyleID="line_left_grey"><Data ss:Type="String">${o.client_order_ref or ''|x}</Data></Cell> |
1052 | + <Cell ss:StyleID="line_left_grey"><Data ss:Type="String">${line.get('po_name', '')|x}</Data></Cell> |
1053 | + <Cell ss:StyleID="line_left_grey"><Data ss:Type="String">${getSel(o, 'state')|x}</Data></Cell> |
1054 | + <Cell ss:StyleID="line_left_grey"><Data ss:Type="String">${line.get('state_display', '-')|x}</Data></Cell> |
1055 | + <Cell ss:StyleID="line_left_grey"><Data ss:Type="String">${saleUstr(formatLang(o.date_order, date=True))|x}</Data></Cell> |
1056 | + <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 | + <Cell ss:StyleID="line_center_grey"><Data ss:Type="String">${line.get('line_number', '-')|x}</Data></Cell> |
1058 | + <Cell ss:StyleID="line_left_grey"><Data ss:Type="String">${line.get('product_code', '-') or ''|x}</Data></Cell> |
1059 | + <Cell ss:StyleID="line_left_grey"><Data ss:Type="String">${line.get('product_name', '-') or ''|x}</Data></Cell> |
1060 | + % if line.get('ordered_qty'): |
1061 | + <Cell ss:StyleID="line_right_grey"><Data ss:Type="Number">${line.get('ordered_qty')}</Data></Cell> |
1062 | + % else: |
1063 | + <Cell ss:StyleID="line_left_grey"><Data ss:Type="String">N/A</Data></Cell> |
1064 | + % endif |
1065 | + <Cell ss:StyleID="line_left_grey"><Data ss:Type="String">${line.get('uom_id', '-')|x}</Data></Cell> |
1066 | + % if line.get('delivered_qty'): |
1067 | + <Cell ss:StyleID="line_right_grey"><Data ss:Type="Number">${line.get('delivered_qty')}</Data></Cell> |
1068 | + % else: |
1069 | + <Cell ss:StyleID="line_left_grey"><Data ss:Type="String">N/A</Data></Cell> |
1070 | + % endif |
1071 | + <Cell ss:StyleID="line_left_grey"><Data ss:Type="String">${line.get('delivered_uom', '')|x}</Data></Cell> |
1072 | + <Cell ss:StyleID="line_left_grey"><Data ss:Type="String">${line.get('packing', '')|x}</Data></Cell> |
1073 | + % if line.get('extra_qty', False): |
1074 | + <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 | + % else: |
1076 | + <Cell ss:StyleID="line_right_grey"><Data ss:Type="Number">${line.get('backordered_qty')}</Data></Cell> |
1077 | + % endif |
1078 | + % if o.transport_type and o.transport_type not in (False, 'False', ''): |
1079 | + <Cell ss:StyleID="line_left_grey"><Data ss:Type="String">${getSel(o, 'transport_type')|x}</Data></Cell> |
1080 | + % else: |
1081 | + <Cell ss:StyleID="line_left_grey"><Data ss:Type="String"></Data></Cell> |
1082 | + % endif |
1083 | + % if line.get('is_delivered'): |
1084 | + <Cell ss:StyleID="line_left_grey"><Data ss:Type="String">${line.get('shipment', '')|x}</Data></Cell> |
1085 | + % else: |
1086 | + <Cell ss:StyleID="line_left_grey"><Data ss:Type="String">${line.get('shipment', '')|x}</Data></Cell> |
1087 | + % endif |
1088 | + <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 | + <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 | + <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 | + % else: |
1092 | + <Cell ss:StyleID="line_left"><Data ss:Type="String">${o.name|x}</Data></Cell> |
1093 | + <Cell ss:StyleID="line_left"><Data ss:Type="String">${o.client_order_ref or ''|x}</Data></Cell> |
1094 | + <Cell ss:StyleID="line_left"><Data ss:Type="String">${line.get('po_name', '')|x}</Data></Cell> |
1095 | + <Cell ss:StyleID="line_left"><Data ss:Type="String">${getSel(o, 'state')|x}</Data></Cell> |
1096 | + <Cell ss:StyleID="line_left"><Data ss:Type="String">${line.get('state_display', '-')|x}</Data></Cell> |
1097 | + <Cell ss:StyleID="line_left"><Data ss:Type="String">${saleUstr(formatLang(o.date_order, date=True))|x}</Data></Cell> |
1098 | + <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 | + <Cell ss:StyleID="line_center"><Data ss:Type="String">${line.get('line_number', '-')|x}</Data></Cell> |
1100 | + <Cell ss:StyleID="line_left"><Data ss:Type="String">${line.get('product_code', '-') or ''|x}</Data></Cell> |
1101 | + <Cell ss:StyleID="line_left"><Data ss:Type="String">${line.get('product_name', '-') or ''|x}</Data></Cell> |
1102 | + % if line.get('ordered_qty'): |
1103 | + <Cell ss:StyleID="line_right"><Data ss:Type="Number">${line.get('ordered_qty')}</Data></Cell> |
1104 | + % else: |
1105 | + <Cell ss:StyleID="line_left"><Data ss:Type="String">N/A</Data></Cell> |
1106 | + % endif |
1107 | + <Cell ss:StyleID="line_left"><Data ss:Type="String">${line.get('uom_id', '-')|x}</Data></Cell> |
1108 | + % if line.get('delivered_qty'): |
1109 | + <Cell ss:StyleID="line_right"><Data ss:Type="Number">${line.get('delivered_qty')}</Data></Cell> |
1110 | + % else: |
1111 | + <Cell ss:StyleID="line_left"><Data ss:Type="String">N/A</Data></Cell> |
1112 | + % endif |
1113 | + <Cell ss:StyleID="line_left"><Data ss:Type="String">${line.get('delivered_uom', '')|x}</Data></Cell> |
1114 | + <Cell ss:StyleID="line_left"><Data ss:Type="String">${line.get('packing', '')|x}</Data></Cell> |
1115 | + % if line.get('extra_qty', False): |
1116 | + <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 | + % else: |
1118 | + <Cell ss:StyleID="line_right"><Data ss:Type="Number">${line.get('backordered_qty')}</Data></Cell> |
1119 | + % endif |
1120 | + % if o.transport_type and o.transport_type not in (False, 'False', ''): |
1121 | + <Cell ss:StyleID="line_left"><Data ss:Type="String">${getSel(o, 'transport_type')|x}</Data></Cell> |
1122 | + % else: |
1123 | + <Cell ss:StyleID="line_left"><Data ss:Type="String"></Data></Cell> |
1124 | + % endif |
1125 | + % if line.get('is_delivered'): |
1126 | + <Cell ss:StyleID="line_left_green"><Data ss:Type="String">${line.get('shipment', '')|x}</Data></Cell> |
1127 | + % else: |
1128 | + <Cell ss:StyleID="line_left"><Data ss:Type="String">${line.get('shipment', '')|x}</Data></Cell> |
1129 | + % endif |
1130 | + <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 | + <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 | + <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 | + % endif |
1134 | </Row> |
1135 | % endfor |
1136 | |
1137 | |
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 | fl_index = 0 |
1143 | m_index = 0 |
1144 | bo_qty = line.product_uom_qty |
1145 | - po_name = '' |
1146 | + po_name = '-' |
1147 | cdd = False |
1148 | linked_pol = self.pool.get('purchase.order.line').search(self.cr, self.uid, [('linked_sol_id', '=', line.id)]) |
1149 | if linked_pol: |
1150 | @@ -131,12 +131,16 @@ |
1151 | if not cdd and line.order_id.delivery_confirmed_date: |
1152 | cdd = line.order_id.delivery_confirmed_date |
1153 | |
1154 | + data = { |
1155 | + 'state': line.state, |
1156 | + 'state_display': line.state_to_display, |
1157 | + } |
1158 | + |
1159 | for move in line.move_ids: |
1160 | m_type = move.product_qty != 0.00 and move.picking_id.type == 'out' |
1161 | ppl = move.picking_id.subtype == 'packing' and move.picking_id.shipment_id and not self._is_returned(move) |
1162 | ppl_not_shipped = move.picking_id.subtype == 'ppl' and move.picking_id.state not in ('cancel', 'done') |
1163 | s_out = move.picking_id.subtype == 'standard' and move.state == 'done' and move.location_dest_id.usage == 'customer' |
1164 | - |
1165 | if m_type and (ppl or s_out or ppl_not_shipped): |
1166 | # bo_qty < 0 if we receipt (IN) more quantities then expected (FO): |
1167 | bo_qty -= self.pool.get('product.uom')._compute_qty( |
1168 | @@ -146,7 +150,7 @@ |
1169 | move.product_qty, |
1170 | line.product_uom.id, |
1171 | ) |
1172 | - data = { |
1173 | + data.update({ |
1174 | 'po_name': po_name, |
1175 | 'cdd': cdd, |
1176 | 'line_number': line.line_number, |
1177 | @@ -154,7 +158,7 @@ |
1178 | 'product_code': line.product_id.code, |
1179 | 'is_delivered': False, |
1180 | 'backordered_qty': 0.00, |
1181 | - } |
1182 | + }) |
1183 | if first_line: |
1184 | data.update({ |
1185 | 'uom_id': line.product_uom.name, |
1186 | @@ -169,15 +173,15 @@ |
1187 | is_delivered = False |
1188 | is_shipment_done = False |
1189 | if ppl: |
1190 | - packing = move.picking_id.previous_step_id.name or '' |
1191 | - shipment = move.picking_id.shipment_id and move.picking_id.shipment_id.name or '' |
1192 | + packing = move.picking_id.previous_step_id.name or '-' |
1193 | + shipment = move.picking_id.shipment_id and move.picking_id.shipment_id.name or '-' |
1194 | eta = datetime.strptime(move.picking_id.shipment_id.shipment_actual_date[0:10], '%Y-%m-%d') |
1195 | eta += timedelta(days=line.order_id.partner_id.supplier_lt or 0.00) |
1196 | is_delivered = move.picking_id.shipment_id.state == 'delivered' or False |
1197 | is_shipment_done = move.picking_id.shipment_id.state == 'done' or False |
1198 | else: |
1199 | - packing = move.picking_id.name or '' |
1200 | - shipment = '' |
1201 | + packing = move.picking_id.name or '-' |
1202 | + shipment = '-' |
1203 | |
1204 | if not grouped: |
1205 | key = (packing, shipment, move.product_uom.name) |
1206 | @@ -188,21 +192,21 @@ |
1207 | 'shipment': shipment, |
1208 | 'is_delivered': is_delivered, |
1209 | 'delivered_qty': not only_bo and (is_shipment_done or is_delivered) and move.product_qty or 0.00, |
1210 | - 'delivered_uom': not only_bo and (is_shipment_done or is_delivered) and move.product_uom.name or '', |
1211 | + 'delivered_uom': not only_bo and (is_shipment_done or is_delivered) and move.product_uom.name or '-', |
1212 | 'backordered_qty': not is_shipment_done and not is_delivered and line.order_id.state != 'cancel' and move.product_qty or 0.00, |
1213 | 'rts': not only_bo and move.picking_id.shipment_id and move.picking_id.shipment_id.shipment_expected_date[0:10] or '', |
1214 | 'eta': not only_bo and eta and eta.strftime('%Y-%m-%d'), |
1215 | - 'transport': not only_bo and move.picking_id.shipment_id and move.picking_id.shipment_id.transport_type or '', |
1216 | + 'transport': not only_bo and move.picking_id.shipment_id and move.picking_id.shipment_id.transport_type, |
1217 | }) |
1218 | else: |
1219 | if move.picking_id.type == 'out' and move.picking_id.subtype == 'packing': |
1220 | packing = move.picking_id.previous_step_id.name |
1221 | - shipment = move.picking_id.shipment_id.name or '' |
1222 | + shipment = move.picking_id.shipment_id.name or '-' |
1223 | is_shipment_done = move.picking_id.shipment_id.state == 'done' |
1224 | else: |
1225 | - shipment = move.picking_id.name or '' |
1226 | + shipment = move.picking_id.name or '-' |
1227 | is_shipment_done = move.picking_id.state == 'done' |
1228 | - packing = '' |
1229 | + packing = '-' |
1230 | if not grouped: |
1231 | key = (packing, False, move.product_uom.name) |
1232 | else: |
1233 | @@ -211,18 +215,24 @@ |
1234 | data.update({ |
1235 | 'packing': packing, |
1236 | 'delivered_qty': is_shipment_done and move.product_qty or 0.00, |
1237 | - 'delivered_uom': is_shipment_done and move.product_uom.name or '', |
1238 | + 'delivered_uom': is_shipment_done and move.product_uom.name or '-', |
1239 | 'rts': line.order_id.ready_to_ship_date, |
1240 | 'shipment': shipment, |
1241 | }) |
1242 | |
1243 | - if key in keys: |
1244 | + if key in keys and lines: |
1245 | for rline in lines: |
1246 | if rline['packing'] == key[0] and rline['shipment'] == key[1] and rline['delivered_uom'] == key[2]: |
1247 | if not grouped or (grouped and line.line_number == key[3]): |
1248 | rline.update({ |
1249 | 'delivered_qty': rline['delivered_qty'] + data['delivered_qty'], |
1250 | }) |
1251 | + if rline['packing'] == key[0] and rline['shipment'] == key[1] and move.product_uom.name == key[2]\ |
1252 | + and (ppl_not_shipped or not is_shipment_done): |
1253 | + if not grouped or (grouped and line.line_number == key[3]): |
1254 | + rline.update({ |
1255 | + 'backordered_qty': rline['backordered_qty'] + data['backordered_qty'], |
1256 | + }) |
1257 | else: |
1258 | keys.append(key) |
1259 | lines.append(data) |
1260 | @@ -230,23 +240,25 @@ |
1261 | fl_index = m_index |
1262 | m_index += 1 |
1263 | |
1264 | + # reset the data to prevent delivered_qty problem when line is split in PICK |
1265 | + data = {} |
1266 | + |
1267 | # No move found |
1268 | if first_line: |
1269 | - data = { |
1270 | + data.update({ |
1271 | 'line_number': line.line_number, |
1272 | 'po_name': po_name, |
1273 | 'product_code': line.product_id.default_code, |
1274 | 'product_name': line.product_id.name, |
1275 | 'uom_id': line.product_uom.name, |
1276 | 'ordered_qty': line.product_uom_qty, |
1277 | - 'rts': line.order_id.state not in ('draft', 'validated', 'cancel') and line.order_id.ready_to_ship_date or '', |
1278 | + 'rts': line.order_id.state not in ('draft', 'validated', 'cancel') and line.order_id.ready_to_ship_date, |
1279 | 'delivered_qty': 0.00, |
1280 | - 'delivered_uom': '', |
1281 | + 'delivered_uom': '-', |
1282 | 'backordered_qty': line.product_uom_qty if line.order_id.state != 'cancel' else 0.00, |
1283 | 'cdd': cdd, |
1284 | - } |
1285 | + }) |
1286 | lines.append(data) |
1287 | - |
1288 | # Put the backorderd qty on the first line |
1289 | if not lines: |
1290 | continue |
1291 | @@ -266,8 +278,8 @@ |
1292 | }) |
1293 | if not first_line: |
1294 | lines[fl_index].update({ |
1295 | - 'shipment': '', |
1296 | - 'packing': '', |
1297 | + 'shipment': '-', |
1298 | + 'packing': '-', |
1299 | }) |
1300 | |
1301 | elif bo_qty < 0: |
1302 | |
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 | 'confirmed_ok': fields.boolean( |
1308 | string='Confirmed', |
1309 | ), |
1310 | - 'exception_ok': fields.boolean( |
1311 | - string='Exception', |
1312 | - ), |
1313 | 'closed_ok': fields.boolean( |
1314 | string='Closed', |
1315 | ), |
1316 | 'cancel_ok': fields.boolean( |
1317 | - string='Cancel', |
1318 | + string='Cancelled', |
1319 | ), |
1320 | 'only_bo': fields.boolean( |
1321 | string='Pending order lines only (PDF)', |
1322 | @@ -115,19 +112,16 @@ |
1323 | state_domain = [] |
1324 | |
1325 | if wizard.draft_ok: |
1326 | - state_domain.append('draft') |
1327 | + state_domain.extend(['draft', 'draft_p']) |
1328 | |
1329 | if wizard.validated_ok: |
1330 | - state_domain.extend(['validated', 'waiting_date']) |
1331 | + state_domain.extend(['validated', 'validated_p']) |
1332 | |
1333 | if wizard.sourced_ok: |
1334 | - state_domain.append('sourced') |
1335 | + state_domain.extend(['sourced', 'sourced_p']) |
1336 | |
1337 | if wizard.confirmed_ok: |
1338 | - state_domain.extend(['manual', 'progress']) |
1339 | - |
1340 | - if wizard.exception_ok: |
1341 | - state_domain.extend(['shipping_except', 'invoice_except']) |
1342 | + state_domain.extend(['confirmed', 'confirmed_p']) |
1343 | |
1344 | if wizard.closed_ok: |
1345 | state_domain.append('done') |
1346 | |
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 | <field name="validated_ok" /> |
1352 | <field name="sourced_ok" /> |
1353 | <field name="confirmed_ok" /> |
1354 | - <field name="exception_ok" /> |
1355 | <field name="closed_ok" /> |
1356 | <field name="cancel_ok" /> |
1357 | </group> |
1358 | |
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 | 'confirmed_ok': fields.boolean( |
1364 | string='Confirmed', |
1365 | ), |
1366 | - 'exception_ok': fields.boolean( |
1367 | - string='Exception', |
1368 | - ), |
1369 | 'closed_ok': fields.boolean( |
1370 | string='Closed', |
1371 | ), |
1372 | 'cancel_ok': fields.boolean( |
1373 | - string='Cancel', |
1374 | + string='Cancelled', |
1375 | ), |
1376 | 'only_bo': fields.boolean( |
1377 | string='Pending order lines only (PDF)', |
1378 | @@ -122,19 +119,16 @@ |
1379 | state_domain = [] |
1380 | |
1381 | if wizard.draft_ok: |
1382 | - state_domain.append('draft') |
1383 | + state_domain.extend(['draft', 'draft_p']) |
1384 | |
1385 | if wizard.validated_ok: |
1386 | - state_domain.extend(['validated', 'waiting_date']) |
1387 | + state_domain.extend(['validated', 'validated_p']) |
1388 | |
1389 | if wizard.sourced_ok: |
1390 | - state_domain.append('sourced') |
1391 | + state_domain.extend(['sourced', 'sourced_p']) |
1392 | |
1393 | if wizard.confirmed_ok: |
1394 | - state_domain.extend(['manual', 'progress']) |
1395 | - |
1396 | - if wizard.exception_ok: |
1397 | - state_domain.extend(['shipping_except', 'invoice_except']) |
1398 | + state_domain.extend(['confirmed', 'confirmed_p']) |
1399 | |
1400 | if wizard.closed_ok: |
1401 | state_domain.append('done') |
1402 | |
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 | <field name="validated_ok" /> |
1408 | <field name="sourced_ok" /> |
1409 | <field name="confirmed_ok" /> |
1410 | - <field name="exception_ok" /> |
1411 | <field name="closed_ok" /> |
1412 | <field name="cancel_ok" /> |
1413 | </group> |
1414 | |
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 | ('product_uom', '=', loc['uom_id']), |
1420 | ('line_number', '=', move['line_number']), |
1421 | ('location_id', '=', loc['location_id']), |
1422 | + ('sale_line_id', '=', move['sale_line_id'] and move['sale_line_id'][0] or False), |
1423 | ('location_dest_id', '=', move['location_dest_id'][0]), |
1424 | ('prodlot_id', '=', loc['prodlot_id'])], |
1425 | context=context) |