-
- Downloads
[REF] account: journal items reconciliation (part 1/2)
This commits refactors the code of the reconciliation, in order to facilitate the process of complex use cases, namely multi-currencies or cash-basis-taxes related (see details below). It also prepares the code for a second refactoring where we will save on each journal items the amount_currency and currency_id field (even in case of operation made in company currency), also in the sake of simplification.
1) Multi-currencies:
- the account.partial.reconcile model now will have dedicated columns to specify the amount of the partial reconciliation in the debit_line_id currency and the credit_line_id currency. That comes in handy when dealing with journal items having different secondary currencies, but also allows some simplification.
- residual_amount_currency computation changed accordingly
- moved models account.full.reconcile and account.partial.reconcile in their dedicated .py file
2) Cash basis taxes
- cash basis entries now handle correctly rounding errors to make sure the exact amount of gets reported when the reconciliation becomes full.
- the account for the base amount of cash basis entries has to be set, now, on the company instead of on each cash basis tax.
- that new 'property' field can be set at the CoA installation via the field property_cash_basis_base_account_id of account.chart.template, or going through the accounting settings.
Was task task: 2243420
Was PR #50308
Related: odoo/upgrade#1121
Related: odoo/enterprise#10252
Signed-off-by:
Quentin De Paoli (qdp) <qdp@openerp.com>
Showing
- addons/account/models/__init__.py 2 additions, 0 deletionsaddons/account/models/__init__.py
- addons/account/models/account_full_reconcile.py 37 additions, 0 deletionsaddons/account/models/account_full_reconcile.py
- addons/account/models/account_move.py 680 additions, 792 deletionsaddons/account/models/account_move.py
- addons/account/models/account_partial_reconcile.py 612 additions, 0 deletionsaddons/account/models/account_partial_reconcile.py
- addons/account/models/account_tax.py 0 additions, 6 deletionsaddons/account/models/account_tax.py
- addons/account/models/chart_template.py 8 additions, 8 deletionsaddons/account/models/chart_template.py
- addons/account/models/company.py 11 additions, 1 deletionaddons/account/models/company.py
- addons/account/models/res_config_settings.py 6 additions, 0 deletionsaddons/account/models/res_config_settings.py
- addons/account/static/src/js/account_payment_field.js 7 additions, 19 deletionsaddons/account/static/src/js/account_payment_field.js
- addons/account/static/src/xml/account_payment.xml 1 addition, 1 deletionaddons/account/static/src/xml/account_payment.xml
- addons/account/static/tests/account_payment_field_tests.js 4 additions, 5 deletionsaddons/account/static/tests/account_payment_field_tests.js
- addons/account/tests/__init__.py 2 additions, 0 deletionsaddons/account/tests/__init__.py
- addons/account/tests/common.py 41 additions, 1 deletionaddons/account/tests/common.py
- addons/account/tests/test_account_move_payments_widget.py 184 additions, 0 deletionsaddons/account/tests/test_account_move_payments_widget.py
- addons/account/tests/test_account_move_reconcile.py 1635 additions, 0 deletionsaddons/account/tests/test_account_move_reconcile.py
- addons/account/tests/test_reconciliation.py 8 additions, 712 deletionsaddons/account/tests/test_reconciliation.py
- addons/account/views/account_chart_template_views.xml 0 additions, 1 deletionaddons/account/views/account_chart_template_views.xml
- addons/account/views/account_tax_views.xml 0 additions, 1 deletionaddons/account/views/account_tax_views.xml
- addons/account/views/report_payment_receipt_templates.xml 1 addition, 1 deletionaddons/account/views/report_payment_receipt_templates.xml
- addons/account/views/res_config_settings_views.xml 4 additions, 0 deletionsaddons/account/views/res_config_settings_views.xml
Loading
Please register or sign in to comment