Merge lp:~dorian-kemps/unifield-server/US-12033 into lp:unifield-server
- US-12033
- Merge into trunk
Proposed by
jftempo
Status: | Merged |
---|---|
Merged at revision: | 6285 |
Proposed branch: | lp:~dorian-kemps/unifield-server/US-12033 |
Merge into: | lp:unifield-server |
Diff against target: |
479 lines (+179/-39) (has conflicts) 7 files modified
bin/addons/base/rng/view.rng (+1/-0) bin/addons/msf_doc_import/wizard/wizard_import_po_line.py (+1/-3) bin/addons/msf_profile/i18n/fr_MF.po (+28/-4) bin/addons/purchase/purchase_order.py (+1/-1) bin/addons/purchase_compare_rfq/wizard/compare_rfq.py (+30/-16) bin/addons/tender_flow/report/tender_rfq_comparison_xls.mako (+114/-13) bin/addons/tender_flow/report/tender_rfq_comparison_xls.py (+4/-2) Text conflict in bin/addons/msf_profile/i18n/fr_MF.po |
To merge this branch: | bzr merge lp:~dorian-kemps/unifield-server/US-12033 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
UniField Reviewer Team | Pending | ||
Review via email: mp+465682@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/base/rng/view.rng' |
2 | --- bin/addons/base/rng/view.rng 2024-02-27 09:10:05 +0000 |
3 | +++ bin/addons/base/rng/view.rng 2024-05-07 10:17:45 +0000 |
4 | @@ -504,6 +504,7 @@ |
5 | <rng:optional><rng:attribute name="required_error_msg"/></rng:optional> |
6 | <rng:optional><rng:attribute name="truncate"/></rng:optional> |
7 | <rng:optional><rng:attribute name="tooltip"/></rng:optional> |
8 | + <rng:optional><rng:attribute name="colors"/></rng:optional> |
9 | <rng:zeroOrMore> |
10 | <rng:choice> |
11 | <rng:ref name="diagram"/> |
12 | |
13 | === modified file 'bin/addons/msf_doc_import/wizard/wizard_import_po_line.py' |
14 | --- bin/addons/msf_doc_import/wizard/wizard_import_po_line.py 2023-11-03 15:04:29 +0000 |
15 | +++ bin/addons/msf_doc_import/wizard/wizard_import_po_line.py 2024-05-07 10:17:45 +0000 |
16 | @@ -329,9 +329,7 @@ |
17 | if not price_value['price_unit_defined']: |
18 | raise osv.except_osv(_('Error'), _("Price must be defined in the RfQ import file.")) |
19 | |
20 | - # in case of update we do not want to update qty and uom values : |
21 | - if 'product_qty' in to_write: |
22 | - to_write.pop('product_qty') |
23 | + # in case of update we do not want to update uom values : |
24 | if 'product_uom' in to_write: |
25 | to_write.pop('product_uom') |
26 | |
27 | |
28 | === modified file 'bin/addons/msf_profile/i18n/fr_MF.po' |
29 | --- bin/addons/msf_profile/i18n/fr_MF.po 2024-05-02 13:19:58 +0000 |
30 | +++ bin/addons/msf_profile/i18n/fr_MF.po 2024-05-07 10:17:45 +0000 |
31 | @@ -8288,7 +8288,6 @@ |
32 | #: report:stock.forecast.report:0 |
33 | #: report:delivery.order:0 |
34 | #: report:internal.move:0 |
35 | -#: report:addons/tender_flow/report/tender_rfq_comparison_xls.mako:573 |
36 | #: report:addons/msf_supply_doc_export/report/internal_request_export_xls.mako:132 |
37 | #: code:addons/sale/wizard/internal_request_import.py:45 |
38 | #: field:internal.request.import.line,imp_qty:0 |
39 | @@ -27177,7 +27176,6 @@ |
40 | #: field:wizard.import.po.simulation.screen.line,in_qty:0 |
41 | #: field:wizard.simu.import.po.line,import_qty:0 |
42 | #: field:wizard.simu.import.po.line,initial_qty:0 |
43 | -#: field:wizard.compare.rfq.line,quantity:0 |
44 | #: report:addons/purchase_followup/report/po_track_changes_report_xls.mako:237 |
45 | #: view:purchase.order:0 |
46 | #: field:stock.reserved.products,product_qty:0 |
47 | @@ -98352,11 +98350,18 @@ |
48 | msgid "Server Actions" |
49 | msgstr "Serveur - Actions " |
50 | |
51 | -#. module: product |
52 | +#. module: product, tender_flow |
53 | #: selection:product.price.type,field:0 |
54 | #: field:product.template,seller_qty:0 |
55 | +#: report:addons/tender_flow/report/tender_rfq_comparison_xls.mako:663 |
56 | msgid "Supplier Quantity" |
57 | -msgstr "Fournisseur - Quantité" |
58 | +msgstr "Quantité Fournisseur" |
59 | + |
60 | +#. module: purchase_compare_rfq |
61 | +#: code:addons/purchase_compare_rfq/wizard/compare_rfq.py:475 |
62 | +#, python-format |
63 | +msgid "Supplier Qty" |
64 | +msgstr "Qté Fournisseur" |
65 | |
66 | #. module: base |
67 | #: report:ir.module.reference:0 |
68 | @@ -121806,6 +121811,7 @@ |
69 | #, python-format |
70 | msgid "This action can only be done on a Picking" |
71 | msgstr "Cette action peut uniquement être faite sur un Picking" |
72 | +<<<<<<< TREE |
73 | |
74 | #. modules: purchase, sale |
75 | #: code:addons/purchase/purchase_workflow.py:107 |
76 | @@ -122096,3 +122102,21 @@ |
77 | msgid "No valid catalogue" |
78 | msgstr "Aucun catalogue valide" |
79 | |
80 | +======= |
81 | + |
82 | +#. module: purchase_compare_rfq |
83 | +#: field:wizard.compare.rfq.line,quantity:0 |
84 | +msgid "Tender Qty" |
85 | +msgstr "Qté Appel d'Offre" |
86 | + |
87 | +#. module: tender_flow |
88 | +#: report:addons/tender_flow/report/tender_rfq_comparison_xls.mako:659 |
89 | +msgid "Tender Quantity" |
90 | +msgstr "Quantité Appel d'Offre" |
91 | + |
92 | +#. module: purchase_compare_rfq |
93 | +#: code:addons/purchase_compare_rfq/wizard/compare_rfq.py:500 |
94 | +#, python-format |
95 | +msgid "Quantity Discrepancy" |
96 | +msgstr "Écart de Quantité" |
97 | +>>>>>>> MERGE-SOURCE |
98 | |
99 | === modified file 'bin/addons/purchase/purchase_order.py' |
100 | --- bin/addons/purchase/purchase_order.py 2024-05-02 13:19:58 +0000 |
101 | +++ bin/addons/purchase/purchase_order.py 2024-05-07 10:17:45 +0000 |
102 | @@ -1636,7 +1636,7 @@ |
103 | def copy_web(self, cr, uid, id, defaults=None, context=None): |
104 | if defaults is None: |
105 | defaults = {} |
106 | - defaults['from_procurement'] = False |
107 | + defaults.update({'from_procurement': False, 'tender_id': False}) |
108 | is_direct = False |
109 | if self.search_exists(cr, uid, [('id', '=', id), ('order_type', '=', 'direct')], context=context): |
110 | company_id = self.pool.get('res.users').get_current_company(cr, uid)[0][0] |
111 | |
112 | === modified file 'bin/addons/purchase_compare_rfq/wizard/compare_rfq.py' |
113 | --- bin/addons/purchase_compare_rfq/wizard/compare_rfq.py 2022-08-18 14:56:03 +0000 |
114 | +++ bin/addons/purchase_compare_rfq/wizard/compare_rfq.py 2024-05-07 10:17:45 +0000 |
115 | @@ -416,7 +416,7 @@ |
116 | ), |
117 | 'quantity': fields.float( |
118 | digits=(16,2), |
119 | - string='Qty', |
120 | + string='Tender Qty', |
121 | ), |
122 | 'uom_id': fields.many2one( |
123 | 'product.uom', |
124 | @@ -467,6 +467,13 @@ |
125 | 'size': 128, |
126 | 'string': _('Supplier'), |
127 | }, |
128 | + # Quantity on the related RfQ line |
129 | + 'qty_%s' % sid: { |
130 | + 'selectable': True, |
131 | + 'type': 'float', |
132 | + 'digits': (16,2), |
133 | + 'string': _('Supplier Qty'), |
134 | + }, |
135 | # Unit price on the related RfQ line |
136 | 'unit_price_%s' % sid: { |
137 | 'selectable': True, |
138 | @@ -486,6 +493,12 @@ |
139 | 'type': 'text', |
140 | 'string': _('Comment'), |
141 | }, |
142 | + # Check to see if the RfQ line qty is different than the one on the related Tender line |
143 | + 'qty_discr_%s' % sid: { |
144 | + 'selectable': True, |
145 | + 'type': 'boolean', |
146 | + 'string': _('Quantity Discrepancy'), |
147 | + }, |
148 | }) |
149 | |
150 | return res |
151 | @@ -529,9 +542,10 @@ |
152 | ('tender_line_id', '=', r['tender_line_id']), |
153 | ], context=context) |
154 | rfql = None |
155 | - pu = 0.00 |
156 | + qty, pu = 0.00, 0.00 |
157 | if rfql_ids: |
158 | rfql = pol_obj.browse(cr, uid, rfql_ids[0], context=context) |
159 | + qty = rfql.product_qty |
160 | pu = rfql.price_unit |
161 | same_cur = rfql.order_id.pricelist_id.currency_id.id == cur_id |
162 | if not same_cur: |
163 | @@ -539,28 +553,26 @@ |
164 | |
165 | r.update({ |
166 | 'name_%s' % sid: sup.name, |
167 | + 'qty_%s' % sid: rfql and qty or 0.00, |
168 | 'unit_price_%s' % sid: rfql and pu or 0.00, |
169 | 'confirmed_delivery_date_%s' % sid: rfql and rfql.confirmed_delivery_date or False, |
170 | 'comment_%s' % sid: rfql and rfql.comment or '', |
171 | + 'qty_discr_%s' % sid: rfql and rfql.tender_line_id and rfql.tender_line_id.qty != qty or False, |
172 | }) |
173 | |
174 | return res |
175 | |
176 | - def fields_view_get(self, cr, uid, view_id=None, view_type='form', |
177 | - context=None, toolbar=False, submenu=False): |
178 | + def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False): |
179 | """ |
180 | - Display the computed fields according to number of suppliers in the |
181 | - tender. |
182 | + Display the computed fields according to number of suppliers in the tender. |
183 | """ |
184 | t_obj = self.pool.get('tender') |
185 | |
186 | if context is None: |
187 | context = {} |
188 | |
189 | - res = super(wizard_compare_rfq_line, self).fields_view_get( |
190 | - cr, uid, view_id, view_type, |
191 | - context=context, toolbar=toolbar, |
192 | - submenu=submenu) |
193 | + res = super(wizard_compare_rfq_line, self).fields_view_get(cr, uid, view_id, view_type, context=context, |
194 | + toolbar=toolbar, submenu=submenu) |
195 | |
196 | if view_type == 'tree': |
197 | tree_view = """<tree string="Compared products" editable="top"> |
198 | @@ -570,12 +582,11 @@ |
199 | <field name="quantity" readonly="1" /> |
200 | <field name="uom_id" readonly="1" /> |
201 | """ |
202 | - fld_to_add = ['name', 'unit_price', 'comment', 'confirmed_delivery_date'] |
203 | + fld_to_add = ['qty_discr', 'name', 'qty', 'unit_price', 'comment', 'confirmed_delivery_date'] |
204 | t_id = context.get('tender_id', False) |
205 | s_ids = [] |
206 | if t_id: |
207 | - s_ids = t_obj.\ |
208 | - browse(cr, uid, t_id, context=context).supplier_ids |
209 | + s_ids = t_obj.browse(cr, uid, t_id, context=context).supplier_ids |
210 | |
211 | for sup in s_ids: |
212 | tree_view += """ |
213 | @@ -595,9 +606,12 @@ |
214 | """ % {'sid': sup.id} |
215 | |
216 | for fld in fld_to_add: |
217 | - tree_view += """ |
218 | - <field name="%s_%s" readonly="1" not_sortable="1"/> |
219 | - """ % (fld, sup.id) |
220 | + if fld == 'qty_discr': |
221 | + tree_view += """<field name="%s_%s" readonly="1" not_sortable="1" invisible="1"/>""" % (fld, sup.id) |
222 | + else: |
223 | + tree_view += """ |
224 | + <field name="%s_%s" readonly="1" not_sortable="1" colors="red:qty_discr_%s==True"/> |
225 | + """ % (fld, sup.id, sup.id) |
226 | |
227 | if s_ids: |
228 | tree_view += """ |
229 | |
230 | === modified file 'bin/addons/tender_flow/report/tender_rfq_comparison_xls.mako' |
231 | --- bin/addons/tender_flow/report/tender_rfq_comparison_xls.mako 2022-02-24 09:02:02 +0000 |
232 | +++ bin/addons/tender_flow/report/tender_rfq_comparison_xls.mako 2024-05-07 10:17:45 +0000 |
233 | @@ -51,6 +51,19 @@ |
234 | <NumberFormat/> |
235 | <Protection/> |
236 | </Style> |
237 | + <Style ss:ID="s67red"> |
238 | + <Alignment ss:Horizontal="Left" ss:Vertical="Center" ss:WrapText="1"/> |
239 | + <Borders> |
240 | + <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/> |
241 | + <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/> |
242 | + <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/> |
243 | + <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/> |
244 | + </Borders> |
245 | + <Font ss:FontName="Calibri" x:Family="Swiss" ss:Size="11" ss:Color="#ff0000"/> |
246 | + <Interior/> |
247 | + <NumberFormat/> |
248 | + <Protection/> |
249 | + </Style> |
250 | <Style ss:ID="s68"> |
251 | <Alignment ss:Horizontal="Left" ss:Vertical="Bottom"/> |
252 | <Borders> |
253 | @@ -202,6 +215,18 @@ |
254 | <NumberFormat/> |
255 | <Protection/> |
256 | </Style> |
257 | + <Style ss:ID="s87red"> |
258 | + <Alignment ss:Horizontal="Left" ss:Vertical="Center" ss:WrapText="1"/> |
259 | + <Borders> |
260 | + <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/> |
261 | + <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="2"/> |
262 | + <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/> |
263 | + </Borders> |
264 | + <Font ss:FontName="Calibri" x:Family="Swiss" ss:Size="11" ss:Color="#ff0000"/> |
265 | + <Interior/> |
266 | + <NumberFormat/> |
267 | + <Protection/> |
268 | + </Style> |
269 | <Style ss:ID="s88"> |
270 | <Alignment ss:Vertical="Center" ss:WrapText="1"/> |
271 | <Borders> |
272 | @@ -214,6 +239,18 @@ |
273 | <NumberFormat ss:Format="Fixed"/> |
274 | <Protection/> |
275 | </Style> |
276 | + <Style ss:ID="s88red"> |
277 | + <Alignment ss:Vertical="Center" ss:WrapText="1"/> |
278 | + <Borders> |
279 | + <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/> |
280 | + <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/> |
281 | + <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/> |
282 | + </Borders> |
283 | + <Font ss:FontName="Calibri" x:Family="Swiss" ss:Size="11" ss:Color="#ff0000"/> |
284 | + <Interior/> |
285 | + <NumberFormat ss:Format="Fixed"/> |
286 | + <Protection/> |
287 | + </Style> |
288 | <Style ss:ID="s89"> |
289 | <NumberFormat ss:Format="Short Date"/> |
290 | <Alignment ss:Vertical="Center" ss:WrapText="1"/> |
291 | @@ -236,6 +273,18 @@ |
292 | <NumberFormat/> |
293 | <Protection/> |
294 | </Style> |
295 | + <Style ss:ID="s90red"> |
296 | + <Alignment ss:Horizontal="Left" ss:Vertical="Center" ss:WrapText="1"/> |
297 | + <Borders> |
298 | + <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/> |
299 | + <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/> |
300 | + <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="2"/> |
301 | + </Borders> |
302 | + <Font ss:FontName="Calibri" x:Family="Swiss" ss:Size="11" ss:Color="#ff0000"/> |
303 | + <Interior/> |
304 | + <NumberFormat/> |
305 | + <Protection/> |
306 | + </Style> |
307 | <Style ss:ID="s91"> |
308 | <Alignment ss:Horizontal="Left" ss:Vertical="Center" ss:WrapText="1"/> |
309 | <Borders> |
310 | @@ -248,6 +297,19 @@ |
311 | <NumberFormat/> |
312 | <Protection/> |
313 | </Style> |
314 | + <Style ss:ID="s91red"> |
315 | + <Alignment ss:Horizontal="Left" ss:Vertical="Center" ss:WrapText="1"/> |
316 | + <Borders> |
317 | + <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/> |
318 | + <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="2"/> |
319 | + <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="2"/> |
320 | + <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/> |
321 | + </Borders> |
322 | + <Font ss:FontName="Calibri" x:Family="Swiss" ss:Size="11" ss:Color="#ff0000"/> |
323 | + <Interior/> |
324 | + <NumberFormat/> |
325 | + <Protection/> |
326 | + </Style> |
327 | <Style ss:ID="s92"> |
328 | <Alignment ss:Horizontal="Left" ss:Vertical="Center" ss:WrapText="1"/> |
329 | <Borders> |
330 | @@ -287,7 +349,7 @@ |
331 | <Protection/> |
332 | </Style> |
333 | <Style ss:ID="s98"> |
334 | - <Alignment ss:Horizontal="Center" ss:Vertical="Center"/> |
335 | + <Alignment ss:Horizontal="Center" ss:Vertical="Center" ss:WrapText="1"/> |
336 | <Borders> |
337 | <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/> |
338 | <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/> |
339 | @@ -404,6 +466,17 @@ |
340 | <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/> |
341 | </Borders> |
342 | </Style> |
343 | +<Style ss:ID="sShortDateRed"> |
344 | +<NumberFormat ss:Format="Short Date"/> |
345 | +<Alignment ss:Vertical="Bottom" ss:Horizontal="Left" ss:WrapText="1"/> |
346 | + <Borders> |
347 | + <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/> |
348 | + <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/> |
349 | + <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/> |
350 | + <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/> |
351 | + </Borders> |
352 | + <Font ss:FontName="Calibri" x:Family="Swiss" ss:Size="11" ss:Color="#ff0000"/> |
353 | +</Style> |
354 | <Style ss:ID="mSupHeader"> |
355 | <Alignment ss:Horizontal="Center" ss:Vertical="Center" ss:WrapText="1"/> |
356 | <Borders> |
357 | @@ -428,6 +501,18 @@ |
358 | <NumberFormat/> |
359 | <Protection/> |
360 | </Style> |
361 | +<Style ss:ID="mSupQty"> |
362 | + <Alignment ss:Horizontal="Center" ss:Vertical="Center" ss:WrapText="1"/> |
363 | + <Borders> |
364 | + <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="2"/> |
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 | + <Interior ss:Color="#FFFF99" ss:Pattern="Solid"/> |
370 | + <NumberFormat/> |
371 | + <Protection/> |
372 | +</Style> |
373 | <Style ss:ID="mSupUnit"> |
374 | <Alignment ss:Horizontal="Center" ss:Vertical="Center"/> |
375 | <Borders> |
376 | @@ -499,10 +584,11 @@ |
377 | <Column ss:AutoFitWidth="0" ss:Width="50"/> |
378 | <Column ss:AutoFitWidth="0" ss:Width="80"/> |
379 | <Column ss:AutoFitWidth="0" ss:Width="250"/> |
380 | - <Column ss:Width="40"/> |
381 | + <Column ss:Width="50"/> |
382 | <Column ss:AutoFitWidth="0" ss:Width="50"/> |
383 | % for numsup in range(0, len(o.supplier_ids)): |
384 | <Column ss:AutoFitWidth="0" ss:Width="120"/> |
385 | + <Column ss:Width="50"/> |
386 | <Column ss:AutoFitWidth="0" ss:Width="70"/> |
387 | <Column ss:AutoFitWidth="0" ss:Width="90"/> |
388 | <Column ss:Width="120" ss:Span="1"/> |
389 | @@ -562,7 +648,7 @@ |
390 | <Cell /> |
391 | <Cell /> |
392 | % for numsup in range(0, len(o.supplier_ids)): |
393 | - <Cell ss:MergeAcross="3" ss:StyleID="mSupHeader"><Data ss:Type="String">${_('Supplier')} ${numsup+1}</Data></Cell> |
394 | + <Cell ss:MergeAcross="4" ss:StyleID="mSupHeader"><Data ss:Type="String">${_('Supplier')} ${numsup+1}</Data></Cell> |
395 | % endfor |
396 | <Cell ss:MergeDown="1" ss:StyleID="mSupHeader"><Data ss:Type="String">${_('Selected Supplier')}</Data></Cell> |
397 | </Row> |
398 | @@ -570,10 +656,11 @@ |
399 | <Cell ss:StyleID="s98"><Data ss:Type="String">${_('Line nr.')}</Data></Cell> |
400 | <Cell ss:StyleID="s98"><Data ss:Type="String">${_('Product Code')}</Data></Cell> |
401 | <Cell ss:StyleID="s98"><Data ss:Type="String">${_('Product Description')}</Data></Cell> |
402 | - <Cell ss:StyleID="s98"><Data ss:Type="String">${_('Quantity')}</Data></Cell> |
403 | + <Cell ss:StyleID="s98"><Data ss:Type="String">${_('Tender Quantity')}</Data></Cell> |
404 | <Cell ss:StyleID="s98"><Data ss:Type="String">${_('UoM')}</Data></Cell> |
405 | % for numsup in range(0, len(o.supplier_ids)): |
406 | <Cell ss:StyleID="mSupName"><Data ss:Type="String">${_('Name')}</Data></Cell> |
407 | + <Cell ss:StyleID="mSupQty"><Data ss:Type="String">${_('Supplier Quantity')}</Data></Cell> |
408 | <Cell ss:StyleID="mSupUnit"><Data ss:Type="String">${_('Unit Price')}</Data></Cell> |
409 | <Cell ss:StyleID="mSupConfDate"><Data ss:Type="String">${_('Confirmed Delivery Date')}</Data></Cell> |
410 | <Cell ss:StyleID="mSupComment"><Data ss:Type="String">${_('Comment')}</Data></Cell> |
411 | @@ -590,19 +677,33 @@ |
412 | % for supplier in o.supplier_ids: |
413 | <% |
414 | sup_name = 'name_%s' % supplier.id |
415 | + sup_qty = 'qty_%s' % supplier.id |
416 | sup_price = 'unit_price_%s' % supplier.id |
417 | sup_comment = 'comment_%s' % supplier.id |
418 | sup_confirmed_delivery_date = 'confirmed_delivery_date_%s' % supplier.id |
419 | %> |
420 | - <Cell ss:StyleID="s87"><Data ss:Type="String">${line.get(sup_name, '')|x}</Data></Cell> |
421 | - <Cell ss:StyleID="s88"><Data ss:Type="Number">${line.get(sup_price, 0.00)}</Data></Cell> |
422 | - % if isDate(line.get(sup_confirmed_delivery_date, False)): |
423 | - <Cell ss:StyleID="sShortDate"><Data ss:Type="DateTime">${line.get(sup_confirmed_delivery_date, '')|x}T00:00:00.000</Data></Cell> |
424 | - % else: |
425 | - <Cell ss:StyleID="s87"><Data ss:Type="String"></Data></Cell> |
426 | - % endif |
427 | - <Cell ss:StyleID="s90"><Data ss:Type="String">${line.get(sup_comment, '')|x}</Data></Cell> |
428 | - % endfor |
429 | + % if line.get(sup_qty, 0.00) != line.quantity: |
430 | + <Cell ss:StyleID="s87red"><Data ss:Type="String">${line.get(sup_name, '')|x}</Data></Cell> |
431 | + <Cell ss:StyleID="s67red"><Data ss:Type="Number">${line.get(sup_qty, 0.00)}</Data></Cell> |
432 | + <Cell ss:StyleID="s88red"><Data ss:Type="Number">${line.get(sup_price, 0.00)}</Data></Cell> |
433 | + % if isDate(line.get(sup_confirmed_delivery_date, False)): |
434 | + <Cell ss:StyleID="sShortDateRed"><Data ss:Type="DateTime">${line.get(sup_confirmed_delivery_date, '')|x}T00:00:00.000</Data></Cell> |
435 | + % else: |
436 | + <Cell ss:StyleID="s87red"><Data ss:Type="String"></Data></Cell> |
437 | + % endif |
438 | + <Cell ss:StyleID="s90red"><Data ss:Type="String">${line.get(sup_comment, '')|x}</Data></Cell> |
439 | + % else: |
440 | + <Cell ss:StyleID="s87"><Data ss:Type="String">${line.get(sup_name, '')|x}</Data></Cell> |
441 | + <Cell ss:StyleID="s67"><Data ss:Type="Number">${line.get(sup_qty, 0.00)}</Data></Cell> |
442 | + <Cell ss:StyleID="s88"><Data ss:Type="Number">${line.get(sup_price, 0.00)}</Data></Cell> |
443 | + % if isDate(line.get(sup_confirmed_delivery_date, False)): |
444 | + <Cell ss:StyleID="sShortDate"><Data ss:Type="DateTime">${line.get(sup_confirmed_delivery_date, '')|x}T00:00:00.000</Data></Cell> |
445 | + % else: |
446 | + <Cell ss:StyleID="s87"><Data ss:Type="String"></Data></Cell> |
447 | + % endif |
448 | + <Cell ss:StyleID="s90"><Data ss:Type="String">${line.get(sup_comment, '')|x}</Data></Cell> |
449 | + % endif |
450 | + % endfor |
451 | <Cell ss:StyleID="s91"><Data ss:Type="String">${line.choosen_supplier_id or ''|x}</Data></Cell> |
452 | </Row> |
453 | % endfor |
454 | |
455 | === modified file 'bin/addons/tender_flow/report/tender_rfq_comparison_xls.py' |
456 | --- bin/addons/tender_flow/report/tender_rfq_comparison_xls.py 2020-05-06 17:04:38 +0000 |
457 | +++ bin/addons/tender_flow/report/tender_rfq_comparison_xls.py 2024-05-07 10:17:45 +0000 |
458 | @@ -58,9 +58,10 @@ |
459 | ('tender_line_id', '=', line.id), |
460 | ]) |
461 | rfql = None |
462 | - pu = 0.00 |
463 | + qty, pu = 0.00, 0.00 |
464 | if rfql_ids: |
465 | rfql = pol_obj.browse(self.cr, self.uid, rfql_ids[0]) |
466 | + qty = rfql.product_qty |
467 | pu = rfql.price_unit |
468 | to_cur = rfql.order_id.tender_id.currency_id and rfql.order_id.tender_id.currency_id.id or \ |
469 | self.localcontext['company'].currency_id.id |
470 | @@ -69,7 +70,8 @@ |
471 | |
472 | line_vals.update({ |
473 | 'name_%s' % sid: sup.name, |
474 | - 'unit_price_%s' % sid: pu, |
475 | + 'qty_%s' % sid: rfql and qty or 0.00, |
476 | + 'unit_price_%s' % sid: rfql and pu or 0.00, |
477 | 'comment_%s' % sid: rfql and rfql.comment or '', |
478 | 'confirmed_delivery_date_%s' % sid: rfql and rfql.confirmed_delivery_date or False, |
479 | }) |