[IMP] - store last_date_invoiced on contract_line

Improve CRITERIA_ALLOWED_DICT

[IMP] - code improvement

[IMP] - Use last_date_invoiced to set marker in invoice description

[IMP] - add migration script to init last_day_invoiced and some other improvement

[FIX] - a contract line suspended should start a day after the suspension end
This commit is contained in:
sbejaoui
2018-11-29 16:57:51 +01:00
parent f217be4f19
commit aefa12ab9e
12 changed files with 1016 additions and 525 deletions

View File

@@ -11,7 +11,7 @@ from odoo import api, models, fields
class AbstractAccountAnalyticContract(models.AbstractModel):
_name = 'account.abstract.analytic.contract'
_description = 'Abstract Account Analytic Contract'
_description = 'Abstract Recurring Contract'
# These fields will not be synced to the contract
NO_SYNC = ['name', 'partner_id']
@@ -40,7 +40,9 @@ class AbstractAccountAnalyticContract(models.AbstractModel):
'res.company',
string='Company',
required=True,
default=lambda self: self.env.user.company_id,
default=lambda self: self.env['res.company']._company_default_get(
self._name
),
)
@api.onchange('contract_type')