This question has been flagged

I am new to Odoo and have been exploring it's potential for use in our manufacturing business. Unfortunately I started researching under version 13 only about a few weeks before version 14 came out (along with the many major improvements/changes to MRP), so there are new things for me to learn.


I see how Operations is now a tab under the BOM. When adding an operation, it appears that you simply type in text (create one unique to that BOM) and then select a predefined work center. Both the operation and work center are required. 


What I don't understand is why the Operation isn't a drop down menu. It would seem that you should set up the standard operations under Configuration and then when you add operations to specific BOMs it would reference that list. That is how the work centers appears to work. I don't understand the purpose of even having operations under Configuration if you have to manually type them in each time to a BOM.


Adding operations is now so flexible that it is cumbersome! Am I missing something in how this is supposed to work in V14? 

Avatar
Discard

In Odoo 15 it's possible to copy an existing operation

Best Answer


It is possible to customize Odoo and not that complicated to provide a way to copy an existing Operation:

1. Create a Custom Field to link an Operation to another Operation:




2. Create a Custom Field that will "listen" for Users selecting an Operation and will "copy" the information:




for record in self:
if record.x_existing_op_id:
existing_op = record.x_existing_op_id
record['name'] = existing_op.name
record['workcenter_id'] = existing_op.workcenter_id.id
record['worksheet_type'] = existing_op.worksheet_type
record['note'] = existing_op.note
record['time_mode'] = existing_op.time_mode
record['time_cycle_manual'] = existing_op.time_cycle_manual
record['time_mode_batch'] = existing_op.time_mode_batch



3. Add the two fields to the User Interface with a Custom View:


<field name="name" position="replace">
<field name="x_update_operation" invisible="1"/>
<field name="x_existing_op_id" widget="selection" />
<p>or</p>
<field name="name" string="New Operation"/>
</field>


Then you get this:



These seven properties of the existing Operation are copied:



Note:  This is a proof of concept, designed to help you understand an approach that might be useful.  You may need to modify the code to suit your own needs.  Possible enhancements are to limit operations if they have already been selected, or if they are not compatible with the product you are creating.  This has been tested very quickly and some of the Operation information may not be moved over - in this case simply add any missing fields.  Odoo or an Odoo Partner can help you here if you don't have the skills or time to do this yourself.

Avatar
Discard
Best Answer

You can copy another BOM, so it is possible to setup "template" BOMs with standard operations (and a list of components if that's what you want) and copy those.

Avatar
Discard

This is a good solution. You can also create a custom field on the BoM (which doesn't even need components) to differentiate it from a regular BoM and even show these "templates" in a different Menu.

Excellent feedback. In setting up a BoM template the operational steps are not copies. Any thoughts how to duplicate the template Bom with the operation AND the steps?

You're correct that Operation Steps aren't copied. That would need some customization. Or maybe one day Odoo will add this as a feature!