Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
  • Wizards in Odoo9

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 270
    Comment on it

    Wizards is used to show the view of any project in Odoo and the interactive sessions with user (or dialog boxes) through dynamic forms is also described by Wizards. A wizard is simply a model that extends the class TransientModel instead of Model. The class TransientModel extends Model and reuse all its existing mechanisms. for example you can see below code.

    from . import controllers
    from . import models
    from . import partner
    from . import wizard
    # -*- coding: utf-8 -*-
    from openerp import models, fields, api
    class Wizard(models.TransientModel):
        _name = 'openacademy.wizard'
        session_id = fields.Many2one('openacademy.session',
            string="Session", required=True)
        attendee_ids = fields.Many2many('res.partner', string="Attendees")

    Note- the above example ststes a wizard model with a many2one relationship with the Session model and a many2many relationship with the Partner model.

 0 Comment(s)

Sign In

Sign up using

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: