[MERGE] forward port of branch 7.0 up to 80c7209
This commit is contained in:
commit
2e9b33b793
|
@ -185,6 +185,10 @@ class lang(osv.osv):
|
||||||
return grouping, thousands_sep, decimal_point
|
return grouping, thousands_sep, decimal_point
|
||||||
|
|
||||||
def write(self, cr, uid, ids, vals, context=None):
|
def write(self, cr, uid, ids, vals, context=None):
|
||||||
|
if 'code' in vals:
|
||||||
|
for rec in self.browse(cr, uid, ids, context):
|
||||||
|
if rec.code != vals['code']:
|
||||||
|
raise osv.except_osv(_('User Error'), _("Language code cannot be modified."))
|
||||||
for lang_id in ids :
|
for lang_id in ids :
|
||||||
self._lang_data_get.clear_cache(self)
|
self._lang_data_get.clear_cache(self)
|
||||||
return super(lang, self).write(cr, uid, ids, vals, context)
|
return super(lang, self).write(cr, uid, ids, vals, context)
|
||||||
|
|
|
@ -2527,7 +2527,7 @@ class BaseModel(object):
|
||||||
# if val is a many2one, just write the ID
|
# if val is a many2one, just write the ID
|
||||||
if type(val) == tuple:
|
if type(val) == tuple:
|
||||||
val = val[0]
|
val = val[0]
|
||||||
if val is not False:
|
if f._type == 'boolean' or val is not False:
|
||||||
cr.execute(update_query, (ss[1](val), key))
|
cr.execute(update_query, (ss[1](val), key))
|
||||||
|
|
||||||
def _check_selection_field_value(self, cr, uid, field, value, context=None):
|
def _check_selection_field_value(self, cr, uid, field, value, context=None):
|
||||||
|
|
|
@ -70,7 +70,12 @@ class WorkflowInstance(object):
|
||||||
cr = self.session.cr
|
cr = self.session.cr
|
||||||
cr.execute("select * from wkf_workitem where inst_id=%s", (self.instance['id'],))
|
cr.execute("select * from wkf_workitem where inst_id=%s", (self.instance['id'],))
|
||||||
stack = []
|
stack = []
|
||||||
for work_item_values in cr.dictfetchall():
|
for i, work_item_values in enumerate(cr.dictfetchall()):
|
||||||
|
if i > 0:
|
||||||
|
# test if previous workitem has already processed this one
|
||||||
|
cr.execute("select id from wkf_workitem where id=%s", (work_item_values['id'],))
|
||||||
|
if not cr.fetchone():
|
||||||
|
continue
|
||||||
wi = WorkflowItem(self.session, self.record, work_item_values)
|
wi = WorkflowItem(self.session, self.record, work_item_values)
|
||||||
wi.process(signal=signal, force_running=force_running, stack=stack)
|
wi.process(signal=signal, force_running=force_running, stack=stack)
|
||||||
# An action is returned
|
# An action is returned
|
||||||
|
|
Loading…
Reference in New Issue