On Sunday, February 14, 2016 at 12:15:04 AM UTC+10, Cédric Krier wrote: > > On 2016-02-13 02:20, Vincent Bastos wrote: > > Hey, > > > > I am getting the following error for a state field: > > > > The value "None" of field "State" on "..." is not in the selection. > > > > However I do have the default method in the class: > > > > @staticmethod > > def default_state(): > > return 'draft' > > This means that you are creating a record with the value 'None' for the > state field. The default value method is only used if there is no key > for the field in the dictionary. >
Tryton is telling me that I am trying to save a record with the field state with a value None, but this field is required, so this is wrong. Right? How can that be if the selection dictionary does not have any keys with None values, and there is even a default method? Also, even the client displays the value 'draft' in that field before save button is pressed. -- You received this message because you are subscribed to the Google Groups "tryton" group. To view this discussion on the web visit https://groups.google.com/d/msgid/tryton/05996563-7cef-4300-b347-00c1450d9511%40googlegroups.com.
