Skip to content
Snippets Groups Projects
user avatar
Andrzej(pian) authored
[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: default avatarAndrea Grazioso (agr) <agr@odoo.com>
2e1a28ec
History

Build Status Tech Doc Help Nightly Builds

Odoo

Odoo is a suite of web based open source business apps.

The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...

Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.

Getting started with Odoo

For a standard installation please follow the Setup instructions from the documentation.

To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials