diff options
| author | Raphael Collet <rco@openerp.com> | 2015-04-02 15:48:38 +0200 |
|---|---|---|
| committer | Raphael Collet <rco@openerp.com> | 2015-04-02 16:54:39 +0200 |
| commit | 9a365e83e7c6b3be77607e5a8390d0d3dd46ae85 (patch) | |
| tree | 70adcf7a12877870c5b814a90689003286fb7531 /addons/analytic_user_function/analytic_user_function.py | |
| parent | ad55981b4b629a0f9e8fae079d650494e9f662ca (diff) | |
[FIX] models: do not prefetch fields while the model schema is created
The following case has shown the issue: extend the model `res.company` by
adding at least two fields F and G, where F has a default value defined as:
lambda self: self.env.user.company_id.name
If the column F is created before G in the database, the existing records will
be filled with the default value of F. When the default value is computed, the
field `name` from a `res.company` is read, and other fields are prefetched,
including G. This operation fails, because G does not exist in database yet!
Diffstat (limited to 'addons/analytic_user_function/analytic_user_function.py')
0 files changed, 0 insertions, 0 deletions
