[FIX] sale: format date according to partner language in SO emails.
opw:625594
This commit is contained in:
parent
88cc816670
commit
9b3e606538
|
@ -190,7 +190,7 @@ class email_template(osv.osv):
|
||||||
user = self.pool.get('res.users').browse(cr, uid, uid, context=context)
|
user = self.pool.get('res.users').browse(cr, uid, uid, context=context)
|
||||||
records = self.pool[model].browse(cr, uid, res_ids, context=context) or [None]
|
records = self.pool[model].browse(cr, uid, res_ids, context=context) or [None]
|
||||||
variables = {
|
variables = {
|
||||||
'format_tz': lambda dt, tz=False, format=False: format_tz(self.pool, cr, uid, dt, tz, format, context),
|
'format_tz': lambda dt, tz=False, format=False, context=context: format_tz(self.pool, cr, uid, dt, tz, format, context),
|
||||||
'user': user,
|
'user': user,
|
||||||
'ctx': context, # context kw would clash with mako internals
|
'ctx': context, # context kw would clash with mako internals
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
<strong>REFERENCES</strong><br />
|
<strong>REFERENCES</strong><br />
|
||||||
Order number: <strong>${object.name}</strong><br />
|
Order number: <strong>${object.name}</strong><br />
|
||||||
Order total: <strong>${object.amount_total} ${object.pricelist_id.currency_id.name}</strong><br />
|
Order total: <strong>${object.amount_total} ${object.pricelist_id.currency_id.name}</strong><br />
|
||||||
Order date: ${object.date_order}<br />
|
Order date: ${format_tz(object.date_order, tz=user.tz, context={'lang':object.partner_id.lang})}<br />
|
||||||
% if object.origin:
|
% if object.origin:
|
||||||
Order reference: ${object.origin}<br />
|
Order reference: ${object.origin}<br />
|
||||||
% endif
|
% endif
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
<strong>REFERENCES</strong><br />
|
<strong>REFERENCES</strong><br />
|
||||||
Order number: <strong>${object.name}</strong><br />
|
Order number: <strong>${object.name}</strong><br />
|
||||||
Order total: <strong>${object.amount_total} ${object.pricelist_id.currency_id.name}</strong><br />
|
Order total: <strong>${object.amount_total} ${object.pricelist_id.currency_id.name}</strong><br />
|
||||||
Order date: ${object.date_order}<br />
|
Order date: ${format_tz(object.date_order, tz=user.tz, context={'lang':object.partner_id.lang})} <br />
|
||||||
% if object.origin:
|
% if object.origin:
|
||||||
Order reference: ${object.origin}<br />
|
Order reference: ${object.origin}<br />
|
||||||
% endif
|
% endif
|
||||||
|
|
Loading…
Reference in New Issue