I am not able to assign a LOT until I click the PRODUCE button:
It is possible to assign the Lot BEFORE I have made anything? So I can print a label and other documentation and have it ready?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
I am not able to assign a LOT until I click the PRODUCE button:
It is possible to assign the Lot BEFORE I have made anything? So I can print a label and other documentation and have it ready?
Yes.
Create a new Field on the mrp.production (Production Order) model to store the finished product lot:
Add this field to the User Interface via your own custom View:
This pushes the value of the custom field to the Produce wizard and sets the default company and product values for the newly created Lot.
<xpath expr="//button[@name='open_produce_product'][1]" position="attributes">
<attribute name="context">{'default_finished_lot_id': x_finished_lot_id}</attribute>
</xpath>
<xpath expr="//button[@name='open_produce_product'][2]" position="attributes">
<attribute name="context">{'default_finished_lot_id': x_finished_lot_id}</attribute>
</xpath>
<field name="bom_id" position="before">
<field name="x_finished_lot_id" context="{'default_company_id': company_id, 'default_product_id': product_id}"/>
</field>
You can then assign the Lot before you start production, or even during the creation of the Manufacturing Order:
When you click PRODUCE the Wizard will be pre-populated with the Lot from the Manufacturing Order: