Skip to Content
Menu
This question has been flagged
1 Reply
14376 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. 

Avatar
Discard
Best Answer

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>

    

 

Avatar
Discard
Author

Thank you, This solved my problem

Related Posts Replies Views Activity
1
Nov 24
1867
2
Oct 17
5657
2
Dec 16
10508
1
May 16
4265
1
Aug 24
421