What are the steps to reproduce your issue?
I have two fields pnumber (Char)pdate (Date)
when I'm trying to do like this
<field name="pnumber" attrs="{'required': [('pdate', '=', True)]}"/>
What is the current behavior that you observe?
But it is working if I do like this
<field name="pnumber" attrs="{'required': [('pdate', !'=', False)]}"/>
What would be your expected behavior in this case?
It should working in True value also.. as per my view
<field name="pnumber" attrs="{'required': [('pdate', '=', True)]}"/>
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Księgowość
- Zapasy
- PoS
- Project
- MRP
To pytanie dostało ostrzeżenie
1
Odpowiedz
3757
Widoki
You cant check datetime object with true if that has a value. but in python it will accept that != False,
check this code in your python console
import datetime
x = datetime.date(2012, 9, 1)
if x == True:
print "fail"
elif x != False or x != True:
print "truee"
so you can check that using this code
isinstance(x, datetime.date)
Thank You
Podoba Ci się ta dyskusja? Dołącz do niej!
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
sie 25
|
52 | ||
|
0
sie 25
|
7 | ||
|
0
lut 25
|
728 | ||
How to check if 3 conditions meet using '&'?
Rozwiązane
|
|
2
paź 24
|
3619 | |
Removeing attrs in 17.0
Rozwiązane
|
|
2
cze 24
|
2117 |