Tryton - Issues

 

Issue5205

Title Remove check_invoice_sequences
Priority feature Status chatting
Superseder Nosy List Timitos, ced, pokoli
Type feature request Components account_invoice
Assigned To Keywords
Reviews

Created on 2015-12-24.15:03:47 by ced, last changed by pokoli.

Messages
msg25741 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2016-05-03.17:16:19
To be precise the date to use for the check is the accounting date (which is the invoice date if not manually set).
msg23441 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2015-12-24.15:17:26
RFC: https://groups.google.com/d/topic/tryton/vaq3mURFeYs/discussion
msg23440 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2015-12-24.15:03:45
On the fiscal year and period, there is a check that ensure the same sequence is not used more than once ('check_invoice_sequences').
A part that such constraint written with SQL query is not safe against concurrent transactions, the discussion [1] shows that there are use cases where user wants to reuse the same sequence over different fiscal years.

Here is my proposal.
We drop the 'check_invoice_sequences' and replace it by a check when setting the number on an invoice to ensure that the invoice date not before any invoice dates numbered with the same sequence. With this constraint we ensure the correct usage of the sequence independently of the way the fiscal years are configured.
On the technical point of view, I think we will have to store on the invoice the sequence used.
Also this check is only useful for the 'out' invoices.

[1] https://groups.google.com/d/topic/tryton/a4fobeaYn48/discussion
History
Date User Action Args
2017-02-16 10:20:38pokolisetnosy: + pokoli
2016-11-28 20:25:17Timitossetnosy: + Timitos
2016-05-03 17:16:20cedsetmessages: + msg25741
2015-12-24 15:17:27cedsetmessages: + msg23441
2015-12-24 15:03:47cedcreate

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