fix: Map warehouse and serial no

This commit is contained in:
Deepesh Garg
2020-12-11 18:38:21 +05:30
parent 9d806df589
commit 7b458be170

View File

@@ -1548,6 +1548,26 @@ def make_inter_company_transaction(doctype, source_name, target_doc=None):
if currency: if currency:
target_doc.currency = currency target_doc.currency = currency
item_field_map = {
"doctype": target_doctype + " Item",
"field_no_map": [
"income_account",
"expense_account",
"cost_center",
"warehouse"
]
}
if source_doc.get('update_stock'):
item_field_map.update({
'field_map': {
source_document_warehouse_field: target_document_warehouse_field,
'batch_no': 'batch_no',
'serial_no': 'serial_no'
}
})
doclist = get_mapped_doc(doctype, source_name, { doclist = get_mapped_doc(doctype, source_name, {
doctype: { doctype: {
"doctype": target_doctype, "doctype": target_doctype,