mirror of
https://github.com/OCA/contract.git
synced 2025-02-13 17:57:24 +02:00
[FIX] Issue-199: if not set Partner Language then language should be company's partner language for date format.
This commit is contained in:
@@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
'name': 'Contracts Management - Recurring',
|
'name': 'Contracts Management - Recurring',
|
||||||
'version': '10.0.4.2.0',
|
'version': '10.0.4.2.1',
|
||||||
'category': 'Contract Management',
|
'category': 'Contract Management',
|
||||||
'license': 'AGPL-3',
|
'license': 'AGPL-3',
|
||||||
'author': "OpenERP SA, "
|
'author': "OpenERP SA, "
|
||||||
|
|||||||
@@ -198,8 +198,8 @@ class AccountAnalyticAccount(models.Model):
|
|||||||
contract = line.analytic_account_id
|
contract = line.analytic_account_id
|
||||||
if 'old_date' in self.env.context and 'next_date' in self.env.context:
|
if 'old_date' in self.env.context and 'next_date' in self.env.context:
|
||||||
lang_obj = self.env['res.lang']
|
lang_obj = self.env['res.lang']
|
||||||
lang = lang_obj.search(
|
code = contract.partner_id.lang or self.company_id.partner_id.lang
|
||||||
[('code', '=', contract.partner_id.lang)])
|
lang = lang_obj.search([('code', '=', code)])
|
||||||
date_format = lang.date_format or '%m/%d/%Y'
|
date_format = lang.date_format or '%m/%d/%Y'
|
||||||
name = self._insert_markers(
|
name = self._insert_markers(
|
||||||
line, self.env.context['old_date'],
|
line, self.env.context['old_date'],
|
||||||
|
|||||||
Reference in New Issue
Block a user