Pull all customer's po no in delivery note when made from multiple sales order
This commit is contained in:
parent
4b83403a63
commit
ad0bd4ca92
@ -175,6 +175,7 @@
|
|||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"label": "PO No",
|
"label": "PO No",
|
||||||
|
"no_copy": 1,
|
||||||
"oldfieldname": "po_no",
|
"oldfieldname": "po_no",
|
||||||
"oldfieldtype": "Data",
|
"oldfieldtype": "Data",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
@ -1020,7 +1021,7 @@
|
|||||||
"idx": 1,
|
"idx": 1,
|
||||||
"is_submittable": 1,
|
"is_submittable": 1,
|
||||||
"issingle": 0,
|
"issingle": 0,
|
||||||
"modified": "2014-10-08 14:22:44.717108",
|
"modified": "2014-12-12 12:35:09.652211",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Selling",
|
"module": "Selling",
|
||||||
"name": "Sales Order",
|
"name": "Sales Order",
|
||||||
|
|||||||
@ -275,6 +275,14 @@ def make_material_request(source_name, target_doc=None):
|
|||||||
@frappe.whitelist()
|
@frappe.whitelist()
|
||||||
def make_delivery_note(source_name, target_doc=None):
|
def make_delivery_note(source_name, target_doc=None):
|
||||||
def set_missing_values(source, target):
|
def set_missing_values(source, target):
|
||||||
|
if source.po_no:
|
||||||
|
if target.po_no:
|
||||||
|
target_po_no = target.po_no.split(", ")
|
||||||
|
target_po_no.append(source.po_no)
|
||||||
|
target.po_no = ", ".join(list(set(target_po_no))) if len(target_po_no) > 1 else target_po_no[0]
|
||||||
|
else:
|
||||||
|
target.po_no = source.po_no
|
||||||
|
|
||||||
target.ignore_pricing_rule = 1
|
target.ignore_pricing_rule = 1
|
||||||
target.run_method("set_missing_values")
|
target.run_method("set_missing_values")
|
||||||
target.run_method("calculate_taxes_and_totals")
|
target.run_method("calculate_taxes_and_totals")
|
||||||
|
|||||||
@ -178,7 +178,7 @@
|
|||||||
{
|
{
|
||||||
"fieldname": "po_no",
|
"fieldname": "po_no",
|
||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
"hidden": 1,
|
"hidden": 0,
|
||||||
"label": "Customer's Purchase Order No",
|
"label": "Customer's Purchase Order No",
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"oldfieldname": "po_no",
|
"oldfieldname": "po_no",
|
||||||
@ -1013,7 +1013,7 @@
|
|||||||
"idx": 1,
|
"idx": 1,
|
||||||
"in_create": 0,
|
"in_create": 0,
|
||||||
"is_submittable": 1,
|
"is_submittable": 1,
|
||||||
"modified": "2014-09-09 05:35:30.700911",
|
"modified": "2014-12-12 12:36:59.262500",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Stock",
|
"module": "Stock",
|
||||||
"name": "Delivery Note",
|
"name": "Delivery Note",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user