Merge pull request #2489 from nabinhait/fix1

Pull all customer's po no in delivery note when made from multiple SO
This commit is contained in:
Nabin Hait 2014-12-12 12:50:41 +05:30
commit 870dd43268
3 changed files with 12 additions and 3 deletions

View File

@ -175,6 +175,7 @@
"fieldtype": "Data",
"hidden": 0,
"label": "PO No",
"no_copy": 1,
"oldfieldname": "po_no",
"oldfieldtype": "Data",
"permlevel": 0,
@ -1020,7 +1021,7 @@
"idx": 1,
"is_submittable": 1,
"issingle": 0,
"modified": "2014-10-08 14:22:44.717108",
"modified": "2014-12-12 12:35:09.652211",
"modified_by": "Administrator",
"module": "Selling",
"name": "Sales Order",

View File

@ -275,6 +275,14 @@ def make_material_request(source_name, target_doc=None):
@frappe.whitelist()
def make_delivery_note(source_name, target_doc=None):
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.run_method("set_missing_values")
target.run_method("calculate_taxes_and_totals")

View File

@ -178,7 +178,7 @@
{
"fieldname": "po_no",
"fieldtype": "Data",
"hidden": 1,
"hidden": 0,
"label": "Customer's Purchase Order No",
"no_copy": 0,
"oldfieldname": "po_no",
@ -1013,7 +1013,7 @@
"idx": 1,
"in_create": 0,
"is_submittable": 1,
"modified": "2014-09-09 05:35:30.700911",
"modified": "2014-12-12 12:36:59.262500",
"modified_by": "Administrator",
"module": "Stock",
"name": "Delivery Note",