c2c-oerpscenario team mailing list archive
-
c2c-oerpscenario team
-
Mailing list archive
-
Message #35081
[Bug 865308] Re: Context is not evaluted on one2many fields
** Changed in: openerp-web
Status: New => Incomplete
--
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to OpenERP Project Group.
https://bugs.launchpad.net/bugs/865308
Title:
Context is not evaluted on one2many fields
Status in OpenERP Web:
Incomplete
Bug description:
Hi,
I'm working on the trunk branch (updated this morning). When
specifying a context on a one2many field in its "field" XML atg, it
doesn't work. I join a module so you can test and reproduce the bug
easily.
Example :
<!-- A many2one, it's ok -->
<field name="user_id" context="{'temporal_date' : date, 'dummy' : active_id}"/>
<!-- A one2many, it's does't work -->
<field name="fake_object_child_ids" context="{'this_does_not_work' : date, 'neither_this' : active_id}"/>
I got this error on GTK client :
Traceback (most recent call last):
File "/home/thibaut/OpenERP 6/Logica/client/bin/tools/__init__.py", line 52, in expr_eval
temp = eval(string, context)
File "<string>", line 1, in <module>
NameError: name 'date' is not defined
And the same error with the active_id variable, whereras the first
context work perfectly fine.
This is going to be a problem for the future base_temporal module : we
won't be able to pass the temporal_date variable in the context based
on a current form field. Moreover, not being able to use active_id in
the context of a one2many field also is a problem to define default
values in the one2many form view.
I hope this could be fixed before the 6.1 (7.0? ;-) !
Thanks for your time,
To manage notifications about this bug go to:
https://bugs.launchpad.net/openerp-web/+bug/865308/+subscriptions
References