def METHOD_NAME(self):
    ctx = self._context.copy()
    model = "l10n_br_fiscal.document"
    if self.fiscal_operation_type == "out":
        ctx.update(
            {
                "default_fiscal_operation_type": "out",
                "default_fiscal_operation_id": self.id,
            }
        )
    elif self.fiscal_operation_type == "in":
        ctx.update(
            {
                "default_fiscal_operation_type": "in",
                "default_fiscal_operation_id": self.id,
            }
        )
    return {
        "name": _("Create invoice/bill"),
        "type": "ir.actions.act_window",
        "view_type": "form",
        "view_mode": "form",
        "res_model": model,
        "view_id": self.env.ref("l10n_br_fiscal.document_form").id,
        "context": ctx,
    }