def METHOD_NAME(self):
    active_id = self.env.context.get("active_id", False)
    if not active_id:
        raise UserError(_("No active ID found."))
    move_model = self.env["account.move"]
    distinta_model = self.env["riba.distinta"]
    distinta = distinta_model.browse(active_id)
    wizard = self
    if (
        not wizard.accreditation_journal_id
        or not wizard.accreditation_account_id
        or not wizard.bank_account_id
        or not wizard.bank_expense_account_id
    ):
        raise UserError(_("Every account is mandatory."))
    move_vals = {
        "ref": _("C/O Credit %s") % distinta.name,
        "journal_id": wizard.accreditation_journal_id.id,
        "line_ids": [
            (
                0,
                0,
                {
                    "name": _("Credit"),
                    "account_id": wizard.accreditation_account_id.id,
                    "credit": wizard.accreditation_amount,
                    "debit": 0.0,
                },
            ),
            (
                0,
                0,
                {
                    "name": _("A/C Bank"),
                    "account_id": wizard.bank_account_id.id,
                    "debit": wizard.bank_amount,
                    "credit": 0.0,
                },
            ),
        ],
    }
    if wizard.expense_amount:
        move_vals["line_ids"].append(
            (
                0,
                0,
                {
                    "name": _("Bank Fee"),
                    "account_id": wizard.bank_expense_account_id.id,
                    "debit": wizard.expense_amount,
                    "credit": 0.0,
                },
            ),
        )
    move = move_model.create(move_vals)
    vals = {
        "accreditation_move_id": move.id,
        "state": "accredited",
    }
    if not distinta.date_accreditation:
        vals.update({"date_accreditation": fields.Date.context_today(self)})
    distinta.update(vals)
    for line in distinta.line_ids:
        line.state = "accredited"
    return {
        "name": _("Credit Entry"),
        "view_mode": "form",
        "res_model": "account.move",
        "type": "ir.actions.act_window",
        "target": "current",
        "res_id": move.id or False,
    }