Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to Create write function in openerp

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 420
    Comment on it

    To create writer function in openerp you have to override the create and write methods, as show in example below. Example:- use this code to write and override function in openerp

    def write(self, cr, uid, ids, values, context = None):
       res = super(MyChildClass, self).write(cr, uid, ids, values, context = context)
       if 'child_field' in values:
          for child_item in self.browse(cr, uid, ids, context = context):
              self.pool.get('my.parent.model').write(cr, uid, [child_item.parent_id.id], {'parent_field': values['child_field'],}, context = context) 
    
       return res
    

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: