fix remove_account_chart

This commit is contained in:
Chill
2023-02-17 14:05:49 +08:00
parent ca873f5b89
commit 40a1bbb0aa

View File

@@ -338,20 +338,8 @@ class ResConfigSettings(models.TransientModel):
def remove_account_chart(self): def remove_account_chart(self):
company_id = self.env.company.id company_id = self.env.company.id
self = self.with_context(force_company=company_id, company_id=company_id) self = self.with_company(self.env.company)
to_removes = [ to_removes = [
# 清除财务科目,用于重设
'res.partner.bank',
'account.move.line',
# 'account.invoice',
'account.payment',
'account.bank.statement',
# 'account.tax.account.tag',
'account.tax',
'account.account.tag',
# 'wizard_multi_charts_accounts',
'account.journal',
'account.account',
] ]
# todo: 要做 remove_hr因为工资表会用到 account # todo: 要做 remove_hr因为工资表会用到 account
# 更新account关联很多是多公司字段故只存在 ir_property故在原模型只能用update # 更新account关联很多是多公司字段故只存在 ir_property故在原模型只能用update