What is the correct way to pass in child records when creating a new object? The below example for creating a sales order, (I have tried many variations) with one Sales Order Line item. This example fails with the error MandatoryError: sales_order_details
s = [{
'doctype': 'Sales Order',
'name': 'tes name',
'company': 'company',
'customer': 'client',
'notes': 'notes',
'currency': 'EUR',
'price_list_currency': 'EUR',
'plc_conversion_rate,': '1.0',
'selling_price_list': 'Standard Selling',
'order_type': 'Sales',
'transaction_date': '2013-09-11 00:00:00',
'delivery_date': '2013-09-14 00:00:00',
'fiscal_year': '2013-2014',
'sales_order_details': [{
'doctype': 'Sales Order Item',
'item_code': 'ELTEST',
'item_name': 'some name',
'sales_order_details': 'foo',
'description': 'humbug',
'qty': 3,
'export_rate': 2,
}]
}]
print(wn.insert(s))
Thanks all,
-Jev
–
Note:
If you are posting an issue,
We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.
End of Note
—
You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.
What is the correct way to pass in child records when creating a new object? The below example for creating a sales order, (I have tried many variations) with one Sales Order Line item. This example fails with the error MandatoryError: sales_order_details
s = [{
'doctype': 'Sales Order',
'name': 'tes name',
'company': 'company',
'customer': 'client',
'notes': 'notes',
'currency': 'EUR',
'price_list_currency': 'EUR',
'plc_conversion_rate,': '1.0',
'selling_price_list': 'Standard Selling',
'order_type': 'Sales',
'transaction_date': '2013-09-11 00:00:00',
'delivery_date': '2013-09-14 00:00:00',
'fiscal_year': '2013-2014',
'sales_order_details': [{
'doctype': 'Sales Order Item',
'item_code': 'ELTEST',
'item_name': 'some name',
'sales_order_details': 'foo',
'description': 'humbug',
'qty': 3,
'export_rate': 2,
}]
}]
print(wn.insert(s))
Thanks all,
-Jev
–
Note:
If you are posting an issue,
We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.
End of Note
—
You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.
What is the correct way to pass in child records when creating a new object? The below example for creating a sales order, (I have tried many variations) with one Sales Order Line item. This example fails with the error MandatoryError: sales_order_details
s = [{
'doctype': 'Sales Order',
'name': 'tes name',
'company': 'company',
'customer': 'client',
'notes': 'notes',
'currency': 'EUR',
'price_list_currency': 'EUR',
'plc_conversion_rate,': '1.0',
'selling_price_list': 'Standard Selling',
'order_type': 'Sales',
'transaction_date': '2013-09-11 00:00:00',
'delivery_date': '2013-09-14 00:00:00',
'fiscal_year': '2013-2014',
'sales_order_details': [{
'doctype': 'Sales Order Item',
'item_code': 'ELTEST',
'item_name': 'some name',
'sales_order_details': 'foo',
'description': 'humbug',
'qty': 3,
'export_rate': 2,
}]
}]
print(wn.insert(s))
Thanks all,
-Jev
–
Note:
If you are posting an issue,
We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.
End of Note
—
You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.