[7.0] [ocb] Method _get_lines signature changed
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenERP Community Backports (Addons) |
Confirmed
|
Undecided
|
Yannick Vaucher @ Camptocamp |
Bug Description
In revision 9599 (http://
I know that this method is internal, but we are using it in Spain to get taxes values for vat reports easily. The problem is not the change itself, but the difference with the official branch, so we cannot use the same code for both branches. For now, I'm going to use a workaround catching the exception or reading method definition, but please fix this ASAP.
I think one possible solution is to put the argument as keyword argument with default value None, but I have to test if it's correct, because I don't know that code.
Another thing that it's important is to prevent this kind of changes that provokes side effects, so maybe positional arguments must be forbidden. What do you think? Do I talk this on the community list?
Regards.
Changed in ocb-addons: | |
assignee: | nobody → Yannick Vaucher @ Camptocamp (yvaucher-c2c) |
I must say I had not expected anyone to call a method from this report from somewhere else, so I guess this demonstrates that signature changes are a bad idea in general indeed. Maybe in OCB the parameter can be passed in the context?