mirror of
https://github.com/OCA/contract.git
synced 2025-02-13 17:57:24 +02:00
[IMP] - Replace is_suspended flag by manual_renew_needed
Add a computed field for the first date of the termination notice period Adapt state compute and search method [IMP] - Improve unit tests
This commit is contained in:
committed by
Jean-Charles Drubay
parent
e386f17ed5
commit
b3ebba4aa1
@@ -13,7 +13,13 @@ 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)
|
||||
manual_renew_needed = fields.Boolean(
|
||||
string="Manual renew needed",
|
||||
default=False,
|
||||
help="This flag is used to make a difference between a definitive stop"
|
||||
"and temporary one for which a user is not able to plan a"
|
||||
"successor in advance",
|
||||
)
|
||||
contract_line_id = fields.Many2one(
|
||||
comodel_name="account.analytic.invoice.line",
|
||||
string="Contract Line",
|
||||
@@ -25,7 +31,7 @@ class AccountAnalyticInvoiceLineWizard(models.TransientModel):
|
||||
def stop(self):
|
||||
for wizard in self:
|
||||
wizard.contract_line_id.stop(
|
||||
wizard.date_end, is_suspended=wizard.is_suspended
|
||||
wizard.date_end, manual_renew_needed=wizard.manual_renew_needed
|
||||
)
|
||||
return True
|
||||
|
||||
|
||||
@@ -12,7 +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"/>
|
||||
<field string="Is a suspension" name="manual_renew_needed"/>
|
||||
</group>
|
||||
<footer>
|
||||
<button name="stop"
|
||||
|
||||
Reference in New Issue
Block a user