← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 669210] Re: [trunk][mrp] stock_move.action_consume raises exception

 

I've just checked this function since it has been fixed. I found that
this patch solved the problem reported above but introduced two new
ones.

The new problems are:

1. After consuming the raw materials they appear in the right side list
doubled. (Every item is displayed twice in Consumed Products). Initially
the duplicated lines show only a quantity of 0 but after double clicking
on any line the duplicates will be shown.

2. A new LOT is generated for each consumed raw material after invoking
consume. So the system wants to consume materials from such LOTs where
there is 0 quantity in stock. These new LOTs will have a negative stock
quantity and these LOTs are used for nothing. At the same time stock
quantities in the work center locations keep increasing because the user
sets the right LOTs on the Internal Moves lines but the system doesn't
consume raw materials from these LOTs.

The mechanism mentioned in the second problem should be changed so that
Production LOT should not be generated for the Consumed Products but
should the LOTs copied from the Internal Move lines (Picking List). This
way the system would work as intended.


** Changed in: openobject-addons
       Status: Fix Released => Triaged

** Changed in: openobject-addons
       Status: Triaged => Fix Released

-- 
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
https://bugs.launchpad.net/bugs/669210

Title:
  [trunk][mrp] stock_move.action_consume raises exception

Status in OpenObject Addons Modules:
  Fix Released

Bug description:
  In the mrp modul's Manufacturing Order form clicking on the "Produce" then the "Confirm" buttons raises an AttributeError exception with the message 'stock.move' object has no attribute 'split_lines'. This occurs only if there are raw materials in the BOM list on which the "Track Manufacturing Lots" attribute is checked. 
The problem seems to be the result of some untested and incomplete refactoring. (Probably at revision 3038.1.7)

The traceback is as follows:

Traceback (most recent call last):
  File "/home/tomi/openerp/server/bin/netsvc.py", line 489, in dispatch
    result = ExportService.getService(service_name).dispatch(method, auth, params)
  File "/home/tomi/openerp/server/bin/service/web_services.py", line 586, in dispatch
    res = fn(db, uid, *params)
  File "/home/tomi/openerp/server/bin/osv/osv.py", line 57, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/home/tomi/openerp/server/bin/osv/osv.py", line 140, in execute
    res = pool.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/home/tomi/openerp/server/bin/osv/osv.py", line 130, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/home/tomi/openerp/addons/mrp/wizard/mrp_product_produce.py", line 72, in do_produce
    data['product_qty'], data['mode'], context=context)
  File "/home/tomi/openerp/addons/mrp/mrp.py", line 684, in action_produce
    stock_mov_obj.action_consume(cr, uid, [raw_product.id], consumed_qty, production.location_src_id.id, context=context)
  File "/home/tomi/openerp/addons/mrp/stock.py", line 109, in action_consume
    new_moves = super(StockMove, self).action_consume(cr, uid, [move.id], product_qty, location_id, context=context)
  File "/home/tomi/openerp/addons/stock/stock.py", line 2234, in action_consume
    res += self.split_lines(cr, uid, [move.id], quantity_rest, split_by_qty=1, context=context)
AttributeError: 'stock.move' object has no attribute 'split_lines'





References