[WIP] Temporarily give all products a standard cost_method and valuation method

bzr revid: jco@openerp.com-20130715114609-7cxiijarob2138px
This commit is contained in:
Josse Colpaert 2013-07-15 13:46:09 +02:00
parent 6898ade414
commit dba8a69be3
3 changed files with 8 additions and 1 deletions

View File

@ -132,7 +132,7 @@ class procurement_order(osv.osv):
company = self.pool.get('res.users').browse(cr, uid, uid, context=context).company_id
move_obj = self.pool.get('stock.move')
#Search all confirmed stock_moves and try to assign them
confirmed_ids = move_obj.search(cr, uid, [('state', '=', 'confirmed'), ('company_id','=', company.id)], context=context)
confirmed_ids = move_obj.search(cr, uid, [('state', 'in', ['confirmed', 'waiting']), ('company_id','=', company.id)], context=context) #Type = stockable product?
move_obj.action_assign(cr, uid, confirmed_ids, context=context)
finally:
if use_new_cursor:

View File

@ -80,6 +80,7 @@ Dashboard / Reports for Warehouse Management will include:
# 'report/report_stock_view.xml',
# 'board_warehouse_view.xml',
# 'res_config_view.xml',
'valuationandcostmethod.yml',
],
'test': [
# 'test/inventory.yml',

View File

@ -0,0 +1,6 @@
-
Write on all products valuation and cost method (temporary patch for default value problems for properties in demo data)
-
!python {model: product.product}: |
prod_ids = self.search(cr, uid, [])
self.write(cr, uid, prod_ids, {'cost_method':'real', 'valuation':'manual_periodic'})