[MERGE] forward port branch 9.0 up to 2b2be3caa4
This commit is contained in:
@@ -50,7 +50,9 @@ class ReportTrialBalance(models.AbstractModel):
|
|||||||
res['balance'] = account_result[account.id].get('balance')
|
res['balance'] = account_result[account.id].get('balance')
|
||||||
if display_account == 'all':
|
if display_account == 'all':
|
||||||
account_res.append(res)
|
account_res.append(res)
|
||||||
if display_account in ['movement', 'not_zero'] and not currency.is_zero(res['balance']):
|
if display_account == 'not_zero' and not currency.is_zero(res['balance']):
|
||||||
|
account_res.append(res)
|
||||||
|
if display_account == 'movement' and (not currency.is_zero(res['debit']) or not currency.is_zero(res['credit'])):
|
||||||
account_res.append(res)
|
account_res.append(res)
|
||||||
return account_res
|
return account_res
|
||||||
|
|
||||||
|
|||||||
@@ -818,6 +818,9 @@ class crm_lead(FormatAddress, osv.osv):
|
|||||||
context['default_team_id'] = vals.get('team_id')
|
context['default_team_id'] = vals.get('team_id')
|
||||||
if vals.get('user_id') and 'date_open' not in vals:
|
if vals.get('user_id') and 'date_open' not in vals:
|
||||||
vals['date_open'] = fields.datetime.now()
|
vals['date_open'] = fields.datetime.now()
|
||||||
|
if context.get('default_partner_id') and not vals.get('email_from'):
|
||||||
|
partner_id = self.pool['res.partner'].browse(cr, uid, context.get('default_partner_id'))
|
||||||
|
vals['email_from'] = partner_id.email
|
||||||
|
|
||||||
# context: no_log, because subtype already handle this
|
# context: no_log, because subtype already handle this
|
||||||
create_context = dict(context, mail_create_nolog=True)
|
create_context = dict(context, mail_create_nolog=True)
|
||||||
|
|||||||
Reference in New Issue
Block a user