-
- Downloads
[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>
Showing
- addons/account/__manifest__.py 2 additions, 0 deletionsaddons/account/__manifest__.py
- addons/account/models/__init__.py 1 addition, 0 deletionsaddons/account/models/__init__.py
- addons/account/models/account.py 8 additions, 109 deletionsaddons/account/models/account.py
- addons/account/models/account_bank_statement.py 35 additions, 8 deletionsaddons/account/models/account_bank_statement.py
- addons/account/models/account_move.py 111 additions, 109 deletionsaddons/account/models/account_move.py
- addons/account/models/sequence_mixin.py 125 additions, 0 deletionsaddons/account/models/sequence_mixin.py
- addons/account/security/ir.model.access.csv 1 addition, 0 deletionsaddons/account/security/ir.model.access.csv
- addons/account/static/src/js/account_resequence_field.js 32 additions, 0 deletionsaddons/account/static/src/js/account_resequence_field.js
- addons/account/static/src/scss/variables.scss 14 additions, 0 deletionsaddons/account/static/src/scss/variables.scss
- addons/account/static/src/xml/account_resequence.xml 25 additions, 0 deletionsaddons/account/static/src/xml/account_resequence.xml
- addons/account/tests/test_account_move_entry.py 148 additions, 9 deletionsaddons/account/tests/test_account_move_entry.py
- addons/account/tests/test_account_move_in_invoice.py 0 additions, 27 deletionsaddons/account/tests/test_account_move_in_invoice.py
- addons/account/tests/test_account_move_in_refund.py 0 additions, 27 deletionsaddons/account/tests/test_account_move_in_refund.py
- addons/account/tests/test_account_move_out_invoice.py 3 additions, 30 deletionsaddons/account/tests/test_account_move_out_invoice.py
- addons/account/tests/test_account_move_out_refund.py 0 additions, 27 deletionsaddons/account/tests/test_account_move_out_refund.py
- addons/account/tests/test_reconciliation_matching_rules.py 3 additions, 4 deletionsaddons/account/tests/test_reconciliation_matching_rules.py
- addons/account/views/account.xml 1 addition, 0 deletionsaddons/account/views/account.xml
- addons/account/views/account_move_views.xml 9 additions, 21 deletionsaddons/account/views/account_move_views.xml
- addons/account/views/account_view.xml 1 addition, 16 deletionsaddons/account/views/account_view.xml
- addons/account/wizard/__init__.py 1 addition, 0 deletionsaddons/account/wizard/__init__.py
Loading
Please register or sign in to comment