Tryton - Issues

 

Issue7192

Title Payment type is missing when paying customer invoice in foreign currency
Priority bug Status need-eg
Superseder Nosy List Artem, ced, pokoli
Type behavior Components
Assigned To Keywords
Reviews

Created on 2018-03-05.13:27:27 by Artem, last changed by pokoli.

Messages
msg39958 (view) Author: [hidden] (pokoli) (Tryton committer) (Tryton translator) Date: 2018-04-13.16:42:19
I confirm that I can not reproduce it also.
msg39831 (view) Author: [hidden] (Artem) Date: 2018-04-06.09:55:10
Here is the full traceback: 

Traceback (most recent call last):
  File "/trytond/model/model.py", line 384, in __getattr__
    return self._values[name]
TypeError: 'NoneType' object is not subscriptable

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/trytond/wsgi.py", line 70, in dispatch_request
    return endpoint(request, **request.view_args)
  File "/trytond/protocols/dispatcher.py", line 41, in rpc
    request, database_name, *request.rpc_params)
  File "/trytond/wsgi.py", line 41, in auth_required
    return wrapped(*args, **kwargs)
  File "/trytond/protocols/wrappers.py", line 110, in wrapper
    return func(request, pool, *args, **kwargs)
  File "/trytond/protocols/dispatcher.py", line 165, in _dispatch
    result = rpc.result(meth(*c_args, **c_kwargs))
  File "/trytond/wizard/wizard.py", line 287, in execute
    return wizard._execute(state_name)
  File "/trytond/wizard/wizard.py", line 318, in _execute
    result = self._execute(transition())
  File "/trytond/wizard/wizard.py", line 318, in _execute
    result = self._execute(transition())
  File "/trytond/modules/account_invoice/invoice.py", line 2625, in transition_pay
    and self.ask.type != 'writeoff'):
  File "/trytond/model/model.py", line 387, in __getattr__
    % (self.__name__, name, self._values))
AttributeError: 'account.invoice.pay.ask' Model has no attribute 'type': None
msg39638 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2018-04-01.19:12:59
I can not reproduce and it is difficult to understand without the full traceback.
msg38802 (view) Author: [hidden] (Artem) Date: 2018-03-05.13:27:26
To replicate the error:
- Company's main currency is USD
- create customer invoice for the amount of EUR 100
- Invoice date and invoice accounting date are equal (in this case - 2018-03-04
- Post invoice
- Currency rates as of 2018-03-04: for USD - 1, for EUR - 0.9
- Press "Pay" button in the posted customer invoice
- The pop-up window "Pay Invoice" appears
- Fill in the values in this window: amount: 100, currency: EUR, Date: 2018-03-04, journal - CASH journal
- press OK

As a result, the Attribute Error appears: 'account.invoice.pay.ask' Model has no attribute 'type': None
History
Date User Action Args
2018-04-13 16:42:19pokolisetnosy: + pokoli
messages: + msg39958
2018-04-06 09:55:11Artemsetmessages: + msg39831
2018-04-01 19:12:59cedsetstatus: unread -> need-eg
nosy: + ced
messages: + msg39638
2018-03-05 13:27:27Artemcreate

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