Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to extended the Address in OpenERP(Odoo)?

    • 0
    • 2
    • 1
    • 1
    • 0
    • 0
    • 0
    • 0
    • 347
    Comment on it

    To extended the Address first we have to go in .py file (Python file) After that we have to decide where we want extended the Address and then write start to end python code to that field.
    Use below .py code in python file:
    In below example, I have customized .py file. You can directly copy the below python code in your .py file. -

    class address_extended_places(orm.Model):
        _name ='address_extended.places'
        _order='name'
    
        country_id  = fields.Many2one('res.country','Country', required=True)
        state_id    = fields.Many2one('res.country.state', 'Fed. State', change_default=True, domain="[('country_id','=',country_id)]")
        parent_id   = fields.Many2one('address_extended.places', 'Parent')
        name        = fields.Char('Name', size=100, required=True)
        active      = fields.Boolean('Active', default=True)
    
    
    
    class res_partner(orm.Model):
        _inherit ='res.partner'
    
        place_id_1  = fields.Many2one('address_extended.places','Place (level 1)')
        place_id_2  = fields.Many2one('address_extended.places','Place (level 2)')
        place_id_3  = fields.Many2one('address_extended.places','Place (level 3)')
    
    

 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: