Odoo Help

Welcome!

This community 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.

0

How can i inherit res.users?

By
samba
on 7/28/14, 2:50 AM 1,899 views

I want to add two more columns "column1" and "column2" to res.users model. I want to show these two columns in the Settings -> users -> create -> in "Access Rights", "Other" menu. How can i proceed for this. 

2

Jagdish Panchal

--Jagdish Panchal--
2674
| 5 3 6
Gandhinagar, India
--Jagdish Panchal--

OpenERP Developer

Jagdish Panchal
On 7/28/14, 3:35 AM

Hi,

Try below code

class res_users(osv.osv):

    _inherit = 'res.users'

    _columns = {
        'column1': fields.char('column1', size=30),
        'column2': fields.char('column1', size=30),
        }

res_users()

    <record id="view_users_form_inherit" model="ir.ui.view">

        <field name="name">res.users.form.inherit</field>
        <field name="model">res.users</field>
        <field name="type">form</field>
        <field name="inherit_id" ref="base.view_users_form"/>
        <field name="arch" type="xml">
            <field name="company_id" position="after">
               <field name="column1" />
               <field name="column2" />
             </field>
        </field>
    </record>

    

 

Thank you, This solved my problem

samba
on 7/28/14, 5:46 AM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 7/28/14, 2:50 AM
Seen: 1899 times
Last updated: 3/16/15, 8:10 AM