Merge pull request #6592 from rohitwaghchaure/production_planning_issue
[Fix] making of production order from material request with sales order, restirct validation validate_production_order_against_so in production order
This commit is contained in:
		
						commit
						efd7c3e22b
					
				| @ -58,6 +58,7 @@ class ProductionOrder(Document): | ||||
| 				if so[0].project: | ||||
| 					self.project = so[0].project | ||||
| 
 | ||||
| 				if not self.material_request: | ||||
| 					self.validate_production_order_against_so() | ||||
| 			else: | ||||
| 				frappe.throw(_("Sales Order {0} is not valid").format(self.sales_order)) | ||||
|  | ||||
| @ -454,6 +454,7 @@ class ProductionPlanningTool(Document): | ||||
| 				material_request.update({"material_request_type": item_wrapper.default_material_request_type}) | ||||
| 
 | ||||
| 				for sales_order, requested_qty in items_to_be_requested[item].items(): | ||||
| 					if sales_order != 'No Sales Order': | ||||
| 						material_request.append("items", { | ||||
| 							"doctype": "Material Request Item", | ||||
| 							"__islocal": 1, | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user