I need to create a field with a value suggested by the program according to the last back label generated for the selected series.
I have this:
back_label_from = fields.Integer(string="Back Label From", default=lambda self: self._get_default_back_label())
@api.model def _get_default_back_label(self): back_label_id = self.env['back.label'].search([('back_label_from')]) return back_label_id.id
I don't know exactly what to put in the function (
def _get_default_back_label(self):
)