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
- Accounting
- Inventory
- PoS
- Project
- MRP
This question has been flagged
1
Reply
3344
Views
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
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign upRelated Posts | Replies | Views | Activity | |
---|---|---|---|---|
|
0
Feb 25
|
308 | ||
|
2
Oct 24
|
3232 | ||
Removeing attrs in 17.0
Solved
|
|
2
Jun 24
|
1364 | |
|
1
Jun 19
|
5393 | ||
|
0
Mar 15
|
4886 |