Merge pull request #20125 from marination/stock-module-desk
chore: Added Reports to Stock Module Desk
diff --git a/erpnext/manufacturing/doctype/work_order/work_order.js b/erpnext/manufacturing/doctype/work_order/work_order.js
index 176ca2e..80bd89d 100644
--- a/erpnext/manufacturing/doctype/work_order/work_order.js
+++ b/erpnext/manufacturing/doctype/work_order/work_order.js
@@ -77,8 +77,7 @@
return {
query: "erpnext.controllers.queries.item_query",
filters:[
- ['is_stock_item', '=',1],
- ['default_bom', '!=', '']
+ ['is_stock_item', '=',1]
]
};
});
diff --git a/erpnext/patches/v12_0/set_employee_preferred_emails.py b/erpnext/patches/v12_0/set_employee_preferred_emails.py
index 2763561..f6eb12e 100644
--- a/erpnext/patches/v12_0/set_employee_preferred_emails.py
+++ b/erpnext/patches/v12_0/set_employee_preferred_emails.py
@@ -7,10 +7,10 @@
fields=["name", "prefered_contact_email", "company_email", "personal_email", "user_id"])
for employee in employees:
- preferred_email_field = frappe.scrub(employee.prefered_contact_email)
-
- if not preferred_email_field:
+ if not employee.prefered_contact_email:
continue
+ preferred_email_field = frappe.scrub(employee.prefered_contact_email)
+
preferred_email = employee.get(preferred_email_field)
frappe.db.set_value("Employee", employee.name, "prefered_email", preferred_email, update_modified=False)
diff --git a/erpnext/stock/doctype/item/item.py b/erpnext/stock/doctype/item/item.py
index 151be11..a1f06b2 100644
--- a/erpnext/stock/doctype/item/item.py
+++ b/erpnext/stock/doctype/item/item.py
@@ -551,7 +551,7 @@
"""select parent from `tabItem Barcode` where barcode = %s and parent != %s""", (item_barcode.barcode, self.name))
if duplicate:
frappe.throw(_("Barcode {0} already used in Item {1}").format(
- item_barcode.barcode, duplicate[0][0]), frappe.DuplicateEntryError)
+ item_barcode.barcode, duplicate[0][0]))
item_barcode.barcode_type = "" if item_barcode.barcode_type not in options else item_barcode.barcode_type
if item_barcode.barcode_type and item_barcode.barcode_type.upper() in ('EAN', 'UPC-A', 'EAN-13', 'EAN-8'):
diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.js b/erpnext/stock/doctype/stock_entry/stock_entry.js
index 79ce231..38e1bc4 100644
--- a/erpnext/stock/doctype/stock_entry/stock_entry.js
+++ b/erpnext/stock/doctype/stock_entry/stock_entry.js
@@ -922,8 +922,6 @@
this.frm.toggle_enable("from_warehouse", doc.purpose!='Material Receipt');
this.frm.toggle_enable("to_warehouse", doc.purpose!='Material Issue');
- this.frm.fields_dict["items"].grid.set_column_disp("s_warehouse", doc.purpose!='Material Receipt');
- this.frm.fields_dict["items"].grid.set_column_disp("t_warehouse", doc.purpose!='Material Issue');
this.frm.fields_dict["items"].grid.set_column_disp("retain_sample", doc.purpose=='Material Receipt');
this.frm.fields_dict["items"].grid.set_column_disp("sample_quantity", doc.purpose=='Material Receipt');