コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
15748 ビュー

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. 

アバター
破棄
最善の回答

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

関連投稿 返信 ビュー 活動
1
11月 24
3382
2
10月 17
6991
2
12月 16
11755
1
5月 16
5632
4
2月 25
2334