-
- Downloads
[FIX] account : Deprecated accounts shall not appear in suggestions
[Problem]
Before this commit, depreceted accounts were visible in the suggestions.
To reproduce:
- run odoo 16.0 (onward) with modules: account,account_accountant
- deprecate all, but 3 accounts (UPDATE account_account SET deprecated=true WHERE id>3;)
- go to: invoicing app -> Vendors -> Bills -> New
- pick a vendor -> add a line -> click on dropdown in the Account column
- see the deprecated accounts are showed in suggestion (we don't want deprecated accounts in suggestions)
[Solution]
Modified SQL query, such that only not deprecated accounts will appear.
[Testing]
Created test in test_account_account:
It runs function with modified sql query twice:
- with certain account not deprecated -> extected that this account appears in the results
- with the same account deprecated -> extected that this account won't appears in the results
opw-3485768
closes odoo/odoo#135884
Signed-off-by:
Andrea Grazioso (agr) <agr@odoo.com>
Loading
Please register or sign in to comment