Tryton - Issues

 

Issue7988

Title Reloading product.product URL crash
Priority bug Status resolved
Superseder Nosy List ced, pokoli, reviewbot, roundup-bot
Type crash Components trytond
Assigned To ced Keywords review
Reviews 275081002
View: 275081002

Created on 2019-01-11.20:07:19 by ced, last changed by roundup-bot.

Messages
New changeset 843ae2eb860d by Cédric Krier in branch '5.0':
Set the requested view_id in result of fields_view_get
https://hg.tryton.org/trytond/rev/843ae2eb860d

New changeset 18aab6c23703 by Cédric Krier in branch '4.8':
Set the requested view_id in result of fields_view_get
https://hg.tryton.org/trytond/rev/18aab6c23703

New changeset 90137525eeaa by Cédric Krier in branch '4.6':
Set the requested view_id in result of fields_view_get
https://hg.tryton.org/trytond/rev/90137525eeaa

New changeset 76fccf82a71f by Cédric Krier in branch '4.4':
Set the requested view_id in result of fields_view_get
https://hg.tryton.org/trytond/rev/76fccf82a71f

New changeset 3f73760b4901 by Cédric Krier in branch '4.2':
Set the requested view_id in result of fields_view_get
https://hg.tryton.org/trytond/rev/3f73760b4901
New changeset 9558f8e62a8c by Cédric Krier in branch 'default':
Set the requested view_id in result of fields_view_get
https://hg.tryton.org/tryton-env/rev/9558f8e62a8c
New changeset fac8fda20028 by Cédric Krier in branch 'default':
Set the requested view_id in result of fields_view_get
https://hg.tryton.org/trytond/rev/fac8fda20028
review275081002 updated at https://codereview.tryton.org/275081002/#ps253151002
msg47667 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2019-03-16.15:16:48
The problem comes from fields_view_get which does not always return the requested view_id (when inherits is involved). Here is review275081002 which ensures to return the right view_id.
msg45925 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2019-01-11.20:07:18
When reloading the URL of product.product with an ID, this exception is raised:

Traceback (most recent call last):
  File "/trytond/wsgi.py", line 73, in dispatch_request
    return endpoint(request, **request.view_args)
  File "/trytond/protocols/dispatcher.py", line 46, in rpc
    request, database_name, *request.rpc_params)
  File "/trytond/wsgi.py", line 44, in auth_required
    return wrapped(*args, **kwargs)
  File "/trytond/protocols/wrappers.py", line 122, in wrapper
    return func(request, pool, *args, **kwargs)
  File "/trytond/protocols/dispatcher.py", line 176, in _dispatch
    result = rpc.result(meth(*c_args, **c_kwargs))
  File "/trytond/model/modelview.py", line 345, in fields_view_get
    result['field_childs'])
  File "/trytond/model/modelview.py", line 460, in _view_look_dom_arch
    fields_width=fields_width)
  File "/trytond/model/modelview.py", line 625, in __view_look_dom
    fields_width=fields_width, fields_attrs=fields_attrs)
  File "/trytond/model/modelview.py", line 625, in __view_look_dom
    fields_width=fields_width, fields_attrs=fields_attrs)
  File "/trytond/model/modelview.py", line 625, in __view_look_dom
    fields_width=fields_width, fields_attrs=fields_attrs)
  File "/trytond/model/modelview.py", line 556, in __view_look_dom
    field = cls._fields[fname]
KeyError: 'products'
History
Date User Action Args
2019-03-28 19:58:10roundup-botsetmessages: + msg48107
2019-03-22 18:18:59roundup-botsetmessages: + msg47919
2019-03-22 18:18:56roundup-botsetstatus: testing -> resolved
nosy: + roundup-bot
messages: + msg47918
2019-03-16 15:46:03reviewbotsetnosy: + reviewbot
messages: + msg47670
2019-03-16 15:16:48cedsetstatus: unread -> testing
keyword: + review
messages: + msg47667
component: + trytond, - sao
reviews: 275081002
assignedto: ced
2019-01-25 00:03:33cedlinkissue8045 superseder
2019-01-14 11:15:20pokolisetnosy: + pokoli
2019-01-11 20:07:19cedcreate