Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
2 Ответы
4762 Представления

I have this search view in Odoo v12

<record id="search_tardis_product" model="ir.ui.view">
    <field name="name">tardis.product.search</field>
    <field name="model">tardis.product</field>
    <field name="arch" type="xml">
        <search name="Unique Rocket Part">
            <field name="product_id"/>
            <field name="department_id"/>
            <field name="responsible_id"/>
            <field name="id" modifiers="{&quot;readonly&quot;: true}"/>
            <group expand="0" string="Group By">
                <filter context="{'group_by': 'make_buy'}" name="tardis_group_by_make_buy" string="Make / Buy"/>
                <filter context="{'group_by': 'department_id'}" name="tardis_group_by_department_id" string="Department"/>
                <filter context="{'group_by': 'product_category_id'}" name="tardis_group_by_product_category_id" string="Product Category"/>
                <filter context="{'group_by': 'responsible_id'}" name="tardis_group_by_responsible_id" string="Responsible Eng."/>
            </group>
            <filter domain="[[&quot;make_buy&quot;,&quot;=&quot;,&quot;buy&quot;]]" name="tardis_filter_make_buy" string="Only Buy"/>
        </search>
    </field>
</record>


And I'm getting the error

ValidationError(_('Invalid view %s definition in %s') % (view.name, view.arch_fs))

Not sure what's wrong. Do wish the errors were more helpful

Аватар
Отменить
Автор

@Niyas Raphy why are you commenting when there's already an answer, and a better one for that matter

Лучший ответ

The <search> tag does not need any attributes. Remove "name" from the search tag.

According to the documentation: "The root element of search views is <search>. It takes no attributes."

Source: Search Views

Аватар
Отменить
Лучший ответ

Hi,

   Try Instead of <search name="Unique Rocket Part"> use <search string="Unique Rocket Part">

Аватар
Отменить
Related Posts Ответы Просмотры Активность
1
янв. 21
4273
1
дек. 19
2324
1
сент. 21
5428
1
дек. 19
4473
2
дек. 19
7877