Merge lp://qastaging/~camptocamp/openerp-fiscal-rules/7.0-wrong-onchange-1255918 into lp://qastaging/openerp-fiscal-rules
Status: | Merged | ||||
---|---|---|---|---|---|
Merged at revision: | 65 | ||||
Proposed branch: | lp://qastaging/~camptocamp/openerp-fiscal-rules/7.0-wrong-onchange-1255918 | ||||
Merge into: | lp://qastaging/openerp-fiscal-rules | ||||
Diff against target: |
33 lines (+8/-7) 1 file modified
account_fiscal_position_rule_sale/sale.py (+8/-7) |
||||
To merge this branch: | bzr merge lp://qastaging/~camptocamp/openerp-fiscal-rules/7.0-wrong-onchange-1255918 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Joël Grand-Guillaume @ camptocamp | code review, no tests | Approve | |
Raphaël Valyi - http://www.akretion.com | Approve | ||
Sébastien BEAU - http://www.akretion.com | no test, code review | Approve | |
Review via email:
|
Commit message
[FIX] kwargs is always None, fiscal position rule never applied
Description of the change
Fixes lp:1255918
The onchange_partner_id method had a couple of errors:
* The condition on shop_id to not apply the rules was reversed [0]
* {}.update() returns None, so kwargs was always None
* context was set as a value of context, resulting in a recursive data structure:
{'context': <Recursion on dict with id=120528752>, ...}
I took the decision here to no longer transform the context into **kwargs because it seems to me a hazardous operation. I think that the kwargs should be build solely with determined keys. If someone has a good reason to keep passing the context as **kwargs, please let me know.
LGTM, I think too that it's better to no transform the context into kwargs.