Merge lp:~openerp-dev/openobject-server/trunk-imp-warning-msg-bde into lp:openobject-server

Proposed by Bharat Devnani (Open ERP)
Status: Merged
Approved by: Richard Mathot (Odoo, formerly OpenERP)
Approved revision: 5015
Merged at revision: 5194
Proposed branch: lp:~openerp-dev/openobject-server/trunk-imp-warning-msg-bde
Merge into: lp:openobject-server
Diff against target: 13 lines (+2/-1)
1 file modified
openerp/addons/base/res/res_currency.py (+2/-1)
To merge this branch: bzr merge lp:~openerp-dev/openobject-server/trunk-imp-warning-msg-bde
Reviewer Review Type Date Requested Status
Richard Mathot (Odoo, formerly OpenERP) (community) Approve
Review via email: mp+197328@code.launchpad.net

Description of the change

Hello Sir,

I have improved warning message as per specification.

Thanks & Regards,
Devnani Bharat R.

To post a comment you must log in.
5006. By Bharat Devnani (Open ERP)

[IMP] improved the code

5007. By Bharat Devnani (Open ERP)

[IMP] improved the code

5008. By Bharat Devnani (Open ERP)

[IMP] improved the code

5009. By Bharat Devnani (Open ERP)

[MERGE] merged with latest server branch

5010. By Bharat Devnani (Open ERP)

[MERGE] merged with latest server

5011. By Bharat Devnani (Open ERP)

[IMP] improved

5012. By Bharat Devnani (Open ERP)

[IMP] improved

5013. By Bharat Devnani (Open ERP)

[IMP] improved the code to get the name of currency instead of id

5014. By Bharat Devnani (Open ERP)

[MERGE] merged with main server branch

Revision history for this message
Richard Mathot (Odoo, formerly OpenERP) (rim-openerp) wrote :

Please move the "browse" operation to the else clause, in order to avoid some unnecessary "browse"

review: Needs Fixing
5015. By Richard Mathot (Odoo, formerly OpenERP)

[FIX] res_currency: Removing unnecessary 'browse'

Revision history for this message
Richard Mathot (Odoo, formerly OpenERP) (rim-openerp) wrote :

Fixed, LGTM

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'openerp/addons/base/res/res_currency.py'
2--- openerp/addons/base/res/res_currency.py 2013-11-15 13:25:53 +0000
3+++ openerp/addons/base/res/res_currency.py 2014-04-23 07:35:49 +0000
4@@ -58,7 +58,8 @@
5 elif not raise_on_no_rate:
6 res[id] = 0
7 else:
8- raise osv.except_osv(_('Error!'),_("No currency rate associated for currency %d for the given period" % (id)))
9+ currency = self.browse(cr, uid, id, context=context)
10+ raise osv.except_osv(_('Error!'),_("No currency rate associated for currency '%s' for the given period" % (currency.name)))
11 return res
12
13 _name = "res.currency"