Hi,
I'm creating a reference field, containing an auto-generated sequence generated by a _defaults lambda which gets the sequence value.
The problem is that when the view is loaded, the sequence is set in the field. But because the field is readonly, when the object is saved, the sequence is re-generated by create() because the field value was not in vals{}.
Is it possible to say "do not load the default value in the view" ? This way, only the call to create() would grab the sequence value.
What's the point of setting a
_defaultif you don't want it?I want it. I want the reference to be generated automatically. The problem is that OpenERP generates it twice if I set my field readonly : Once when loading the view, and once when calling create().