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

Hello Everyone,

Nice to meet you again!

I'm getting the following error(Parse Error) while installing the module

odoo.tools.convert.ParseError: while parsing File Path:39, near

Code Snippet

<record id="country_rule" model="ir.rule">

    <field name="name">Country</field>

    <field name="model_id" ref="model_model_name"/>

    <field name="domain_force">['|', ('company_id', 'child_of', company_ids), ('company_id', 'parent_of', company_ids)]</field>

</record>

I don't know what am i missing the above code, Can you help me to figure it out?


Thanks in Advance !

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

I think the model ref is not correct. What model do you actually want to apply your rule to? I guess something more like 'model_sale_order' or some custom model you created...

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

Try this

<record id="country_rule" model="ir.rule">
            <field name="name">Country</field>
            <field name="model_id" ref="base.model_res_country"/>
            <field name="domain_force">['|', ('company_id', 'child_of', company_ids), ('company_id', 'parent_of', company_ids)]</field>
        </record>
Thanks
อวตาร
ละทิ้ง
ผู้เขียน

Hi Husain,

Thanks for your update, but that's also throwing the same error.

Related Posts ตอบกลับ มุมมอง กิจกรรม
1
มี.ค. 23
1933
1
ก.ค. 25
2399
2
ก.ค. 25
7889
2
ก.ค. 25
4295
2
ก.ค. 25
4031