Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
15605 มุมมอง

I have this module I use to attach certain information to stock.production.lot. How should I make these fields searchable in the main search bar? i.e. if I wanted to find a product that has an associated unique Serial Number, that has associated Toner Level (x_toner) field set to 'Full'?

Can someone point me to good examples or some specific reading?

from odoo import models, fields, api

class x_wh(models.Model):
_inherit = 'stock.production.lot'

x_toner = fields.Char(
'Toner Level', index=True
)
x_print_count = fields.Integer(
'Print Count', index=True
)
x_description = fields.Text(
'Description'
)
x_condition = fields.Char(
'Product Condition', index=True
)





อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Hi Zendo..!


You can please refer to this link, you can get the answer.


https://www.odoo.com/forum/help-1/question/making-a-custom-field-searchable-w-o-advanced-search-55299


Thanks
อวตาร
ละทิ้ง
ผู้เขียน

Thanks, Nikhil, that was what I needed

Related Posts ตอบกลับ มุมมอง กิจกรรม
0
พ.ค. 21
3064
Odoo11 Community: Salary แก้ไขแล้ว
1
ก.พ. 19
2723
0
ธ.ค. 18
2995
0
ก.ค. 18
3337
1
พ.ค. 18
4341