Comment 8 for bug 1111298

Revision history for this message
Olivier Dony (Odoo) (odo-openerp) wrote :

Nicolas, your analysis in comment #6 is correct, and what you describe in comment #7 is just the expected behavior for the caching/prefetching of browse_records. It simply happens to trigger the error here because of the problems described in comment #6.

I think the solution is the following:

1. Add a proper record rule on res.currency to make it consistent with the rest of the system.
2. Change the default value of the company_id field of res.currency to False
3. Apply the small change described in comment #3 to make sure the problem is fixed for existing databases where existing currencies already have a value for company_id. (it will not break anything)

Users who encounter this error should also remove the assigned Company for their existing currencies, to prevent future problems.

Thanks for reporting and providing an excellent analysis!