Skip to Content
Odoo เมนู
  • ลงชื่อเข้าใช้
  • ทดลองใช้ฟรี
  • แอป
    การเงิน
    • ระบบบัญชี
    • ระบบการออกใบแจ้งหนี้
    • ระบบบัญชีรายจ่าย
    • ระบบการจัดการข้อมูลผ่านสเปรดชีต (BI)
    • เอกสาร
    • ระบบลงลายเซ็น
    การขาย
    • ลูกค้าสัมพันธ์
    • การขาย
    • POS ร้านค้า
    • POS ร้านอาหาร
    • ระบบสมัครสมาชิก
    • การเช่า
    การจัดการเว็บไซต์
    • เครื่องมือสร้างเว็บไซต์
    • ระบบการขายออนไลน์
    • บล็อก
    • ฟอรั่ม
    • ไลฟ์แชท
    • ระบบการอบรมออนไลน์
    ซัพพลายเชน
    • คลังสินค้า
    • ระบบการผลิต
    • PLM
    • ระบบการจัดซื้อ
    • การซ่อมบำรุง
    • ระบบจัดการคุณภาพ
    ทรัพยากรบุคคล
    • ข้อมูลพนักงาน
    • ระบบสรรหาบุคลากร
    • ระบบการลา
    • การประเมิน
    • ระบบการแนะนำพนักงาน
    • ระบบจัดการยานพาหนะ
    การตลาด
    • โซเชียลมาร์เก็ตติ้ง
    • การตลาดผ่านอีเมล
    • ระบบการตลาดผ่าน SMS
    • ระบบการจัดงานอีเวนต์
    • การตลาดแบบอัตโนมัติ
    • ระบบแบบสำรวจ
    การบริการ
    • โปรเจกต์
    • ระบบบันทึกเวลา
    • ระบบการจัดการบริการภาคสนาม
    • ระบบดูแลช่วยเหลือ
    • การวางแผน
    • การนัดหมาย
    ประสิทธิผล
    • ระบบแสดงความคิดเห็น
    • ระบบการอนุมัติ
    • ไอโอที
    • VoIP
    • คลังข้อมูล
    • WhatsApp
    แอปพลิเคชันของบุคคลที่สาม Odoo สตูดิโอ แพลตฟอร์มคลาวด์ของ Odoo
  • อุตสาหกรรม
    การค้าปลีก
    • ร้านขายหนังสือ
    • ร้านขายเสื้อผ้า
    • ร้านขายเฟอร์นิเจอร์
    • ร้านขายของชำ
    • ร้านขายฮาร์ดแวร์
    • ร้านขายของเล่น
    Food & Hospitality
    • บาร์และผับ
    • ร้านอาหาร
    • อาหารฟาสต์ฟู้ด
    • Guest House
    • ตัวแทนจำหน่ายเครื่องดื่ม
    • Hotel
    อสังหาริมทรัพย์
    • Real Estate Agency
    • บริษัทสถาปัตยกรรม
    • บริษัทรับเหมา
    • การจัดการอสังหาริมทรัพย์
    • การจัดสวน
    • สมาคมเจ้าของอสังหาริมทรัพย์
    ปรึกษา
    • สำนักงานบัญชี
    • Odoo พาร์ทเนอร์
    • เอเจนซี่การตลาด
    • สำนักงานกฎหมาย
    • บริการสรรหาบุคลากร
    • การตรวจสอบและการรับรอง
    ระบบการผลิต
    • Textile
    • เหล็ก
    • เฟอร์นิเจอร์
    • อาหาร
    • Brewery
    • ของขวัญขององค์กร
    สุขภาพ & ฟิตเนส
    • ชมรมกีฬา
    • ร้านขายแว่นตา
    • ฟิตเนส
    • ผู้ประกอบวิชาชีพด้านสุขภาพ
    • ร้านขายยา
    • ร้านทำผม
    Trades
    • ช่างซ่อม
    • ฮาร์ดแวร์และการสนับสนุนด้านไอที
    • ระบบพลังงานแสงอาทิตย์
    • ช่างทำรองเท้า
    • บริการทำความสะอาด
    • HVAC Services
    อื่น ๆ
    • Nonprofit Organization
    • สำนักงานสิ่งแวดล้อม
    • ร้านเช่าป้ายโฆษณา
    • การถ่ายภาพ
    • ร้านเช่าจักรยาน
    • ตัวแทนจำหน่ายซอฟต์แวร์
    Browse all Industries
  • คอมมูนิตี้
    ศึกษา
    • บทเรียน
    • เอกสารกำกับโปรแกรม
    • การรับรอง
    • การฝึกอบรม
    • บล็อก
    • พอดแคสต์
    เพิ่มศักยภาพให้กับการศึกษา
    • โปรแกรมการศึกษา
    • Scale Up! Business Game
    • เยี่ยมชม Odoo
    รับซอฟต์แวร์
    • ดาวน์โหลด
    • เปรียบเทียบรุ่น
    • เผยแพร่
    ทำงานร่วมกัน
    • Github
    • ฟอรั่ม
    • ระบบการจัดงานอีเวนต์
    • การแปล
    • ร่วมเป็นพาร์ทเนอร์
    • Services for Partners
    • ลงทะเบียนเพื่อสร้างบัญชีบริษัทของคุณ
    รับบริการ
    • ค้นหาพาร์ทเนอร์
    • ค้นหานักบัญชี
    • พบกับที่ปรึกษา
    • บริการติดตั้งระบบเพื่อใช้งาน
    • ข้อมูลอ้างอิงลูกค้า
    • การสนับสนุน
    • อัปเกรด
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    รับการสาธิต
  • ราคา
  • ช่วยเหลือ

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

  • ลูกค้าสัมพันธ์
  • e-Commerce
  • ระบบบัญชี
  • สินค้าคงคลัง
  • PoS
  • โปรเจกต์
  • MRP
All apps
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
All Posts คน เหรียญรางวัล
แท็ก (View all)
odoo accounting v14 pos v15
เกี่ยวกับฟอรั่มนี้
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
All Posts คน เหรียญรางวัล
แท็ก (View all)
odoo accounting v14 pos v15
เกี่ยวกับฟอรั่มนี้
ช่วยเหลือ

Error: NameError: name 'search_default_filter' is not defined

ติดตาม

รับการแจ้งเตือนเมื่อมีกิจกรรมในโพสต์นี้

คำถามนี้ถูกตั้งค่าสถานะ
filtererrornameodoo12
1 ตอบกลับ
5787 มุมมอง
อวตาร
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
อวตาร
ละทิ้ง
อวตาร
Marco
ผู้เขียน คำตอบที่ดีที่สุด

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
อวตาร
ละทิ้ง
สนุกกับการพูดคุยนี้ใช่ไหม? เข้าร่วมเลย!

สร้างบัญชีวันนี้เพื่อเพลิดเพลินไปกับฟีเจอร์พิเศษและมีส่วนร่วมกับคอมมูนิตี้ที่ยอดเยี่ยมของเรา!

ลงชื่อ
Related Posts ตอบกลับ มุมมอง กิจกรรม
odoo 12 in ubuntu 18.04.4 Error ModuleNotFoundError: No module named 'werkzeug.contrib' แก้ไขแล้ว
error odoo12
อวตาร
อวตาร
อวตาร
3
ก.ย. 21
13275
Can not tabbing over readonly field in odoo 12. Help me please !!!
error bug odoo12
อวตาร
0
เม.ย. 24
2213
Search based on Many2many attachment file name
filter search odoo12
อวตาร
0
ธ.ค. 21
2480
Problems migrating from odoo 12 to odoo 14 แก้ไขแล้ว
error odoo12 v14
อวตาร
อวตาร
2
ม.ค. 21
6049
Filter domain in xml treeview, what is a logic behind it? แก้ไขแล้ว
filter treeview odoo12
อวตาร
อวตาร
2
ต.ค. 20
5365
คอมมูนิตี้
  • บทเรียน
  • เอกสารกำกับโปรแกรม
  • ฟอรั่ม
โอเพนซอร์ส
  • ดาวน์โหลด
  • Github
  • Runbot
  • การแปล
บริการ
  • โฮสติ้ง odoo.sh เซิร์ฟเวอร์
  • การสนับสนุน
  • อัปเกรด
  • การพัฒนาที่กำหนดเอง
  • การศึกษา
  • ค้นหานักบัญชี
  • ค้นหาพาร์ทเนอร์
  • ร่วมเป็นพาร์ทเนอร์
เกี่ยวกับเรา
  • บริษัทของเรา
  • ทรัพย์สินในรูปของเครื่องหมายการค้า
  • ติดต่อเรา
  • งาน
  • ระบบการจัดงานอีเวนต์
  • พอดแคสต์
  • บล็อก
  • ลูกค้า
  • กฎหมาย • ความเป็นส่วนตัว
  • ความปลอดภัย
الْعَرَبيّة 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 เป็นชุดแอปธุรกิจแบบเปิดที่ครอบคลุมทุกความต้องการของบริษัทของคุณ อาธิ CRM eCommerce ระบบบัญชี ระบบสินค้าคงคลัง ระบบการขายหน้าร้าน โปรเจกต์ และ อีกมากมาย

ความเหนือกว่าอันเป็นเอกลักษณ์ของ Odoo คือการใช้งานที่ง่ายดายและผสานการทำงานอย่างสมบูรณ์แบบในเวลาเดียวกัน

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