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
- Akuntansi
- Inventaris
- PoS
- Project
- MRP
Pertanyaan ini telah diberikan tanda
1
Balas
3256
Tampilan
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
Menikmati diskusi? Jangan hanya membaca, ikuti!
Buat akun sekarang untuk menikmati fitur eksklufi dan agar terlibat dengan komunitas kami!
DaftarPost Terkait | Replies | Tampilan | Aktivitas | |
---|---|---|---|---|
|
0
Mei 25
|
35 | ||
|
0
Feb 25
|
207 | ||
How to check if 3 conditions meet using '&'?
Diselesaikan
|
|
2
Okt 24
|
3140 | |
Removeing attrs in 17.0
Diselesaikan
|
|
2
Jun 24
|
1271 | |
|
1
Jun 19
|
5333 |