[REF] contract: Several things

[REF] use context_today instead of time in filters
[REF] Contract: split from analytic account
[REF] Contract Sale Invoicing: split from analytic account
[REF] Contract Sale Invoicing: update translations
[IMP] - Assert that the predecessor is available for new link at uncancel
[RMV] - remove usless changes
[RMV] - Remove usless field recurring_invoices
  after the total isolation between contract model and account analytic one.
  recurring_invoices which was used to mark analytic account as contract became usless
[IMP] - P3 syntax
[IMP] - use @openupgrade.migrate() and openupgrade.logged_query
[IMP] - drop transient table in migration script
This commit is contained in:
Thomas Binsfeld
2019-05-28 19:06:11 +02:00
committed by Christopher Rogos
parent 2f405c546b
commit 489a79588d
30 changed files with 606 additions and 444 deletions

View File

@@ -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(