mirror of
https://github.com/OCA/contract.git
synced 2025-02-13 17:57:24 +02:00
[14.0][IMP] contract: Use Odoo conventions for methods
This commit is contained in:
@@ -50,17 +50,17 @@ class ContractAbstractContract(models.AbstractModel):
|
|||||||
)
|
)
|
||||||
generation_type = fields.Selection(
|
generation_type = fields.Selection(
|
||||||
string="Generation Type",
|
string="Generation Type",
|
||||||
selection=lambda self: self._get_generation_type_selection(),
|
selection=lambda self: self._selection_generation_type(),
|
||||||
default=lambda self: self._get_default_generation_type(),
|
default=lambda self: self._default_generation_type(),
|
||||||
help="Choose the document that will be automatically generated by cron.",
|
help="Choose the document that will be automatically generated by cron.",
|
||||||
)
|
)
|
||||||
|
|
||||||
@api.model
|
@api.model
|
||||||
def _get_generation_type_selection(self):
|
def _selection_generation_type(self):
|
||||||
return [("invoice", "Invoice")]
|
return [("invoice", "Invoice")]
|
||||||
|
|
||||||
@api.model
|
@api.model
|
||||||
def _get_default_generation_type(self):
|
def _default_generation_type(self):
|
||||||
return "invoice"
|
return "invoice"
|
||||||
|
|
||||||
@api.onchange("contract_type")
|
@api.onchange("contract_type")
|
||||||
|
|||||||
Reference in New Issue
Block a user