Hi, I have a field type selection defined like that:
`process_machine = fields.Selection('on_change_with_process_machine', 'Process',
states={
'invisible': (Eval('type_automatic') == 'automatic')},
depends=['type_automatic'], required=False)`
about the function related to this field:
@fields.depends('type_machine')
def on_change_with_process_machine(self, name=None):
liste=[]
if(self.type_machine == "machine"):
liste.append(("AW", "AW | Arc | 1 | "))
liste.append(("AW", "AW | Arc | 2 | "))
liste.append((" ", " "))
else:
liste.append((" ", " "))
return liste
I have also added a default value for this selection field:
@staticmethod
def default_process_machine():
return " "
But it keeps tell me , it’s required and that i should choose it, any help will be appreciated How i can do that(How i can force setting a selection field to be not required) ?