Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
2 Risposte
1552 Visualizzazioni

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
Abbandona
Risposta migliore

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
Abbandona
Risposta migliore

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
Abbandona
Post correlati Risposte Visualizzazioni Attività
1
feb 24
3195
2
mar 15
5205
1
mar 15
5733
4
mag 24
7662
1
mar 24
1881