From 3713363a35aba98d01e839874f390d6b9c8332a5 Mon Sep 17 00:00:00 2001 From: "Harry (Open ERP)" Date: Wed, 25 Feb 2009 11:12:12 +0530 Subject: [PATCH 1/6] [fixed bug] name should be has next sequence when duplicate stock rule bzr revid: hmo@tinyerp.com-20090225054212-9kx5yvzff0u9p29a --- addons/mrp/mrp.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/addons/mrp/mrp.py b/addons/mrp/mrp.py index b4388f6d19b..828998c4142 100644 --- a/addons/mrp/mrp.py +++ b/addons/mrp/mrp.py @@ -1172,6 +1172,13 @@ class stock_warehouse_orderpoint(osv.osv): v = {'product_uom':prod.uom_id.id} return {'value': v} return {} + def copy(self, cr, uid, id, default=None,context={}): + if not default: + default = {} + default.update({ + 'name': self.pool.get('ir.sequence').get(cr, uid, 'mrp.warehouse.orderpoint') or '', + }) + return super(stock_warehouse_orderpoint, self).copy(cr, uid, id, default, context) stock_warehouse_orderpoint() From c206a83c2b5aeb45e6e93ae48c204c8aa19c6728 Mon Sep 17 00:00:00 2001 From: husen daudi Date: Thu, 26 Feb 2009 16:03:11 +0530 Subject: [PATCH 2/6] Improvements by Christophe Chauvet bzr revid: hda@hda-20090226103311-1vb5zh70n0owuyba --- addons/project/project.py | 4 ++-- addons/project/project_view.xml | 26 +++++++++++++++++--------- 2 files changed, 19 insertions(+), 11 deletions(-) diff --git a/addons/project/project.py b/addons/project/project.py index fc0fca5d04d..3dc09a50c5c 100644 --- a/addons/project/project.py +++ b/addons/project/project.py @@ -271,7 +271,7 @@ class task(osv.osv): 'history': fields.function(_history_get, method=True, string="Task Details", type="text"), 'notes': fields.text('Notes'), - 'planned_hours': fields.float('Planned Hours', readonly=True, states={'draft':[('readonly',False)]}, required=True, help='Estimated time to do the task, usually set by the project manager when the task is in draft state.'), + 'planned_hours': fields.float('Planned Hours', required=True, help='Estimated time to do the task, usually set by the project manager when the task is in draft state.'), 'effective_hours': fields.function(_hours_get, method=True, string='Hours Spent', multi='hours', store=True, help="Computed using the sum of the task work done."), 'remaining_hours': fields.float('Remaining Hours', digits=(16,2), help="Total remaining time, can be re-estimated periodically by the assignee of the task."), 'total_hours': fields.function(_hours_get, method=True, string='Total Hours', multi='hours', store=True, help="Computed as: Time Spent + Remaining Time."), @@ -280,7 +280,7 @@ class task(osv.osv): 'user_id': fields.many2one('res.users', 'Assigned to'), 'partner_id': fields.many2one('res.partner', 'Partner'), - 'work_ids': fields.one2many('project.task.work', 'task_id', 'Work done', readonly=False, states={'draft':[('readonly',True)]}), + 'work_ids': fields.one2many('project.task.work', 'task_id', 'Work done'), } _defaults = { 'user_id': lambda obj,cr,uid,context: uid, diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml index 0c216b99407..627f69286e2 100644 --- a/addons/project/project_view.xml +++ b/addons/project/project_view.xml @@ -243,11 +243,11 @@
- - - - - + + + + + @@ -256,6 +256,7 @@