Skip to Content
Menu
This question has been flagged
1 Reply
1465 Views

getting validation error

File "/mnt/extra-addons/insight_merchant_base/models/res_users.py", line 22, in create
    raise ValidationError(_("Sorry !! You cannot create more users"))
odoo.tools.convert.ParseError: "Sorry !! You cannot create more users


my xml file.
<record model="res.partner" id="partner_manager">
<field name="name">Manager</field>
<field name="company_id" ref="base.main_company"/>
<!--<field name="customer" eval="False"/>-->
<field name="email">manager@example.com</field>
<!--<field name="image" type="base64" file="base/static/img/avatar.png"/>-->
</record>

<!-- user 3 is the human Manager user -->
<record id="pk_user_manager" model="res.users">
<field name="name">manager</field>
<field name="login">manager</field>
<field name="password">manager</field>
<field name="partner_id" ref="partner_manager"/>
<field name="company_id" ref="base.main_company"/>
<field name="company_ids" eval="[(4, ref('base.main_company'))]"/>
<field name="groups_id" eval="[(4, ref('point_of_sale.group_pos_manager')), (4, ref('stock.group_stock_user'))]"/>
<field name="signature"><![CDATA[<span>-- <br/>
Manager</span>]]></field>
</record>
Avatar
Discard
Best Answer

Hello Paidy Kumar,

I followed the same steps that you have mentioned in the code and I am able to create users and partners. There is no error in the XML code.

The error which you have mentioned, it is coming from the custom module "insight_merchant_base". Please update the create method of res. users model which you wrote in the res_users.py file of insight_merchant_base module.

Thank you!

Regards,




Email:      odoo@aktivsoftware.com  

Skype: kalpeshmaheshwari

   

Avatar
Discard
Related Posts Replies Views Activity
4
May 24
10066
1
Apr 24
1561
0
Nov 23
523
1
Sep 23
561
2
Aug 23
2421