Hello,
I am integrating ERPNext with a legacy sales hardware. Here is is my JSON
{
"doctype": "Sales Invoice",
"customer": customer['name'],
"title": invoice['invoice_ref'],
"contact_display": customer['name'],
"posting_date": str(invoice['creation_date']),
"company": "EBM Ltd",
'currency': 'RWF',
'debit_to': 'Debtors - EL',
'conversion_rate': 1.0,
'selling_price_list': 'Standard Selling',
'price_list_currency': 'RWF',
'plc_conversion_rate': 1.0,
'naming_series': 'SINV-',
'status': 'Draft',
'grand_total':100,
"items": [
{
'qty': 1,
'doctype': 'Sales Order Item',
'item_code': 'Water Consumption',
'item_name': 'Water Consumption',
'description': 'Water Consumption',
'income_accont': 'Sales - EL',
'cost_center': 'Main - EL',
'rate': 100,
'price_list_rate': 100,
'amount': 100
}
]
}
I have been trying the insert this for the past 2 days but get the error
File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 932, in round_floats_in
doc.set(fieldname, flt(doc.get(fieldname), self.precision(fieldname, doc.parentfield)))
File "/home/frappe/frappe-bench/apps/frappe/frappe/model/base_document.py", line 686, in precision
if df.fieldtype in ("Currency", "Float", "Percent"):
AttributeError: 'NoneType' object has no attribute 'fieldtype'
ERPNext: v7.2.21
Frappe Framework: v7.2.17