Odoo Help

0

0
1 Answer
0
Avatar

Hilar AK

--Hilar AK--
9133
| 6 6 11
سويسرا
--Hilar AK--
  Blog:-
        https://hilarlive.wordpress.com/
  StackOverflow:
        http://stackoverflow.com/users/7561347/burmese-pythis

Quora:
    

            https://www.quora.com/profile/Hilar-Ak-1

Experienced Odoo developer, Functional Consultant.



Hilar AK
14‏/5‏/2019 12:55 ص

Here you are comparing two strings where odoo retrieves date or DateTime fields as a string. So here you are comparing str == str and results vary according to that. The solution is that you have to typecast the fields before comparison using pythons default or odoo's way. I can give you an example.

date = vals.get('date') # String
date = feilds.Date.from_string(date) # Date(01,02,2019) dateobject
Ask a Question
Writer
Keep Informed
1 follower(s)
About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register
Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now