Woocommerce full 2 way integration

I have tried to install this app woocommerceconnector.

Getting the below error.

Installing woocommerceconnector...
Traceback (most recent call last):
  File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 97, in <module>
    main()
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 18, in main
    click.Group(commands=commands)(prog_name='bench')
  File "/home/erpnext/frappe-bench/env/lib/python3.6/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/home/erpnext/frappe-bench/env/lib/python3.6/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/home/erpnext/frappe-bench/env/lib/python3.6/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/erpnext/frappe-bench/env/lib/python3.6/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/erpnext/frappe-bench/env/lib/python3.6/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/erpnext/frappe-bench/env/lib/python3.6/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/home/erpnext/frappe-bench/env/lib/python3.6/site-packages/click/decorators.py", line 21, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/commands/__init__.py", line 25, in _func
    ret = f(frappe._dict(ctx.obj), *args, **kwargs)
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/commands/site.py", line 169, in install_app
    _install_app(app, verbose=context.verbose)
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/installer.py", line 152, in install_app
    sync_for(name, force=True, sync_everything=True, verbose=verbose, reset_permissions=True)
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/model/sync.py", line 56, in sync_for
    reset_permissions=reset_permissions, for_sync=True)
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/modules/import_file.py", line 65, in import_file_by_path
    ignore_version=ignore_version, reset_permissions=reset_permissions)
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/modules/import_file.py", line 100, in import_doc
    doc = frappe.get_doc(docdict)
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/__init__.py", line 734, in get_doc
    doc = frappe.model.document.get_doc(*args, **kwargs)
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/model/document.py", line 69, in get_doc
    return controller(*args, **kwargs)
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/model/document.py", line 113, in __init__
    super(Document, self).__init__(kwargs)
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/model/base_document.py", line 54, in __init__
    self.update(d)
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/model/base_document.py", line 77, in update
    self.set(key, value)
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/model/base_document.py", line 124, in set
    self.extend(key, value)
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/model/base_document.py", line 161, in extend
    self.append(key, v)
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/model/base_document.py", line 155, in append
    self.name, str(type(value))[1:-1], value)
ValueError: Document for field "field_order" attached to child table of "WooCommerce Config" must be a dict or BaseDocument, not class 'str' (status_html)

Hi,

I have the sync setup between WooCommerce and ERPNext and its having a few issues, first is once I sync, the WooCommerce IDā€™s donā€™t update on ERPNext and it keeps creating new products on WooCommerce. I found a workaround for this issue, which is making the ID sections writeable and after the first sync, manually copy the WooCommerce product ID to the ERPNext product.

Second issue is the stock showing on WooCommerce is double what is shown on ERPNext. Just had a sale and after realizing this discrepancy ended up overselling by quite a bit.

Any ideas on how these could be fixed, especially the latter.

Hi @fkardame,

which ERPNext version are you using? This seems like a backwards-compatibility issue.

Hi @techfourk,

there is a function to sync the IDs, have you tried this?

As for your stock issue, probably your warehouse is selected twice, once as main and as additional warehouse. Remove the additional warehouse (this is only used when you have multiple warehouses and want to report the overall quantity).

Hope this helps.

I think it is V12 but I will have to check, This app is for which Erpnext version ?

It used to be for v11, but is now fitted to v12ā€¦ So v12 should actually work!

The Good news guys is that we eventually got this to work on V13.

This was with a lot of work from @lasalesi

Keep at it!

4 Likes

I would love to see some help on Woo integration.

I am stuck on here

image

Hey @lasalesi,

I have tried the sync ID option however it just creates new products in erpnext but I have existing ones which I wanted to sync with. Anyway, the manual option works quite well, just a little trial and error to realize which IDā€™s needed to be populated.

As for the stock issue, thanks for your help, seems like it did not save despite trying more than half a dozen times. Seems like waiting a few days and then trying a bunch more times worked somehow.

WooCommerceConnector (full 2-way sync, not the embedded WooCommerce in ERPNext) does not work with WebHooks. You need to enable REST API and then integrate this.

I have dons that already according to help docs, but no success. all treads says check the log and there is no log for me.

I really want to integrate this but no one put proper help for troubleshooting.

It seems lots of stuff behind the seen and no disclosure to general help docs.

Any one need to help me ā€¦ may be I can pay some.

If you could share some more details on your issue, it would be easier to help you hereā€¦

What is your scenario (which connector are you using?) From your post I guess you are using the integrated connector, is that right? What are you trying to sync?

you are right, I use common integrated connector.

I am trying to sync sales orders.

@fkardame The site is V11. Can you try to reinstall it again?

I am getting this same error @lasalesi on:

ERPNext: v11.1.55 (version-11)
Frappe Framework: v11.1.51 (version-11)

Hi @eagoweb,

for v11, this is expected because the doctype json as generated from v12 is not backwards compatible. If this is a need, we will have to create a backwards compatible branch for v11ā€¦

Can you check the content of WooCommerceConnector/woocommerce_settings.json at rubirosa Ā· libracore/WooCommerceConnector Ā· GitHub and merge it into your woocommerce_config.json? This had to be refactored because of the integrated function, which overwrites the conenctor settingsā€¦

thank you! I just manage to update to 12.10 and is installed but I am still struggling with all the patches and stuff.

Now my error is in the log, I Guess the migration didnā€™t passedā€¦
(1054, ā€œUnknown column ā€˜woocommerce_descriptionā€™ in ā€˜field listā€™ā€)

Just created a v11 compatibility branch: GitHub - libracore/WooCommerceConnector at v11

The above error indicates that the migration/installation was not able to install the fixtures (could well be an upgrade issue). You should be able to uninstall/reinstall WooCommerceConnector and get it to workingā€¦

1 Like

Yeah could be it, the first try it raises some installation issue and I am sure should be related to my installation:

  File "/home/frappe/frappe-bench/apps/frappe/frappe/modules/utils.py", line 206, in load_doctype_module
    raise ImportError('Module import failed for {0} ({1})'.format(doctype, module_name + ' Error: ' + str(e)))
ImportError: Module import failed for Bank Clearance (erpnext.accounts.doctype.bank_clearance.bank_clearance Error: No module named 'erpnext.accounts.doctype.bank_clearance')

The above error is actually not related to the WooCommerceConncetor at all. Itā€™s a doctype issue with the EPRNext doctype Bank Clearanceā€¦