İçereği Atla
Odoo Menü
  • Portal
  • Ücretsiz deneyin
  • Uygulamalar
    Finans
    • Muhasebe
    • Faturalama
    • Masraf Yönetimi
    • Elektronik Çizelge (BI)
    • Belgeler
    • İmza
    Satış
    • Müşteri İlişkileri Yönetimi (CRM)
    • Satış
    • Satış Noktası Mağaza
    • Satış Noktası Restoran
    • Abonelikler
    • Kiralama
    Web Sitesi
    • Web Sitesi Oluşturucu
    • eTicaret
    • Blog
    • Forum
    • Canlı Sohbet
    • eÖğrenme
    Tedarik Zinciri
    • Envanter
    • Üretim
    • Ürün Yaşam Döngüsü Yönetimi
    • Satın Alma
    • Bakım
    • Kalite
    İnsan Kaynakları
    • Çalışanlar
    • İşe Alım
    • İzin
    • Değerlendirme
    • Referans
    • Filo Yönetimi
    Pazarlama
    • Sosyal Medyada Pazarlama
    • E-posta ile Pazarlama
    • SMS ile Pazarlama
    • Etkinlikler
    • Pazarlama Otomasyonu
    • Anket
    Hizmetler
    • Proje Yönetimi
    • Çalışma Çizelgeleri
    • Saha Hizmeti
    • Yardım Masası
    • Planlama
    • Randevular
    Verimlilik
    • Sohbet
    • Onay
    • Nesnelerin İnterneti
    • VoIP
    • Bilgi Bankası
    • WhatsApp
    Üçüncü taraf uygulamalar Odoo Stüdyo Odoo Bulut Platformu
  • Sektörler
    Perakende satış
    • Kitapçı
    • Giyim Mağazası
    • Mobilya Mağazası
    • Gıda Marketi
    • Hırdavat Dükkanı
    • Oyuncak Dükkanı
    Gıda ve Konaklama
    • Bar ve Pub
    • Restoran
    • Fast Food Restoranı
    • Konuk Evi
    • İçecek Distribütörü
    • Otel
    Gayrimenkul
    • Emlak Acentesi
    • Mimarlık Firması
    • İnşaat
    • Emlak Yönetimi
    • Bahçe Tasarımı
    • Mülk Sahipleri Derneği
    Uzmanlık
    • Muhasebe Firması
    • Odoo Partner
    • Pazarlama Ajansı
    • Hukuk Firması
    • Yetenek Kazanımı
    • Denetim ve Belgelendirme
    Üretim
    • Tekstil
    • Metal
    • Mobilyalar
    • Gıda
    • Bira fabrikası
    • Kurumsal Hediye
    Sağlık ve Spor
    • Spor Kulübü
    • Optik Mağazası
    • Fitness Merkezi
    • Sağlıklı Yaşam Merkezi
    • Eczane
    • Kuaför Salonu
    Ticaret
    • Tamirci
    • BT Donanım & Destek
    • Güneş Enerjisi Sistemleri
    • Ayakkabı İmalatçısı
    • Temizlik Hizmetleri
    • HVAC Hizmetleri
    Diğerleri
    • Kar Amacı Gütmeyen Kuruluş
    • Çevre Ajansı
    • Reklam Panosu Kiralama
    • Fotoğrafçılık
    • Bisiklet Kiralama
    • Yazılım Bayisi
    Tüm Sektörlere Göz Atın
  • Topluluk
    Öğrenim
    • Eğitim Araçları
    • Dokümantasyon
    • Sertifikasyonlar
    • Eğitim Etkinlikleri
    • Blog
    • Podcast
    Eğitim ve Gelişim
    • Eğitim Programı
    • Scale Up! İşletme Oyunu
    • Odoo'yu Ziyaret Edin
    Yazılım
    • İndirin
    • Sürümleri Kıyaslayın
    • Sürümler
    İş Birliği
    • Github
    • Forum
    • Etkinlikler
    • Çeviriler
    • Partner Olun
    • Partnerler için Hizmetler
    • Muhasebe Firmanızı Kaydettirin
    Hizmetler
    • Partner Bulun
    • Muhasebeci Bulun
    • Bir danışmanla görüşün
    • Kurulum Hizmetleri
    • Müşteri Referansları
    • Destek
    • Sürüm Yükseltme
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Demo randevusu alın
  • Fiyatlandırma
  • Yardım

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • Müşteri İlişkileri Yönetimi
  • e-Commerce
  • Muhasebe
  • Envanter
  • PoS
  • Proje Yönetimi
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Etiketler (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Etiketler (View all)
odoo accounting v14 pos v15
About this forum
Yardım

Error: NameError: name 'search_default_filter' is not defined

Abone Ol

Get notified when there's activity on this post

Bu soru işaretlendi
filtererrornameodoo12
1 Cevapla
5800 Görünümler
Avatar
Marco

Hi
I'm facing issue trying to remove dependencies to filter 'type_student' in a module inherited from res.partner.
My goal is to delete this error and to correctly add 'type_student' as default filter to other views.
Even if I delete every call of type_student the error still be there.
Can anyone help me?
Thanks in advice. Here is the code of my res_partner module that inherit from res.partner.

<!-- PARTNER -->
<record id="view_partner_form" model="ir.ui.view">
<field name="name">res.partner.form</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_partner_form"/>
<field name="arch" type="xml">

<xpath expr="//form" position="inside">

<header>

<button name="course_withdraw" type="object" string="Withdraw" states="active" class="oe_highlight"/>
<button name="course_rejoin" type="object" string="Rejoin" states="withdrawed" class="oe_highlight"/>

<field name="state" widget="statusbar"/>
</header>
</xpath>


<xpath expr="//field[@name='category_id']" position="after">
<field name="lesson_id"/>
</xpath>

<xpath expr="//page[@name='internal_notes']" position="before">

<page string="Gest Call">
<group>
<field name="is_student"/>
<field name="is_teacher"/>
<field name="is_operator"/>
<field name="topics" position="attribute" attrs="{'invisible':[('is_teacher','=',False)]}"/>
</group>
<group>
<field name="plan_ids">
<tree string="Plan">
<field name="title" />
<field name="plan_code" />
<field name="total_lesson_hours" />
</tree>
</field>
</group>
</page>

</xpath>
</field>
</record>


<!-- Contact search for gestcalls -->
<record id="view_search_gestcall_contact_form" model="ir.ui.view">
<field name="name">res.partner.search.form</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_res_partner_filter"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='name']" position="after">

<field name="lesson_id"/>
<field name="projects_ids"/>
<field name="gest_course_id"/>
<field name="plan_ids"/>
<field name="topics"/>
<field name="participation_hour"/>
<field name="tot_inserted_hours"/>
<field name="state"/>
<field name="is_student" />
<field name="is_teacher" />
<field name="is_operator" />
</xpath>
<xpath expr="//separator" position="after">
<filter string="Companies" name="type_company" domain="[('is_company','=', True)]"/>
<filter string="Operators" name="type_operator" domain="[('is_operator', '=', True)]"/>
<filter string="Teachers" name="type_teacher" domain="[('is_teacher', '=', True)]"/>
<filter string="Students" name="type_student" domain="[('is_student', '=', True)]"/>

<group expand="0" string="Group By">
<filter name="is_student" string="Students" domain="[('is_student','=',True)]" context="{'group_by' : 'state'}"/>
<filter name="is_teacher" string="Teachers" domain="[('is_teacher','=',True)]" context="{'group_by' : 'lesson_id'}"/>
<filter name="is_operator" string="Operator" domain="[('is_operator','=',True)]" context="{'group_by' : 'projects_ids'}"/>
</group>
</xpath>

</field>
</record>

<!-- Contact actions for gestcalls -->
<record id="gestcall_contact_action" model="ir.actions.act_window">
<field name="name">Contact</field>
<field name="res_model">res.partner</field>
<!-- <field name="type">ir.actions.act_window</field>-->
<field name="view_type">form</field>
<field name="view_mode">kanban,tree,form</field>

<field name="search_view_id" ref="view_search_gestcall_contact_form"/>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Add Contact
</p>
</field>
</record>


<record id="gestcall_kanban_contact_action_kanban" model="ir.actions.act_window.view">
<field name="sequence" eval="1" />
<field name="view_mode">kanban</field>
<field name="view_id" ref="base.res_partner_kanban_view" />
<field name="act_window_id" ref="gestcall_contact_action" />
</record>
<record id="gestcall_kanban_contact_action_tree" model="ir.actions.act_window.view">
<field name="sequence" eval="2" />
<field name="view_mode">tree</field>
<field name="view_id" ref="base.view_partner_tree" />
<!-- <field name="context">{search_default_type_company:1}</field>-->
<field name="act_window_id" ref="gestcall_contact_action" />
</record>
<record id="gestcall_kanban_contact_action_form" model="ir.actions.act_window.view">
<field name="sequence" eval="3" />
<field name="view_mode">form</field>
<field name="view_id" ref="base.view_partner_form" />
<field name="act_window_id" ref="gestcall_contact_action" />
</record>

here is the error

Error: NameError: name 'search_default_type_student' is not defined
http://0.0.0.0:8099/web/content/392-1a081a9/web.assets_backend.js:145
Traceback:
PY_ensurepy@http://0.0.0.0:8099/web/content/392-1a081a9/web.assets_backend.js:145:65
py.evaluate@http://0.0.0.0:8099/web/content/392-1a081a9/web.assets_backend.js:261:8
py.evaluate@http://0.0.0.0:8099/web/content/392-1a081a9/web.assets_backend.js:270:156
py.eval@http://0.0.0.0:8099/web/content/392-1a081a9/web.assets_backend.js:274:284
eval_contexts/<@http://0.0.0.0:8099/web/content/392-1a081a9/web.assets_backend.js:410:110
iterator@http://0.0.0.0:8099/web/content/327-b6c9587/web.assets_common.js:14:183
createReduce/<@http://0.0.0.0:8099/web/content/327-b6c9587/web.assets_common.js:17:8
_.mixin/</_.prototype[name]@http://0.0.0.0:8099/web/content/327-b6c9587/web.assets_common.js:69:526
eval_contexts@http://0.0.0.0:8099/web/content/392-1a081a9/web.assets_backend.js:408:136
eval_contexts/<@http://0.0.0.0:8099/web/content/392-1a081a9/web.assets_backend.js:410:253
iterator@http://0.0.0.0:8099/web/content/327-b6c9587/web.assets_common.js:14:183
createReduce/<@http://0.0.0.0:8099/web/content/327-b6c9587/web.assets_common.js:17:8
_.mixin/</_.prototype[name]@http://0.0.0.0:8099/web/content/327-b6c9587/web.assets_common.js:69:526
eval_contexts@http://0.0.0.0:8099/web/content/392-1a081a9/web.assets_backend.js:408:136
pyeval@http://0.0.0.0:8099/web/content/392-1a081a9/web.assets_backend.js:427:8
_preprocessAction@http://0.0.0.0:8099/web/content/392-1a081a9/web.assets_backend.js:483:439
_preprocessAction@http://0.0.0.0:8099/web/content/392-1a081a9/web.assets_backend.js:507:127
OdooClass.extend/Class.include/</prototype[name]</<@http://0.0.0.0:8099/web/content/327-b6c9587/web.assets_common.js:3541:371
doAction/<@http://0.0.0.0:8099/web/content/392-1a081a9/web.assets_backend.js:458:130
then/</</<@http://0.0.0.0:8099/web/content/327-b6c9587/web.assets_common.js:802:681
fire@http://0.0.0.0:8099/web/content/327-b6c9587/web.assets_common.js:796:299
add@http://0.0.0.0:8099/web/content/327-b6c9587/web.assets_common.js:797:471
then/</<@http://0.0.0.0:8099/web/content/327-b6c9587/web.assets_common.js:802:649
each@http://0.0.0.0:8099/web/content/327-b6c9587/web.assets_common.js:625:767
then/<@http://0.0.0.0:8099/web/content/327-b6c9587/web.assets_common.js:802:560
Deferred@http://0.0.0.0:8099/web/content/327-b6c9587/web.assets_common.js:803:194
then@http://0.0.0.0:8099/web/content/327-b6c9587/web.assets_common.js:802:525
doAction@http://0.0.0.0:8099/web/content/392-1a081a9/web.assets_backend.js:458:33
do_action@http://0.0.0.0:8099/web/content/392-1a081a9/web.assets_backend.js:558:1326
_openMenu@http://0.0.0.0:8099/web/content/392-1a081a9/web.assets_backend.js:568:1324
on_menu_clicked/</<@http://0.0.0.0:8099/web/content/392-1a081a9/web.assets_backend.js:568:1050
exec/<@http://0.0.0.0:8099/web/content/327-b6c9587/web.assets_common.js:3751:384
then/</</<@http://0.0.0.0:8099/web/content/327-b6c9587/web.assets_common.js:802:681
fire@http://0.0.0.0:8099/web/content/327-b6c9587/web.assets_common.js:796:299
add@http://0.0.0.0:8099/web/content/327-b6c9587/web.assets_common.js:797:471
then/</<@http://0.0.0.0:8099/web/content/327-b6c9587/web.assets_common.js:802:649
each@http://0.0.0.0:8099/web/content/327-b6c9587/web.assets_common.js:625:767
then/<@http://0.0.0.0:8099/web/content/327-b6c9587/web.assets_common.js:802:560
Deferred@http://0.0.0.0:8099/web/content/327-b6c9587/web.assets_common.js:803:194
then@http://0.0.0.0:8099/web/content/327-b6c9587/web.assets_common.js:802:525
exec@http://0.0.0.0:8099/web/content/327-b6c9587/web.assets_common.js:3751:354
on_menu_clicked/<@http://0.0.0.0:8099/web/content/392-1a081a9/web.assets_backend.js:568:995
then/</</<@http://0.0.0.0:8099/web/content/327-b6c9587/web.assets_common.js:802:681
fire@http://0.0.0.0:8099/web/content/327-b6c9587/web.assets_common.js:796:299
fireWith@http://0.0.0.0:8099/web/content/327-b6c9587/web.assets_common.js:801:202
Deferred/</deferred[tuple[0]]@http://0.0.0.0:8099/web/content/327-b6c9587/web.assets_common.js:803:56
add/<@http://0.0.0.0:8099/web/content/327-b6c9587/web.assets_common.js:3750:831
fire@http://0.0.0.0:8099/web/content/327-b6c9587/web.assets_common.js:796:299
fireWith@http://0.0.0.0:8099/web/content/327-b6c9587/web.assets_common.js:801:202
then/</</<@http://0.0.0.0:8099/web/content/327-b6c9587/web.assets_common.js:802:874
fire@http://0.0.0.0:8099/web/content/327-b6c9587/web.assets_common.js:796:299
fireWith@http://0.0.0.0:8099/web/content/327-b6c9587/web.assets_common.js:801:202
then/</</<@http://0.0.0.0:8099/web/content/327-b6c9587/web.assets_common.js:802:874
fire@http://0.0.0.0:8099/web/content/327-b6c9587/web.assets_common.js:796:299
fireWith@http://0.0.0.0:8099/web/content/327-b6c9587/web.assets_common.js:801:202
Deferred/</deferred[tuple[0]]@http://0.0.0.0:8099/web/content/327-b6c9587/web.assets_common.js:803:56
genericJsonRpc/<@http://0.0.0.0:8099/web/content/327-b6c9587/web.assets_common.js:3558:10
then/</</<@http://0.0.0.0:8099/web/content/327-b6c9587/web.assets_common.js:802:681
fire@http://0.0.0.0:8099/web/content/327-b6c9587/web.assets_common.js:796:299
fireWith@http://0.0.0.0:8099/web/content/327-b6c9587/web.assets_common.js:801:202
then/</</<@http://0.0.0.0:8099/web/content/327-b6c9587/web.assets_common.js:802:874
fire@http://0.0.0.0:8099/web/content/327-b6c9587/web.assets_common.js:796:299
fireWith@http://0.0.0.0:8099/web/content/327-b6c9587/web.assets_common.js:801:202
done@http://0.0.0.0:8099/web/content/327-b6c9587/web.assets_common.js:1192:95
callback@http://0.0.0.0:8099/web/content/327-b6c9587/web.assets_common.js:1212:23
0
Avatar
Vazgeç
Avatar
Marco
Üretici En İyi Yanıt

I found the solution:

1. substitute

             <xpath expr="//separator" position="after">

with

            <xpath expr="/search/filter[1]" position="before">

2. replace

 <field name="context">{search_default_type_student:1}</field>

(even if you delete it remains in cahce and cause the error above)

with

<!--         Contact actions for gestcalls -->
<record id="gestcall_contact_action" model="ir.actions.act_window">
<field name="name">Contact</field>
<field name="res_model">res.partner</field>
<!-- <field name="type">ir.actions.act_window</field>-->
<field name="view_type">form</field>
<field name="view_mode">kanban,tree,form</field>
        <field name="context">{"search_default_type_student":1}</field>



0
Avatar
Vazgeç
Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Üye Ol
İlgili Gönderiler Cevaplar Görünümler Aktivite
odoo 12 in ubuntu 18.04.4 Error ModuleNotFoundError: No module named 'werkzeug.contrib' Çözüldü
error odoo12
Avatar
Avatar
Avatar
3
Eyl 21
13285
Can not tabbing over readonly field in odoo 12. Help me please !!!
error bug odoo12
Avatar
0
Nis 24
2220
Search based on Many2many attachment file name
filter search odoo12
Avatar
0
Ara 21
2488
Problems migrating from odoo 12 to odoo 14 Çözüldü
error odoo12 v14
Avatar
Avatar
2
Oca 21
6058
Filter domain in xml treeview, what is a logic behind it? Çözüldü
filter treeview odoo12
Avatar
Avatar
2
Eki 20
5379
Topluluk
  • Eğitim Araçları
  • Dokümantasyon
  • Forum
Açık Kaynak
  • İndirin
  • Github
  • Runbot
  • Çeviriler
Hizmetler
  • Odoo.sh Hosting
  • Destek
  • Sürüm Yükseltme
  • Özel Geliştirmeler
  • Eğitim
  • Muhasebeci Bulun
  • Partner Bulun
  • Partner Olun
Hakkında
  • Şirketimiz
  • Pazarlama Gereçleri
  • İletişim
  • Kariyer
  • Etkinlikler
  • Podcast
  • Blog
  • Müşteriler
  • Hukuki • Gizlilik
  • Güvenlik
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo, müşteri ilişkileri yönetimi, eTicaret, muhasebe, envanter, satış noktası, proje yönetimi gibi şirketinizin tüm ihtiyaçlarını karşılayan bir açık kaynak işletme uygulamaları paketidir.

Odoo’nun eşsiz değer önermesi, aynı anda hem kullanımının çok kolay olup hem de tamamen entegre olmasıdır.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now