diff --git a/README.md b/README.md index f86e6fb..4616d00 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ addon | version | summary --- | --- | --- [mis_template_financial_report](mis_template_financial_report/) | 2.0.1.0.0| Profit & Loss / Balance sheet MIS templates [account_move_line_report_xls](account_move_line_report_xls/) | 2.0.1.0.1| Journal Items Excel export -[account_tax_balance](account_tax_balance/) | 2.0.1.2.3| Compute tax balances based on date range +[account_tax_balance](account_tax_balance/) | 2.0.1.2.4| Compute tax balances based on date range [account_financial_report](account_financial_report/) | 2.0.2.0.0| OCA Financial Reports [mis_builder_cash_flow](mis_builder_cash_flow/) | 2.0.1.0.0| MIS Builder Cash Flow [partner_statement](partner_statement/) | 2.0.1.1.0| OCA Financial Reports diff --git a/account_tax_balance/__manifest__.py b/account_tax_balance/__manifest__.py index e98fb01..3a78e6d 100644 --- a/account_tax_balance/__manifest__.py +++ b/account_tax_balance/__manifest__.py @@ -6,7 +6,7 @@ { "name": "Tax Balance", "summary": "Compute tax balances based on date range", - "version": "2.0.1.2.3", + "version": "2.0.1.2.4", "development_status": "Mature", "category": "Invoices & Payments", "website": "https://gitlab.com/flectra-community/account-financial-reporting", diff --git a/account_tax_balance/models/account_tax.py b/account_tax_balance/models/account_tax.py index 6eac23a..19b050e 100644 --- a/account_tax_balance/models/account_tax.py +++ b/account_tax_balance/models/account_tax.py @@ -180,11 +180,11 @@ class AccountTax(models.Model): domain = self.get_move_lines_domain( tax_or_base=tax_or_base, financial_type=financial_type ) - action = self.env.ref("account.action_account_moves_all_tree") - vals = action.sudo().read()[0] - vals["context"] = {} - vals["domain"] = domain - return vals + xmlid = "account.action_account_moves_all_tree" + action = self.env["ir.actions.act_window"]._for_xml_id(xmlid) + action["context"] = {} + action["domain"] = domain + return action def view_tax_lines(self): self.ensure_one() diff --git a/account_tax_balance/wizard/open_tax_balances.py b/account_tax_balance/wizard/open_tax_balances.py index d8bc3bc..48e45f6 100644 --- a/account_tax_balance/wizard/open_tax_balances.py +++ b/account_tax_balance/wizard/open_tax_balances.py @@ -40,13 +40,13 @@ class WizardOpenTaxBalances(models.TransientModel): def open_taxes(self): self.ensure_one() - action = self.env.ref("account_tax_balance.action_tax_balances_tree") - act_vals = action.sudo().read()[0] + xmlid = "account_tax_balance.action_tax_balances_tree" + action = self.env["ir.actions.act_window"]._for_xml_id(xmlid) # override action name doesn't work in v12 or v10 # we need to build a dynamic action on main keys vals = { - x: act_vals[x] - for x in act_vals + x: action[x] + for x in action if x in ( "res_model",