[IMP] sale,mrp,purchase: Rename the date_planned to date in stock_move

bzr revid: sbh@tinyerp.com-20100921123453-186dl4tyq1mwzo2x
This commit is contained in:
sbh (Open ERP) 2010-09-21 18:04:53 +05:30
parent 1397b4df21
commit f3dd4e659d
5 changed files with 8 additions and 8 deletions

View File

@ -857,7 +857,7 @@ class mrp_production(osv.osv):
source = production.product_id.product_tmpl_id.property_stock_production.id
data = {
'name':'PROD:' + production.name,
'date_planned': production.date_planned,
'date': production.date_planned,
'product_id': production.product_id.id,
'product_qty': production.product_qty,
'product_uom': production.product_uom.id,
@ -879,7 +879,7 @@ class mrp_production(osv.osv):
if line.product_id.type in ('product', 'consu'):
res_dest_id = move_obj.create(cr, uid, {
'name':'PROD:' + production.name,
'date_planned': production.date_planned,
'date': production.date_planned,
'product_id': line.product_id.id,
'product_qty': line.product_qty,
'product_uom': line.product_uom.id,
@ -900,7 +900,7 @@ class mrp_production(osv.osv):
'product_uom': line.product_uom.id,
'product_uos_qty': line.product_uos and line.product_uos_qty or False,
'product_uos': line.product_uos and line.product_uos.id or False,
'date_planned': newdate,
'date': newdate,
'move_dest_id': res_dest_id,
'location_id': production.location_src_id.id,
'location_dest_id': routing_loc or production.location_src_id.id,

View File

@ -71,7 +71,7 @@ class report_mrp_inout(osv.osv):
create or replace view report_mrp_inout as (
select
min(sm.id) as id,
to_char(sm.date_planned,'YYYY:IW') as date,
to_char(sm.date,'YYYY:IW') as date,
sum(case when (sl.usage='internal') then
pt.standard_price * sm.product_qty
else
@ -94,7 +94,7 @@ class report_mrp_inout(osv.osv):
where
sm.state in ('waiting','confirmed','assigned')
group by
to_char(sm.date_planned,'YYYY:IW')
to_char(sm.date,'YYYY:IW')
)""")
report_mrp_inout()

View File

@ -79,7 +79,7 @@ class StockMove(osv.osv):
proc_id = procurement_obj.create(cr, uid, {
'name': (move.picking_id.origin or ''),
'origin': (move.picking_id.origin or ''),
'date_planned': move.date_planned,
'date_planned': move.date,
'product_id': line['product_id'],
'product_qty': line['product_qty'],
'product_uom': line['product_uom'],

View File

@ -451,7 +451,7 @@ class purchase_order(osv.osv):
'product_uos_qty': order_line.product_qty,
'product_uom': order_line.product_uom.id,
'product_uos': order_line.product_uom.id,
'date_planned': order_line.date_planned,
'date': order_line.date_planned,
'date_expected': order_line.date_planned,
'location_id': loc_id,
'location_dest_id': dest,

View File

@ -654,7 +654,7 @@ class sale_order(osv.osv):
'name': line.name[:64],
'picking_id': picking_id,
'product_id': line.product_id.id,
'date_planned': date_planned,
'date': date_planned,
'date_expected': date_planned,
'product_qty': line.product_uom_qty,
'product_uom': line.product_uom.id,