diff --git a/erpnext/hooks.py b/erpnext/hooks.py index e5d625e83a..a877ee53dc 100644 --- a/erpnext/hooks.py +++ b/erpnext/hooks.py @@ -12,7 +12,7 @@ app_license = "GNU General Public License (v3)" source_link = "https://github.com/frappe/erpnext" develop_version = '12.x.x-develop' -staging_version = '11.0.3-beta.27' +staging_version = '11.0.3-beta.28' error_report_email = "support@erpnext.com" diff --git a/erpnext/patches.txt b/erpnext/patches.txt index 0452132abc..4a67eb4e47 100755 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -579,4 +579,3 @@ erpnext.patches.v10_0.update_user_image_in_employee erpnext.patches.v11_0.update_delivery_trip_status erpnext.patches.v10_0.repost_gle_for_purchase_receipts_with_rejected_items erpnext.patches.v11_0.set_missing_gst_hsn_code -erpnext.patches.v11_0.update_package_total_in_delivery_trips \ No newline at end of file diff --git a/erpnext/patches/v11_0/update_package_total_in_delivery_trips.py b/erpnext/patches/v11_0/update_package_total_in_delivery_trips.py deleted file mode 100755 index d609890fb4..0000000000 --- a/erpnext/patches/v11_0/update_package_total_in_delivery_trips.py +++ /dev/null @@ -1,7 +0,0 @@ -import frappe - -def execute(): - for trip in frappe.get_all("Delivery Trip", {"docstatus" : 1}): - trip_doc = frappe.get_doc("Delivery Trip", trip.name) - total = sum([stop.grand_total for stop in trip_doc.delivery_stops if stop.grand_total]) - frappe.db.set_value("Delivery Trip", trip.name, "package_total", total, update_modified=False) \ No newline at end of file diff --git a/erpnext/stock/doctype/delivery_trip/delivery_trip.py b/erpnext/stock/doctype/delivery_trip/delivery_trip.py index cafc9380cb..01b4734bf5 100644 --- a/erpnext/stock/doctype/delivery_trip/delivery_trip.py +++ b/erpnext/stock/doctype/delivery_trip/delivery_trip.py @@ -25,8 +25,6 @@ class DeliveryTrip(Document): def validate(self): self.validate_stop_addresses() - self.update_status() - self.update_package_total() def on_submit(self): self.update_status() @@ -39,6 +37,11 @@ class DeliveryTrip(Document): self.update_status() self.update_delivery_notes(delete=True) + def validate_stop_addresses(self): + for stop in self.delivery_stops: + if not stop.customer_address: + stop.customer_address = get_address_display(frappe.get_doc("Address", stop.address).as_dict()) + def update_status(self): status = { 0: "Draft", @@ -55,14 +58,6 @@ class DeliveryTrip(Document): self.db_set("status", status) - def update_package_total(self): - self.package_total = sum([stop.grand_total for stop in self.delivery_stops if stop.grand_total]) - - def validate_stop_addresses(self): - for stop in self.delivery_stops: - if not stop.customer_address: - stop.customer_address = get_address_display(frappe.get_doc("Address", stop.address).as_dict()) - def update_delivery_notes(self, delete=False): """ Update all connected Delivery Notes with Delivery Trip details