def METHOD_NAME(self, **kwargs):
    self.ensure_one()
    if self.move_type.startswith("out"):
        view_id = self.env.ref("account.view_move_form").id
    else:
        view_id = False
    return {
        "type": "ir.actions.act_window",
        "res_model": "account.move",
        "res_id": self.id,
        "views": [(view_id, "form")],
        "view_mode": "form",
        "target": "current",
        **kwargs,
    }