Browse Source
Merge pull request #241 from sys-odoo/10.0_contract_lang_date_format_issue_199
[FIX] Issue-199: OCA-Contract V10, if not set Partner Language so languag…
pull/260/head
Pedro M. Baeza
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
3 additions and
3 deletions
-
contract/__manifest__.py
-
contract/models/account_analytic_account.py
|
|
@ -9,7 +9,7 @@ |
|
|
|
|
|
|
|
{ |
|
|
|
'name': 'Contracts Management - Recurring', |
|
|
|
'version': '10.0.4.2.0', |
|
|
|
'version': '10.0.4.2.1', |
|
|
|
'category': 'Contract Management', |
|
|
|
'license': 'AGPL-3', |
|
|
|
'author': "OpenERP SA, " |
|
|
|
|
|
@ -198,8 +198,8 @@ class AccountAnalyticAccount(models.Model): |
|
|
|
contract = line.analytic_account_id |
|
|
|
if 'old_date' in self.env.context and 'next_date' in self.env.context: |
|
|
|
lang_obj = self.env['res.lang'] |
|
|
|
lang = lang_obj.search( |
|
|
|
[('code', '=', contract.partner_id.lang)]) |
|
|
|
code = contract.partner_id.lang or self.company_id.partner_id.lang |
|
|
|
lang = lang_obj.search([('code', '=', code)]) |
|
|
|
date_format = lang.date_format or '%m/%d/%Y' |
|
|
|
name = self._insert_markers( |
|
|
|
line, self.env.context['old_date'], |
|
|
|