Browse Source
Merge pull request #156 from Tecnativa/11.0-FIX-contract-onchange_template
[FIX] contract: Onchange contract template raise error
pull/155/head
Pedro M. Baeza
7 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
1 deletions
-
contract/__manifest__.py
-
contract/models/account_analytic_account.py
|
|
@ -8,7 +8,7 @@ |
|
|
|
|
|
|
|
{ |
|
|
|
'name': 'Contracts Management - Recurring', |
|
|
|
'version': '11.0.1.4.1', |
|
|
|
'version': '11.0.1.4.2', |
|
|
|
'category': 'Contract Management', |
|
|
|
'license': 'AGPL-3', |
|
|
|
'author': "OpenERP SA, " |
|
|
|
|
|
@ -145,6 +145,8 @@ class AccountAnalyticAccount(models.Model): |
|
|
|
new_lines = [] |
|
|
|
for contract_line in contract.recurring_invoice_line_ids: |
|
|
|
vals = contract_line._convert_to_write(contract_line.read()[0]) |
|
|
|
# Remove template link field named as analytic account field |
|
|
|
vals.pop('analytic_account_id', False) |
|
|
|
new_lines.append((0, 0, vals)) |
|
|
|
return new_lines |
|
|
|
|
|
|
|