libracore / WooCommerceConnector

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

Error when creating Order and Invoice for product sale with WooCommerce variant #88

Open sptechcue opened 7 months ago

sptechcue commented 7 months ago

I have a client that uses Woocommerce Connector, it synchronizes stock, orders, customers, all good so far.

image

But there is a snag with an order you had recently, I recreated it on my test machine and give you an example:

You have 2 items with 2 variants each:

Shoe 1: VARIANT: Color Red VARIANT: Size 8 VARIANT: Color Red VARIANT: Size 9 Shoe 2: VARIANT: Color Blue VARIANT: Size 8 VARIANT: Color Blue VARIANT: Size 9


When a customer buys in the same order 2 shoes of the same model, but different sizes: Shoe 1: VARIANT: Color Red VARIANT: Size 8 VARIANT: Color Red VARIANT: Size 9

image

When the Sales Order (SO) and the sales invoice are created, only one of the two variants appears in the 2 items.

SALES ORDER
image

SALES INVOICE image

But when checking the woocommerce log it does import correctly.

image

image

image

I have tested it in ERPNext v13, v14 and v15 and in all of them it is the same. Maybe someone can give me a hand. Regards

Glitch-Trap-1 commented 1 week ago

Hey @sptechcue,

I've seen your posts on ERPnext and Github, were you able to figure anything else out? I just download it myself and made changes to woocommerce_requests.py for it to work on V15. I am interested in helping you figure out the problem as my company does use variants a lot. Is your current work around just to delete one of the rows and update it with the accurate one?

Let me know and maybe we can figure something out. I looked at some of the python code briefly for the sales order/sales invoice creation. Your log does show the correct import so I'm wondering why the sales order is failing to pull the variant!