Tryton - Issues

 

Issue7450

Title Remove default accounts from journals
Priority bug Status resolved
Superseder Nosy List Timitos, ced, pokoli, reviewbot, roundup-bot
Type crash Components account, account_invoice, account_statement
Assigned To ced Keywords review
Reviews 50391002, 45551002, 45561002, 60331002
View: 50391002, 45551002, 45561002, 60331002

Created on 2018-05-21.16:29:29 by pokoli, last changed by roundup-bot.

Messages
New changeset 7958d4b1b38c by Cédric Krier in branch 'default':
Update reconcile wizard to use write off method
https://hg.tryton.org/modules/account/rev/7958d4b1b38c
New changeset b546126a7c0d by Cédric Krier in branch 'default':
Update reconcile wizard to use write off method
https://hg.tryton.org/tryton-env/rev/b546126a7c0d
review60331002 updated at https://codereview.tryton.org/60331002/#ps40001
review60331002 updated at https://codereview.tryton.org/60331002/#ps20001
New review60331002 at https://codereview.tryton.org/60331002/#ps1
msg43743 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2018-09-06.14:03:01
I re-open it because the reconcile wizard has not been updated: review60331002
New changeset 76ef8b411e93 by Cédric Krier in branch 'default':
Use invoice payment method in scenario
https://hg.tryton.org/tryton-env/rev/76ef8b411e93
New changeset 5f7a873aa52d by Cédric Krier in branch 'default':
Use invoice payment method in scenario
https://hg.tryton.org/modules/sale_supply_drop_shipment/rev/5f7a873aa52d
New changeset 60def0f5bc4a by Cédric Krier in branch 'default':
Use invoice payment method in scenario
https://hg.tryton.org/modules/sale_supply/rev/60def0f5bc4a
New changeset 5bc0ead6c90b by Cédric Krier in branch 'default':
Use invoice payment method in scenario
https://hg.tryton.org/modules/sale_advance_payment/rev/5bc0ead6c90b
New changeset 2eece2a45110 by Cédric Krier in branch 'default':
Use invoice payment method in scenario
https://hg.tryton.org/modules/sale/rev/2eece2a45110
New changeset 3268d015dc7f by Cédric Krier in branch 'default':
Use invoice payment method in scenario
https://hg.tryton.org/modules/purchase/rev/3268d015dc7f
New changeset a11647c35ad8 by Cédric Krier in branch 'default':
Use invoice payment method in scenario
https://hg.tryton.org/tryton-env/rev/a11647c35ad8
New changeset 8ac0fe5a722f by Cédric Krier in branch 'default':
Use invoice payment method in scenario
https://hg.tryton.org/modules/account_tax_cash/rev/8ac0fe5a722f
New changeset 59ae0cae28a6 by Cédric Krier in branch 'default':
Move account from journal to journal statement in scenario
https://hg.tryton.org/tryton-env/rev/59ae0cae28a6
New changeset 70ab325558b6 by Cédric Krier in branch 'default':
Move account from journal to journal statement in scenario
https://hg.tryton.org/modules/account_statement_ofx/rev/70ab325558b6
New changeset 16588d6cf29d by Cédric Krier in branch 'default':
Move account from journal to journal statement in scenario
https://hg.tryton.org/modules/account_statement_coda/rev/16588d6cf29d
New changeset 490d84035919 by Cédric Krier in branch 'default':
Move account from journal to journal statement in scenario
https://hg.tryton.org/modules/account_statement_aeb43/rev/490d84035919
New changeset e5ba84e1eb9c by Cédric Krier in branch 'default':
Move account from journal to journal statement in scenario
https://hg.tryton.org/tryton-env/rev/e5ba84e1eb9c
New changeset 0348cbefd044 by Cédric Krier in branch 'default':
Move account from journal to journal statement in scenario
https://hg.tryton.org/modules/account_payment_clearing/rev/0348cbefd044
New changeset 2f951002ce45 by Sergi Almacellas Abellana in branch 'default':
Remove default account from journal
https://hg.tryton.org/tryton-env/rev/2f951002ce45
New changeset ff7bad57e86a by Sergi Almacellas Abellana in branch 'default':
Use single account for statement journal
https://hg.tryton.org/modules/account_statement/rev/ff7bad57e86a
New changeset 9e3ebaae6bb7 by Sergi Almacellas Abellana in branch 'default':
Add invoice payment method
https://hg.tryton.org/modules/account_invoice/rev/9e3ebaae6bb7
New changeset d1d3a1c12158 by Sergi Almacellas Abellana in branch 'default':
Remove default account from journal
https://hg.tryton.org/modules/account/rev/d1d3a1c12158
msg43085 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2018-08-27.10:14:54
I think it deserves a entry in https://discuss.tryton.org/t/migration-from-4-8-to-5-0/596 even if the update will not fail without but user should know that he must create new documents.
review50391002 updated at https://codereview.tryton.org/50391002/#ps70001
review45561002 updated at https://codereview.tryton.org/45561002/#ps200001
review45561002 updated at https://codereview.tryton.org/45561002/#ps180001
review45561002 updated at https://codereview.tryton.org/45561002/#ps140001
review45551002 updated at https://codereview.tryton.org/45551002/#ps220001
review45561002 updated at https://codereview.tryton.org/45561002/#ps120001
review45551002 updated at https://codereview.tryton.org/45551002/#ps200001
review45561002 updated at https://codereview.tryton.org/45561002/#ps100001
review45551002 updated at https://codereview.tryton.org/45551002/#ps160001
review45561002 updated at https://codereview.tryton.org/45561002/#ps80001
review45551002 updated at https://codereview.tryton.org/45551002/#ps140001
review45561002 updated at https://codereview.tryton.org/45561002/#ps60001
review45551002 updated at https://codereview.tryton.org/45551002/#ps120001
review45551002 updated at https://codereview.tryton.org/45551002/#ps100001
msg41317 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2018-06-08.09:10:33
I'm wondering if we should not have only a 'account.reconcile.write_off' model in account module and an 'account.invoice.payment.method' model in account_invoice module. The 'cash' is not used in account module.
I think this will make more sense to the user as we could precisely define where they are used.
review45561002 updated at https://codereview.tryton.org/45561002/#ps40001
review45551002 updated at https://codereview.tryton.org/45551002/#ps80001
review45551002 updated at https://codereview.tryton.org/45551002/#ps40001
review50391002 updated at https://codereview.tryton.org/50391002/#ps40002
review50391002 updated at https://codereview.tryton.org/50391002/#ps40001
review45561002 updated at https://codereview.tryton.org/45561002/#ps20001
review45551002 updated at https://codereview.tryton.org/45551002/#ps20001
New review45561002 at https://codereview.tryton.org/45561002/#ps1
New review45551002 at https://codereview.tryton.org/45551002/#ps1
msg40954 (view) Author: [hidden] (pokoli) (Tryton committer) (Tryton translator) Date: 2018-05-23.10:27:54
> I think we should go further and remove the accounts from the journal.

That makes sense for me. 

> For me, they are only used for cash and write-off which indeed should probably by replaced by a similar design to statement journal (but probably with a less confusing name which does not include "Journal").

Agree about creating a new model for the Cash Journal. About the name I think we should use something like "Payment method" as I see that cash journal is only used for paying invoices. 

For write-off journals I'm wondering if won't be better to completly remove the write-off type and allow any kind of journal on the write-off wizards (like we do for example on payment clearing). On the wizard we should also ask for the account that should be used for the write-off. Indeed the writeoff API already accepts an account and fallbacks to the journal one if not set.
review50391002 updated at https://codereview.tryton.org/50391002/#ps20001
New review50391002 at https://codereview.tryton.org/50391002/#ps1
msg40808 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2018-05-21.16:55:49
I think we should go further and remove the accounts from the journal.
For me, they are only used for cash and write-off which indeed should probably by replaced by a similar design to statement journal (but probably with a less confusing name which does not include "Journal").
For the migration, I think there is no choice than requesting to manually create/set the new "journals".
msg40807 (view) Author: [hidden] (pokoli) (Tryton committer) (Tryton translator) Date: 2018-05-21.16:40:15
Here is review50391002.

I decided to not make fields optional and fall-back to current journals accounts if not defined. I'm wondering if it will be great to make the fields required and migrate the current values from the journal default accounts. The main problem with this approach is I'm not sure if we can do a migration as this is a multivalue field and the migration will probably not work if extra criteria has been added to the MultiValue pattern. We can also warn the user to manually migrate the data so they can clean the extra journals if they wan't.

Any comments will be much appreciated.
msg40806 (view) Author: [hidden] (pokoli) (Tryton committer) (Tryton translator) Date: 2018-05-21.16:29:28
Currently the statement move lines are created using the accounting journal default credit/debit account. This forces the user to create an accounting journal for each account which adds unneeded complexity.

In a database with multiple companies, this is more complex to manage as the accounting journals are shared between all the companies but the statement journals are company specific. So you end up with a lot of accounting journals created only for statement usages that are not needed on all companies.
History
Date User Action Args
2018-09-23 23:47:02cedlinkissue7189 superseder
2018-09-11 08:20:06roundup-botsetmessages: + msg43811
2018-09-11 08:13:10roundup-botsetstatus: testing -> resolved
messages: + msg43810
2018-09-07 19:55:23reviewbotsetmessages: + msg43766
2018-09-07 16:58:41reviewbotsetmessages: + msg43765
2018-09-07 11:22:07cedlinkissue7684 superseder
2018-09-06 14:24:10reviewbotsetmessages: + msg43744
2018-09-06 14:24:10reviewbotsetreviews: 50391002, 45551002, 45561002 -> 50391002, 45551002, 45561002, 60331002
2018-09-06 14:03:15cedsetpriority: feature -> bug
type: feature request -> crash
2018-09-06 14:03:01cedsetstatus: resolved -> testing
assignedto: pokoli -> ced
messages: + msg43743

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