From 1a627b275cf57029eceaf6b1806d91f11b23a00e Mon Sep 17 00:00:00 2001 From: "Foram Katharotiya (OpenERP)" Date: Wed, 17 Oct 2012 17:04:34 +0530 Subject: [PATCH 1/4] [FIX] traceback of graph in mrp bzr revid: fka@tinyerp.com-20121017113434-lihuvchvs6621id6 --- addons/mrp/mrp_view.xml | 2 +- addons/mrp_operations/mrp_operations_view.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/mrp/mrp_view.xml b/addons/mrp/mrp_view.xml index 9d1ae9eae8a..8d8e77bf75e 100644 --- a/addons/mrp/mrp_view.xml +++ b/addons/mrp/mrp_view.xml @@ -606,7 +606,7 @@ mrp.production - + diff --git a/addons/mrp_operations/mrp_operations_view.xml b/addons/mrp_operations/mrp_operations_view.xml index 834f3000472..c8167fcb0b5 100644 --- a/addons/mrp_operations/mrp_operations_view.xml +++ b/addons/mrp_operations/mrp_operations_view.xml @@ -328,7 +328,7 @@ mrp.production.workcenter.line - + From b24eb49293529ac30d12f2a97a003ee679c806ec Mon Sep 17 00:00:00 2001 From: "Foram Katharotiya (OpenERP)" Date: Fri, 19 Oct 2012 15:57:02 +0530 Subject: [PATCH 2/4] [IMP] remove date_planned_date function Field in mrp_production bzr revid: fka@tinyerp.com-20121019102702-gcskff4ae16jrzqp --- addons/mrp/mrp.py | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/addons/mrp/mrp.py b/addons/mrp/mrp.py index 3ae27bf2c41..8f294539fd4 100644 --- a/addons/mrp/mrp.py +++ b/addons/mrp/mrp.py @@ -431,16 +431,6 @@ class mrp_production(osv.osv): result[prod.id] = prod.date_planned return result - def _production_date(self, cr, uid, ids, prop, unknow_none, context=None): - """ Finds production planned date. - @param prop: Name of field. - @param unknow_none: - @return: Dictionary of values. - """ - result = {} - for prod in self.browse(cr, uid, ids, context=context): - result[prod.id] = prod.date_planned[:10] - return result def _src_id_default(self, cr, uid, ids, context=None): src_location_id = self.pool.get('ir.model.data').get_object(cr, uid, 'stock', 'stock_location_stock', context=context) @@ -471,7 +461,6 @@ class mrp_production(osv.osv): help="Location where the system will stock the finished products."), 'date_planned_end': fields.function(_production_date_end, type='date', string='Scheduled End Date'), - 'date_planned_date': fields.function(_production_date, type='date', string='Scheduled Date'), 'date_planned': fields.datetime('Scheduled Date', required=True, select=1, readonly=True, states={'draft':[('readonly',False)]}), 'date_start': fields.datetime('Start Date', select=True, readonly=True), 'date_finished': fields.datetime('End Date', select=True, readonly=True), From aa7856b025c17d3e36dad7cfdda84cf2fafc4b11 Mon Sep 17 00:00:00 2001 From: "Foram Katharotiya (OpenERP)" Date: Fri, 19 Oct 2012 16:22:10 +0530 Subject: [PATCH 3/4] [IMP] remove date_planned_end function Field in mrp_production bzr revid: fka@tinyerp.com-20121019105210-fx477sy9ht4mlic1 --- addons/mrp/mrp.py | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/addons/mrp/mrp.py b/addons/mrp/mrp.py index 8f294539fd4..92b47ff66e1 100644 --- a/addons/mrp/mrp.py +++ b/addons/mrp/mrp.py @@ -420,18 +420,6 @@ class mrp_production(osv.osv): result[prod.id]['cycle_total'] += wc.cycle return result - def _production_date_end(self, cr, uid, ids, prop, unknow_none, context=None): - """ Finds production end date. - @param prop: Name of field. - @param unknow_none: - @return: Dictionary of values. - """ - result = {} - for prod in self.browse(cr, uid, ids, context=context): - result[prod.id] = prod.date_planned - return result - - def _src_id_default(self, cr, uid, ids, context=None): src_location_id = self.pool.get('ir.model.data').get_object(cr, uid, 'stock', 'stock_location_stock', context=context) return src_location_id.id @@ -459,12 +447,9 @@ class mrp_production(osv.osv): 'location_dest_id': fields.many2one('stock.location', 'Finished Products Location', required=True, readonly=True, states={'draft':[('readonly',False)]}, help="Location where the system will stock the finished products."), - - 'date_planned_end': fields.function(_production_date_end, type='date', string='Scheduled End Date'), 'date_planned': fields.datetime('Scheduled Date', required=True, select=1, readonly=True, states={'draft':[('readonly',False)]}), 'date_start': fields.datetime('Start Date', select=True, readonly=True), 'date_finished': fields.datetime('End Date', select=True, readonly=True), - 'bom_id': fields.many2one('mrp.bom', 'Bill of Material', domain=[('bom_id','=',False)], readonly=True, states={'draft':[('readonly',False)]}, help="Bill of Materials allow you to define the list of required raw materials to make a finished product."), 'routing_id': fields.many2one('mrp.routing', string='Routing', on_delete='set null', readonly=True, states={'draft':[('readonly',False)]}, From 7f64cbd875e22d8feb1555cf886c00bb3163c072 Mon Sep 17 00:00:00 2001 From: "Foram Katharotiya (OpenERP)" Date: Tue, 23 Oct 2012 11:52:30 +0530 Subject: [PATCH 4/4] [IMP] remove date_start_date function field bzr revid: fka@tinyerp.com-20121023062230-l6941b0lt7qx4wzu --- addons/mrp_operations/mrp_operations.py | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/addons/mrp_operations/mrp_operations.py b/addons/mrp_operations/mrp_operations.py index 9f6671c3b2b..ffe0305d5f1 100644 --- a/addons/mrp_operations/mrp_operations.py +++ b/addons/mrp_operations/mrp_operations.py @@ -50,17 +50,6 @@ class stock_move(osv.osv): stock_move() class mrp_production_workcenter_line(osv.osv): - def _get_date_date(self, cr, uid, ids, field_name, arg, context=None): - """ Finds starting date. - @return: Dictionary of values. - """ - res={} - for op in self.browse(cr, uid, ids, context=context): - if op.date_start: - res[op.id] = op.date_start[:10] - else: - res[op.id]=False - return res def _get_date_end(self, cr, uid, ids, field_name, arg, context=None): """ Finds ending date. @@ -92,7 +81,6 @@ class mrp_production_workcenter_line(osv.osv): "* When work order is in running mode, during that time if user wants to stop or to make changes in order then can set in 'Pending' state.\n" \ "* When the user cancels the work order it will be set in 'Canceled' state.\n" \ "* When order is completely processed that time it is set in 'Finished' state."), - 'date_start_date': fields.function(_get_date_date, string='Start Date', type='date'), 'date_planned': fields.datetime('Scheduled Date', select=True), 'date_planned_end': fields.function(_get_date_end, string='End Date', type='datetime'), 'date_start': fields.datetime('Start Date'),