Skip to content

[8.0] Bad ID access #2

@stephen144

Description

@stephen144

In this snippet from _authorize_form_validate the account_id variable is an int, but later the id attribute is used again.

               account_id = partner_id.property_account_receivable.id
                voucher_id = self.env['account.voucher'].create({
                    'name': name,
                    'amount': pay_amount,
                    'company_id': invoice_id.company_id.id,
                    'journal_id': acquirer_id.journal_id.id,
                    'account_id': account_id.id,
                    'period_id': period_id.id,
                    'partner_id': partner_id.id,
                    'type': 'receipt',
                    'line_ids': [(0, 0, {
                        'name': name,
                        'payment_option': 'without_writeoff',
                        'amount': pay_amount,
                        'partner_id': partner_id.id,
                        'account_id': account_id.id,

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions