regression: wild copy of context that can actually be None in ir_model.py
Bug #525962 reported by
Raphaël Valyi - http://www.akretion.com
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Odoo Server (MOVED TO GITHUB) |
Fix Released
|
High
|
Unassigned |
Bug Description
Hello,
In commit #1963 of server 5.0, you changed code inside the ir.model#create method.
Now you do a brutal context.copy() while by default the optional context argument is set to None in the create method signature (around line 83).
One of the examples where it breaks existing code is the Magento Connector magentoerpconnect module , but it's easy to imagine it could easily break in many other cases.
So please do a defensive check of the context before assuming it's not None or either set it to {} by default, I don't know what is better, but the current code is flawed, that's for sure.
Hope this helps
Related branches
Changed in openobject-server: | |
importance: | Undecided → High |
milestone: | none → 5.0.7 |
To post a comment you must log in.
You were right Raphael.
Its rare, but it was needed to be fixed.
Fixed by revision 1985 <email address hidden>.
Thank you.