Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
2 Replies
1585 Tampilan

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
Buang
Jawaban Terbai

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
Buang
Jawaban Terbai

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
Buang
Post Terkait Replies Tampilan Aktivitas
1
Feb 24
3256
2
Mar 15
5264
1
Mar 15
5785
4
Mei 24
7791
1
Mar 24
1935