frappe / erpnext

Free and Open Source Enterprise Resource Planning (ERP)
https://erpnext.com
GNU General Public License v3.0
21.87k stars 7.33k forks source link

Error can not find group “All Item Groups” when configuring woocommerce in erpnext v11 when using the language is different from English #15931

Closed erickrojasfigueroa closed 5 years ago

erickrojasfigueroa commented 6 years ago

Test in: WordPress 4.9.3 Woocomerce Versión 3.2.5 ERPNext: v11.0.3-beta.15

After entering the API data (url, password, secret) of woocomerce in ERPNEXT, show an indicated error that it is not possible to find the group of articles: “All Item Groups”.

I have reviewed in BD and I realize that the groups of articles are translated, therefore there is a validation in ERPNEXT code that compares with “All Item Groups” and as it does not find it can not save the configuration.

See current groups: select name, parent, parentfield, parenttype, is_group, parenttype, idx, item_group_name, parent_item_group from tabItem Group;

SQL script to update the article group name for woocomerce for the Spanish language(In the case of other languages, check according to name of the group of the selection of the previous point):

update tabItem Group set name = “All Item Groups” where name = “Todos los Grupos de Artículos”;

update tabItem Group set parent_item_group = “All Item Groups” where name != “All Item Groups”;

With this script I managed to configure Woocommerce where ERP provided me with a secret key which I used to add the webhook in woocommercer for new orders, but when creating an order from woocoommerce it was not sent to ERPNEXT.

In the log of the woocommerce webhook, it shows:

Result:

Estado: HTTP 403 Forbidden: Not Permitted window.frappe = {}; frappe.ready_events = []; frappe.ready = function(fn) { frappe.ready_events.push(fn); } window.dev_server = 0; Flex <a …

Not Permitted You do not have enough permissions to complete the action … Home Status: 403 frappe.ready(function() { if(window.location.hash) { …

This same error is reported in: ERPNext Integration with WordPress WooCommerce

erickrojasfigueroa commented 5 years ago

Great!