Issue 9221

Title
EC Operation List shows canceled purchase invoices
Priority
bug
Status
resolved
Nosy list
ced, josesalvador, pokoli, reviewbot, roundup-bot
Assigned to
josesalvador
Keywords
review

Created on 2020-04-13.09:42:25 by josesalvador, last changed 6 months ago by roundup-bot.

Files

File name Uploaded Type Details
mercurial_state.png josesalvador, 2020-06-23.18:33:44 image/png view

Messages

New changeset 41e2ccca80de by José Salvador in branch '5.8':
Exclude cancelled invoices from EC Operation list
https://hg.tryton.org/modules/account_es/rev/41e2ccca80de

New changeset db70896e8633 by Cédric Krier in branch '5.8':
Test amount of Spanish EC Operation List without digits
https://hg.tryton.org/modules/account_es/rev/db70896e8633
New changeset fd56d576e9ac by Cédric Krier in branch 'default':
Test amount of Spanish EC Operation List without digits
https://hg.tryton.org/tryton-env/rev/fd56d576e9ac
New changeset 3c9b72a55846 by Cédric Krier in branch 'default':
Test amount of Spanish EC Operation List without digits
https://hg.tryton.org/modules/account_es/rev/3c9b72a55846
New changeset 75c0483baed0 by Sergi Almacellas Abellana in branch 'default':
Exclude cancelled invoices from EC Operation list
https://hg.tryton.org/tryton-env/rev/75c0483baed0
New changeset a0eaa91048cd by José Salvador in branch 'default':
Exclude cancelled invoices from EC Operation list
https://hg.tryton.org/modules/account_es/rev/a0eaa91048cd
Author: [hidden] (josesalvador)
Date: 2020-08-18.12:50:46
Author: [hidden] (josesalvador)
Date: 2020-06-23.18:33:44
Code review ready for testing.

But this patch set [1] uploaded with upload.py does not include the removed file as the screenshot attached [2] of mercurial state shows. Why? What have I done wrong?


[1] https://codereview.tryton.org/295401002/#ps309901003
[2] mercurial_state.png

PS -> I'm conscious of the disaster of previous patches and comments. That will not occur again since I'm be able to manage partial not ready developments without the need to push to code review tool. Excuse me for that.
Author: [hidden] (josesalvador)
Date: 2020-06-11.20:53:24
Relying on in other issues I think the right state is testing.

Correct me if I am wrong, please.
Author: [hidden] (josesalvador)
Date: 2020-06-11.20:24:29
The issue is not finished but I need some guidance/responses to the code in the review so is for that I set to chatting this issue.

If it is not the right workflow please help to know how I have to do it.
Author: [hidden] (pokoli) Tryton committer Tryton translator
Date: 2020-04-16.10:26:44
Here is review295401002 which adds the required filters also improve the cancell invoice scenario to test this case.
Author: [hidden] (josesalvador)
Date: 2020-04-15.12:47:00
> Yes, but as far as customer invoices can also be cancelled (when refunded they are marked as cancelled) we should also take them in account. 

> I will not do any distinction here and fix both cases. This means adding the cancel state filter and also exclude "canceled moves" as we did on issue9097

Understood, so in this case, just for information, are you still ensuring it will be needed to update account_eu too?
Author: [hidden] (pokoli) Tryton committer Tryton translator
Date: 2020-04-15.11:42:56
>> I'm talking all time about canceled (and not refund) **purchase** (from supplier) invoices **not canceled customer invoices**.

Yes, but as far as customer invoices can also be cancelled (when refunded they are marked as cancelled) we should also take them in account. 

I will not do any distintion here and fix both cases. This means adding the cancel state filter and also exclude "canceled moves" as we did on issue9097
Author: [hidden] (josesalvador)
Date: 2020-04-15.11:17:23
@pokoli @ced remember I'm talking all time about canceled (and not refund) **purchase** (from supplier) invoices **not canceled customer invoices**.
Author: [hidden] (ced) Tryton committer Tryton translator
Date: 2020-04-15.11:00:04
On 2020-04-15 10:10, Sergi Almacellas Abellana wrote:
> > I do not see why account_eu should be modified?
> As far as we allow to cancel custom invoices I think it's safer to also exclude the cancelled invoices.

For me, it is a big problem because (except Spanish) I do not know a
country that allow to "update" such report after sending it.
Canceling a customer invoice should always be done with a credit note in
Europe.
Author: [hidden] (pokoli) Tryton committer Tryton translator
Date: 2020-04-15.10:10:08
> I do not see why account_eu should be modified?
As far as we allow to cancel custom invoices I think it's safer to also exclude the cancelled invoices.
Author: [hidden] (ced) Tryton committer Tryton translator
Date: 2020-04-15.10:00:34
I do not see why account_eu should be modified?
Author: [hidden] (pokoli) Tryton committer Tryton translator
Date: 2020-04-15.09:46:43
Ok, so we should add a cancel filter on Spanish and European EC Operation list. 

But if we make this filter we should also include the cancel invoices like we did in issue9097
Author: [hidden] (josesalvador)
Date: 2020-04-13.13:09:39
Not exactly...

In issue9097 we're talking about a customer refund so in this case all the invoices/moves must be taken into account.

In this case I'm talking about a cancel (not refund) of purchase invoice which was accounted as mistake.

In other words I think that:

- A cancel purchase invoice must not be taken into account
- A refund purchase invoice must be taken into account
Author: [hidden] (pokoli) Tryton committer Tryton translator
Date: 2020-04-13.11:42:21
@josesalvador is this similar to issue9097 but for Spanish EC Operation List?
Author: [hidden] (josesalvador)
Date: 2020-04-13.10:18:11
IIUC when you cancel a purchase invoice (eg to correct a purchase invoice accounted as mistake) Tryton cancel it generating a counterpart move.

So IMHO that operation must not be showed in EC Operation List or at least it should be showed as zero amount (although I don't like the last one alternative...)
Author: [hidden] (ced) Tryton committer Tryton translator
Date: 2020-04-13.10:04:05
As long as they have accounting move, for me it is expected.
Author: [hidden] (josesalvador)
Date: 2020-04-13.09:42:25
EC Operation List shows canceled purchase invoices
History
Date User Action Args
2021-03-16 00:46:18roundup-botsetkeyword: - backport
messages: + msg65536
2021-02-27 10:54:09roundup-botsetmessages: + msg64905
2021-02-27 10:54:05roundup-botsetmessages: + msg64904
2021-02-26 09:22:14roundup-botsetmessages: + msg64874
2021-02-26 09:22:05roundup-botsetmessages: + msg64873
nosy: + roundup-bot
status: testing -> resolved
2021-02-16 21:02:15reviewbotsetmessages: + msg64648
2021-02-16 20:01:42reviewbotsetmessages: + msg64647
2021-02-13 11:00:11reviewbotsetmessages: + msg64532
2020-12-13 13:50:25reviewbotsetmessages: + msg63067
2020-12-13 13:20:41josesalvadorsetstatus: in-progress -> testing

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