Tryton - Issues

 

Issue8864

Title problem posting statement if movement is already posted manually
Priority bug Status resolved
Superseder Nosy List ced, pokoli, reviewbot, risto3, roundup-bot
Type behavior Components account_statement
Assigned To ced Keywords review
Reviews 288581002, 288581003
View: 288581002, 288581003

Created on 2019-11-25.11:20:26 by risto3, last changed by roundup-bot.

Messages
New changeset adb19f768d33 by Cédric Krier in branch '5.4':
Do not post a second times move
https://hg.tryton.org/modules/account_statement/rev/adb19f768d33

New changeset 9fcb499779c1 by Cédric Krier in branch '5.2':
Do not post a second times move
https://hg.tryton.org/modules/account_statement/rev/9fcb499779c1

New changeset 073eca862466 by Cédric Krier in branch '5.0':
Do not post a second times move
https://hg.tryton.org/modules/account_statement/rev/073eca862466
New changeset 179af0066e1f by Cédric Krier in branch 'default':
Do not post a second times move
https://hg.tryton.org/tryton-env/rev/179af0066e1f

New changeset d2670fb7df6b by Cédric Krier in branch 'default':
Prevent posting move from not posted statement
https://hg.tryton.org/tryton-env/rev/d2670fb7df6b
New changeset 4d122b7a7611 by Cédric Krier in branch 'default':
Do not post a second times move
https://hg.tryton.org/modules/account_statement/rev/4d122b7a7611

New changeset 06e865fb149c by Cédric Krier in branch 'default':
Prevent posting move from not posted statement
https://hg.tryton.org/modules/account_statement/rev/06e865fb149c
msg53752 (view) Author: [hidden] (risto3) Date: 2019-11-30.08:44:14
The back port seems ok, as I can now post the statements having previously posted moves

The main patch gives blocks the posting, with the message 'account_statement.msg_post_statement_move'
perhaps I simply need to update in order to take full advantage of the gettext() call.

Otherwise, LGTM
review288581003 updated at https://codereview.tryton.org/288581003/#ps264801003
review288581003 updated at https://codereview.tryton.org/288581003/#ps272551003
review288581002 updated at https://codereview.tryton.org/288581002/#ps260551077
msg53648 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2019-11-26.01:00:18
Here is review288581002 to be backported
And here is review288581003 that prevents posting statement move outside the statement.
msg53647 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2019-11-26.00:15:29
I think the bug should be fixed in two steps.
First, Statement should not post move that are already posted (Move.post is not a Workflow so it re-writes state)
Second, Move with an Statement origin can not be posted if the statement is not yet in posted state. This means that the Statement state should be written before calling Move.post.
msg53646 (view) Author: [hidden] (risto3) Date: 2019-11-25.22:37:41
Fails on 
https://hg.tryton.org/modules/account/file/tip/move.py#l246
msg53479 (view) Author: [hidden] (pokoli) (Tryton committer) (Tryton translator) Date: 2019-11-25.12:16:30
Which is the problem? There is an error on the system? Or what happens? 

If there is an crash did you have the traceback?
msg53476 (view) Author: [hidden] (risto3) Date: 2019-11-25.11:33:03
I guess there is also the option, tryton being an integrated system, to ask whether to post directly the statement (or invoice) in *order* to post the movement.
msg53475 (view) Author: [hidden] (risto3) Date: 2019-11-25.11:20:25
there is a problem if a move generated by a statement not yet posted is manually posted via the account moves form... it is now seemingly impossible to post the statement.

Suggestion: possibly refuse to post the move via the moves form if the move is generated from another source such as statement or invoice, and/or verify that the move is the same (and coherent with the statement or invoice) and simply post it... flagging an exception/error if it is no longer coherent.

This is a pain as, once posted, one can not go back.
History
Date User Action Args
2019-12-10 00:31:54roundup-botsetmessages: + msg54393
keyword: - backport
2019-12-05 21:39:11roundup-botsetmessages: + msg54297
2019-12-05 21:39:01roundup-botsetstatus: testing -> resolved
nosy: + roundup-bot
messages: + msg54296
2019-11-30 08:44:15risto3setmessages: + msg53752
2019-11-26 12:44:18reviewbotsetmessages: + msg53654
2019-11-26 01:08:09reviewbotsetmessages: + msg53650
2019-11-26 01:08:05reviewbotsetnosy: + reviewbot
messages: + msg53649
2019-11-26 01:00:19cedsetstatus: chatting -> testing
reviews: 288581002, 288581003
messages: + msg53648
keyword: + review, backport
assignedto: ced
2019-11-26 00:15:30cedsetpriority: wish -> bug
type: behavior
messages: + msg53647
nosy: + ced
2019-11-25 22:37:41risto3setmessages: + msg53646

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