App Versions
{
"erpnext": "15.0.0",
"frappe": "15.0.2",
"india_compliance": "15.0.0-dev"
}
Route
Form/Subcontracting Receipt/new-subcontracting-receipt-dmgohdmemb
Traceback
Traceback (most recent call last):
File "apps/frappe/frappe/app.py", line 110, in application
response = frappe.api.handle(request)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "apps/frappe/frappe/api/__init__.py", line 49, in handle
data = endpoint(**arguments)
^^^^^^^^^^^^^^^^^^^^^
File "apps/frappe/frappe/api/v1.py", line 36, in handle_rpc_call
return frappe.handler.handle()
^^^^^^^^^^^^^^^^^^^^^^^
File "apps/frappe/frappe/handler.py", line 49, in handle
data = execute_cmd(cmd)
^^^^^^^^^^^^^^^^
File "apps/frappe/frappe/handler.py", line 85, in execute_cmd
return frappe.call(method, **frappe.form_dict)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "apps/frappe/frappe/__init__.py", line 1682, in call
return fn(*args, **newargs)
^^^^^^^^^^^^^^^^^^^^
File "apps/frappe/frappe/utils/typing_validations.py", line 31, in wrapper
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "apps/frappe/frappe/desk/form/save.py", line 39, in savedocs
doc.save()
File "apps/frappe/frappe/model/document.py", line 334, in save
return self._save(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "apps/frappe/frappe/model/document.py", line 356, in _save
return self.insert()
^^^^^^^^^^^^^
File "apps/frappe/frappe/model/document.py", line 310, in insert
self.run_post_save_methods()
File "apps/frappe/frappe/model/document.py", line 1118, in run_post_save_methods
self.run_method("on_update")
File "apps/frappe/frappe/model/document.py", line 950, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "apps/frappe/frappe/model/document.py", line 1316, in composer
return composed(self, method, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "apps/frappe/frappe/model/document.py", line 1298, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
^^^^^^^^^^^^^^^^^^^^^^^^^
File "apps/frappe/frappe/model/document.py", line 947, in fn
return method_object(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "apps/erpnext/erpnext/subcontracting/doctype/subcontracting_receipt/subcontracting_receipt.py", line 87, in on_update
self.set_serial_and_batch_bundle(table_field)
File "apps/erpnext/erpnext/controllers/stock_controller.py", line 399, in set_serial_and_batch_bundle
frappe.get_doc("Serial and Batch Bundle", row.get(field)).set_serial_and_batch_values(
File "apps/erpnext/erpnext/stock/doctype/serial_and_batch_bundle/serial_and_batch_bundle.py", line 298, in set_serial_and_batch_values
self.validate_quantity(row, qty_field=qty_field)
File "apps/erpnext/erpnext/stock/doctype/serial_and_batch_bundle/serial_and_batch_bundle.py", line 404, in validate_quantity
f"Total quantity {abs(self.total_qty)} in the Serial and Batch Bundle {bold(self.name)} does not match with the quantity {abs(row.get(qty_field))} for the Item {bold(self.item_code)} in the {self.voucher_type} # {self.voucher_no}"
^^^^^^^^^^^^^^^^^^^^^^^
TypeError: bad operand type for abs(): 'NoneType'
Request Data
{
"type": "POST",
"args": {
"doc": "{\"owner\":\"Administrator\",\"docstatus\":0,\"idx\":0,\"naming_series\":\"MAT-SCR-.YYYY.-\",\"supplier\":\"Arihant Dyeing\",\"supplier_name\":\"Arihant Dyeing\",\"company\":\"Hard N Soft\",\"posting_date\":\"2023-12-14\",\"posting_time\":\"16:23:31.962475\",\"set_posting_time\":0,\"is_return\":0,\"supplier_warehouse\":\"Goods In Transit - HNS\",\"total_qty\":300,\"total\":23,\"distribute_additional_costs_based_on\":\"Qty\",\"total_additional_costs\":0,\"status\":\"Draft\",\"per_returned\":0,\"doctype\":\"Subcontracting Receipt\",\"items\":[{\"owner\":\"Administrator\",\"docstatus\":0,\"idx\":1,\"item_code\":\"FIN1006\",\"item_name\":\"FIN1006\",\"is_scrap_item\":0,\"description\":\"FIN1006\",\"received_qty\":0,\"qty\":300,\"rejected_qty\":0,\"returned_qty\":0,\"stock_uom\":\"Nos\",\"conversion_factor\":1,\"rate\":0.076666667,\"amount\":23.000000099999998,\"rm_cost_per_qty\":0,\"service_cost_per_qty\":0.076666667,\"additional_cost_per_qty\":0,\"scrap_cost_per_qty\":0,\"rm_supp_cost\":0,\"warehouse\":\"Stores - HNS\",\"subcontracting_order\":\"SC-ORD-2023-00005\",\"subcontracting_order_item\":\"87ca9249d2\",\"bom\":\"BOM-FIN1006-001\",\"schedule_date\":\"2023-12-14\",\"cost_center\":\"Main - HNS\",\"page_break\":0,\"parentfield\":\"items\",\"parenttype\":\"Subcontracting Receipt\",\"doctype\":\"Subcontracting Receipt Item\",\"__islocal\":1,\"__unsaved\":1,\"parent\":\"new-subcontracting-receipt-dmgohdmemb\",\"name\":\"new-subcontracting-receipt-item-szndlznavq\",\"serial_and_batch_bundle\":\"SABB-00000031\"}],\"supplied_items\":[],\"additional_costs\":[],\"__islocal\":1,\"__onload\":{\"load_after_mapping\":true},\"__unsaved\":1,\"name\":\"new-subcontracting-receipt-dmgohdmemb\",\"__last_sync_on\":\"2023-12-14T10:53:31.842Z\"}",
"action": "Save"
},
"btn": {
"jQuery370062606293250653991": {
"events": {
"click": [
{
"type": "click",
"origType": "click",
"guid": 20287,
"namespace": ""
}
]
}
}
},
"freeze": true,
"headers": {},
"error_handlers": {},
"url": "/api/method/frappe.desk.form.save.savedocs",
"request_id": "4b1744ed-9828-4d5c-aaa7-9dd3e9f04d52"
}
Response Data
{
"exception": "TypeError: bad operand type for abs(): 'NoneType'",
"exc_type": "TypeError",
"_exc_source": "erpnext (app)"
}