** Attachment added: "Refrence_Fields.ogv"
   
https://bugs.launchpad.net/openobject-client/+bug/908785/+attachment/2650323/+files/Refrence_Fields.ogv

** Changed in: openobject-client
   Importance: Undecided => Low

** Changed in: openobject-client
       Status: New => Confirmed

** Changed in: openobject-client
     Assignee: (unassigned) => OpenERP sa GTK client R&D (openerp-dev-gtk)

-- 
You received this bug notification because you are a member of OpenERP
sa GTK client R&D, which is a bug assignee.
https://bugs.launchpad.net/bugs/908785

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

Status in OpenERP GTK Client:
  Confirmed

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.

To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-client/+bug/908785/+subscriptions

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to