[stock] error when manually creating stock.move

Bug #591294 reported by sraps (Alistek)
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Fix Released
Undecided
Vinay Rana (OpenERP)

Bug Description

Error happens when manually creating stock.move to the chained location ("Automatic Move" and "Fixed Location" selected for the Location posting to ) and there is no stock.picking object attached to the original move. As there should be new additional stock movement created, it tries to do it, and tries to create another picking, which may not exist (field picking_id is not mandatory). So the error happens.

OpenERP-Client Version : 5.0.10
Last revision No. & ID :Bazaar Package not Found !Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/openerp-server/netsvc.py", line 245, in dispatch
    result = LocalService(service_name)(method, *params)
  File "/usr/lib/python2.5/site-packages/openerp-server/netsvc.py", line 74, in __call__
    return getattr(self, method)(*params)
  File "/usr/lib/python2.5/site-packages/openerp-server/service/web_services.py", line 576, in execute
    res = service.execute(db, uid, object, method, *args)
  File "/usr/lib/python2.5/site-packages/openerp-server/osv/osv.py", line 58, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/usr/lib/python2.5/site-packages/openerp-server/osv/osv.py", line 119, in execute
    res = pool.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/usr/lib/python2.5/site-packages/openerp-server/osv/osv.py", line 111, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/usr/lib/python2.5/site-packages/openerp-server/addons/stock/stock.py", line 1158, in action_confirm
    create_chained_picking(self, cr, uid, moves, context)
  File "/usr/lib/python2.5/site-packages/openerp-server/addons/stock/stock.py", line 1134, in create_chained_picking
    'address_id': picking.address_id.id,
AttributeError: 'bool' object has no attribute 'id'

As there is no picking_id, the field is set to False...

Additional information:
When "Automatic No Step Added" is selected for Location we are posting to, there is no problem as system tries to change the original stock.move object, thus not creating picking.

Assuming, that picking_id is not a mandatory field, this is a bug, because if there is no picking it should not try to create another one for new movement to chained location.

Related branches

Changed in openobject-addons:
status: New → Confirmed
assignee: nobody → vra (openerp) (vra-openerp)
Revision history for this message
Vinay Rana (OpenERP) (vra-openerp) wrote :

Hello Sraps,

Can you please check the attached patch and notify me?

Thanks.

Changed in openobject-addons:
status: Confirmed → In Progress
Revision history for this message
Anup(SerpentCS) (anup-serpent) wrote :

Hello Kasparas,

   It has been fixed by revision 2831 <email address hidden>

Thanks.

Changed in openobject-addons:
milestone: none → 5.0.13
status: In Progress → Fix Released
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.