Comment 8 for bug 580218

Revision history for this message
Olivier Dony (Odoo) (odo-openerp) wrote : Re: trunk - ir.actions.act_window - context must be at least {}

Ferdinand, JMA marked the bug as Invalid because he thinks it is invalid, that's the whole point.

The system is working as expected: XML data that is not set to "noupdate" will be updated when the module it belongs to is updated, but only the fields that are explicitly mentioned in the XML. This is by design, and a good thing.
How and with what value would you update the other fields that are unspecified?? Think about all the possible cases: default values that have changed, custom fields, admin customizations, etc.

If you have an idea for a clean, generic and fast solution there, please describe, but really this matter has been discussed extensively and your patch is definitely not correct.

The module developers need to learn the framework and work correctly with it: when you update your module it's your job to foresee an appropriate migration. So if you explicitly want to drop an attribute or field value that used to be specified in the XML, replace it with an empty or False value. And if the admin has added a context manually and this introduces a bug, then the admin needs to fix his mess himself.

And BTW the ORM does drop records of module data that have been removed from XML files, as soon as it notices that an ir.model.data object has been removed in the newer version of the module, so there's no need for <record id="the_old_id" action="delete" /> or other nonsense ;-)

I'm setting this bug back to invalid again to clean up our list, please don't put it back as new unless you have a valid solution to offer, there are real bugs out there that need the attention of the developers, I'm sure you agree :-)