Comment 4 for bug 985699

Revision history for this message
Alexis de Lattre (alexis-via) wrote :

After some more investigation, I found out that it's NOT the "self.read" in the code of the button that triggers the second call to default_get.

When you click on a button of the wizard, the OpenERP framework calls the self.create() method, who is responsible for the second call to default_get. It does that because i have some readonly fields in the wizard that are set by default_get() ; as these fields are readonly, they are not passed to create(), so the framework calls default_get() to get the values for these readonly fields.

The big mess with readonly fields not passed to create() nor write() is a well known problem of the OpenERP framework, cf https://bugs.launchpad.net/openobject-client/+bug/378824