Skip to main content
Best answer

Odoo plugin date format error


Hello, I have this issue with the integration of Odoo within Zapier with the help of the Odoo plugin called Odoo ERP Self Hosted.

When creating a new record, for admission table, it is required to provide an Application Date.

When testing with all the required fields filled, here’s the error returned

File "/usr/lib/python3/dist-packages/odoo/fields.py", line 1806, in to_datetime
return datetime.strptime(value, DATETIME_FORMAT[:len(value)-2])
TypeError: object of type 'DateTime' has no len()

I tried almost every date format possible (with or without time), and whatever I put in this field this python error is returned.

Help will be much appreciated

Thanks!

Best answer by Liz_RobertsBest answer by Liz_Roberts

Hi @Zakarya ,

Sorry you are running into this! I see you have been working with Eliza in Support who has added you to a bug report on this issue that our team will review. 

While we can't provide a timeline for when this bug might be resolved, we’ll be sure to be in touch with you as soon as we have any updates.

I know that is not the answer you were hoping for but please let us know if you have any further questions!

 

UPDATE 2022-09-14

One of our members has found a workaround using a patch, check out this post for details: 

 

View original
Did this topic help you find an answer to your question?
This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

4 replies

Danvers
Forum|alt.badge.img+12
  • Zapier Staff
  • 3731 replies
  • July 10, 2020

Hi @Zakarya!

 

Could you share a bit more about what you’re trying to do and where you’re seeing this error? For example, is this error from a code step? Or are you trying to build your own integration that will send information to Odoo ERP Self Hosted?


  • Author
  • Beginner
  • 1 reply
  • July 19, 2020
Danvers wrote:

Hi @Zakarya!

 

Could you share a bit more about what you’re trying to do and where you’re seeing this error? For example, is this error from a code step? Or are you trying to build your own integration that will send information to Odoo ERP Self Hosted?

Basically, I am creating a new record from input data, and I’m filling all the required fields to create that new record.

As you can see in the image, two fields requires a date format, I fill these with ISO format I could also put a general date format such as 06/03/2020.

I’ve tried pretty much any date format, and whatever I put inside the “Application Date” field (text, numbers, dates), the python error below is returned

I think this is a problem with the Odoo plugin itself, because I’ve got in touch with Zapier support and we couldn’t find the issue.


Liz_Roberts
Forum|alt.badge.img+8
  • Zapier Staff
  • 1366 replies
  • Answer
  • July 20, 2020

Hi @Zakarya ,

Sorry you are running into this! I see you have been working with Eliza in Support who has added you to a bug report on this issue that our team will review. 

While we can't provide a timeline for when this bug might be resolved, we’ll be sure to be in touch with you as soon as we have any updates.

I know that is not the answer you were hoping for but please let us know if you have any further questions!

 

UPDATE 2022-09-14

One of our members has found a workaround using a patch, check out this post for details: 

 


Danvers
Forum|alt.badge.img+12
  • Zapier Staff
  • 3731 replies
  • September 14, 2022

Hi @Zakarya!

I just wanted to draw your attention to a post another member made about this, they found a workaround using a path on the Opodo side:

https://community.zapier.com/troubleshooting-99/odoo-plugin-date-format-error-17935

I hope that helps!