account journal numbering

Registered by Ferdinand

I suggest to create the following classes
account_period
* get_period(date)
* get_fiscalyear(period)

account_fiscalyear
* get_fiscalyear(date)

account_journal
* get_journal_number(date or period_id or fiscalyear_id) [1 or 3 classses? do not know eough of python]
* get_journal_invoice_number(date or period_id or fiscalyear_id)
these two call
* get_number(sequence_number,fiscalyear_id )
which itself calls existung ir_sequence

for yearly numbering we need a switch in account_journal (for each sequence and sequence_invoice)
* fiscal year (numbering follows the companies fiscal year definition)
* calendar year (example bank statements)

Fallback to current behaviour if no sequence are defined in journals
* must raise error if multiple sequence are defined for the same "code" to avoid random results.
(solved in invoice.py of https://code.launchpad.net/~openerp-commiter/openobject-addons/chricar_price_unit)

IMHO this should go ASAP (even currently as dead code) into 5.0.7 so it can be used to improve other modules
we would avoid a lot of troubles ....!

see also
def onchange_journal_id in account_bank_statement.py
https://bugs.launchpad.net/openobject-addons/+bug/523800
and the patch there

Blueprint information

Status:
Not started
Approver:
None
Priority:
Undefined
Drafter:
None
Direction:
Needs approval
Assignee:
None
Definition:
New
Series goal:
None
Implementation:
Unknown
Milestone target:
None

Related branches

Sprints

Whiteboard

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.