Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
5701 Widoki

am starting on odoo 12 and am trying create a research for my module bien like this

<!-- debut de la recherche-->

<record id="bien_search" model="ir.ui.view">
<field name="name">bien search</field>
<field name="model">immobilier.bien</field>
<field name="arch" type="xml">
<search string="Search Bien">

<!-- dans les balise search on commencer nos different type de recherche
field pour les recherche textuelle
balise orpheline separator pour passer vers les autre recherche hors textuelle
filter pour la recherche par filtre selon un champs spécifique
group pour les groupements
-->

<field name="etat" filter_domain="['|',('reference','ilike',self),('type_de_bien_id','ilike',self)]"/>

<!--avec sa nous auron une recherche par rapport a la reference et au type de bien par contre nous n'aurons pas le nom du filte alors il faut l'ajouter -->

<field name="reference"/>
<field name="type_de_bien_id"/>
<separator/>
<filter string="etat"/>
<filter string="type_de_bien_id"/>
<filter string="usage_id"/>
<filter string="appreciation_id"/>
<filter string="superficie"/>
<filter string="date"/>
<filter string="nb_piece"/>
<filter string="commune_id"/>
<group expand="0" string="Group By">
<filter string="commune_id" name="commune" context="{'group_by':'commune_id'}"/>
</group>
</search>
</field>
</record>
<!-- fin de la recherche -->

 but i got this error 

raise ValidationError(_('Invalid view %s definition in %s') % (view.name, view.arch_fs))
odoo.tools.convert.ParseError: "Invalid view bien search definition in immobilier/views/bien_views.xml
None" while parsing /home/mohamed/Odoo12/odoo/MyAddons/immobilier/views/bien_views.xml:94, near
<record id="bien_search" model="ir.ui.view">


Awatar
Odrzuć
Autor Najlepsza odpowiedź

probblem solved the field "etat" is a selection so i had to precise option of it 

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
1
lip 25
621
Validation Error Rozwiązane
4
lip 25
5225
Search a message Rozwiązane
1
lut 25
1307
0
wrz 23
2264
2
cze 23
4103