[FIX] account: no default taxes on accounts

So fat, the default sale and purchase taxes were so on the
account.accounts depending on the user type id.
These taxes were meant to be used as default taxes on products
and not accounts, so this is not right.
It also is an issue since the default tax isn't visible
on the COA list until the user add it from the optional fields.

Task id # 3223731

closes odoo/odoo#116111

X-original-commit: f1a9414f3cbe83bfde7e401e90b641668bd0ca14
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
This commit is contained in:
Nicolas (vin)
2023-03-22 07:21:10 +01:00
parent d0657e1757
commit ae835037fc
-4
View File
@@ -579,10 +579,6 @@ class AccountAccount(models.Model):
def _onchange_account_type(self):
if self.internal_group == 'off_balance':
self.tax_ids = False
elif self.internal_group == 'income' and not self.tax_ids:
self.tax_ids = self.company_id.account_sale_tax_id
elif self.internal_group == 'expense' and not self.tax_ids:
self.tax_ids = self.company_id.account_purchase_tax_id
def _split_code_name(self, code_name):
# We only want to split the name on the first word if there is a digit in it