Tryton - Issues

 

Issue6212

Title Better customization of invoice sequence
Priority feature Status resolved
Superseder Nosy List Timitos, ced, pokoli, resteve, reviewbot, roundup-bot
Type feature request Components account_invoice
Assigned To pokoli Keywords review
Reviews 31991002
View: 31991002

Created on 2017-01-23.15:27:22 by pokoli, last changed by roundup-bot.

Messages
New changeset 91bb822d56b2 by Sergi Almacellas Abellana in branch 'default':
Use Match pattern for invoice sequences
http://hg.tryton.org/modules/account_invoice/rev/91bb822d56b2
review31991002 updated at https://codereview.tryton.org/31991002/#ps500001
review31991002 updated at https://codereview.tryton.org/31991002/#ps480001
review31991002 updated at https://codereview.tryton.org/31991002/#ps460001
review31991002 updated at https://codereview.tryton.org/31991002/#ps440001
review31991002 updated at https://codereview.tryton.org/31991002/#ps400001
review31991002 updated at https://codereview.tryton.org/31991002/#ps360001
review31991002 updated at https://codereview.tryton.org/31991002/#ps340001
review31991002 updated at https://codereview.tryton.org/31991002/#ps320001
msg32019 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2017-02-17.11:19:15
I made my mind. I think we should try to keep the current UX as close as possible while adding the feature.
For that, the sequence model should contain the four type of sequence and the list should be displayed by default as a form. It should also have an empty default value.
review31991002 updated at https://codereview.tryton.org/31991002/#ps300001
review31991002 updated at https://codereview.tryton.org/31991002/#ps280001
msg31961 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2017-02-15.23:08:56
I'm wondering if we should not have 4 sequence field on each line instead of having an invoice_type. And so we could display the one2many as form by default to create a single line which is the more common use case.
For the protection, it should probably be fixed with issue5205.

But I'm still doubtful about the feature. Do we really need to customize the invoice sequence? Maybe the sequence should be just linked to the journal.
msg31960 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2017-02-15.22:16:47
I have few concerns about this design.
I find it as user difficult and complex to understand and predict which sequence will be used.
Also it will be very easy to break the configuration during the fiscal year, for example by re-ordering or deleting a line.
review31991002 updated at https://codereview.tryton.org/31991002/#ps260001
review31991002 updated at https://codereview.tryton.org/31991002/#ps220001
review31991002 updated at https://codereview.tryton.org/31991002/#ps200001
review31991002 updated at https://codereview.tryton.org/31991002/#ps180001
review31991002 updated at https://codereview.tryton.org/31991002/#ps160001
review31991002 updated at https://codereview.tryton.org/31991002/#ps150001
review31991002 updated at https://codereview.tryton.org/31991002/#ps130001
review31991002 updated at https://codereview.tryton.org/31991002/#ps110001
review31991002 updated at https://codereview.tryton.org/31991002/#ps90001
review31991002 updated at https://codereview.tryton.org/31991002/#ps70001
review31991002 updated at https://codereview.tryton.org/31991002/#ps60001
review31991002 updated at https://codereview.tryton.org/31991002/#ps40001
msg31456 (view) Author: [hidden] (pokoli) (Tryton committer) Date: 2017-01-23.17:59:33
I updated the review taking in account msg31451
review31991002 updated at https://codereview.tryton.org/31991002/#ps20001
msg31451 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2017-01-23.16:01:24
I do not think the real problem is the code of the method set_number.
Indeed the sequence selection should follow the Match design pattern instead of being only available on fiscal year and period.
review31991002 updated at https://codereview.tryton.org/31991002/#ps1
msg31447 (view) Author: [hidden] (pokoli) (Tryton committer) Date: 2017-01-23.15:27:22
Since issue5751 invoice.set_number is called with a list of invoice so it's harder to customize the invoice sequence for each invoice. 

For a better customization, we should allow to customize the sequence and the context used to compute the number for each invoice.
History
Date User Action Args
2017-03-30 09:45:31roundup-botsetstatus: testing -> resolved
nosy: + roundup-bot
messages: + msg32909
2017-03-27 10:37:30reviewbotsetmessages: + msg32800
2017-03-22 10:02:14reviewbotsetmessages: + msg32658
2017-03-17 10:39:54reviewbotsetmessages: + msg32568
2017-03-14 14:09:31reviewbotsetmessages: + msg32496
2017-03-14 13:29:00reviewbotsetmessages: + msg32495
2017-03-02 15:59:45reviewbotsetmessages: + msg32279
2017-02-24 15:09:07reviewbotsetmessages: + msg32172
2017-02-17 12:59:36reviewbotsetmessages: + msg32032
2017-02-17 11:46:34restevesetnosy: + resteve

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