OpenERP : create new record ,one2many many2one relationship
问题 I have created on2many field in class A and other field nombre (integer): 'Inventaire' : fields.one2many('class.b','id_classb'), 'nombre' : fields.integer('Nombre'), In class b : 'id_classb' : fields.many2one('class.a', 'ID_classA'), 'ql' : fields.integer('QL'), I want to create a function in class a that create records for object b according to the value of nombre field. for example if nombre =3 I should create 3 object of class b here is my function: def save_b(self, cr, uid, ids, field