Created on 2020-10-16.16:52:04 by pokoli, last changed 2 months ago by roundup-bot.
New changeset a58a39360324 by Cédric Krier in branch 'default': Warn user when posting a statement with canceled or paid lines https://hg.tryton.org/tryton-env/rev/a58a39360324
New changeset 90cc8fdb0fd2 by Adrià Tarroja Caubet in branch 'default': Warn user when posting a statement with canceled or paid lines https://hg.tryton.org/modules/account_statement/rev/90cc8fdb0fd2
On 2020-10-16 17:28, Sergi Almacellas Abellana wrote: > I proposed to clear the invoice because we already clear posted invoices: > > https://hg.tryton.org/modules/account_statement/file/1021ec9c9953/statement.py#l521 > > So I'm wondering if we should also warn the user when cancelling a posted invoice that is contained in a draft statement. > > What do you think? Indeed having the same behavior as for paid invoice will be good as it warns the user and he will decide.
For me the problem is that it warns that there is an invoice which is not valid, but does not explain the error nor which invoice is wrong. When there are a lot of lines (for example our case had 675 statement lines) it's very hard to find the invoice and fix it. So if you want to keep the error, we should replace it by an UserError which gives more details. I proposed to clear the invoice because we already clear posted invoices: https://hg.tryton.org/modules/account_statement/file/1021ec9c9953/statement.py#l521 So I'm wondering if we should also warn the user when cancelling a posted invoice that is contained in a draft statement. What do you think?
I do not agree. For me, the behavior is correct as it warns the user that the statement is no more postable.
Steps to reproduce: 1. Createa a supplier invoice and post it 2. Create an statement with a line to pay the supplier invoice 3. Cancel the invoice 4. Try to post the statement A domain validation error is raised because the invoice is cancelled before posting. I think the invoice should be cleared from statement line when cancelling.
|2021-02-12 20:21:55||roundup-bot||set||messages: + msg64504|
nosy: + roundup-bot
status: testing -> resolved
|2021-02-05 09:29:47||reviewbot||set||messages: + msg64321|
|2021-01-22 10:11:30||reviewbot||set||messages: + msg64034|
|2021-01-07 09:16:57||reviewbot||set||messages: + msg63795|
|2021-01-04 10:25:32||reviewbot||set||messages: + msg63751|
|2021-01-04 09:56:03||reviewbot||set||messages: + msg63750|
|2020-11-30 16:00:26||reviewbot||set||messages: + msg62316|
|2020-11-17 17:55:11||reviewbot||set||messages: + msg61994|
|2020-11-02 09:14:30||reviewbot||set||messages: + msg61582|
Showing 10 items. Show all history (warning: this could be VERY long)