Odoo Help


how to get values od specific field like doing any fielter or onchange please check below code ?

shridhar b ivani
on 5/30/15, 2:44 AM 719 views

py code here i have one asset.cat module i have created one asset name as A and another is B .

in A i have created other names as 1,2 ,in B 3,4 .So i have made many2 one to asset_inspection their i have field asset_type and in tree vies as 'insp_name',

if i select A in tree 'insp_name' i have get only 1,2 ,if i select B in 'insp_name' i have to get 3,4 , how to this operation please post your answer

class asset_inspection(osv.Model):

_name = "asset.inspection"















_columns = {

'inspection_name':fields.char('Inspection Type',),


'shut_down':fields.selection(SHOUTDOWN_SELECTION,'Shout Down'),

'main_type':fields.char('Maintenance Type',),

'insp_id1' : fields.one2many('inspec.grid','insp_id','BoM',),

'ainsp_id1' : fields.one2many('assetinspec.grid','ainsp_id','Asset Maintenance',),

'asset_type': fields.many2one('asset.cat','Asset Categ')



class inspec_grid(osv.Model):

_name = 'inspec.grid'

_columns = {

'insp_name' : fields.many2one('assetcat.grid','Part'),

'insp_code' : fields.char('Code'),

'insp_quty' : fields.char('Quantity '),

'insp_uom' : fields.char('UoM'),

'insp_id': fields.many2one('asset.inspection','Insp Id'),



class assetinspec_grid(osv.Model):

_name = 'assetinspec.grid'

_columns = {

'ainsp_name' : fields.char('Asset Name'),

'ainsp_id': fields.many2one('asset.inspection','aInsp Id'),




#-----------------------------------------------------Asset Categories------------------------------------------------------

class asset_cat(osv.Model):

_name = "asset.cat"


_columns = {

'asset_catname':fields.char('Asset Type',),

'assetcat_id':fields.one2many('assetcat.grid','ainspcat_id','Asset Name',)



class assetcat_grid(osv.Model):

_name = 'assetcat.grid'


_columns = {

'ainspcat_name' : fields.char('Asset Names'),

'ainspcat_id': fields.many2one('asset.cat','AssetCat ID'),



About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 5/30/15, 2:44 AM
Seen: 719 times
Last updated: 5/30/15, 2:44 AM