Tryton - Issues

 

Issue9107

Title Unable to create complaing using relate
Priority bug Status unread
Superseder Nosy List pokoli
Type crash Components sale_complaint
Assigned To Keywords
Reviews

Created on 2020-03-02.17:21:10 by pokoli, last changed by pokoli.

Messages
msg56012 (view) Author: [hidden] (pokoli) (Tryton committer) (Tryton translator) Date: 2020-03-02.17:21:10
If an user tries to create a complaint from a sale the following exception is raised: 

KeyError: 'sale'
  File "trytond/protocols/dispatcher.py", line 186, in _dispatch
    result = rpc.result(meth(*c_args, **c_kwargs))
  File "trytond/model/modelsql.py", line 1247, in search
    tables, expression = cls.search_domain(domain)
  File "trytond/model/modelsql.py", line 1431, in search_domain
    expression = convert(domain)
  File "trytond/model/modelsql.py", line 1429, in convert
    domain[1:] if domain[0] == 'AND' else domain)))
  File "trytond/model/modelsql.py", line 1428, in <genexpr>
    return And((convert(d) for d in (
  File "trytond/model/modelsql.py", line 1426, in convert
    return Or((convert(d) for d in domain[1:]))
  File "trytond/model/modelsql.py", line 1426, in <genexpr>
    return Or((convert(d) for d in domain[1:]))
  File "trytond/model/modelsql.py", line 1418, in convert
    field = cls._fields[fname]

Steps to reproduce on a fresh database:

1. Create a complain type related to a sale
2. Create a new sale and process it.
3. Open the "Complaint" relate
4. Create a new record on the screen. 
5. Select "Sale" as origin and when trying to select a custom sale the exception above is raised.
History
Date User Action Args
2020-03-02 17:21:10pokolicreate

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