Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
5705 มุมมอง

I wanted to update default template user from xml, but due to no update=1 on the xml it is not updating.  what is the best practice to update the template user? 

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

the best way to update the template user is to delete the template user using xml and create the same template user with your modification in it.

you can delete the user using 

<delete id="auth_signup.default_template_user" model="res.users"/>

and create it again(make sure you use the proper ID)

       <record id="auth_signup.default_template_user" model="res.users">
            <field name="name">New Template User</field>
            <field name="login">portaltemplate</field>
            <field name="active" eval="False"/>
            <field name="groups_id" eval="[(6, 0,  [ref('base.group_portal')])]"/>
        </record>

Hope this helps!

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
3
เม.ย. 23
7312
3
พ.ย. 15
5159
1
มี.ค. 25
1182
0
พ.ย. 24
1426
0
มิ.ย. 24
1489