← Back to team overview

openerp-community-reviewer team mailing list archive

Re: [Merge] lp:~scigghia/ocb-addons/7.0_prop_supplier_invoice_number into lp:ocb-addons

 

Review: Disapprove

It is true that there is a certain redundancy on the invoice form, having both the supplier_invoice_number and reference fields. Then again, they are not necessarily the same. When creating payment orders from the resulting move lines, we definately want the reference to be passed. Payments read the reference from the move line's 'ref' field, so I don't think the supplier_invoice_number is a good choice here and I favour the reference from the invoice.

Apart from the functional aspect, I wonder if this code actually works. The move line's 'ref' field is a related field on the same field on account.move and while the move's 'ref' value is specified explicitely here, I believe it to be overwritten when the move lines are created (the move lines are passed in (0, 0, {}) o2m notation). The move lines' value for 'ref' is determined around l.945 in account.py, depending on the invoice type. If I am not mistaken, this assignment is void anyway for that reason.


-- 
https://code.launchpad.net/~scigghia/ocb-addons/7.0_prop_supplier_invoice_number/+merge/208934
Your team OpenERP Community Backports Team is subscribed to branch lp:ocb-addons.


References