[IMP] use augmented assignments
bzr revid: xmo@openerp.com-20121214131924-bpl48ht21ic4g34b
This commit is contained in:
parent
91f441d0cd
commit
5d3d3868f6
|
@ -181,7 +181,7 @@ class ir_ui_menu(osv.osv):
|
|||
next_num=int(concat[0])+1
|
||||
datas['name']=rex.sub(('(%d)'%next_num),datas['name'])
|
||||
else:
|
||||
datas['name']=datas['name']+'(1)'
|
||||
datas['name'] += '(1)'
|
||||
self.write(cr,uid,[res],{'name':datas['name']})
|
||||
ids = ir_values_obj.search(cr, uid, [
|
||||
('model', '=', 'ir.ui.menu'),
|
||||
|
|
|
@ -254,7 +254,7 @@ class view(osv.osv):
|
|||
if label:
|
||||
for lbl in eval(label):
|
||||
if t.has_key(tools.ustr(lbl)) and tools.ustr(t[lbl])=='False':
|
||||
label_string = label_string + ' '
|
||||
label_string += ' '
|
||||
else:
|
||||
label_string = label_string + " " + tools.ustr(t[lbl])
|
||||
labels[str(t['id'])] = (a['id'],label_string)
|
||||
|
|
|
@ -307,10 +307,10 @@ class ir_values(osv.osv):
|
|||
ORDER BY v.user_id, u.company_id"""
|
||||
params = ('default', model, uid, uid)
|
||||
if condition:
|
||||
query = query % 'AND v.key2 = %s'
|
||||
query %= 'AND v.key2 = %s'
|
||||
params += (condition[:200],)
|
||||
else:
|
||||
query = query % 'AND v.key2 is NULL'
|
||||
query %= 'AND v.key2 is NULL'
|
||||
cr.execute(query, params)
|
||||
|
||||
# keep only the highest priority default for each field
|
||||
|
|
Loading…
Reference in New Issue