WooCommerce Sales Order as Draft

Recently back to ERPNext since overall it has everything I need but I am having an issue with orders from WooCommerce. Not all of the charges (usually tax & freight transfer over properly and I end up with a different order $ Total.

Is there a way to edit or modify the integration so that orders are in Draft status so I can modify if necessary? Right now I have to recreate and then delete the original. Not the end of the world but rather time consuming.

It submits the orders here.

You can add a field in woocommerce settings that flags whether to submit orders and check the value before .submit()

If it works for you then do send a pull request.

1 Like

Well, that was overly simple. Thank you. Probably not the cleanest thing to do but I just commented out the submit line and performed a test. Sales order was created but left in Draft status.

Thank you. Not sure what you mean about a pull request.

173. # new_sales_order.submit()

1 Like

This just makes the orders draft for all cases.

It can be done like following:

  • Woocommerce Settings should have a field is_order_submittable
  • if frappe.db.get_value('Woocommerce Settings', 'Woocommerce Settings', 'is_order_submittable'): new_sales_order.submit()

Pull request means sending the fix or feature you made into the upstream ERPNext code so that others can also benefit from it.

https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request

2 Likes