[FIX] account: search for deprecated account
Duplicate the default Account Payable (211000) Set the default Account Payable to Deprecated Create a Vendor Bill with a line Save Error will raise The account Account Payable (211000) is deprecated. opw-3199157 opw-3229350 closes odoo/odoo#120799 X-original-commit: 0dc11ed2e4e530ddefe4310fa6bef7001f20ecc1 Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com> Signed-off-by: Grazioso Andrea (agr) <agr@odoo.com>
This commit is contained in:
@@ -543,6 +543,7 @@ class AccountMoveLine(models.Model):
|
||||
FROM account_account account
|
||||
WHERE account.company_id = ANY(%(company_ids)s)
|
||||
AND account.account_type IN ('asset_receivable', 'liability_payable')
|
||||
AND account.deprecated = 'f'
|
||||
)
|
||||
SELECT * FROM previous
|
||||
UNION ALL
|
||||
|
||||
Reference in New Issue
Block a user