mirror of
https://github.com/OCA/contract.git
synced 2025-02-13 17:57:24 +02:00
[REF] Contract: split from analytic account
This commit is contained in:
committed by
sbejaoui
parent
e167562a20
commit
da7826797c
@@ -9,8 +9,8 @@
|
||||
from odoo import api, models, fields
|
||||
|
||||
|
||||
class AbstractAccountAnalyticContract(models.AbstractModel):
|
||||
_name = 'account.abstract.analytic.contract'
|
||||
class ContractAbstractContract(models.AbstractModel):
|
||||
_name = 'contract.abstract.contract'
|
||||
_description = 'Abstract Recurring Contract'
|
||||
|
||||
# These fields will not be synced to the contract
|
||||
@@ -50,7 +50,7 @@ class AbstractAccountAnalyticContract(models.AbstractModel):
|
||||
@api.onchange('contract_type')
|
||||
def _onchange_contract_type(self):
|
||||
if self.contract_type == 'purchase':
|
||||
self.recurring_invoice_line_ids.filtered('automatic_price').update(
|
||||
self.contract_line_ids.filtered('automatic_price').update(
|
||||
{'automatic_price': False}
|
||||
)
|
||||
self.journal_id = self.env['account.journal'].search(
|
||||
|
||||
Reference in New Issue
Block a user