Skip to content

Commit d156b56

Browse files
committed
[IMP] subscription_oca: Use _for_xml_id in action_open_subscription
1 parent 194b279 commit d156b56

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

subscription_oca/models/account_move.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ class AccountMove(models.Model):
1313

1414
def action_open_subscription(self):
1515
self.ensure_one()
16-
action = self.env.ref("subscription_oca.sale_subscription_action")
17-
action = action.read()[0]
16+
action = self.env["ir.actions.act_window"]._for_xml_id(
17+
"subscription_oca.sale_subscription_action"
18+
)
1819
action["domain"] = [("id", "=", self.subscription_id.id)]
1920
return action

0 commit comments

Comments
 (0)