AttributeError: 'NoneType' object has no attribute 'set_text'

Bug #908785 reported by Thibaut DIRLIK (Logica)
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo GTK Client (MOVED TO GITHUB)
Confirmed
Low
OpenERP sa GTK client R&D

Bug Description

Hi,

I'm using the trunk GTK client. I have a fields.reference used in a form view. This is the form view used from a one2many double click. I added a dynamic "attrs" on this reference field to make it readonly if a boolean field is not checked.

This work fine when I double click on line in the one2many for the first time : The form view opens, and my field is readonly until I check the combobox (btw, why the combobox is not readonly too ?).

But if I close the window and double-click on the same item, then I got this error in my client console :

Traceback (most recent call last):
  File "/home/thibaut/OpenERP 6/OpenAssur/client/bin/widget/view/form_gtk/checkbox.py", line 40, in _toggled
    self._focus_out()
  File "/home/thibaut/OpenERP 6/OpenAssur/client/bin/widget/view/form_gtk/interface.py", line 130, in _focus_out
    self.set_value(self._view.model, self._view.modelfield)
  File "/home/thibaut/OpenERP 6/OpenAssur/client/bin/widget/view/form_gtk/checkbox.py", line 44, in set_value
    model_field.set_client(model, int(self.widget.get_active()))
  File "/home/thibaut/OpenERP 6/OpenAssur/client/bin/widget/model/field.py", line 270, in set_client
    model.signal('record-changed', model)
  File "/home/thibaut/OpenERP 6/OpenAssur/client/bin/signal_event.py", line 28, in signal
    fnct(self, signal_data, *data)
  File "/home/thibaut/OpenERP 6/OpenAssur/client/bin/widget/model/group.py", line 308, in _record_changed
    self.signal('model-changed', model)
  File "/home/thibaut/OpenERP 6/OpenAssur/client/bin/signal_event.py", line 28, in signal
    fnct(self, signal_data, *data)
  File "/home/thibaut/OpenERP 6/OpenAssur/client/bin/widget/screen/screen.py", line 423, in _model_changed
    self.display()
  File "/home/thibaut/OpenERP 6/OpenAssur/client/bin/widget/screen/screen.py", line 853, in display
    self.current_view.display()
  File "/home/thibaut/OpenERP 6/OpenAssur/client/bin/widget/view/form.py", line 480, in display
    widget.display(model, state)
  File "/home/thibaut/OpenERP 6/OpenAssur/client/bin/widget/view/form.py", line 52, in display
    self.widget.display(model, modelfield)
  File "/home/thibaut/OpenERP 6/OpenAssur/client/bin/widget/view/form_gtk/reference.py", line 228, in display
    self.widget_combo.child.set_text('')
AttributeError: 'NoneType' object has no attribute 'set_text'

Then my dynamic attrs doesn't work anymore.

Revision history for this message
Jignesh Rathod(OpenERP) (jir-openerp) wrote :
Changed in openobject-client:
assignee: nobody → OpenERP sa GTK client R&D (openerp-dev-gtk)
importance: Undecided → Low
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.