[MERGE] forward port of branch 7.0 up to 368c674

This commit is contained in:
Denis Ledoux 2015-02-10 15:31:51 +01:00
commit 48f527b860
2 changed files with 7 additions and 2 deletions

View File

@ -100,9 +100,12 @@ class report_rappel(report_sxw.rml_parse):
partner_max_text = i.followup_line_id.description partner_max_text = i.followup_line_id.description
text = partner_max_delay and partner_max_text or default_text text = partner_max_delay and partner_max_text or default_text
if text: if text:
lang_obj = self.pool['res.lang']
lang_ids = lang_obj.search(self.cr, self.uid, [('code', '=', stat_line.partner_id.lang)], context=context)
date_format = lang_ids and lang_obj.browse(self.cr, self.uid, lang_ids[0], context=context).date_format or '%Y-%m-%d'
text = text % { text = text % {
'partner_name': stat_line.partner_id.name, 'partner_name': stat_line.partner_id.name,
'date': time.strftime('%Y-%m-%d'), 'date': time.strftime(date_format),
'company_name': stat_line.company_id.name, 'company_name': stat_line.company_id.name,
'user_signature': self.pool['res.users'].browse(self.cr, self.uid, self.uid, context).signature or '', 'user_signature': self.pool['res.users'].browse(self.cr, self.uid, self.uid, context).signature or '',
} }

View File

@ -259,7 +259,9 @@ openerp.hr_timesheet_sheet = function(instance) {
return; return;
} }
var ops = self.generate_o2m_value(); var ops = self.generate_o2m_value();
new instance.web.Model("hr.analytic.timesheet").call("on_change_account_id", [[], id]).then(function(res) { new instance.web.Model("hr.analytic.timesheet").call("multi_on_change_account_id", [[], [id],
new instance.web.CompoundContext({'user_id': self.get('user_id')})]).then(function(res) {
res = res[id];
var def = _.extend({}, self.default_get, res.value, { var def = _.extend({}, self.default_get, res.value, {
name: self.description_line, name: self.description_line,
unit_amount: 0, unit_amount: 0,