Hi,
I want to search using different fields in a field with many2one content.
Screen 1: https://prnt.sc/2Z1wOx_P8HjA
Screen 2: https://prnt.sc/iAJdOt7UsgRU
Screen 3: https://prnt.sc/WKub100kXvCO
***I want it to find by Code field
Thanks.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- إدارة علاقات العملاء
- e-Commerce
- المحاسبة
- المخزون
- PoS
- المشروع
- MRP
لقد تم الإبلاغ عن هذا السؤال
Hi Tugay HATIL,
Name search function is an odoo ORM method that is responsible for searching the specific records by some field values in a relational field.
For More Refer,
https://www.youtube.com/watch?v=dd5SYkPSMSo
https://www.cybrosys.com/blog/name-search-function-in-odoo-14#
thanks @Kiran K
Hello Tugay HATIL,
For find a record based on name and code field of project (M2O) field of sale order, you can use name_search ORM method,
You can refer below code for that is mention in Comment.
Thanks & Regards,
Email: odoo@aktivsoftware.com
Skype: kalpeshmaheshwari
@api.model
def name_search(self, name='', args=None, operator='ilike', limit=100):
if args is None:
args = []
domain = args + ['|', ('name', operator, name),
('code', operator, name)]
return super(ProjectProject, self).search(
domain, limit=limit).name_get()
thanks @Jainesh Shah(Aktiv Software)
هل أعجبك النقاش؟ لا تكن مستمعاً فقط. شاركنا!
أنشئ حساباً اليوم لتستمتع بالخصائص الحصرية، وتفاعل مع مجتمعنا الرائع!
تسجيل| المنشورات ذات الصلة | الردود | أدوات العرض | النشاط | |
|---|---|---|---|---|
|
|
0
أبريل 23
|
2764 | ||
|
|
0
ديسمبر 22
|
2143 | ||
|
|
2
يوليو 22
|
7859 | ||
|
|
2
أبريل 21
|
4068 | ||
|
|
3
مارس 15
|
4975 |