mirror of
https://github.com/OCA/contract.git
synced 2025-02-13 17:57:24 +02:00
[IMP] - Link invoice line to contract lines
[IMP] - Add index on contract line [IMP] - Add is_suspended flag and _search_state [IMP] - Add is_suspended flag to stop contract line
This commit is contained in:
committed by
Jean-Charles Drubay
parent
62115b4156
commit
fdbedb602d
@@ -13,16 +13,20 @@ class AccountAnalyticInvoiceLineWizard(models.TransientModel):
|
||||
date_end = fields.Date(string='Date End')
|
||||
recurring_next_date = fields.Date(string='Next Invoice Date')
|
||||
is_auto_renew = fields.Boolean(string="Auto Renew", default=False)
|
||||
is_suspended = fields.Boolean(string="Is a suspension", default=False)
|
||||
contract_line_id = fields.Many2one(
|
||||
comodel_name="account.analytic.invoice.line",
|
||||
string="Contract Line",
|
||||
required=True,
|
||||
index=True,
|
||||
)
|
||||
|
||||
@api.multi
|
||||
def stop(self):
|
||||
for wizard in self:
|
||||
wizard.contract_line_id.stop(wizard.date_end)
|
||||
wizard.contract_line_id.stop(
|
||||
wizard.date_end, is_suspended=wizard.is_suspended
|
||||
)
|
||||
return True
|
||||
|
||||
@api.multi
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
<group>
|
||||
<field name="contract_line_id" invisible="True"/>
|
||||
<field string="Stop Date" name="date_end" required="True"/>
|
||||
<field string="Is a suspension" name="is_suspended"/>
|
||||
</group>
|
||||
<footer>
|
||||
<button name="stop"
|
||||
|
||||
Reference in New Issue
Block a user