**### App Versions
{
"agriculture": "0.0.1",
"chat": "0.0.1",
"education": "15.0.0",
"erpnext": "15.19.2",
"frappe": "15.20.0",
"healthcare": "16.0.0-dev",
"hrms": "15.16.0",
"india_compliance": "15.7.1"
}
Route
Form/Sales Invoice/new-sales-invoice-lmqobcdpjv
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 1718, 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 337, in save
return self._save(*args, **kwargs)
File "apps/frappe/frappe/model/document.py", line 359, in _save
return self.insert()
File "apps/frappe/frappe/model/document.py", line 291, in insert
self.run_before_save_methods()
File "apps/frappe/frappe/model/document.py", line 1091, in run_before_save_methods
self.run_method("validate")
File "apps/frappe/frappe/model/document.py", line 962, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File "apps/frappe/frappe/model/document.py", line 1322, in composer
return composed(self, method, *args, **kwargs)
File "apps/frappe/frappe/model/document.py", line 1306, in runner
add_to_return_value(self, f(self, method, *args, **kwargs))
File "apps/healthcare/healthcare/healthcare/utils.py", line 531, in manage_invoice_validate
if doc.service_unit and len(doc.items):
AttributeError: 'HealthcareSalesInvoice' object has no attribute 'service_unit'
Request Data
{
"type": "POST",
"args": {
"doc": "{\"docstatus\":0,\"doctype\":\"Sales Invoice\",\"name\":\"new-sales-invoice-lmqobcdpjv\",\"__islocal\":1,\"__unsaved\":1,\"owner\":\"Administrator\",\"naming_series\":\"SI24B25/I./\",\"e_waybill_status\":\"\",\"company\":\"Softland India Ltd\",\"posting_date\":\"2024-06-24\",\"set_posting_time\":0,\"custom_sales_type\":\"B2B PRODUCT INDIA\",\"custom_is_tallyupdated\":\"0\",\"custom_is_updated\":\"0\",\"is_pos\":0,\"is_consolidated\":0,\"is_return\":0,\"reason_for_issuing_document\":\"\",\"update_outstanding_for_self\":1,\"update_billed_amount_in_sales_order\":0,\"update_billed_amount_in_delivery_note\":1,\"is_debit_note\":0,\"is_reverse_charge\":0,\"is_export_with_gst\":0,\"currency\":\"INR\",\"selling_price_list\":\"Standard Selling\",\"price_list_currency\":\"INR\",\"ignore_pricing_rule\":0,\"update_stock\":0,\"items\":[{\"docstatus\":0,\"doctype\":\"Sales Invoice Item\",\"name\":\"new-sales-invoice-item-fdveyxuwcq\",\"__islocal\":1,\"__unsaved\":1,\"owner\":\"Administrator\",\"has_item_scanned\":0,\"stock_uom\":\"Nos\",\"margin_type\":\"\",\"is_free_item\":0,\"grant_commission\":1,\"delivered_by_supplier\":0,\"is_fixed_asset\":0,\"enable_deferred_revenue\":0,\"use_serial_batch_fields\":0,\"allow_zero_valuation_rate\":0,\"cost_center\":\"Main - SIL\",\"page_break\":0,\"parent\":\"new-sales-invoice-lmqobcdpjv\",\"parentfield\":\"items\",\"parenttype\":\"Sales Invoice\",\"idx\":1,\"qty\":1,\"conversion_factor\":1,\"stock_qty\":1,\"price_list_rate\":256.77,\"base_price_list_rate\":256.77,\"margin_rate_or_amount\":0,\"rate_with_margin\":0,\"discount_amount\":0,\"base_rate_with_margin\":0,\"rate\":256.77,\"amount\":256.77,\"base_rate\":256.77,\"base_amount\":256.77,\"stock_uom_rate\":256.77,\"net_rate\":256.77,\"net_amount\":256.77,\"base_net_rate\":256.77,\"base_net_amount\":256.77,\"taxable_value\":0,\"igst_rate\":0,\"cgst_rate\":0,\"sgst_rate\":0,\"cess_rate\":0,\"cess_non_advol_rate\":0,\"igst_amount\":0,\"cgst_amount\":0,\"sgst_amount\":0,\"cess_amount\":0,\"cess_non_advol_amount\":0,\"weight_per_unit\":0,\"total_weight\":0,\"incoming_rate\":0,\"actual_batch_qty\":0,\"actual_qty\":0,\"delivered_qty\":0,\"custom_item_classification\":\"Finished Software\",\"custom_item_family\":\"Software Solution\",\"custom_alias_name\":\"Man Power Charges\",\"gst_hsn_code\":\"998313\",\"item_code\":\"PR0323\",\"weight_uom\":null,\"barcode\":null,\"pricing_rules\":\"\",\"item_name\":\"Man Power Charges\",\"description\":\"Man Power Charges\",\"image\":\"\",\"warehouse\":\"Stores - SIL\",\"income_account\":\"Sales - SIL\",\"expense_account\":\"Cost of Goods Sold - SIL\",\"discount_account\":null,\"provisional_expense_account\":null,\"has_serial_no\":0,\"has_batch_no\":0,\"batch_no\":null,\"uom\":\"Nos\",\"min_order_qty\":\"\",\"discount_percentage\":0,\"update_stock\":0,\"last_purchase_rate\":0,\"transaction_date\":\"2024-06-24\",\"against_blanket_order\":null,\"bom_no\":null,\"item_group\":\"Software Solution\",\"brand\":null,\"manufacturer\":null,\"manufacturer_part_no\":null,\"item_tax_rate\":\"{}\",\"customer_item_code\":null,\"projected_qty\":0,\"reserved_qty\":0,\"has_margin\":false,\"free_item_data\":[],\"child_docname\":\"new-sales-invoice-item-fdveyxuwcq\"}],\"custom_item_series\":[],\"taxes\":[{\"docstatus\":0,\"doctype\":\"Sales Taxes and Charges\",\"name\":\"new-sales-taxes-and-charges-hmfbjyuene\",\"__islocal\":1,\"__unsaved\":1,\"owner\":\"Administrator\",\"charge_type\":\"On Net Total\",\"included_in_print_rate\":0,\"included_in_paid_amount\":0,\"cost_center\":\"Main - SIL\",\"account_currency\":null,\"dont_recompute_tax\":0,\"parent\":\"new-sales-invoice-lmqobcdpjv\",\"parentfield\":\"taxes\",\"parenttype\":\"Sales Invoice\",\"idx\":1,\"row_id\":null,\"account_head\":\"Output Tax SGST - SIL\",\"description\":\"SGST\",\"rate\":9,\"tax_amount\":23.11,\"total\":279.88,\"tax_amount_after_discount_amount\":23.11,\"base_tax_amount\":23.11,\"base_total\":279.88,\"base_tax_amount_after_discount_amount\":23.11,\"item_wise_tax_detail\":\"{\\\"PR0323\\\":[9,23.11]}\"},{\"docstatus\":0,\"doctype\":\"Sales Taxes and Charges\",\"name\":\"new-sales-taxes-and-charges-gyggfouxxo\",\"__islocal\":1,\"__unsaved\":1,\"owner\":\"Administrator\",\"charge_type\":\"On Net Total\",\"included_in_print_rate\":0,\"included_in_paid_amount\":0,\"cost_center\":\"Main - SIL\",\"account_currency\":null,\"dont_recompute_tax\":0,\"parent\":\"new-sales-invoice-lmqobcdpjv\",\"parentfield\":\"taxes\",\"parenttype\":\"Sales Invoice\",\"idx\":2,\"row_id\":null,\"account_head\":\"Output Tax CGST - SIL\",\"description\":\"CGST\",\"rate\":9,\"tax_amount\":23.11,\"total\":302.99,\"tax_amount_after_discount_amount\":23.11,\"base_tax_amount\":23.11,\"base_total\":302.99,\"base_tax_amount_after_discount_amount\":23.11,\"item_wise_tax_detail\":\"{\\\"PR0323\\\":[9,23.11]}\"}],\"use_company_roundoff_cost_center\":0,\"disable_rounded_total\":0,\"apply_discount_on\":\"Grand Total\",\"is_cash_or_non_trade_discount\":0,\"pricing_rules\":[],\"packed_items\":[],\"timesheets\":[],\"total_billing_amount\":0,\"payments\":[],\"allocate_advances_automatically\":0,\"only_include_allocated_payments\":0,\"advances\":[],\"write_off_outstanding_amount_automatically\":0,\"redeem_loyalty_points\":0,\"ignore_default_payment_terms_template\":0,\"payment_schedule\":[],\"party_account_currency\":\"INR\",\"is_opening\":\"No\",\"sales_team\":[],\"letter_head\":\"Sales Invoice\",\"group_same_items\":0,\"invoice_copy\":\"Original for Recipient\",\"mode_of_transport\":\"Road\",\"lr_date\":\"2024-06-24\",\"gst_vehicle_type\":\"Regular\",\"status\":\"Draft\",\"einvoice_status\":\"\",\"is_internal_customer\":0,\"is_discounted\":0,\"repost_required\":0,\"conversion_rate\":1,\"plc_conversion_rate\":1,\"total_billing_hours\":0,\"company_tax_id\":null,\"company_address\":\"Softland India Ltd-Billing\",\"company_address_display\":\"Kinfra Small Industrial Park<br>Trivandrum<br>\\nKerala<br>695009<br>India<br>\\n\",\"company_gstin\":\"32AADCS3676A1ZQ\",\"base_net_total\":256.77,\"net_total\":256.77,\"base_total\":256.77,\"total\":256.77,\"total_qty\":1,\"rounding_adjustment\":0.01,\"grand_total\":302.99,\"base_grand_total\":302.99,\"total_taxes_and_charges\":46.22,\"base_total_taxes_and_charges\":46.22,\"base_rounding_adjustment\":0.01,\"rounded_total\":303,\"base_rounded_total\":303,\"in_words\":\"\",\"base_in_words\":\"\",\"base_discount_amount\":0,\"total_advance\":0,\"write_off_amount\":0,\"paid_amount\":0,\"base_paid_amount\":0,\"change_amount\":0,\"base_change_amount\":0,\"outstanding_amount\":303,\"amount_eligible_for_commission\":256.77,\"total_commission\":null,\"posting_time\":\"17:18:10\",\"tax_id\":null,\"customer_name\":\"KERALA GRAMEEN BANK\",\"custom_zonespares\":\"PN\",\"custom_zoneconsumables\":\"PN\",\"custom_zoneamc\":\"PN\",\"custom_zoneinternational\":null,\"custom_regionspares\":\"RA2\",\"custom_regionconsumables\":\"RA2\",\"custom_regionamc\":\"RA2\",\"custom_regioninternational\":null,\"custom_clusterinternational\":null,\"loyalty_program\":null,\"represents_company\":null,\"customer\":\"KERALA GRAMEEN BANK\",\"debit_to\":\"Debtors - SIL\",\"due_date\":\"2024-06-24\",\"customer_address\":\"KERALA GRAMEEN BANK-Billing-1\",\"billing_address_gstin\":\"32AACAK1498D1ZX\",\"gst_category\":\"Registered Regular\",\"custom_postal_code\":\"676505\",\"address_display\":\"THE MANAGER,KERALA GRAMEEN BANK,PUTHANATHANI BRANCH,MALAPPURAM<br>THE MANAGER,KERALA GRAMEEN BANK,PUTHANATHANI BRANCH,MALAPPURAM<br>MALAPPURAM<br>\\nKerala<br>676505<br>India<br>\\n\",\"shipping_address_name\":null,\"shipping_address\":null,\"tax_category\":\"In-State\",\"place_of_supply\":\"32-Kerala\",\"taxes_and_charges\":\"Output GST In-state - SIL\",\"contact_person\":null,\"contact_display\":null,\"contact_email\":null,\"contact_mobile\":null,\"customer_group\":\"Individual\",\"territory\":\"India\",\"language\":\"en\",\"payment_terms_template\":null,\"total_net_weight\":0}",
"action": "Save"
},
"btn": {
"jQuery370057369620423271231": {
"events": {
"click": [
{
"type": "click",
"origType": "click",
"guid": 13353,
"namespace": ""
}
]
}
}
},
"freeze": true,
"headers": {},
"error_handlers": {},
"url": "/api/method/frappe.desk.form.save.savedocs",
"request_id": null
}
Response Data
{
"exception": "AttributeError: 'HealthcareSalesInvoice' object has no attribute 'service_unit'",
"exc_type": "AttributeError",
"_exc_source": "healthcare (app)"
}
```**