跳至内容
菜单
此问题已终结
2 回复
3136 查看

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.

相关帖文 回复 查看 活动
1
3月 23
1947
1
7月 25
2405
2
7月 25
7893
2
7月 25
4301
2
7月 25
4040