From 8857d87c5bd695a613bbb05a4c8251ed412d44fa Mon Sep 17 00:00:00 2001 From: deepeshgarg007 Date: Thu, 26 Dec 2019 17:34:02 +0530 Subject: [PATCH 1/4] fix: Travis --- .../set_against_blanket_order_in_sales_and_purchase_order.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/erpnext/patches/v12_0/set_against_blanket_order_in_sales_and_purchase_order.py b/erpnext/patches/v12_0/set_against_blanket_order_in_sales_and_purchase_order.py index 555d8ae797..3fccbfa700 100644 --- a/erpnext/patches/v12_0/set_against_blanket_order_in_sales_and_purchase_order.py +++ b/erpnext/patches/v12_0/set_against_blanket_order_in_sales_and_purchase_order.py @@ -1,7 +1,10 @@ import frappe def execute(): + + frappe.reload_doc('selling', 'doctype', frappe.scrub('Sales Order Item')) + frappe.reload_doc('buying', 'doctype', frappe.scrub('Purchase Order Item')) + for doctype in ['Sales Order Item', 'Purchase Order Item']: - frappe.reload_doctype(doctype) frappe.db.sql(""" UPDATE `tab{0}` SET against_blanket_order = 1 From 0b9a98ad43391c5aa0424a0aa1d8598335828e9e Mon Sep 17 00:00:00 2001 From: deepeshgarg007 Date: Thu, 26 Dec 2019 18:15:13 +0530 Subject: [PATCH 2/4] fix: Add against blanket order field in sales order --- .../selling/doctype/sales_order_item/sales_order_item.json | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/erpnext/selling/doctype/sales_order_item/sales_order_item.json b/erpnext/selling/doctype/sales_order_item/sales_order_item.json index aad37d321e..5a18a31a06 100644 --- a/erpnext/selling/doctype/sales_order_item/sales_order_item.json +++ b/erpnext/selling/doctype/sales_order_item/sales_order_item.json @@ -757,6 +757,12 @@ "fieldname": "additional_notes", "fieldtype": "Text", "label": "Additional Notes" + }, + { + "default": "0", + "fieldname": "against_blanket_order", + "fieldtype": "Check", + "label": "Against Blanket Order" } ], "idx": 1, From bd1da65098f14ac71bb7709af0ac09c6179c5952 Mon Sep 17 00:00:00 2001 From: deepeshgarg007 Date: Thu, 26 Dec 2019 18:26:13 +0530 Subject: [PATCH 3/4] fix: Update modified date --- erpnext/selling/doctype/sales_order_item/sales_order_item.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/selling/doctype/sales_order_item/sales_order_item.json b/erpnext/selling/doctype/sales_order_item/sales_order_item.json index 5a18a31a06..4c8973eb65 100644 --- a/erpnext/selling/doctype/sales_order_item/sales_order_item.json +++ b/erpnext/selling/doctype/sales_order_item/sales_order_item.json @@ -767,7 +767,7 @@ ], "idx": 1, "istable": 1, - "modified": "2019-12-11 18:06:26.238169", + "modified": "2019-12-12 18:06:26.238169", "modified_by": "Administrator", "module": "Selling", "name": "Sales Order Item", From 61bd6ccc2b6b002651d92ce628592b4d03b44b7a Mon Sep 17 00:00:00 2001 From: thefalconx33 Date: Thu, 26 Dec 2019 18:23:05 +0530 Subject: [PATCH 4/4] fix: travis failing for leave application test --- .../doctype/leave_application/test_leave_application.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/erpnext/hr/doctype/leave_application/test_leave_application.py b/erpnext/hr/doctype/leave_application/test_leave_application.py index b9c02101f1..b6216424de 100644 --- a/erpnext/hr/doctype/leave_application/test_leave_application.py +++ b/erpnext/hr/doctype/leave_application/test_leave_application.py @@ -235,8 +235,8 @@ class TestLeaveApplication(unittest.TestCase): frappe.get_doc(dict( doctype = 'Holiday List', holiday_list_name = holiday_list, - from_date = date(date.today().year, 1, 1), - to_date = date(date.today().year, 12, 31), + from_date = add_months(today, -6), + to_date = add_months(today, 6), holidays = [ dict(holiday_date = today, description = 'Test') ] @@ -597,8 +597,8 @@ def get_leave_period(): return frappe.get_doc(dict( name = 'Test Leave Period', doctype = 'Leave Period', - from_date = "{0}-12-01".format(now_datetime().year - 1), - to_date = "{0}-12-31".format(now_datetime().year), + from_date = add_months(nowdate(), -6), + to_date = add_months(nowdate(), 6), company = "_Test Company", is_active = 1 )).insert()