Comment 21 for bug 724131

Revision history for this message
Raphaƫl Valyi - http://www.akretion.com (rvalyi) wrote :

Hello Quentin,

sorry, I have one last little objection with the current code:

You here defined the following method:
def prepare_inv_line(self, cr, uid, account_id, order_line, context=None)

But in other parts of the code, we rather defined such methods with an underscore prefix such as:
_prepare_inv_line(self, cr, uid, account_id, order_line, context=None)

the reason we did that is because we expect arguments such as order_line which are non RPC serializable primitive objects but server specific "browse" objects. By adding an underscore we avoid to expose those methods as an RPC webservice.

I would expect you would have followed the same convention here. Or else if it's not a good one, let's rework the other such methods to make it consistent.

What do you think?