Merge lp://qastaging/~therp-nl/therp-backports/addons-6.1-lp754339_pricelist_on_invoice_line into lp://qastaging/therp-backports
Proposed by
Ronald Portier (Therp)
Status: | Merged |
---|---|
Merged at revision: | 6713 |
Proposed branch: | lp://qastaging/~therp-nl/therp-backports/addons-6.1-lp754339_pricelist_on_invoice_line |
Merge into: | lp://qastaging/therp-backports |
Diff against target: |
136 lines (+93/-24) 1 file modified
account/account_invoice.py (+93/-24) |
To merge this branch: | bzr merge lp://qastaging/~therp-nl/therp-backports/addons-6.1-lp754339_pricelist_on_invoice_line |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Stefan Rijnhart (Opener) (community) | Approve | ||
Review via email:
|
This proposal supersedes a proposal from 2013-01-04.
Description of the change
FIX lp754339.
Use the standard mechanism for determining prices that is also used for sales and purchase orders, when creating an invoice without order.
Based on a patch by Salvi Angjeli
Rewritten using suggestions from Stefan Rijnhart
Main change is to make the interface between the product_change and the price_unit_get functions as small as possible.
Also use suffixes on variable names (_model, _obj, _id ... as conistent as possible).
To post a comment you must log in.
Thanks, good on the whole. Got a couple of details:
l.8-12,33,66 To avoid conflicts with the official branch, prevent changes in whitespace.
l.20-25 For the same reason do not refactor
l.95 should say 'warning=None' but it looks like you can replace the argument by an initialisation in the method itself
l.55,94 remove price argument
l.96 So many arguments to this method, I would like to see it having a docstring explaining what they are.
l.123 can say "res[field]" instead of "eval('res.' + field)", even in the case of browse records
l.101 this is actually the default date anyway for currency rates and pricelist lookups so it does not need to be in the context
l.104-109 make translatable
Overall, naming of model pools is pretty random (_obj, obj_, _model). Can you make it a bit more consistent?
Thanks,
Stefan.