Merge lp:~openerp-dev/openobject-addons/7.0-bug-1185795-mahendra into lp:openobject-addons/7.0

Proposed by Mahendra Barad(OpenERP)
Status: Needs review
Proposed branch: lp:~openerp-dev/openobject-addons/7.0-bug-1185795-mahendra
Merge into: lp:openobject-addons/7.0
Diff against target: 51 lines (+8/-3)
2 files modified
stock/report/lot_overview_all.py (+5/-0)
stock/report/lot_overview_all.rml (+3/-3)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/7.0-bug-1185795-mahendra
Reviewer Review Type Date Requested Status
OpenERP Core Team Pending
Review via email: mp+166759@code.launchpad.net

Description of the change

Hello,

I fix the wrong currency symbol in location content report Problem.

Problem is occur when we use the multi-currency and child company has different currency. Then the currency calculation on the report is right as per the user's company currency but it does not shows the user's company currency symbol even it converts the amount based on the user's company currency.

So have set the user's company currency symbol on total price and grand total.

Thanks,
Mahendra

To post a comment you must log in.

Unmerged revisions

9185. By Mahendra Barad(OpenERP)

[FIX] wrong currency symbol in location content report.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'stock/report/lot_overview_all.py'
2--- stock/report/lot_overview_all.py 2012-12-06 14:56:32 +0000
3+++ stock/report/lot_overview_all.py 2013-05-31 11:20:45 +0000
4@@ -32,8 +32,13 @@
5 'process':self.process,
6 'price_total': self._price_total,
7 'grand_total_price':self._grand_total,
8+ 'get_user_currency': self._get_user_currency
9 })
10
11+ def _get_user_currency(self):
12+ user_currency_id = self.pool.get('res.users').browse(self.cr, self.uid, self.uid, context=None).company_id.currency_id
13+ return user_currency_id
14+
15 def process(self, location_id):
16 location_obj = pooler.get_pool(self.cr.dbname).get('stock.location')
17 data = location_obj._product_get_all_report(self.cr,self.uid, [location_id])
18
19=== modified file 'stock/report/lot_overview_all.rml'
20--- stock/report/lot_overview_all.rml 2012-11-29 22:26:45 +0000
21+++ stock/report/lot_overview_all.rml 2013-05-31 11:20:45 +0000
22@@ -184,7 +184,7 @@
23 <para style="terp_default_Right_9">[[ formatLang(p['price'], dp='Account') ]]</para>
24 </td>
25 <td>
26- <para style="terp_default_Right_9">[[ formatLang(p['price_value'], dp='Account', currency_obj = o.company_id.currency_id)]]</para>
27+ <para style="terp_default_Right_9">[[ formatLang(p['price_value'], dp='Account', currency_obj = get_user_currency())]]</para>
28 </td>
29 </tr>
30 </blockTable>
31@@ -198,7 +198,7 @@
32 <para style="terp_default_Bold_9">Total:</para>
33 </td>
34 <td>
35- <para style="terp_tblheader_Details_Right">[[ formatLang(price_total(), dp='Account', currency_obj = o.company_id.currency_id) ]]</para>
36+ <para style="terp_tblheader_Details_Right">[[ formatLang(price_total(), dp='Account', currency_obj = get_user_currency()) ]]</para>
37 </td>
38 </tr>
39 </blockTable>
40@@ -215,7 +215,7 @@
41 </para>
42 </td>
43 <td>
44- <para style="terp_tblheader_Details_Right">[[ formatLang(grand_total_price(), dp='Account', currency_obj = o.company_id.currency_id) ]]</para>
45+ <para style="terp_tblheader_Details_Right">[[ formatLang(grand_total_price(), dp='Account', currency_obj = get_user_currency()) ]]</para>
46 </td>
47 </tr>
48 </blockTable>
49
50=== modified file 'stock/report/lot_overview_all.sxw'
51Binary files stock/report/lot_overview_all.sxw 2012-11-29 22:26:45 +0000 and stock/report/lot_overview_all.sxw 2013-05-31 11:20:45 +0000 differ