Comment 16 for bug 724131

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

Hello,

Kriti and Rucha,

i seems quite better now. But eventually, let me criticize a bit the signature of the new
_prepare_order_line_invoice(self, cr, uid, orders, line_ids, *args)
method you introduced here http://bazaar.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-724131-ksa/revision/5491

Two things don't feel right for me:
1) why pass the orders param. Eventually pass just the order (although you can re(browse it from the order line) but is there any reason to pass the others orders? I mean may be but I'm just curious.
2) the other argument is line_ids. Too me it seems wrong as it has the _id suffix while it's not a id integer but a browse object and also it's in plural while it's actually a single order line. This seems rather confusing to me when you then have in the code things like if line_ids.product_id...
Wouldn't it be better to just call it order_line instead?

Thanks.