Tryton - Issues

 

Issue7427

Title Can't add a statement line of payment made in a foreign currency
Priority bug Status resolved
Superseder Nosy List ced, nelghani, reviewbot, roundup-bot
Type crash Components trytond
Assigned To ced Keywords review
Reviews 53381002
View: 53381002

Created on 2018-05-11.09:25:30 by nelghani, last changed by roundup-bot.

Files
File name Uploaded Type Edit Remove
StatementLineError.jpg nelghani, 2018-05-11.09:25:29 image/jpeg
Messages
New changeset 8da3cf6cf2ec by Cédric Krier in branch '4.8':
Do not fail if invoice is not in invoice_id2amount_to_pay
https://hg.tryton.org/modules/account_statement/rev/8da3cf6cf2ec
New changeset 203717a7e221 by Cédric Krier in branch 'default':
Do not fail if invoice is not in invoice_id2amount_to_pay
https://hg.tryton.org/tryton-env/rev/203717a7e221
New changeset 6c718b6c3b8a by Cédric Krier in branch 'default':
Do not fail if invoice is not in invoice_id2amount_to_pay
https://hg.tryton.org/modules/account_statement/rev/6c718b6c3b8a
New review53381002 at https://codereview.tryton.org/53381002/#ps20001
msg43818 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2018-09-11.21:47:24
Indeed since issue7314, the amount to pay is only computed for invoices with the same currency as the company.
Here is review53381002 which should avoid the crash.
msg40630 (view) Author: [hidden] (nelghani) Date: 2018-05-11.09:25:29
When saving a statement line of a paiement in a forein currency tryton raises an error message if the related invoice is selected.

Traceback (most recent call last):
  File "/trytond/wsgi.py", line 71, 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 42, 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 172, in _dispatch
    result = rpc.result(meth(inst, *c_args, **c_kwargs))
  File "/trytond/model/modelview.py", line 669, in on_change
    method()
  File "/trytond/model/modelview.py", line 84, in wrapper
    result = func(self, *args, **kwargs)
  File "/trytond/model/fields/field.py", line 113, in wrapper
    return func(self, *args, **kwargs)
  File "/trytond/modules/account_statement/statement.py", line 306, in on_change_lines
    amount_to_pay = invoice_id2amount_to_pay[line.invoice.id]
KeyError: 32

Test made with tryton 4.8
Server : demo4.8.tryton.org
History
Date User Action Args
2018-09-15 18:27:14roundup-botsetmessages: + msg43894
2018-09-12 12:49:04roundup-botsetmessages: + msg43832
2018-09-12 12:48:53roundup-botsetstatus: testing -> resolved
nosy: + roundup-bot
messages: + msg43830
2018-09-11 21:58:06reviewbotsetnosy: + reviewbot
messages: + msg43819
2018-09-11 21:58:05reviewbotsetreviews: 53381002
keyword: + review
2018-09-11 21:47:24cedsetstatus: unread -> testing
assignedto: ced
messages: + msg43818
nosy: + ced
2018-05-11 09:25:30nelghanicreate

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