Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Relational fields in Odoo

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 365
    Comment on it

    If you want to make relational fields in OpenERP(Odoo) follow the below mentioned code and paste it in your model.py file: -

      name = fields.Char(string="Title", required=True)
        description = fields.Text()
    
    responsible_id = fields.Many2one('res.users',
    ondelete='set null', string="Responsible", index=True)
    
    
    class Session(models.Model):
        _name = 'openacademy.session'
        start_date = fields.Date()
        duration = fields.Float(digits=(6, 2), help="Duration in days")
        seats = fields.Integer(string="Number of seats")
    
    instructor_id = fields.Many2one('res.partner', string="Instructor")
    course_id = fields.Many2one('openacademy.course',
        ondelete='cascade', string="Course", required=True)
    

 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: