From a94078f37ffab309684f8f0c27c2d6ded5d59114 Mon Sep 17 00:00:00 2001 From: "sbh (Open ERP)" Date: Tue, 21 Sep 2010 18:20:29 +0530 Subject: [PATCH] [IMP] mrp_repair,stock_location,stock_planning: Rename the date_planned to date in stock_move bzr revid: sbh@tinyerp.com-20100921125029-2jm2exk7b66k8rvb --- addons/mrp_repair/mrp_repair.py | 2 +- addons/mrp_repair/test/test_mrp_repair.yml | 2 +- addons/stock_location/mrp_pull.py | 2 +- addons/stock_planning/stock_planning.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/addons/mrp_repair/mrp_repair.py b/addons/mrp_repair/mrp_repair.py index ddcd2ccb501..85c26593501 100644 --- a/addons/mrp_repair/mrp_repair.py +++ b/addons/mrp_repair/mrp_repair.py @@ -192,7 +192,7 @@ class mrp_repair(osv.osv): if move_id: move = self.pool.get('stock.move').browse(cr, uid, move_id) product = self.pool.get('product.product').browse(cr, uid, prod_id) - date = move.date_planned + date = move.date limit = mx.DateTime.strptime(date, '%Y-%m-%d %H:%M:%S') + RelativeDateTime(months=product.warranty) data['value']['guarantee_limit'] = limit.strftime('%Y-%m-%d') data['value']['location_id'] = move.location_dest_id.id diff --git a/addons/mrp_repair/test/test_mrp_repair.yml b/addons/mrp_repair/test/test_mrp_repair.yml index 7d38ab8a94d..3e58a837f38 100644 --- a/addons/mrp_repair/test/test_mrp_repair.yml +++ b/addons/mrp_repair/test/test_mrp_repair.yml @@ -8,7 +8,7 @@ company_id: base.main_company date: '2010-06-24 20:10:28' date_expected: '2010-06-24 20:10:55' - date_planned: '2010-06-24 20:10:28' + date: '2010-06-24 20:10:28' location_dest_id: stock.stock_location_stock location_id: stock.stock_location_stock name: '[PC1] Basic PC' diff --git a/addons/stock_location/mrp_pull.py b/addons/stock_location/mrp_pull.py index b4a68ca1b74..231a814e671 100644 --- a/addons/stock_location/mrp_pull.py +++ b/addons/stock_location/mrp_pull.py @@ -80,7 +80,7 @@ class procurement_order(osv.osv): 'picking_id': picking_id, 'company_id': line.company_id and line.company_id.id or False, 'product_id': proc.product_id.id, - 'date_planned': proc.date_planned, + 'date': proc.date_planned, 'product_qty': proc.product_qty, 'product_uom': proc.product_uom.id, 'product_uos_qty': (proc.product_uos and proc.product_uos_qty)\ diff --git a/addons/stock_planning/stock_planning.py b/addons/stock_planning/stock_planning.py index f6668130415..3bd9e6d6af9 100644 --- a/addons/stock_planning/stock_planning.py +++ b/addons/stock_planning/stock_planning.py @@ -690,7 +690,7 @@ class stock_planning(osv.osv): 'name': _('MPS(') + str(user.login) +') '+ obj.period_id.name, 'picking_id': picking_id, 'product_id': obj.product_id.id, - 'date_planned': obj.period_id.date_start, + 'date': obj.period_id.date_start, 'product_qty': uom_qty, 'product_uom': uom, 'product_uos_qty': uos_qty,