[MERGE] forward port of branch saas-3 up to 48f527b

This commit is contained in:
Denis Ledoux 2015-02-10 15:32:20 +01:00
commit 08888b21b8
2 changed files with 7 additions and 2 deletions

View File

@ -99,9 +99,12 @@ class report_rappel(report_sxw.rml_parse):
partner_max_text = i.followup_line_id.description
text = partner_max_delay and partner_max_text or default_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 % {
'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,
'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;
}
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, {
name: self.description_line,
unit_amount: 0,