From 72e32f1ae414ec47ed97eccd7c2015dc3f7df268 Mon Sep 17 00:00:00 2001 From: s-aga-r Date: Wed, 29 Mar 2023 18:38:43 +0530 Subject: [PATCH] refactor: remove `Posting Date` and `Posting Time` columns from SRE --- .../stock_reservation_entry.json | 27 +------------------ .../stock_reservation_entry.py | 8 ++---- 2 files changed, 3 insertions(+), 32 deletions(-) diff --git a/erpnext/stock/doctype/stock_reservation_entry/stock_reservation_entry.json b/erpnext/stock/doctype/stock_reservation_entry/stock_reservation_entry.json index a170c4bdfb..7c7abacd91 100644 --- a/erpnext/stock/doctype/stock_reservation_entry/stock_reservation_entry.json +++ b/erpnext/stock/doctype/stock_reservation_entry/stock_reservation_entry.json @@ -10,8 +10,6 @@ "field_order": [ "item_code", "warehouse", - "posting_date", - "posting_time", "column_break_elik", "voucher_type", "voucher_no", @@ -61,29 +59,6 @@ "search_index": 1, "width": "100px" }, - { - "fieldname": "posting_date", - "fieldtype": "Date", - "in_filter": 1, - "in_list_view": 1, - "label": "Posting Date", - "oldfieldname": "posting_date", - "oldfieldtype": "Date", - "print_width": "100px", - "read_only": 1, - "search_index": 1, - "width": "100px" - }, - { - "fieldname": "posting_time", - "fieldtype": "Time", - "label": "Posting Time", - "oldfieldname": "posting_time", - "oldfieldtype": "Time", - "print_width": "100px", - "read_only": 1, - "width": "100px" - }, { "fieldname": "voucher_type", "fieldtype": "Select", @@ -231,7 +206,7 @@ "index_web_pages_for_search": 1, "is_submittable": 1, "links": [], - "modified": "2023-03-29 18:24:18.332719", + "modified": "2023-03-29 18:36:26.752872", "modified_by": "Administrator", "module": "Stock", "name": "Stock Reservation Entry", diff --git a/erpnext/stock/doctype/stock_reservation_entry/stock_reservation_entry.py b/erpnext/stock/doctype/stock_reservation_entry/stock_reservation_entry.py index b79e8105c0..efe99799b1 100644 --- a/erpnext/stock/doctype/stock_reservation_entry/stock_reservation_entry.py +++ b/erpnext/stock/doctype/stock_reservation_entry/stock_reservation_entry.py @@ -3,16 +3,14 @@ import frappe from frappe import _ +from frappe.model.document import Document from frappe.query_builder.functions import Sum -from erpnext.utilities.transaction_base import TransactionBase - -class StockReservationEntry(TransactionBase): +class StockReservationEntry(Document): def validate(self) -> None: from erpnext.stock.utils import validate_disabled_warehouse, validate_warehouse_company - self.validate_posting_time() self.validate_mandatory() validate_disabled_warehouse(self.warehouse) validate_warehouse_company(self.warehouse, self.company) @@ -29,8 +27,6 @@ class StockReservationEntry(TransactionBase): mandatory = [ "item_code", "warehouse", - "posting_date", - "posting_time", "voucher_type", "voucher_no", "voucher_detail_no",