[MERGE] Forward-port of latest 7.0 bugfixes, up to rev. 5294 revid:odo@openerp.com-20140505074636-bl2y5pst4pfmpz3u
bzr revid: dle@openerp.com-20140506121627-4oyw4zl4o6azy73w
This commit is contained in:
commit
b882dd7109
|
@ -384,7 +384,7 @@ class ir_model_fields(osv.osv):
|
||||||
|
|
||||||
# static table of properties
|
# static table of properties
|
||||||
model_props = [ # (our-name, fields.prop, set_fn)
|
model_props = [ # (our-name, fields.prop, set_fn)
|
||||||
('field_description', 'string', str),
|
('field_description', 'string', tools.ustr),
|
||||||
('required', 'required', bool),
|
('required', 'required', bool),
|
||||||
('readonly', 'readonly', bool),
|
('readonly', 'readonly', bool),
|
||||||
('domain', '_domain', eval),
|
('domain', '_domain', eval),
|
||||||
|
|
|
@ -99,7 +99,7 @@ class res_groups(osv.osv):
|
||||||
}
|
}
|
||||||
|
|
||||||
_sql_constraints = [
|
_sql_constraints = [
|
||||||
('name_uniq', 'unique (category_id, name)', 'The name of the group must be unique !')
|
('name_uniq', 'unique (category_id, name)', 'The name of the group must be unique within an application!')
|
||||||
]
|
]
|
||||||
|
|
||||||
def search(self, cr, uid, args, offset=0, limit=None, order=None, context=None, count=False):
|
def search(self, cr, uid, args, offset=0, limit=None, order=None, context=None, count=False):
|
||||||
|
|
|
@ -305,12 +305,17 @@ form: module.record_id""" % (xml_id,)
|
||||||
|
|
||||||
if d_search:
|
if d_search:
|
||||||
idref = _get_idref(self, cr, self.uid, d_model, context={}, idref={})
|
idref = _get_idref(self, cr, self.uid, d_model, context={}, idref={})
|
||||||
|
try:
|
||||||
ids = self.pool[d_model].search(cr, self.uid, unsafe_eval(d_search, idref))
|
ids = self.pool[d_model].search(cr, self.uid, unsafe_eval(d_search, idref))
|
||||||
|
except ValueError:
|
||||||
|
_logger.warning('Skipping deletion for failed search `%r`', d_search, exc_info=True)
|
||||||
|
pass
|
||||||
if d_id:
|
if d_id:
|
||||||
try:
|
try:
|
||||||
ids.append(self.id_get(cr, d_id))
|
ids.append(self.id_get(cr, d_id))
|
||||||
except:
|
except ValueError:
|
||||||
# d_id cannot be found. doesn't matter in this case
|
# d_id cannot be found. doesn't matter in this case
|
||||||
|
_logger.warning('Skipping deletion for missing XML ID `%r`', d_id, exc_info=True)
|
||||||
pass
|
pass
|
||||||
if ids:
|
if ids:
|
||||||
self.pool[d_model].unlink(cr, self.uid, ids)
|
self.pool[d_model].unlink(cr, self.uid, ids)
|
||||||
|
|
|
@ -71,7 +71,8 @@ _SAFE_OPCODES = _EXPR_OPCODES.union(set(opmap[x] for x in [
|
||||||
'CONTINUE_LOOP', 'RAISE_VARARGS',
|
'CONTINUE_LOOP', 'RAISE_VARARGS',
|
||||||
# New in Python 2.7 - http://bugs.python.org/issue4715 :
|
# New in Python 2.7 - http://bugs.python.org/issue4715 :
|
||||||
'JUMP_IF_FALSE_OR_POP', 'JUMP_IF_TRUE_OR_POP', 'POP_JUMP_IF_FALSE',
|
'JUMP_IF_FALSE_OR_POP', 'JUMP_IF_TRUE_OR_POP', 'POP_JUMP_IF_FALSE',
|
||||||
'POP_JUMP_IF_TRUE', 'SETUP_EXCEPT', 'END_FINALLY', 'LOAD_FAST',
|
'POP_JUMP_IF_TRUE', 'SETUP_EXCEPT', 'END_FINALLY',
|
||||||
|
'LOAD_FAST', 'STORE_FAST', 'DELETE_FAST',
|
||||||
'LOAD_GLOBAL', # Only allows access to restricted globals
|
'LOAD_GLOBAL', # Only allows access to restricted globals
|
||||||
] if x in opmap))
|
] if x in opmap))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue