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

[11.0][MIG][ADD]-Migrated WooCommerce Module #44

Open
wants to merge 8 commits into
base: 11.0
Choose a base branch
from

Conversation

YogeshMahera-SerpentCS
Copy link
Member

  • Migrated woocommerce module with new functions

  • Added New functions of Import / Export of product,Sale,customer, product catergories

@YogeshMahera-SerpentCS YogeshMahera-SerpentCS force-pushed the 11.0-MIG-woo_commerce branch 2 times, most recently from cb53003 to 903b841 Compare October 1, 2018 05:51
@pedrobaeza
Copy link
Member

Hi @YogeshMahera-SerpentCS, can you please preserve commit history following technical method explained in https://github.com/OCA/maintainer-tools/wiki/Migration-to-version-11.0 ?

@YogeshMahera-SerpentCS
Copy link
Member Author

@pedrobaeza Added preserve commit history

@pedrobaeza
Copy link
Member

Thanks for that, but I'm afraid you are doing the contrary: adding commit history at the end instead of the beginning. You can try the following:

  • Preserve current files somewhere.
  • Start from a clean 11.0 branch
  • Follow the migration guide for bringing commit history.
  • Add your files to this branch.
  • Commit again.

@YogeshMahera-SerpentCS
Copy link
Member Author

YogeshMahera-SerpentCS commented Oct 1, 2018

@pedrobaeza Updated Accordingly!

@pedrobaeza pedrobaeza added this to the 11.0 milestone Oct 1, 2018
@pedrobaeza
Copy link
Member

Great, thanks! I let now reviewers of the code itself.

@YogeshMahera-SerpentCS
Copy link
Member Author

@simahawk @guewen Could you please check?

@nogueira-raphael
Copy link

I'm testing the uploaded update, and it's experiencing errors when trying to import the products.
@YogeshMahera-SerpentCS
2018-10-16 20:55:53,291 15023 ERROR =wooooo odoo.addons.queue_job.controllers.main: Traceback (most recent call last): File "/home/raphael/keesoft/apps/addons/queue/queue_job/controllers/main.py", line 97, in runjob self._try_perform_job(env, job) File "/home/raphael/keesoft/apps/addons/queue/queue_job/controllers/main.py", line 61, in _try_perform_job job.perform() File "/home/raphael/keesoft/apps/addons/queue/queue_job/job.py", line 466, in perform self.result = self.func(*tuple(self.args), **self.kwargs) File "/home/raphael/keesoft/apps/addons/connector-woocommerce/connector_woocommerce/models/woo_binding/common.py", line 51, in import_record return importer.run(external_id, force=force) File "/home/raphael/keesoft/apps/addons/connector-woocommerce/connector_woocommerce/components/importer.py", line 187, in run self.woo_record = self._get_woo_data() File "/home/raphael/keesoft/apps/addons/connector-woocommerce/connector_woocommerce/models/product/importer.py", line 75, in _create odoo_binding = super(ProductProductImporter, self)._create(data) File "/home/raphael/keesoft/apps/addons/connector-woocommerce/connector_woocommerce/components/importer.py", line 154, in _create binding = model.create(data) File "/home/raphael/keesoft/apps/addons/connector/component_event/models/base.py", line 94, in create record = super(Base, self).create(vals) File "/home/raphael/keesoft/apps/odoo/odoo/models.py", line 3373, in create record = self.browse(self._create(old_vals)) File "/home/raphael/keesoft/apps/odoo/odoo/models.py", line 3430, in _create parent_id = self.env[parent_model].create(parent_vals).id File "/home/raphael/keesoft/apps/addons/connector-ecommerce/connector_ecommerce/models/product.py", line 113, in create product = super(ProductProduct, self).create(vals) File "/home/raphael/keesoft/apps/odoo/addons/product/models/product.py", line 305, in create product = super(ProductProduct, self.with_context(create_product_product=True)).create(vals) File "/home/raphael/keesoft/apps/odoo/addons/mail/models/mail_thread.py", line 236, in create thread = super(MailThread, self).create(values) File "/home/raphael/keesoft/apps/addons/connector/component_event/models/base.py", line 94, in create record = super(Base, self).create(vals) File "/home/raphael/keesoft/apps/odoo/odoo/models.py", line 3373, in create record = self.browse(self._create(old_vals)) File "/home/raphael/keesoft/apps/odoo/odoo/models.py", line 3520, in _create field.write(self.with_context(rel_context), vals[name], create=True) File "/home/raphael/keesoft/apps/odoo/odoo/fields.py", line 2495, in write cr.execute(query, (records.ids, list(sub_ids), tuple(records.ids))) File "/home/raphael/keesoft/apps/odoo/odoo/sql_db.py", line 155, in wrapper return f(self, *args, **kwargs) File "/home/raphael/keesoft/apps/odoo/odoo/sql_db.py", line 232, in execute res = self._obj.execute(query, params) psycopg2.ProgrammingError: EXCEPT types boolean and integer cannot be matched LINE 3: ... EXCEPT (SELECT product_product_id, product_ca...

@YogeshMahera-SerpentCS
Copy link
Member Author

@rodriguesraphael runbot is down!

@angelmoya
Copy link
Member

I would be nice to get more info in readme.
Thanks

@@ -0,0 +1,355 @@
# © 2009 Tech-Receptives Solutions Pvt. Ltd.
# © 2018 Serpent Consulting Services Pvt. Ltd.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The copyright on several files have been stripped, as they are strongly similar than: https://github.com/OCA/connector-magento/blob/10.0/connector_magento/components/exporter.py

# record
if not odoo.tools.config['test_enable']:
binding = binding
#self.env.cr.commit() # noqa
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

_usage = 'export.mapper'


def normalize_datetime(field):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this method is useless, it was for Magento which sometimes returns a date/time full of zeroes.

@guewen
Copy link
Member

guewen commented Jun 22, 2020

Very interesting :) Do you use this module in production? Do you need a lot of "local customization" to make it run with a typical woocommerce shop?

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

Successfully merging this pull request may close these issues.

8 participants