It is **migration** scripts. not initialisation scripts.
They are intended to be one-shot modifications.
For initialisation, use noupdate data declared in __openerp__.py
I also remind you you can include sql files in __openerp__.py
OpenERP will automatically compute the value of the newly created stored function and relatedd fields. For others, the default value is used.
I taked a look at the migration scripts available on apps. Either they starts with "if not version: return", would have to, or, worst, are wrong as they recompute what must be related fields.
I even found one that create a plpgsql function!
It is **migration** scripts. not initialisation scripts.
They are intended to be one-shot modifications.
For initialisation, use noupdate data declared in __openerp__.py
I also remind you you can include sql files in __openerp__.py
OpenERP will automatically compute the value of the newly created stored function and relatedd fields. For others, the default value is used.
I taked a look at the migration scripts available on apps. Either they starts with "if not version: return", would have to, or, worst, are wrong as they recompute what must be related fields.
I even found one that create a plpgsql function!
This also error prone as every migration script would have to start with a check on version. C2C have already been bitten by this bug: https:/ /bugs.launchpad .net/openerp- product- attributes/ +bug/1259975