Context_get can misbehave for M2O.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Odoo Server (MOVED TO GITHUB) |
Fix Released
|
High
|
Unassigned | ||
5.0 |
Fix Released
|
High
|
JMA(Open ERP) |
Bug Description
In 5.0.11
I had a field in res.users call context_
-------
class ResUsers(osv.osv):
_inherit = 'res.users'
_columns = {
}
_defaults = {
}
-------
i try to login with the GTK client and i have this traceback
-------
[2010-06-15 09:46:41,188] ERROR:orm:[01]:
[2010-06-15 09:46:41,188] ERROR:orm:[02]: Environment Information :
[2010-06-15 09:46:41,189] ERROR:orm:[03]: System : Linux-2.
[2010-06-15 09:46:41,189] ERROR:orm:[04]: OS Name : posix
[2010-06-15 09:46:41,189] ERROR:orm:[05]: Distributor ID: Ubuntu
[2010-06-15 09:46:41,189] ERROR:orm:[06]: Description: Ubuntu 10.04 LTS
[2010-06-15 09:46:41,189] ERROR:orm:[07]: Release: 10.04
[2010-06-15 09:46:41,190] ERROR:orm:[08]: Codename: lucid
[2010-06-15 09:46:41,190] ERROR:orm:[09]: Operating System Release : 2.6.32-22-generic
[2010-06-15 09:46:41,190] ERROR:orm:[10]: Operating System Version : #36-Ubuntu SMP Thu Jun 3 22:02:19 UTC 2010
[2010-06-15 09:46:41,190] ERROR:orm:[11]: Operating System Architecture : 32bit
[2010-06-15 09:46:41,190] ERROR:orm:[12]: Operating System Locale : fr_FR.UTF8
[2010-06-15 09:46:41,191] ERROR:orm:[13]: Python Version : 2.6.5
[2010-06-15 09:46:41,191] ERROR:orm:[14]: OpenERP-Server Version : 5.0.10
[2010-06-15 09:46:41,191] ERROR:orm:[15]: Last revision No. & ID :
[2010-06-15 09:46:41,191] ERROR:orm:[16]: Programming error: field '__getstate__' does not exist in object 'stock.warehouse' !
Exception in thread Thread-13:
Traceback (most recent call last):
File "/usr/lib/
self.run()
File "/home/
ts.
File "/home/
msg = cPickle.
File "/usr/lib/
dict = getstate()
TypeError: 'bool' object is not callable
-------
The problem is the many2one with getattr() return a browse_record or browse_null
I attach a patch to correct this behaviour
Regards,
Hello Christophe Chauvet,
I tried with several databases, but I did not face such an error.
Would you attach a module here?
Thanks.