Code review comment for lp:~pedro.baeza/account-payment/7.0-account_payment_extension_store

Revision history for this message
Guewen Baconnier @ Camptocamp (gbaconnier-c2c) wrote :

    result = {}
    line_obj = self.pool['payment.line']
    for line in line_obj.browse(cr, uid, ids, context=context):
        result[line.move_line_id.id] = True
        result[line.payment_move_id.id] = True
    return result.keys()

is a somewhat awkward manner to do:

    result = set()
    line_obj = self.pool['payment.line']
    for line in line_obj.browse(cr, uid, ids, context=context):
        result.add(line.move_line_id.id)
        result.add(line.payment_move_id.id)
    return list(result)

On line 72 of the diff:

    'account.move.line': (lambda self, cr, uid, ids, c={}: ids,

There is a mutable default argument, it should be replaced by None

Would you agree to change that?
Thanks

review: Needs Fixing

« Back to merge proposal