diff --git a/contract/models/abstract_contract.py b/contract/models/abstract_contract.py index cb951f227..f66650b63 100644 --- a/contract/models/abstract_contract.py +++ b/contract/models/abstract_contract.py @@ -50,17 +50,17 @@ class ContractAbstractContract(models.AbstractModel): ) generation_type = fields.Selection( string="Generation Type", - selection=lambda self: self._get_generation_type_selection(), - default=lambda self: self._get_default_generation_type(), + selection=lambda self: self._selection_generation_type(), + default=lambda self: self._default_generation_type(), help="Choose the document that will be automatically generated by cron.", ) @api.model - def _get_generation_type_selection(self): + def _selection_generation_type(self): return [("invoice", "Invoice")] @api.model - def _get_default_generation_type(self): + def _default_generation_type(self): return "invoice" @api.onchange("contract_type")