Skip to content

invoice_multi_approval/models/account_move v18: error in create when called with list of multiple values #389

@sneldev

Description

@sneldev
@api.model_create_multi
def create(self, vals_list):
    """Super the create function adding approvers while create account
         move through sale /purchase
    :param vals_list: dictionary with the detaisl of current record set
    :return: record"""
    res = super(AccountMove, self).create(vals_list)
    res._onchange_partner_id() <------------------------------ this is wrong as res can be a recordset with more than 1 record
    return res

Consider replacing this line with

[r._onchange_partner_id() for r in res]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions