libracore / WooCommerceConnector

Integration App for ERPNext to connect to WooCommerce
Other
85 stars 149 forks source link

Cant install on erpnext 11 or 12 can you please advise on how to fix this? #18

Closed woakes070048 closed 4 years ago

lasalesi commented 4 years ago

Do you have any error trace? Currently, it is compatible with EPNext v12 and Dokos v1, using Python 3.

lasalesi commented 4 years ago

Can reproduce that installation works fine, but after the installation, "woocommerce Settings" is not available and will return Sorry, I cannot find what you are looking for: grafik Only affects new installations, works fine in existing installations.

lasalesi commented 4 years ago

This is more a workaround than anything else, but if you open "Doctype List", the open "woocommerce Settings", click menu > duplicate and save it as "WooCommerce Config", it works and can be opened. Seems like something in the ERPNext v12 base config is conflicting here...

olamide2 commented 4 years ago

Hi @lasalesi

Tried the workaround, did not work for me ..any other ideas?

thomasoceguera commented 4 years ago

I tried the install and was able to see the config after your workaround but not the Module settings in the Desk app.

Here are my error logs immediately after installing. Maybe this can help solve it


TITLE:: woocommerceconnector.api.check_hourly_sync

ERROR:: {'method_name': 'woocommerceconnector.api.check_hourly_sync', 'log': <function log at 0x7feaac975510>, 'retry': 0, 'is_async': True, 'user': 'Administrator', 'kwargs': {}, 'job_name': 'woocommerceconnector.api.check_hourly_sync', 'event': 'hourly', 'method': <function check_hourly_sync at 0x7feaac227e18>, 'site': 'my.site.com'} Traceback (most recent call last): File "/home/bench_user/frappe-bench/apps/frappe/frappe/utils/background_jobs.py", line 99, in execute_job method(*kwargs) File "/home/bench_user/frappe-bench/apps/woocommerceconnector/woocommerceconnector/api.py", line 17, in check_hourly_sync woocommerce_settings = frappe.get_doc("woocommerce Settings") File "/home/bench_user/frappe-bench/apps/frappe/frappe/init.py", line 740, in get_doc doc = frappe.model.document.get_doc(args, **kwargs) File "/home/bench_user/frappe-bench/apps/frappe/frappe/model/document.py", line 68, in get_doc controller = get_controller(doctype) File "/home/bench_user/frappe-bench/apps/frappe/frappe/model/base_document.py", line 56, in get_controller raise ImportError(doctype) ImportError: woocommerce Settings


TITLE:: frappe.utils.global_search.rebuild_for_doctype

ERROR:: {'method_name': 'frappe.utils.global_search.rebuild_for_doctype', 'log': <function log at 0x7f4c7b67e510>, 'retry': 0, 'is_async': True, 'user': 'user@site.com', 'kwargs': {'doctype': 'WooCommerce Settings'}, 'job_name': 'frappe.utils.global_search.rebuild_for_doctype', 'event': None, 'method': <function rebuild_for_doctype at 0x7f4c7c5b17b8>, 'site': 'my.site.com'} Traceback (most recent call last): File "/home/bench_user/frappe-bench/apps/frappe/frappe/utils/background_jobs.py", line 99, in execute_job method(kwargs) File "/home/bench_user/frappe-bench/apps/frappe/frappe/utils/global_search.py", line 101, in rebuild_for_doctype all_records = frappe.get_all(doctype, fields=fieldnames, filters=_get_filters()) File "/home/bench_user/frappe-bench/apps/frappe/frappe/init.py", line 1305, in get_all return get_list(doctype, *args, *kwargs) File "/home/bench_user/frappe-bench/apps/frappe/frappe/init.py", line 1278, in get_list return frappe.model.db_query.DatabaseQuery(doctype).execute(None, args, kwargs) File "/home/bench_user/frappe-bench/apps/frappe/frappe/model/db_query.py", line 96, in execute result = self.build_and_run() File "/home/bench_user/frappe-bench/apps/frappe/frappe/model/db_query.py", line 110, in build_and_run args = self.prepare_args() File "/home/bench_user/frappe-bench/apps/frappe/frappe/model/db_query.py", line 136, in prepare_args self.set_optional_columns() File "/home/bench_user/frappe-bench/apps/frappe/frappe/model/db_query.py", line 298, in set_optional_columns columns = get_table_columns(self.doctype) File "/home/bench_user/frappe-bench/apps/frappe/frappe/model/meta.py", line 49, in get_table_columns return frappe.db.get_table_columns(doctype) File "/home/bench_user/frappe-bench/apps/frappe/frappe/database/database.py", line 865, in get_table_columns raise self.TableMissingError('DocType', doctype) pymysql.err.ProgrammingError: ('DocType', 'WooCommerce Settings')

thomasoceguera commented 4 years ago

BTW I'm Python3, ERP12, on Unbuntu

thomasoceguera commented 4 years ago

I got this to work by doing two different things.

First off, to get the two different doc.types to even display in the WooCommerce Connector Module, instead of the the blank page that I was seeing, I removed an extra comma in the woocommerceconnector.py file. I forked the author's repository with he fix and comments. He should merge that asap. You can see the change in github

Next, to display the WooCommerce Settings file correctly I did the following:

  1. I restarted the site in developer mode the doctype in developer mode
  2. Logged in as the Administrator user. The Original Administrator user, not a System Manager
  3. Navigated to the Customization Module, then Doc Types
  4. I opened the woocommerce settings doctype and removed all the mandatory checks except the "app_type" then saved the doc.
  5. Then I renamed the doctype to woocommerce settings 2 and saved.
  6. I then checked the box in the upper left of the doctype the at says "go to woocommerce settings 2" and I was able to see the document easily.
  7. I removed all values in any of the fields and saved the doc.
  8. Back to the Customization Module, then Doc Types to edit the doctype one last time, by renaming it back to woocommerce settings and saving.
  9. Restarted bench and it was smooth sailing from there. The doc was able to be opened from the normal module on desk.

I hope this helps folks. and thanks to the original app developer for making app happen. I know it's a more specific module but if it works as described it can be very useful to many people.
Off to bed for me!!

lasalesi commented 4 years ago

Thanks for sharing, will check the offending commas...