When i creating Quotation i need to give only 2 Orderline items.How to restrict them to only 2 entries.Can any one help me? Thank's in advance
Asked
Active
Viewed 835 times
1 Answers
3
Use the _constraint in py file. and in function check the length of the orderlines. and raise an error in case of the more than 2 lines found

Ruchir Shukla
- 805
- 6
- 13
-
Can you please say me How can i check the number of orderlines – nitesh May 30 '14 at 10:29
-
self_obj = self.browse(cr, uid, ids, context=context); lenth = len(self_obj.orderline) – Ruchir Shukla Jun 10 '14 at 11:43
-
Can u please tell me in which function i need to add these line – nitesh Jun 10 '14 at 12:26
-
you have to create new function for and add in _constraint . please check addons/product/product.py for ean13 check constraints – Ruchir Shukla Jun 11 '14 at 13:22