Incoming Shipment ERROR when receive a Product with Real Time Inventory Valuation

Bug #1079070 reported by Kitti Upariphutthiphong
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Confirmed
Medium
OpenERP R&D Addons Team 3

Bug Description

If product is to be received is not Real Time inventory valuation, there will be no problem, but if it is, ERROR will occur when trying to post accounting.

*Based on*
(Build 24921)
server (4562)
addons (8041)
web (3425)

*Steps to Error*
==============
1. Create new database with Demo data and install "Accounting" and "Warehouse" module
2. Menu / Settings / Configuration / Warehouse --> Generate accounting entries per stock movement = YES
3. Edit Product i.e., USB Adapter --> go to Accounting tab --> Set Inventory Valuation = Real Time, Set Stock Input Account and Stock Output Account
4. Create new Incoming Shipments (Menu / Warehouse / Receive/Deliver By Orders / Incoming Shipments) and try to receive this product.

Error as following when click "Receive"

Server Traceback (most recent call last):
  File "/home/kittiu/workspace/openerpSrc/trunk_24921/web/addons/web/session.py", line 91, in send
    return openerp.netsvc.dispatch_rpc(service_name, method, args)
  File "/home/kittiu/workspace/openerpSrc/trunk_24921/server/openerp/netsvc.py", line 361, in dispatch_rpc
    result = ExportService.getService(service_name).dispatch(method, params)
  File "/home/kittiu/workspace/openerpSrc/trunk_24921/server/openerp/service/web_services.py", line 596, in dispatch
    res = fn(db, uid, *params)
  File "/home/kittiu/workspace/openerpSrc/trunk_24921/server/openerp/osv/osv.py", line 167, in execute_kw
    return self.execute(db, uid, obj, method, *args, **kw or {})
  File "/home/kittiu/workspace/openerpSrc/trunk_24921/server/openerp/osv/osv.py", line 121, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/home/kittiu/workspace/openerpSrc/trunk_24921/server/openerp/osv/osv.py", line 176, in execute
    res = self.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/home/kittiu/workspace/openerpSrc/trunk_24921/server/openerp/osv/osv.py", line 164, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/home/kittiu/workspace/openerpSrc/trunk_24921/addons/stock/wizard/stock_partial_picking.py", line 213, in do_partial
    stock_picking.do_partial(cr, uid, [partial.picking_id.id], partial_data, context=context)
  File "/home/kittiu/workspace/openerpSrc/trunk_24921/addons/stock/stock.py", line 1361, in do_partial
    self.action_move(cr, uid, [pick.id], context=context)
  File "/home/kittiu/workspace/openerpSrc/trunk_24921/addons/stock/stock.py", line 906, in action_move
    context=context)
  File "/home/kittiu/workspace/openerpSrc/trunk_24921/addons/stock/stock.py", line 2448, in action_done
    self._create_product_valuation_moves(cr, uid, move, context=context)
  File "/home/kittiu/workspace/openerpSrc/trunk_24921/addons/stock/stock.py", line 2407, in _create_product_valuation_moves
    'ref': move.picking_id and move.picking_id.name})
  File "/home/kittiu/workspace/openerpSrc/trunk_24921/addons/account/account.py", line 1442, in create
    c['period_id'] = vals['period_id']
KeyError: 'period_id'

Amit Parik (amit-parik)
Changed in openobject-addons:
assignee: nobody → OpenERP R&D Addons Team 3 (openerp-dev-addons3)
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Amit Parik (amit-parik) wrote :

Hello,

This will become duplicate of lp:1076363 because lp:1076363 is first reported,

Anyways thanks for the reporting with nice producible steps!

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.