frappe / frappe/ecommerce_integrations
Error with valuation rate on products that are immediately fulfilled on order
- Dominant language
- Python
- Stars
- 206
- Forks
- 275
- Avg merge
- 54m
- Merged PRs (30d)
- 1
Description
When a new product is created in shopify that is immediately fulfilled (non-physical products in general) the sync will crash with a valuation rate must be set error. However, it has not actually committed its changes to the item, so the item does not actually exist to set the valuation rate on. This means I have to manually create the item and set the valuation rate.
In the create_order function in order.py is there a way to commit all changes between the create_sales_order call and the create_delivery_note call?
Like this:
def create_order(order, setting, company=None):
# local import to avoid circular dependencies
from ecommerce_integrations.shopify.fulfillment import create_delivery_note
from ecommerce_integrations.shopify.invoice import create_sales_invoice
so = create_sales_order(order, setting, company)
if so:
< DO SOMETHING TO COMMIT CHANGES HERE >
if order.get("financial_status") == "paid":
create_sales_invoice(order, setting, so)
if order.get("fulfillments"):
create_delivery_note(order, setting, so)
I am on the latest ecommerce integrations and ERPNext 13.
Thanks!
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in order.py at create_order, then trace create_sales_order and create_delivery_note to reproduce the Shopify sync for an immediately fulfilled product. Confirm the item changes are committed before delivery-note processing, and verify that the sync completes without requiring manual item creation or valuation-rate setup.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100