Merge lp://staging/~scigghia/ocb-addons/7.0_prop_supplier_invoice_number into lp://staging/ocb-addons
Proposed by
Andrea Cometa
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Holger Brunn (Therp) | ||||
Approved revision: | no longer in the source branch. | ||||
Merged at revision: | 10163 | ||||
Proposed branch: | lp://staging/~scigghia/ocb-addons/7.0_prop_supplier_invoice_number | ||||
Merge into: | lp://staging/ocb-addons | ||||
Diff against target: |
12 lines (+1/-1) 1 file modified
account/account_invoice.py (+1/-1) |
||||
To merge this branch: | bzr merge lp://staging/~scigghia/ocb-addons/7.0_prop_supplier_invoice_number | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Holger Brunn (Therp) | code review | Approve | |
Stefan Rijnhart (Opener) | Approve | ||
giudalo (community) | Approve | ||
Carlo - Didotech.com (community) | Approve | ||
Andrea Cometa (community) | Abstain | ||
Review via email:
|
Description of the change
when paying a supplier invoice, with voucher, may be useful to show supplier invoice number instead of ref for supplier invoice, and invoice_number instead of ref or name for out invoice
I think this could be done in action_move_create in account.py done by this mp
To post a comment you must log in.
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.