ERPNext Foundation ERPNext Cloud Chat Blog Discuss Frappé* Donate

Manufacturing process


#1

hi all,

I would like to indicate that I’m new with ERP in general and new with ErpNext. We have an ERpnext server running since 3 months only. We are running full cycles of selling/purchase/manufacturing in parallel of our “rich paper application” :slight_smile: and I’m very pleased to see all the improvements ErpNext is bringing to us.

In our business we are manufacturing on order. Our items are an assembly of 25 items configured in a BOM. The selling orders are contening 10 differents items per one or two units. A typical order is 10 lines, with 10 items, each one or two units. we are running about 40 orders a day.
Production is plannified for one to 3 days. It means that a production run is going to manufacture 400 items for shipping around 40 orders.

I would like to describe what I do in front of my ErpNext to manage that production:

  • open an order -> make material request of type manufacture
  • open the material request -> make production order. 10 productions orders are made (one per item)
  • open a production order, choose WIP warehouse (see https://github.com/frappe/erpnext/issues/6636), save and submit click Yes for quantity to manufacture.
  • on production order click start, make 1x quantitiy,
  • stock entry (source to wip), save and submit
  • back to production order, finish make 1x.
  • stock entry (wip to target warehouse) save and submit.

Repeat that cycle for the 10 items multiply 40 orders. Means a lot of click and time :frowning:

Is there some ways to improve that? is it the right way of doing things?


Enhancing the Manufacturing Module
I have no "new" button in Production Order, and cannot create a Production Order from any attempt
[Roadmap] Path to v9
Stock processing using BOM and simple items
Production Order Source/Target warehouses - custom STE
#2

Have you tried using the Production Planning Tool?

That can generate all the production orders all at once, which may speed things up.


#3

yes @Ben_Cornwell_Mott with the production planning tool, a production order is made against each item code/order, even if the item is found in different orders, no grouping by item code is made. I’m not sure it saves any time.

if I use the production planning tool here is my process:

  • open production planning tool, get items from sales order. add a batch of 40 orders for the day. the result is 400 production orders.
  • open each production orders, click submit, click start, click make, validate the quantity required.
  • stock entry, material transfer for manufacture, save and submit.
  • back to production order, click finish and make and validate the quantity
  • stock entry manufacture click save and submit.

As you can see, the production planning tool is not really a gain in my case. It take up to 5mins / per order to validate all the docs inside erpnext.

do I do well? is there a way to automate? an other way of doing the whole process? some good pratices? I’m ready to change the way I work if needed.


#4

So if I understand what you’re looking for, it would be something to consolidate all the production orders where possible. For example, if you have 5 separate sales orders for the same part, you want to have 1 production order with a quantity 5 instead of 5 production orders each with one.

The reason you can’t do this now is because each of those production orders is tied to the specific sales order. That way, if your sales team wants to see the status of the order, they can step through from the sales order, to the production order, to the material requests/stock transfers, as they are all connected.

What steps do you think could be shortened or sped up?
Based on your feedback, it sounds like having a tool that automatically transferred all the stock for a set of production orders (“Material Transfer for Manufacture”) would help. Anything else?


#5

Hi,
This is anton,

I am sorry to join this, however I had the same problem before and as the manufacturing process are handled manually, i just needed a way to transform the raw material into finished goods as soon as possible without having to go to normal production order process of start - transfer to wip - finish - transfer to finished goods.

In my company the manufacturing process that i recorded are as follows

Sales order - item - create BOM for each item needed - check on qty (manually)

Create Manual Stock Entry ( Material Transfer for all needed material) ( RM warehouse to WIP warehouse)

Create Manual “mini production process” (Stock entry - Repack Function) to record (WIP Warehouse to FG Warehouse)

Done

"STE - Repack has the same function with the “PROD ORDER” function however it is less tedious and do what i needed to do.

This is what i do and this is not normal manufacturing process, i just share this because i think its interesting

I hope i can give you some useful input in this.

Thanks
Anton


#6

Thanks Anton for your suggestion I will reread again to see if I can use it.

@Ben_Cornwell_Mott may be all of your suggestions together! Consolidatting items is a good suggestion. First because at the production floor they prefer making batches of same product Even if they can go to differents orders. I will try to transfer all the material to wip warehouse before starting the production order.

I have a question for advanced users. When you have 400 production orders coming from manufacturing planning tool (40 orders with 10 items each) do you click 800 times to submit them?

Do the erpnext team have some advices?


#7

Hi Hiousi,

The community is working together to enhance the manufacturing module. We will involve you in those discussions and you can influence the evolution of the manufacturing module.

Thanks

Jay


#8

thank you @jayram. Note that I’m not from production, not a manufacturing specialist. I count on the software to help me adopt best practices. Tell me how I can participate.

For now, my idea was to move boxes of BOM items to the Work in Progress warehouse. I was thinking that a production order will simply pick in the WIP warehouse without asking to make a new Stock transfer for manufacture. Because the items are already available in the WIP to manufacture. But it does not work. The production order always makes a new material transfert.

If no one say I do bad, I must conclude that the problem is the design of the production order. @jayram when does the work to enchange the module will start?

I suppose a menu to submit by ticking documents in their list can be a great click saver, and a way to not wait for an improved manufacturing module.

How can we do that? a custom script? Can you give some directions?


#9

@tara_antonius hey Anton, I’m testing your approach. I like it, it is smart.

1/ your first step, manual stock entry, transfer from RAW to WIP is quick if you transfer more items than you actualy need to serve pending orders. I mean, if you need 1x item A for an order, transfer a box with 100x item A (it is what we do in real life). Add all the production floor needs to that stock entry, or ask the production guys to register a stock tranfer when they pick up a box of materials.

2/ “mini production process” is a good idea. it saves lot of time. Only one stock entry for each item manufactured, avoiding the production order step. (idea: make this entry from a barcode scanner thru API?). DO not forget to set d source warehouse to WIP as your BOM may have RAW in it. if I could add multiples BOM to the REPACK entry it would be great!

I’m loosing the ability to have a report with a list of products to manufacture, and the link to the reference order. I can accomodate with that for now (I print the order on a real paper, sorry for the planet).

Waiting to take part of the work to improve the manufacturing module.


#10

Hi Hiousi,

Would you please send me the Export of your Manufacturing entries for a day? Please include the BoM details as well if you can. I can send you my E-Mail ID if you don’t want to post it here.

The reason I’m asking is that I can almost visualise what your problem areas are, but looking at the data would make it easier for me to come up with a solution.

I have a feeling that everybody that is into any type of manufacturing will need a more elegant solution for managing this process.

Thanks

Jay


#11

@JayRam can not upload CSV here. Give me your email please.


#12

jram at epochconsulting.in


Processing and Packaging Tracking
#13

@hiousi, hey glad to hear that,

it is not a normal production process but i think you can ease your problem with a lot of docs to submit.

I think STE document in ERPNEXT is really the “swis army knife of Inventory Process” as with STE you can have multiple WIP warehouse and do manual transfer of material from RM - Semi FG - FG in Simple Manufacturing process.

1/ barcode scanner is usually plug and play, you can use it directly on your computer to scan your barcode in item.
in STE document its also posible to input item needed from barcode scanner. we use that for material transfer, issue and receipt. you can use custom script so that the barcode column can be shown in editable grid or in V 7.1 you can already design the flexible editable grid.

  1. Multiple BOM in the repack it would be a great idea. I think i can use that too.
    but it would be nice if we can have prod order that we sort based on the similar items or BOM so we can have it on stock entry - manufacture.

  2. to link to your sales order, you can make customization in the STE and Sales to link the document to the Sales order.

  3. I think the idea of putting all similar item together for production is also a good idea, that would make less production order created and as also in the real condition, the same item would be processed at the same time

I like idea from @hiousi and @Ben_Cornwell_Mott

I think in the production planning tool there should be an addition/checklist so that we can choose to “create production order” process that you can “group production orders with item based on the same BOM or Item_code”. that would produce better manufacturing queue.

Thanks
Anton


#14

@tara_antonius you CAN make a STE of type “manufacture” without a production order (in the form production order is not mandatory)


#15

My first custom script!
A button to help to fill quickly a Stock Entry with the @tara_antonius method of “mini production process”

frappe.ui.form.on("Stock Entry", "refresh", function(frm){

		frm.add_custom_button(__("Manufacture an Item"), function() {

		frappe.prompt({fieldtype: "Link", label: __("Select Item to manufacture"), fieldname:"item", options: "Item"},
					function(d) {
						if(!d) {
							return;
						}
						frappe.call({
							   'method': 'erpnext.stock.get_item_details.get_default_bom',
							   'args': {
							   		"item_code": cstr(d.item),
							   },
							   callback: function(r) {
							   		if(r.message) {

							   			frm.set_value("purpose", "Manufacture");
							   			frm.set_value("from_bom", true);
							   			frm.set_value("fg_completed_qty", 1);
                                                                            frm.set_value("title", "Manufacture "+ cstr(d.item));
							   			frm.set_value("bom_no", r.message);


										frappe.call({
											method: "erpnext.manufacturing.doctype.production_order.production_order.get_default_warehouse",
											callback: function(r) {
												if(!r.exc) {
													frm.set_value("from_warehouse", r.message.wip_warehouse);
													frm.set_value("to_warehouse", r.message.fg_warehouse);
													frm.call({
														doc: frm.doc,
														method: "get_items",
														callback: function(r) {
															if(!r.exc) refresh_field("items");
														 }                   
													});
												}
											}
										});

							   		} else {
							   			return;
							   		}

							   		
							   		
							   }
						});
		
						return;
					}, __("Select Item"), __("Make"));
		})	
	
});

#16

@hiousi

Great its nice to see you made some improvements on the stock entry “mini production process”
I will try on your script and give you my feedback.

Thanks a lot, Good luck on your way of customizing erpnext.

Best regards
Anton


#17

small improvementsof the button, now ask for quantity and save automatically.

frappe.ui.form.on("Stock Entry", "refresh", function(frm){

		frm.add_custom_button(__("Manufacture an Item"), function() {

			var fields = [];

			var dialog = new frappe.ui.Dialog({
						title: __("Manufacture item"),
						fields: [
							{fieldname: 'item', label: __('Item'), fieldtype: 'Link', options: 'Item'},
							{fieldname: 'qty', label: __('Quantity'), reqd: 1, default: 1, fieldtype: 'Float' },
						]
			});

			dialog.show();

			dialog.set_primary_action(__('Make'), function() {
				var values = dialog.get_values();
				if(!values) {
						return;
				}
				frappe.call({
							   'method': 'erpnext.stock.get_item_details.get_default_bom',
							   'args': {
							   		"item_code": cstr(values.item),
							   },
							   callback: function(r) {
							   		if(r.message) {

							   			frm.set_value("purpose", "Manufacture");
							   			frm.set_value("from_bom", true);
							   			frm.set_value("fg_completed_qty", values.qty);
							   			frm.set_value("bom_no", r.message);
							   			frm.set_value("title", "Manufacture "+ values.qty +" x "+ cstr(values.item));
							   			dialog.hide();
										frappe.call({
											method: "erpnext.manufacturing.doctype.production_order.production_order.get_default_warehouse",
											callback: function(r) {
												if(!r.exc) {
													frm.set_value("from_warehouse", r.message.wip_warehouse);
													frm.set_value("to_warehouse", r.message.fg_warehouse);
													frm.call({
														doc: frm.doc,
														method: "get_items",
														callback: function(r) {
															if(!r.exc) refresh_field("items");
															frm.save();
														 }                   
													});
												}
											}
										});

							   		} else {
							   			return;
							   		}

							   		
							   		
							   }
				});
			});
		});

	
	
});

I would like to build a list of items, taken from an order, filter the list with the ones that need to manufactured (they have BOM + are not already available in finished products stock), and loop trough them to make all of the manufacture stock entries.
Need to learn more. And if you can help :slight_smile:


#18

In the latest version 7.1 the script gives the following error.

Traceback (most recent call last): File "/home/frappe/frappe-bench/apps/frappe/frappe/app.py", line 55, in application response = frappe.handler.handle() File "/home/frappe/frappe-bench/apps/frappe/frappe/handler.py", line 19, in handle execute_cmd(cmd) File "/home/frappe/frappe-bench/apps/frappe/frappe/handler.py", line 36, in execute_cmd ret = frappe.call(method, **frappe.form_dict) File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 890, in call return fn(*args, **newargs) File "/home/frappe/frappe-bench/apps/frappe/frappe/handler.py", line 67, in runserverobj frappe.desk.form.run_method.runserverobj(method, docs=docs, dt=dt, dn=dn, arg=arg, args=args) File "/home/frappe/frappe-bench/apps/frappe/frappe/desk/form/run_method.py", line 35, in runserverobj r = doc.run_method(method) File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 654, in run_method out = Document.hook(fn)(self, *args, **kwargs) File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 882, in composer return composed(self, method, *args, **kwargs) File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 865, in runner add_to_return_value(self, fn(self, *args, **kwargs)) File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 648, in fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs) File "/home/frappe/frappe-bench/apps/erpnext/erpnext/stock/doctype/stock_entry/stock_entry.py", line 581, in get_items self.calculate_rate_and_amount() File "/home/frappe/frappe-bench/apps/erpnext/erpnext/stock/doctype/stock_entry/stock_entry.py", line 247, in calculate_rate_and_amount self.set_basic_rate(force, update_finished_item_rate) File "/home/frappe/frappe-bench/apps/erpnext/erpnext/stock/doctype/stock_entry/stock_entry.py", line 283, in set_basic_rate if not flt(d.basic_rate) and getattr(self, "pro_doc", frappe._dict()).scrap_warehouse == d.t_warehouse: AttributeError: 'NoneType' object has no attribute 'scrap_warehouse'


#19

@reador do you have 7.1.15? I had this error too with 7.1.14. it is fixed now in 7.1.15


#20

Thats awesome @hiousi . I was waiting for a long time for this.