From f3dd4e659de9e1bef9a5052e932b5a9e01a6afb5 Mon Sep 17 00:00:00 2001 From: "sbh (Open ERP)" Date: Tue, 21 Sep 2010 18:04:53 +0530 Subject: [PATCH] [IMP] sale,mrp,purchase: Rename the date_planned to date in stock_move bzr revid: sbh@tinyerp.com-20100921123453-186dl4tyq1mwzo2x --- addons/mrp/mrp.py | 6 +++--- addons/mrp/report/mrp_report.py | 4 ++-- addons/mrp/stock.py | 2 +- addons/purchase/purchase.py | 2 +- addons/sale/sale.py | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/addons/mrp/mrp.py b/addons/mrp/mrp.py index 5ad90bf25d6..8cb3b62689d 100644 --- a/addons/mrp/mrp.py +++ b/addons/mrp/mrp.py @@ -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, diff --git a/addons/mrp/report/mrp_report.py b/addons/mrp/report/mrp_report.py index 6ae1b2e63e5..d677184586e 100644 --- a/addons/mrp/report/mrp_report.py +++ b/addons/mrp/report/mrp_report.py @@ -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() diff --git a/addons/mrp/stock.py b/addons/mrp/stock.py index 248e39989d8..9f149dda6bd 100644 --- a/addons/mrp/stock.py +++ b/addons/mrp/stock.py @@ -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'], diff --git a/addons/purchase/purchase.py b/addons/purchase/purchase.py index 51e294200cb..29320cf28c0 100644 --- a/addons/purchase/purchase.py +++ b/addons/purchase/purchase.py @@ -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, diff --git a/addons/sale/sale.py b/addons/sale/sale.py index b2df12965d3..924c17d0da3 100644 --- a/addons/sale/sale.py +++ b/addons/sale/sale.py @@ -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,