def METHOD_NAME(self):
    self.ensure_one()
    action = self.env["ir.actions.act_window"]._for_xml_id(
        "account.action_move_journal_line"
    )
    if self.grouped_move_count == 1:
        action.update(
            {
                "view_mode": "form,tree,kanban",
                "views": False,
                "view_id": False,
                "res_id": self.grouped_move_ids.id,
            }
        )
    else:
        action["domain"] = [("id", "in", self.grouped_move_ids.ids)]
    ctx = self.env.context.copy()
    ctx.update({"search_default_misc_filter": 0})
    action["context"] = ctx
    return action