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

Proposed by jftempo
Status: Merged
Merged at revision: 4121
Proposed branch: lp:~unifield-team/unifield-server/us-1694
Merge into: lp:unifield-server
Diff against target: 68 lines (+1/-40)
2 files modified
bin/addons/tender_flow/report/tender_rfq_comparison_xls.mako (+1/-1)
bin/addons/tender_flow/report/tender_rfq_comparison_xls.py (+0/-39)
To merge this branch: bzr merge lp:~unifield-team/unifield-server/us-1694
Reviewer Review Type Date Requested Status
UniField Reviewer Team Pending
Review via email: mp+313322@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bin/addons/tender_flow/report/tender_rfq_comparison_xls.mako'
2--- bin/addons/tender_flow/report/tender_rfq_comparison_xls.mako 2016-12-05 15:18:05 +0000
3+++ bin/addons/tender_flow/report/tender_rfq_comparison_xls.mako 2016-12-15 08:33:29 +0000
4@@ -541,7 +541,7 @@
5 <Cell ss:StyleID="sTitle" ss:MergeAcross="1"><Data ss:Type="String">${_('Details')}:</Data></Cell>
6 <Cell ss:StyleID="sData"><Data ss:Type="String">${o.details or ''|x}</Data></Cell>
7 <Cell ss:StyleID="sTitle" ss:MergeAcross="1"><Data ss:Type="String">${_('Currency')}:</Data></Cell>
8- <Cell ss:StyleID="sData"><Data ss:Type="String">${get_same_and_default_currency(o)[1].name or ''|x}</Data></Cell>
9+ <Cell ss:StyleID="sData"><Data ss:Type="String">${o.company_id.currency_id.name or ''|x}</Data></Cell>
10 <Cell ss:StyleID="sTitle" ss:MergeAcross="1"><Data ss:Type="String">${_('Tender Priority')}:</Data></Cell>
11 <Cell ss:StyleID="sData"><Data ss:Type="String">${getSel(o, 'priority')|x}</Data></Cell>
12 </Row>
13
14=== modified file 'bin/addons/tender_flow/report/tender_rfq_comparison_xls.py'
15--- bin/addons/tender_flow/report/tender_rfq_comparison_xls.py 2016-12-05 15:15:27 +0000
16+++ bin/addons/tender_flow/report/tender_rfq_comparison_xls.py 2016-12-15 08:33:29 +0000
17@@ -17,8 +17,6 @@
18 super(tender_rfq_comparison, self).__init__(cr, uid, name, context=context)
19 self.localcontext.update({
20 'get_compare_lines': self.get_compare_lines,
21- 'gen_line_link': self.gen_line_link,
22- 'get_same_and_default_currency': self.get_same_and_default_currency,
23 })
24
25 def get_compare_lines(self, tender_obj):
26@@ -85,42 +83,5 @@
27
28 return lines
29
30- def get_same_and_default_currency(self, tender_obj):
31-
32- if tender_obj == 'draft' or not tender_obj.rfq_ids:
33- return (True, self.localcontext['company'].currency_id)
34-
35- current_cur = False
36-
37- for rfq in tender_obj.rfq_ids:
38- next_cur = rfq.currency_id
39- if current_cur and current_cur.id != next_cur.id:
40- return (False, self.localcontext['company'].currency_id)
41- current_cur = rfq.currency_id
42- return (True, current_cur)
43-
44- def gen_line_link(self, tender_obj):
45- link_line_supp = {}
46-
47- same_cur, currency = self.get_same_and_default_currency(tender_obj)
48- cur_obj = self.pool.get('res.currency')
49-
50- if tender_obj.rfq_ids:
51- # fine we have rfqs
52- for rfq in tender_obj.rfq_ids:
53- for line in rfq.order_line:
54- data = {'notes': line.notes, 'price_unit': line.price_unit}
55- if not same_cur:
56- data['price_unit'] = cur_obj.compute(self.cr, self.uid, line.currency_id.id, currency.id, line.price_unit, round=True)
57-
58- link_line_supp.setdefault(line.product_id.id, {}).setdefault(rfq.partner_id.id, data)
59- elif tender_obj.supplier_ids:
60- for line in tender_obj.tender_line_ids:
61- link_line_supp[line.product_id.id] = {}
62- for supp in tender_obj.supplier_ids:
63- link_line_supp[line.product_id.id][supp.id] = {}
64-
65- return link_line_supp
66-
67
68 SpreadsheetReport('report.tender_rfq_comparison_xls', 'tender', 'tender_flow/report/tender_rfq_comparison_xls.mako', parser=tender_rfq_comparison)

Subscribers

People subscribed via source and target branches

to all changes: