Error on create a purchase from purchase request with quotation.
Creation of a QUOTATION from a PURCHASE REQUEST. Error when using the WIZARD to create a purchase.
File "/trytond/model/modelstorage.py", line 1513, in getattr field = self._fields[name] KeyError: 'incoterm'
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/trytond/wsgi.py", line 117, in dispatch_request return endpoint(request, request.view_args) File "/trytond/protocols/dispatcher.py", line 48, in rpc request, database_name, request.rpc_params) File "/trytond/wsgi.py", line 84, in auth_required return wrapped(args, kwargs) File "/trytond/protocols/wrappers.py", line 159, in wrapper return func(request, pool, args, **kwargs) File "/trytond/protocols/dispatcher.py", line 181, in _dispatch result = rpc.result(meth(c_args, c_kwargs)) File "/trytond/wizard/wizard.py", line 314, in execute return wizard._execute(state_name) File "/trytond/wizard/wizard.py", line 345, in _execute result = self._execute(transition()) File "/trytond/modules/purchase_request_quotation/purchase.py", line 623, in transition_start state = super(CreatePurchase, self).transition_start() File "/trytond/modules/purchase_request/purchase_request.py", line 481, in transition_start requests = sorted(requests, key=sortable_values(keyfunc)) File "/trytond/tools/misc.py", line 254, in wrapper result = list(func(*args, kwargs)) File "/trytond/modules/incoterm/purchase.py", line 68, in group_purchase_key if request.best_quotation_line else None), File "/trytond/model/modelstorage.py", line 1515, in _getattr raise AttributeError('"%s" has no attribute "%s"' % (self, name)) AttributeError: "purchase.request.quotation.line,1" has no attribute "incoterm"
Fault: "purchase.request.quotation.line,1" has no attribute "incoterm"
The _group_purchase_key method searches for an incoterm on the lines of QUOTATION. But the incoterm is on the QUOTATION header.