Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Datetime Format Issue on Export #103

Open
davidjleach opened this issue Jun 11, 2015 · 1 comment
Open

Datetime Format Issue on Export #103

davidjleach opened this issue Jun 11, 2015 · 1 comment

Comments

@davidjleach
Copy link

When creating a new export job for products, we are seeing the following stack trace (edited for the full line of code):

File "/vagrant/connector_addons_inprogress/connector-magento/magentoerpconnect/unit/export_synchronizer.py", line 96, in _should_import
magento_date = datetime.strptime(record['updated_at'], MAGENTO_DATETIME_FORMAT)
File "/usr/lib/python2.7/_strptime.py", line 325, in _strptime
(data_string, format))
ValueError: time data '2015-05-15 20:18:18' does not match format '%Y/%m/%d %H:%M:%S'

The error is due to the record object having the Odoo server datetime format, but strptime is using the magento datetime format.

pre-upgrade, this function used DEFAULT_SERVER_DATETIME_FORMAT instead of MAGENTO_DATETIME_FORMAT, so it looks like a regression.

Was there any reason for this change?

@guewen
Copy link
Member

guewen commented Jun 22, 2015

record['updated_at'] is the record that comes from Magento, not Odoo.
It seems that the MAGENTO_DATETIME_FORMAT constant is set to the wrong format though (or is it possible that Magento uses several formats depending on an option?).
Could you propose a pull request? Thanks for reporting

jcoux pushed a commit to camptocamp/connector-magento that referenced this issue May 14, 2019
3936 fix back order for stockit export date
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants