Tryton - Issues

 

Issue8616

Title AttributeError: 'ListBoxViewForm' object has no attribute '_record'
Priority bug Status unread
Superseder Nosy List smarro
Type Components tryton
Assigned To Keywords
Reviews

Created on 2019-08-28.01:39:29 by smarro, last changed by smarro.

Messages
msg51532 (view) Author: [hidden] (smarro) Date: 2019-08-28.01:39:28
Using Tryton 5.2

To reproduce the error, put a binary field with widget="image" in a view of type list-form

Removing line with
self.update_img()
from __init__ method of Image class, makes it no longer show the error


Traceback:
  File "/media/sebastian/SOURCE/workspace/tryton/5.2/venv/lib/python3.7/site-packages/tryton-5.2.5-py3.7.egg/tryton/gui/window/view_form/view/list_form.py", line 82, in _create_form
    view_form = ListBoxViewForm(self.view_id, self.screen, self.form_xml)
  File "/media/sebastian/SOURCE/workspace/tryton/5.2/venv/lib/python3.7/site-packages/tryton-5.2.5-py3.7.egg/tryton/gui/window/view_form/view/list_form.py", line 13, in __init__
    super().__init__(view_id, screen, xml)
  File "/media/sebastian/SOURCE/workspace/tryton/5.2/venv/lib/python3.7/site-packages/tryton-5.2.5-py3.7.egg/tryton/gui/window/view_form/view/form.py", line 416, in __init__
    super().__init__(view_id, screen, xml)
  File "/media/sebastian/SOURCE/workspace/tryton/5.2/venv/lib/python3.7/site-packages/tryton-5.2.5-py3.7.egg/tryton/gui/window/view_form/view/__init__.py", line 35, in __init__
    ).parse(xml)
  File "/media/sebastian/SOURCE/workspace/tryton/5.2/venv/lib/python3.7/site-packages/tryton-5.2.5-py3.7.egg/tryton/gui/window/view_form/view/__init__.py", line 130, in parse
    parser(node, node_attrs)
  File "/media/sebastian/SOURCE/workspace/tryton/5.2/venv/lib/python3.7/site-packages/tryton-5.2.5-py3.7.egg/tryton/gui/window/view_form/view/form.py", line 201, in _parse_form
    self.parse_child(node, container)
  File "/media/sebastian/SOURCE/workspace/tryton/5.2/venv/lib/python3.7/site-packages/tryton-5.2.5-py3.7.egg/tryton/gui/window/view_form/view/form.py", line 208, in parse_child
    self.parse(child)
  File "/media/sebastian/SOURCE/workspace/tryton/5.2/venv/lib/python3.7/site-packages/tryton-5.2.5-py3.7.egg/tryton/gui/window/view_form/view/__init__.py", line 130, in parse
    parser(node, node_attrs)
  File "/media/sebastian/SOURCE/workspace/tryton/5.2/venv/lib/python3.7/site-packages/tryton-5.2.5-py3.7.egg/tryton/gui/window/view_form/view/form.py", line 218, in _parse_field
    widget = self.WIDGETS[attributes['widget']](self.view, attributes)
  File "/media/sebastian/SOURCE/workspace/tryton/5.2/venv/lib/python3.7/site-packages/tryton-5.2.5-py3.7.egg/tryton/gui/window/view_form/view/form_gtk/image.py", line 47, in __init__
    self.update_img()
  File "/media/sebastian/SOURCE/workspace/tryton/5.2/venv/lib/python3.7/site-packages/tryton-5.2.5-py3.7.egg/tryton/gui/window/view_form/view/form_gtk/image.py", line 100, in update_img
    if self.field:
  File "/media/sebastian/SOURCE/workspace/tryton/5.2/venv/lib/python3.7/site-packages/tryton-5.2.5-py3.7.egg/tryton/gui/window/view_form/view/form_gtk/widget.py", line 45, in field
    if self.record:
  File "/media/sebastian/SOURCE/workspace/tryton/5.2/venv/lib/python3.7/site-packages/tryton-5.2.5-py3.7.egg/tryton/gui/window/view_form/view/form_gtk/widget.py", line 41, in record
    return self.view.record
  File "/media/sebastian/SOURCE/workspace/tryton/5.2/venv/lib/python3.7/site-packages/tryton-5.2.5-py3.7.egg/tryton/gui/window/view_form/view/list_form.py", line 19, in record
    return self._record

AttributeError: 'ListBoxViewForm' object has no attribute '_record'

Could not reproduce the error in sao
History
Date User Action Args
2019-08-28 01:39:29smarrocreate

Showing 10 items. Show all history (warning: this could be VERY long)