Creation of production orders impossible

Bug #660427 reported by Alexis Deméaulte
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Incomplete
Undecided
JMA(Open ERP)

Bug Description

Hi,

I currently have a problem when I try to create a production order. I choose my product to create, I fill the "Raw material location" field with a stock, and when I click on "Confirm production" I got this error message :

    ValidateError Error occurred while validating the field(s) prodlot_id: You must assign a production lot for this product

After some investigations I found the problem : When I confirm my production order, OpenERP create a packing list with the flag auto-picking set to true. Because consumed products are available in the source stock of stock moves created in the picking, it follow the workflow and go directly to the done state for the picking and all stock move associated to the picking.

The problem is, when it try to set to done the stock moves, the constraint "_check_tracking" define in the stock_move object is run. This constraint check that a production lot is associated to each stock move (because we have check track_incoming and track_outgoing on our product), but of course there is no production lot associated to the these stock move, and there is no way to do it, because before the confirm production order, these stock moves doesn't exist.

The bug was introduice at revision 2475 by the modification of line 929 and 930, which also check internal picking. Before this revision internal picking wasn't concerned by the constraint.

By the way what is the goal of this internal picking created automatically ? I don't get it, stock moves created have the same source and destination stock. We have lot of packing created automatilly by the MRP, but we don't use it.

Changed in openobject-addons:
assignee: nobody → JMA(Open ERP) (jma-openerp)
Revision history for this message
JMA(Open ERP) (jma-openerp) wrote :

Hello Alexis Deméaulte,

In response to your post, first of all I would like to inform you that this isn't a bug but a warning message!

On the Product's form we have a boolean field 'Production Lot'.
So, in case that field is 'Checked' and you try to create a Production Order without assigning production lot to the products the warning message pops up.

So once the field has been checked on Products form, on the Production order when you press 'Confirm Production' automatic moves gets created for the specified product, but unfortunately the moves do not have field 'Production Lot' selected.

In short, you need to assign Production Lot for the product on the 'Moves line' if you have set the field 'Track Production Lot' checked(true) on Products form. If, you haven't checked the 'Track production Lot' field it is not mandatory to have a production lot.
Things would work fine either way.

The Production Lot is used to put a serial number.
It is mainly used to track products on the basis of the serial number assigned once production gets done.

I hope this helps you and makes the scenario transparent.
Thanks.

Revision history for this message
Alexis Deméaulte (alexis-demeaulte) wrote :

Hello JMA,

I understand what you mean, and I'm totally agree with you : if you check the 'Track production lot' field you need to choose a production lot for each move line.

So you said "you need to assign Production Lot for the product on the 'Moves line'" : yes ! that's true, but I can't do that because I got the popup before the creation of the move lines. I don't have any move lines in my production order, and so I can't associate any production lot. Move lines are created when I click on "Confirm Production", but when I click on "Confirm Production" I got the warning popup, and so move lines creation fails.

Like I try to explain, the warning pop ups because of move lines in the picking list, picking list which is present in the 'Extra Information' tab. These move lines are set directly to done just after their creation, and that the problem.

Revision history for this message
JMA(Open ERP) (jma-openerp) wrote :

Hello Alexis Deméaulte,

You can always assign production lot once the moves have been created.
i.e After we click on 'Confirm Production' and that is what I follow.
Likely I can navigate after assigning the production lot and the error pops up when I try to click on 'Production done'.
(screenshots attached)

Thank you.

Revision history for this message
JMA(Open ERP) (jma-openerp) wrote :
Revision history for this message
JMA(Open ERP) (jma-openerp) wrote :
Changed in openobject-addons:
status: New → Incomplete
Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) wrote :

Alexis,

We would like to know your reply here.

Can you please participate?

Thanks.

Revision history for this message
Alexis Deméaulte (alexis-demeaulte) wrote :

Hi,

In fact, I got the error popup when I click on "Confirm Production", _before_ the creation of the move lines. I have made some researchs, and the problem appears after the installation of the mrp_jit module, because it remove a workflow condition. If you don't have this module installed, the problem is not present.

Here a screenshot of my situation.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.