Odoo Help

0

How to enter my field data to ir.model.fields?

By
arsalan
on 4/24/14, 8:24 AM 1,480 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

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.

Register

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

0 follower(s)

Stats

Asked: 4/24/14, 8:24 AM
Seen: 1480 times
Last updated: 3/16/15, 8:10 AM