nitesh
nitesh

Reputation: 266

How to restrict entires for one2many field in Openerp

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

Upvotes: 0

Views: 850

Answers (1)

Ruchir Shukla
Ruchir Shukla

Reputation: 805

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

Upvotes: 3

Related Questions