Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
2 Odgovori
1564 Prikazi

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
Opusti
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
Opusti
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
Opusti
Related Posts Odgovori Prikazi Aktivnost
1
feb. 24
3204
2
mar. 15
5211
1
mar. 15
5734
4
maj 24
7671
1
mar. 24
1898