c2c-oerpscenario team mailing list archive
-
c2c-oerpscenario team
-
Mailing list archive
-
Message #03952
[Bug 673447] Re: Server ORM bug when using calculated field, error of syntax
> I have a "non technical" suggestion that I think is important : next
time, could you mention the author of the patch in the commit message ?
There should be no need for such an ad-hock behavior: bazaar provides a
`—author` option to commit, which allows the committer to specify a
different author, and the author himself will be visible in the log.
Committer simply needs to remember to use it.
See http://bazaar.launchpad.net/%7Eopenerp/openobject-client-
web/trunk/revision/3788 for instance, GEM is marked as author (and
visible in log) but I'm the one who actually committed the change.
--
Server ORM bug when using calculated field, error of syntax
https://bugs.launchpad.net/bugs/673447
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
Status in OpenObject Server: Fix Released
Bug description:
Hi I found a bug in the ORM. It's an error of syntax!
line 2011 of orm.py
if (not isinstance(self._columns[record[1]],fields.function)) or (record[1] in self._inherit_fields and not isinstance(self._inherit_fields[[record[1]]][2],fields.function)):
The error is at the end of the line self._inherit_fields[[record[1]]], you give a list as key of the dictionary.
Just remove the two useless Square brackets and It's work perfectly.
I send you a patch
For information this code was removed on version 6.
Traceback (most recent call last):
File "./openerp-server.py", line 103, in <module>
pooler.get_db_and_pool(db, update_module=tools.config['init'] or tools.config['update'])
File "/home/sebastien/DEV/openerp/5.0/server/bin/pooler.py", line 40, in get_db_and_pool
addons.load_modules(db, force_demo, status, update_module)
File "/home/sebastien/DEV/openerp/5.0/server/bin/addons/__init__.py", line 736, in load_modules
r = load_module_graph(cr, graph, status, report=report)
File "/home/sebastien/DEV/openerp/5.0/server/bin/addons/__init__.py", line 579, in load_module_graph
init_module_objects(cr, package.name, modules)
File "/home/sebastien/DEV/openerp/5.0/server/bin/addons/__init__.py", line 362, in init_module_objects
result = obj._auto_init(cr, {'module': module_name})
File "/home/sebastien/DEV/openerp/5.0/server/bin/osv/orm.py", line 2011, in _auto_init
if (not isinstance(self._columns[record[1]],fields.function)) or (record[1] in self._inherit_fields and not isinstance(self._inherit_fields[[record[1]]][2],fields.function)):
TypeError: unhashable type: 'list'
References