fix(ux): make stock entry type the title field (#29674)
This commit is contained in:
		
							parent
							
								
									cec971b5db
								
							
						
					
					
						commit
						5e6227e3d8
					
				| @ -8,7 +8,6 @@ | ||||
|  "engine": "InnoDB", | ||||
|  "field_order": [ | ||||
|   "items_section", | ||||
|   "title", | ||||
|   "naming_series", | ||||
|   "stock_entry_type", | ||||
|   "outgoing_stock_entry", | ||||
| @ -83,14 +82,6 @@ | ||||
|    "fieldtype": "Section Break", | ||||
|    "oldfieldtype": "Section Break" | ||||
|   }, | ||||
|   { | ||||
|    "fieldname": "title", | ||||
|    "fieldtype": "Data", | ||||
|    "hidden": 1, | ||||
|    "label": "Title", | ||||
|    "no_copy": 1, | ||||
|    "print_hide": 1 | ||||
|   }, | ||||
|   { | ||||
|    "fieldname": "naming_series", | ||||
|    "fieldtype": "Select", | ||||
| @ -353,9 +344,9 @@ | ||||
|   }, | ||||
|   { | ||||
|    "fieldname": "scan_barcode", | ||||
|    "options": "Barcode", | ||||
|    "fieldtype": "Data", | ||||
|    "label": "Scan Barcode" | ||||
|    "label": "Scan Barcode", | ||||
|    "options": "Barcode" | ||||
|   }, | ||||
|   { | ||||
|    "allow_bulk_edit": 1, | ||||
| @ -628,10 +619,11 @@ | ||||
|  "index_web_pages_for_search": 1, | ||||
|  "is_submittable": 1, | ||||
|  "links": [], | ||||
|  "modified": "2021-08-20 19:19:31.514846", | ||||
|  "modified": "2022-02-07 12:55:14.614077", | ||||
|  "modified_by": "Administrator", | ||||
|  "module": "Stock", | ||||
|  "name": "Stock Entry", | ||||
|  "naming_rule": "By \"Naming Series\" field", | ||||
|  "owner": "Administrator", | ||||
|  "permissions": [ | ||||
|   { | ||||
| @ -698,6 +690,7 @@ | ||||
|  "show_name_in_global_search": 1, | ||||
|  "sort_field": "modified", | ||||
|  "sort_order": "DESC", | ||||
|  "title_field": "title", | ||||
|  "states": [], | ||||
|  "title_field": "stock_entry_type", | ||||
|  "track_changes": 1 | ||||
| } | ||||
| @ -76,7 +76,6 @@ class StockEntry(StockController): | ||||
| 
 | ||||
| 		self.validate_posting_time() | ||||
| 		self.validate_purpose() | ||||
| 		self.set_title() | ||||
| 		self.validate_item() | ||||
| 		self.validate_customer_provided_item() | ||||
| 		self.validate_qty() | ||||
| @ -1835,14 +1834,6 @@ class StockEntry(StockController): | ||||
| 
 | ||||
| 		return sorted(list(set(get_serial_nos(self.pro_doc.serial_no)) - set(used_serial_nos))) | ||||
| 
 | ||||
| 	def set_title(self): | ||||
| 		if frappe.flags.in_import and self.title: | ||||
| 			# Allow updating title during data import/update | ||||
| 			return | ||||
| 
 | ||||
| 		self.title = self.purpose | ||||
| 
 | ||||
| 
 | ||||
| @frappe.whitelist() | ||||
| def move_sample_to_retention_warehouse(company, items): | ||||
| 	if isinstance(items, str): | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user