hello,
I put 7 boolean fields for days of the week in the lunch.product form And when we define a product, we choose days that the restaurant has that food.
How can I show users when ordering food just the day's food
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
hello,
I put 7 boolean fields for days of the week in the lunch.product form And when we define a product, we choose days that the restaurant has that food.
How can I show users when ordering food just the day's food
Hi Mitra,
It would be more helpful if you can post your code.
May be based on the day (Mon (0), Tue (1), Wed (2), ..., Sun (6)), you can pass a domain depending on your boolean fields to search the products.
Ex:
# My Odoo Boolean fields for each day
bool_mon, bool_tue, bool_web, ...., bool_sun
day = 1 # Means Tue- You will be able to find it from the current day
domain = []
if day == 1:
domain.append(('bool_tue', '=', True))
self.env['product.product'].search(domain) # Search the products based on boolean fields and current day
Stwórz konto dzisiaj, aby cieszyć się ekskluzywnymi funkcjami i wchodzić w interakcje z naszą wspaniałą społecznością!
Zarejestruj sięPowiązane posty | Odpowiedzi | Widoki | Czynność | |
---|---|---|---|---|
|
0
cze 19
|
2465 | ||
|
2
lip 24
|
2609 | ||
|
1
cze 24
|
5087 | ||
|
1
paź 23
|
10777 | ||
|
1
paź 23
|
98 |