← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 660427] Re: Creation of production orders impossible

 

** Changed in: openobject-addons
     Assignee: (unassigned) => JMA(Open ERP) (jma-openerp)

-- 
Creation of production orders impossible
https://bugs.launchpad.net/bugs/660427
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to OpenERP OpenObject.

Status in OpenObject Addons Modules: New

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.





References