odoo/odoo#203447
Created by fw-bot
Statuses:
- legal/cla: Contributor License Agreement check
- ci/runbot: Odoo Test Suite
- ci/upgrade_enterprise: Test upgrades for enterprise master
- ci/template: Contact runbot team on discord for help.
- ci/style: Optional style check. Ignore it only if strictly necessary.
- ci/security: Required security check. Can only be ignored by security team.
- label
- odoo-dev:saas-18.2-18.0-fix-mandatory-analytic-plans-srma-425381-fw
- head
- 6850b6d2470baf96d2cfcae7813660b6dbf2cbdf
- merged
- 7 months ago by Accounting, Maira Salazar
| odoo/odoo | |
|---|---|
| 16.0 | #201560 |
| 17.0 | #203006 |
| saas-17.4 | #203153 |
| 18.0 | #203194 |
| saas-18.1 | #203338 |
| saas-18.2 | #203447 |
| saas-18.3 | |
| saas-18.4 | |
| 19.0 | |
| master | #203480 |
[FW][IMP] account: validate mandatory analytic plans when batch posting
When we have an Analytic Plan being Mandatory, confirming an invoice from the form view, if it has a line without an Analytic distribution, correctly raises a ValidationError.
Confirming invoices from the list view does not raise the same error, yet it should.
To replicate:
1. Activate Analytic accounting:
a. Install accountant
b. In Settings, activate Analytic Accounting
c. Create an Analytic plan (with an Analytic account associated)
2. Set its default applicability to mandatory
3. Create two invoices, remove the analytic distribution from one of the lines in one invoice.
4. In the invoices list view, select both newly created invoices, click on Actions > Confirm Entries
5. Click Confirm
6. The invoices were posted, even though they have no analytic distributions.
Ticket link
opw-4603919