Skip to Content
Menu
This question has been flagged
1 Reply
1730 Views

I am using the Assistance application in Odoo v15, when i create a record with the method:

model = xmlrpc.client.ServerProxy('{}/xmlrpc/2/object'.format(rute))
model.execute_kw(db, uid, api, 'hr.attendance', 'create', [{'id_employee':'Josh Allen', 'check_in':datetime.now().strftime("%Y-%m-%d %H:%M:%S")}])

the registry is created but the time is wrong

example:

local time is "2023-02-07 10:27:41"

time recorded in odoo "2023-02-07 03:27:41"


Any solution besides reducing the time with code 7 hours?


Any help will be much appreciated.



Avatar
Discard
Best Answer

Hi,

The easy method here is to pass the UTC time to odoo instead of passing the local time. The advantage of this is that the same time can be show in the odoo ui according to different users time zone.

Thanks

Avatar
Discard
Related Posts Replies Views Activity
1
Oct 24
272
2
Jul 24
261
1
Apr 24
514
2
Mar 24
748
2
Mar 24
2101