This question has been flagged
7656 Views

Hello to all , my question is how can we enter our field details to "ir.model.fields" form. I have made a button and connectv it to a function for entering values to the "ir.model.fields" form. But on clicking the button I get the following error:

Properties of base fields cannot be altered in this manner! Please modify them through Python code, preferably through a custom addon!

my function :

def cron_d(self,cr,uid,ids,context):
        x_fields=self.pool.get('ir.model.fields')
        for id in ids:
            objn = self.pool.get('deg.form').browse(cr, uid, id)
             x_fields.write(cr, uid, ids,{'name':objn.name,'field_description':objn.name,'ttype':objn.data_type})

Please help me to fix the issue Thanks

Avatar
Discard