Skip to content

Commit

Permalink
[IMP] subscription_oca: Use _for_xml_id in action_open_subscription
Browse files Browse the repository at this point in the history
  • Loading branch information
tarteo committed Jan 28, 2025
1 parent 194b279 commit d156b56
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions subscription_oca/models/account_move.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ class AccountMove(models.Model):

def action_open_subscription(self):
self.ensure_one()
action = self.env.ref("subscription_oca.sale_subscription_action")
action = action.read()[0]
action = self.env["ir.actions.act_window"]._for_xml_id(
"subscription_oca.sale_subscription_action"
)
action["domain"] = [("id", "=", self.subscription_id.id)]
return action

0 comments on commit d156b56

Please sign in to comment.