Skip to Content
मेन्यू
This question has been flagged

hai everyone...

I want to ask how to solve errors in my program code. Here I tried to call the data from the module 'hr.payslip' to take the salary based on the salary structure, as well as based on the period, but here what I got was an error, can anyone help to solve the problem?


Avatar
Discard
Best Answer

Hi,

It says strftime is not valid on the Date object, regarding the main question to retrieve data from current model or any models, you can utilize the odoo orm, using self, relational fields and using the search you can get datas from any models

Odoo ORM:  


  
Thanks

Avatar
Discard
Best Answer

Hi,

The specific error that you are getting is of strftime the Date object doesn’t have strftime attribute
Try using 
date_from_formatted_date = "{:04d}-{:02d}-{:02d}".format(date_from.year, date_from.month, date_from.day)
date_to_formatted_date = "{:04d}-{:02d}-{:02d}".format(date_to.year, date_to.month, date_to.day)


Hope it helps

Avatar
Discard
Related Posts Replies Views Activity
1
फ़र॰ 24
3202
2
मार्च 15
5207
1
मार्च 15
5734
4
मई 24
7667
1
मार्च 24
1892