diff options
| author | wan <wan@odoo.com> | 2019-11-27 15:57:42 +0000 |
|---|---|---|
| committer | wan <wan@odoo.com> | 2020-02-05 13:59:43 +0000 |
| commit | dfd01b8c5c7e1177f37bf199790a0732a61eed78 (patch) | |
| tree | 6ebb7f50ba554fb4138954c958f799836aae91a7 /addons/account/wizard/__init__.py | |
| parent | a6d7c7b04a48669037e6568849a26571602386f6 (diff) | |
[IMP] account: rework name sequences
Task 2146469
Rework the name computation:
* It doesn't use ir.sequence anymore
* It is an editable computed field
* Add a renaming tool
This allows the user to tweak the sequences more easily than having to
get through the ir.sequence settings.
The sequence depends on a parameter of the journal: continuous, montly
and yearly restart of the sequence. Everytime a new period is started,
try to make a pattern form another period.
The incrementing is done by taking the previous name, ordered
lexicographically, splitting it by taking the digits at the end, adding
1 and re contstruct with the prefix.
** This means there could be cases where the prefix has a big importance
on the next number. For instance, if you have
INVOICE/2019/0001
INVOICE/2019/0002
and then rename the last one to INV/2019/0002, don't expect the next
number to be INV/2019/0003. It will be INVOICE/2019/0002 (again) because
the highest number was INVOICE/2019/0001.
You will then end up with
INVOICE/2019/0001
INV/2019/0002
INVOICE/2019/0002
closes odoo/odoo#41485
Related: odoo/enterprise#7189
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
Diffstat (limited to 'addons/account/wizard/__init__.py')
| -rw-r--r-- | addons/account/wizard/__init__.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/addons/account/wizard/__init__.py b/addons/account/wizard/__init__.py index f213b3126f8..9be1a3ef8d1 100644 --- a/addons/account/wizard/__init__.py +++ b/addons/account/wizard/__init__.py @@ -10,6 +10,7 @@ from . import account_move_reversal from . import account_report_common from . import account_report_common_journal from . import account_report_print_journal +from . import account_resequence from . import setup_wizards from . import wizard_tax_adjustments from . import account_invoice_send |
