c2c-oerpscenario team mailing list archive
-
c2c-oerpscenario team
-
Mailing list archive
-
Message #19329
[Bug 700398] Re: [5.0] KeyError 'active_id' on attrs
I change the state to won't fix since there is no answer, and active_id
in domain is not in the spirit of the framework
** Changed in: openobject-client/trunk
Status: Incomplete => Won't Fix
--
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
https://bugs.launchpad.net/bugs/700398
Title:
[5.0] KeyError 'active_id' on attrs
Status in OpenERP GTK Client:
Incomplete
Status in OpenERP GTK Client 5.0 series:
Won't Fix
Status in OpenERP GTK Client trunk series:
Won't Fix
Bug description:
OpenObject: 5.0
Server revno: 2169
Addons revno: 2898
Client revno: 1095
Web revno: 2950
On a field, i have add a domain and an attrs that use actve_id as:
<field name="lot_output_id" domain="[('warehouse_id','=', active_id)]"
attrs="{'required': [('id','=', active_id)]}"
The domain work with the active_id, but not in attrs
--------------8<---------------8<-------------
Traceback (most recent call last):
File "/home/alncchau/syleam/openerp/5.0/client/bin/modules/gui/main.py", line 989, in sig_win_close
self._sig_child_call(args[0], 'but_close', page_num)
File "/home/alncchau/syleam/openerp/5.0/client/bin/modules/gui/main.py", line 1334, in _sig_child_call
res = wid.handlers[button_name]()
File "/home/alncchau/syleam/openerp/5.0/client/bin/modules/gui/window/form.py", line 441, in sig_close
return self.modified_save(reload=False)
File "/home/alncchau/syleam/openerp/5.0/client/bin/modules/gui/window/form.py", line 428, in modified_save
if self.screen.is_modified():
File "/home/alncchau/syleam/openerp/5.0/client/bin/widget/screen/screen.py", line 487, in is_modified
self.current_view.set_value()
File "/home/alncchau/syleam/openerp/5.0/client/bin/widget/view/form.py", line 333, in set_value
widget.set_value(model)
File "/home/alncchau/syleam/openerp/5.0/client/bin/widget/view/form.py", line 65, in set_value
self.widget.set_value(model, model.mgroup.mfields[self.widget_name])
File "/home/alncchau/syleam/openerp/5.0/client/bin/widget/view/form_gtk/char.py", line 45, in set_value
return model_field.set_client(model, self.widget.get_text() or False)
File "/home/alncchau/syleam/openerp/5.0/client/bin/widget/model/field.py", line 106, in set_client
model.signal('record-changed', model)
File "/home/alncchau/syleam/openerp/5.0/client/bin/signal_event.py", line 29, in signal
fnct(self, signal_data, *data)
File "/home/alncchau/syleam/openerp/5.0/client/bin/widget/model/group.py", line 254, in _record_changed
self.signal('model-changed', model)
File "/home/alncchau/syleam/openerp/5.0/client/bin/signal_event.py", line 29, in signal
fnct(self, signal_data, *data)
File "/home/alncchau/syleam/openerp/5.0/client/bin/widget/screen/screen.py", line 244, in _model_changed
self.display()
File "/home/alncchau/syleam/openerp/5.0/client/bin/widget/screen/screen.py", line 567, in display
self.current_view.display()
File "/home/alncchau/syleam/openerp/5.0/client/bin/widget/view/form.py", line 404, in display
widget.display(model, state)
File "/home/alncchau/syleam/openerp/5.0/client/bin/widget/view/form.py", line 50, in display
modelfield.attrs_set(model)
File "/home/alncchau/syleam/openerp/5.0/client/bin/widget/model/field.py", line 128, in attrs_set
attrs_changes = eval(self.attrs.get('attrs',"{}"),model.value)
File "<string>", line 1, in <module>
NameError: name 'active_id' is not defined
--------------8<---------------8<-------------
Distribution: Ubuntu
Version: 9.10 (karmic)
Python 2.6.4
Locale:
LANG=fr_FR.UTF-8
References