From 50df5eb6c09fd0ce91ec87ba9a4432415b31b0fb Mon Sep 17 00:00:00 2001 From: Flectra Community Bot Date: Sun, 6 Feb 2022 03:11:54 +0000 Subject: [PATCH] Automatic Update form OCA2FC Migrator --- README.md | 2 +- account_cutoff_base/__manifest__.py | 2 +- account_cutoff_base/models/account_cutoff.py | 10 ++++------ 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 8dd5efb..48dd100 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,6 @@ addon | version | summary [account_cutoff_accrual_picking](account_cutoff_accrual_picking/) | 2.0.1.1.0| Accrued expense & accrued revenue from pickings [account_invoice_start_end_dates](account_invoice_start_end_dates/) | 2.0.1.1.0| Adds start/end dates on invoice/move lines [account_cutoff_start_end_dates](account_cutoff_start_end_dates/) | 2.0.1.0.0| Cutoffs based on start/end dates -[account_cutoff_base](account_cutoff_base/) | 2.0.1.2.0| Base module for Account Cut-offs +[account_cutoff_base](account_cutoff_base/) | 2.0.1.2.1| Base module for Account Cut-offs diff --git a/account_cutoff_base/__manifest__.py b/account_cutoff_base/__manifest__.py index 12b6b41..9d42591 100644 --- a/account_cutoff_base/__manifest__.py +++ b/account_cutoff_base/__manifest__.py @@ -4,7 +4,7 @@ { "name": "Account Cut-off Base", - "version": "2.0.1.2.0", + "version": "2.0.1.2.1", "category": "Accounting & Finance", "license": "AGPL-3", "summary": "Base module for Account Cut-offs", diff --git a/account_cutoff_base/models/account_cutoff.py b/account_cutoff_base/models/account_cutoff.py index f64dd5c..0cae51b 100644 --- a/account_cutoff_base/models/account_cutoff.py +++ b/account_cutoff_base/models/account_cutoff.py @@ -305,7 +305,8 @@ class AccountCutoff(models.Model): self.write({"move_id": move.id, "state": "done"}) self.message_post(body=_("Journal entry generated")) - action = self.env.ref("account.action_move_journal_line").sudo().read()[0] + xmlid = "account.action_move_journal_line" + action = self.env["ir.actions.act_window"]._for_xml_id(xmlid) action.update( { "view_mode": "form,tree", @@ -336,11 +337,8 @@ class AccountCutoff(models.Model): return super().unlink() def button_line_tree(self): - action = ( - self.env.ref("account_cutoff_base.account_cutoff_line_action") - .sudo() - .read()[0] - ) + xmlid = "account_cutoff_base.account_cutoff_line_action" + action = self.env["ir.actions.act_window"]._for_xml_id(xmlid) action.update( { "domain": [("parent_id", "=", self.id)],