This question has been flagged
2457 Views

What i am trying to achieve here is on clicking Add an item ...popup should come up listing all products with checkboxes...i want to select multiple products and that should get added in order lines. 

I changed order_line field to many2many.

#'order_line': fields.many2many('sale.order.line', 'order_id', 'Order Lines', readonly=True, states={'draft': [('readonly', False)], 'sent': [('readonly', False)]}, copy=True),

After that it lists all order lines.

Then added following line in sale_order_line class

'm2m_prod': fields.many2many('product.product', 'm2m_table', 'order_lineid', 'product_id', 'M2M products'),But still it lists all order lines.

do we have to modify sale_view.py also?

Avatar
Discard