Tryton - Issues

 

Issue6842

Title Getting error while paying invoice in different currency
Priority bug Status resolved
Superseder Nosy List ced, prakashpp, reviewbot, roundup-bot
Type behavior Components account_invoice
Assigned To ced Keywords review
Reviews 40841002
View: 40841002

Created on 2017-10-11.19:25:22 by prakashpp, last changed by roundup-bot.

Messages
New changeset f8fe6f58c812 by C├ędric Krier in branch 'default':
Compare amount in the invoice currency against amount_to_pay
http://hg.tryton.org/modules/account_invoice/rev/f8fe6f58c812
review40841002 updated at https://codereview.tryton.org/40841002/#ps1
msg37079 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2017-11-27.22:56:08
Indeed it is not a crash.
The comparison of the amount against amount_to_pay is done with amount not necessary in the same currency. amount_to_pay is in the invoice currency and amount is in the company currency. As the goal of the comparison is to determine if the paid amount is enough or not, I think the comparison should be done in the invoice currency.
msg36232 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2017-10-11.21:16:57
If it is a crash please provide the traceback.
msg36231 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2017-10-11.21:16:17
Please do not assign issue not to yourself.
msg36230 (view) Author: [hidden] (prakashpp) Date: 2017-10-11.19:25:22
I think there is an issue with the invoice pay logic. Both the conditions[1][2] in wizard should be compared with amount_to_pay in company's currency?

Let me know if I am missing something or you need error log. Happy to send a patch if its a genuine issue.

[1] https://github.com/tryton/account_invoice/blob/develop/invoice.py#L2556
[2] https://github.com/tryton/account_invoice/blob/develop/invoice.py#L2623
History
Date User Action Args
2017-12-06 01:11:08roundup-botsetstatus: testing -> resolved
nosy: + roundup-bot
messages: + msg37152
2017-11-27 23:03:28reviewbotsetnosy: + reviewbot
messages: + msg37080
2017-11-27 22:56:09cedsetstatus: need-eg -> testing
keyword: + review
messages: + msg37079
reviews: 40841002
assignedto: ced
type: crash -> behavior
2017-10-11 21:16:57cedsetstatus: chatting -> need-eg
messages: + msg36232
2017-10-11 21:16:17cedsetstatus: unread -> chatting
assignedto: ced -> (no value)
messages: + msg36231
2017-10-11 19:25:22prakashppcreate

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