コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
15617 ビュー

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

関連投稿 返信 ビュー 活動
0
5月 21
3064
1
2月 19
2724
0
12月 18
2996
0
7月 18
3339
1
5月 18
4342