In V.14 I want to select my products based on multiple filters, and have the products come up if it only meets the conditions in one of the filters. However currently the search bar only returns queries that contain all filters. I consider this to be an AND condition, and I would like to change it to an OR condition. Is this possible through a Studio customization? The database contains Sales, Inventory, Purchase, Manufacturing and Studio.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Бухгалтерия
- Склад
- PoS
- Проекты
- MRP
Этот вопрос был отмечен
So the answer is quite straightforward. Adding in a Custom Filter gives the option for OR automatically, one has to add a % between both filgets to make it an AND condition.
Great answer. I'd never have guessed... I tried "&" though but of course that did not work :-)
Hello Michael,
Please try with following steps:
First extend the input widget
var Input = Widget.extend( /* @lends instance.web.search.Input# /{
For specific model you can give condition like this:
if (self.searchview.action.env.modelName == 'hr.applicant')
In the base in the return AND condition is defined , you have to change with OR like this:
return pyUtils.assembleDomains(domains, 'OR');
e.g.
var Input = Widget.extend( /* @lends instance.web.search.Input# /{
if (self.searchview.action.env.modelName == 'hr.applicant')
return pyUtils.assembleDomains(domains, 'OR');
Thanks & Regards,
Email: odoo@aktivsoftware.com
Skype: kalpeshmaheshwari
Не оставайтесь в стороне – присоединяйтесь к обсуждению!
Создайте аккаунт сегодня, чтобы получить доступ к эксклюзивным функциям и стать частью нашего замечательного сообщества!
Регистрация| Похожие посты | Ответы | Просмотры | Активность | |
|---|---|---|---|---|
|
|
2
мая 25
|
7689 | ||
|
|
1
мар. 23
|
3665 | ||
|
|
0
июл. 21
|
444 | ||
|
|
2
нояб. 23
|
2504 | ||
|
|
1
дек. 22
|
4004 |