[MERGE] forward port of branch saas-3 up to b62ee07
This commit is contained in:
commit
327e471c9b
|
@ -1234,7 +1234,7 @@ class account_move_line(osv.osv):
|
|||
period = period_obj.browse(cr, uid, period_id, context=context)
|
||||
for (state,) in result:
|
||||
if state == 'done':
|
||||
raise osv.except_osv(_('Error!'), _('You can not add/modify entries in a closed period %s of journal %s.') % (period.name,journal.name))
|
||||
raise osv.except_osv(_('Error!'), _('You can not add/modify entries in a closed period %s of journal %s.') % (period.name, journal.name))
|
||||
if not result:
|
||||
jour_period_obj.create(cr, uid, {
|
||||
'name': (journal.code or journal.name)+':'+(period.name or ''),
|
||||
|
|
|
@ -263,7 +263,7 @@ class mail_compose_message(osv.TransientModel):
|
|||
# static wizard (mail.message) values
|
||||
mail_values = {
|
||||
'subject': wizard.subject,
|
||||
'body': wizard.body,
|
||||
'body': wizard.body or '',
|
||||
'parent_id': wizard.parent_id and wizard.parent_id.id,
|
||||
'partner_ids': [partner.id for partner in wizard.partner_ids],
|
||||
'attachment_ids': [attach.id for attach in wizard.attachment_ids],
|
||||
|
|
|
@ -336,7 +336,7 @@ class mrp_production(osv.osv):
|
|||
for po in self.browse(cr, uid, ids, context=context):
|
||||
direction[po.id] = cmp(po.date_start, vals.get('date_start', False))
|
||||
result = super(mrp_production, self).write(cr, uid, ids, vals, context=context)
|
||||
if (vals.get('workcenter_lines', False) or vals.get('date_start', False)) and update:
|
||||
if (vals.get('workcenter_lines', False) or vals.get('date_start', False) or vals.get('date_planned', False)) and update:
|
||||
self._compute_planned_workcenter(cr, uid, ids, context=context, mini=mini)
|
||||
for d in direction:
|
||||
if direction[d] == 1:
|
||||
|
|
|
@ -401,7 +401,7 @@ def is_leaf(element, internal=False):
|
|||
and len(element) == 3 \
|
||||
and element[1] in INTERNAL_OPS \
|
||||
and ((isinstance(element[0], basestring) and element[0])
|
||||
or element in (TRUE_LEAF, FALSE_LEAF))
|
||||
or tuple(element) in (TRUE_LEAF, FALSE_LEAF))
|
||||
|
||||
|
||||
# --------------------------------------------------
|
||||
|
|
Loading…
Reference in New Issue