Tryton - Issues

 

Issue8754

Title Group Line wizard could fail if the lines to group are balanced
Priority bug Status resolved
Superseder Nosy List ced, nicoe, pokoli, reviewbot, roundup-bot
Type crash Components account
Assigned To nicoe Keywords review
Reviews 284281003
View: 284281003

Created on 2019-10-22.17:52:24 by nicoe, last changed by roundup-bot.

Messages
New changeset 15a9daf4cd52 by Nicolas Évrard in branch '5.4':
Test that balance line exists when grouping payment lines
https://hg.tryton.org/modules/account/rev/15a9daf4cd52

New changeset 9f81d1107cd2 by Nicolas Évrard in branch '5.2':
Test that balance line exists when grouping payment lines
https://hg.tryton.org/modules/account/rev/9f81d1107cd2
New changeset fbb4d635a35c by Nicolas ?vrard in branch 'default':
Test that balance line exists when grouping payment lines
https://hg.tryton.org/tryton-env/rev/fbb4d635a35c
New changeset 53a52828acac by Nicolas ?vrard in branch 'default':
Test that balance line exists when grouping payment lines
https://hg.tryton.org/modules/account/rev/53a52828acac
msg52659 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2019-10-23.22:01:04
On 2019-10-23 21:59, Cédric Krier wrote:
> On 2019-10-23 19:41, Sergi Almacellas Abellana wrote:
> > > If the user wants to do that why prevent it?
> > 
> > Because the user probably selected the wrong lines and do not want to do it. 
> > 
> > IIUC instead of grouping the lines the should be reconcilled and avoid creating an extra move.
> 
> For me, there is nothing wrong with such usage even if it is not
> optimal. More over the user may correct it afterward.

Also adding unnecessary constraint is against our design principle
because it reduce the extensibility.
msg52658 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2019-10-23.22:00:05
On 2019-10-23 19:41, Sergi Almacellas Abellana wrote:
> > If the user wants to do that why prevent it?
> 
> Because the user probably selected the wrong lines and do not want to do it. 
> 
> IIUC instead of grouping the lines the should be reconcilled and avoid creating an extra move.

For me, there is nothing wrong with such usage even if it is not
optimal. More over the user may correct it afterward.
msg52657 (view) Author: [hidden] (pokoli) (Tryton committer) (Tryton translator) Date: 2019-10-23.19:41:03
> If the user wants to do that why prevent it?

Because the user probably selected the wrong lines and do not want to do it. 

IIUC instead of grouping the lines the should be reconcilled and avoid creating an extra move.
msg52656 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2019-10-23.19:36:44
If the user wants to do that why prevent it?
msg52655 (view) Author: [hidden] (pokoli) (Tryton committer) (Tryton translator) Date: 2019-10-23.19:31:07
Does it really make sense to create a grouping moves if the lines are already balanced? 

Is not better to show a message to the user?
review284281003 updated at https://codereview.tryton.org/284281003/#ps268191002
msg52620 (view) Author: [hidden] (nicoe) (Tryton committer) Date: 2019-10-22.17:52:24
Because we fail to test for the boolean value of balance line on https://hg.tryton.org/modules/account/file/54ee0751982b/move.py#l1863

There could be a crash if balance_line is None which could happen if the lines to group are already balanced.
History
Date User Action Args
2020-03-13 00:24:34roundup-botsetmessages: + msg56247
keyword: - backport
2020-03-06 11:27:45roundup-botsetmessages: + msg56103
2020-03-06 11:27:29roundup-botsetstatus: testing -> resolved
nosy: + roundup-bot
messages: + msg56102
2019-10-25 15:07:43cedsetstatus: chatting -> testing
2019-10-25 15:00:15cedsetkeyword: + backport
2019-10-23 22:01:04cedsetmessages: + msg52659
2019-10-23 22:00:05cedsetmessages: + msg52658
2019-10-23 19:41:04pokolisetmessages: + msg52657
2019-10-23 19:36:45cedsetnosy: + ced
messages: + msg52656
2019-10-23 19:31:07pokolisetnosy: + pokoli
messages: + msg52655
2019-10-22 18:22:07reviewbotsetstatus: unread -> chatting
nosy: + reviewbot
messages: + msg52621
2019-10-22 17:52:24nicoecreate