Merge lp:~unifield-team/unifield-addons/uf_886_hook_name_get_currency into lp:unifield-addons

Proposed by jftempo
Status: Merged
Merge reported by: jftempo
Merged at revision: not available
Proposed branch: lp:~unifield-team/unifield-addons/uf_886_hook_name_get_currency
Merge into: lp:unifield-addons
Diff against target: 24 lines (+6/-2)
1 file modified
base_setup/todo.py (+6/-2)
To merge this branch: bzr merge lp:~unifield-team/unifield-addons/uf_886_hook_name_get_currency
Reviewer Review Type Date Requested Status
UniField Dev Team Pending
Review via email: mp+98671@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 'base_setup/todo.py'
2--- base_setup/todo.py 2011-01-14 00:11:01 +0000
3+++ base_setup/todo.py 2012-03-21 16:30:28 +0000
4@@ -161,6 +161,10 @@
5 class res_currency(osv.osv):
6 _inherit = 'res.currency'
7
8+ def hook_get_name_currency(self, cr, uid, ids, context):
9+ reads = self.read(cr, uid, ids, ['name','symbol'], context, load='_classic_write')
10+ return [(x['id'], tools.ustr(x['name']) + (x['symbol'] and (' (' + tools.ustr(x['symbol']) + ')') or '')) for x in reads]
11+
12 def name_get(self, cr, uid, ids, context=None):
13 if context is None:
14 context = {}
15@@ -170,8 +174,8 @@
16 return []
17 if isinstance(ids, (int, long)):
18 ids = [ids]
19- reads = self.read(cr, uid, ids, ['name','symbol'], context, load='_classic_write')
20- return [(x['id'], tools.ustr(x['name']) + (x['symbol'] and (' (' + tools.ustr(x['symbol']) + ')') or '')) for x in reads]
21+
22+ return self.hook_get_name_currency(cr, uid, ids, context)
23
24 res_currency()
25

Subscribers

People subscribed via source and target branches

to all changes: