Closed kvt closed 1 year ago
@kvt the error message is pretty clear that you cannot add items with zero quantity be it via amazon or any other method (try creating one manually as well).
Why should this be tagged as a bug?
@kvt by the way, bench version
must be executed within the bench directory (for example, /home/frappe/frappe-bench
) . Same goes for almost all bench commands. ;)
@kennethsequeira amazon sends this information and ERPNext cannot handle it. That is a bug, right?
@barredterra looks like for integrations there need to be a way to handle this.
Basically, ERPNext will not let you create a quote/order/invoice with quantity 0. I imagine the validation was added for a purpose 😅.
{ "customer": "SOOOOOXYZ", "items": { "batch_id": "J-20-00048", "conversion_factor": 1.0, "stock_qty": 1, "description": "NADA", "item_code": "AVJ-130", "item_name": "JUGO DE SABILA", "qty": 1.0, "stock_uom": "Litre", "uom": "Litre" }, "sales_order": "SAL-ORD-2020-00001" }
ERROR
File \\"/home/erpnext/sabila-2/apps/erpnext/erpnext/controllers/accounts_controller.py\\", line 434, in validate_qty_is_not_zero\n if not item.qty:\nAttributeError: 'str' object has no attribute 'qty'\n\"]"
Delivery Note
curl --request POST \ --url http://IP:81/api/resource/Delivery%20Note \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --cookie 'sid=c0c91b0620e69cf3e1772f866f99c2363b90108b9162b009e8f425c2; system_user=yes; full_name=Arthur%2520M; user_id=a.m@test.local; user_image=' \ --data '{ "customer": "SOOOXYZ", "items": { "batch_id": "J-20-00048", "conversion_factor": 1.0, "stock_qty": 1, "description": "NADA", "item_code": "AVJ-130", "item_name": "JUGO DE SABILA", "qty": 1.0, "stock_uom": "Litre", "uom": "Litre" }, "sales_order": "SAL-ORD-2020-00001" }'
erpnext version
erpnext 12.14.0 frappe 12.12.0 ubuntu 18
Description of the issue
Error occurs while creating sales order when some of line items have 0 quantity in amazon order.
Context information (for bug reports)
Output of
bench version
Steps to reproduce the issue
Observed result
Expected result
Stacktrace / full error message
Additional information
OS version / distribution,
ERPNext
install method, etc.