osv.osv object in OpenERP:-
OSV is a openerp descriptor class which must inherit all the class modules for openerp development. In other words we can say that, In openerp osv.osv object is actually an orm.Model class and define a new object, you must define a new Python class then instantiate it. This class must inherit from the osv class in the osv module.
Example:-
class name_of_the_object(osv.osv):
_name = 'name.of.the.object'
_columns = {
// define field here
}
name_of_the_object()
Predefined fields:-
* _columns (required) -
In _columns to define field and field value store in database The object fields See the fields section for further details.
*_name (required) :-
Name of the object. Default value: None.
0 Comment(s)