From eb40acb2db63421bcd4f02a841d13687dc7003f4 Mon Sep 17 00:00:00 2001 From: "Harry (OpenERP)" Date: Wed, 20 Oct 2010 13:32:53 +0530 Subject: [PATCH 01/13] [FIX] document_webdav: add detail of configuration parameter in module description lp bug: https://launchpad.net/bugs/511394 fixed bzr revid: hmo@tinyerp.com-20101020080253-yrc61hljix0r77j3 --- addons/document_webdav/__openerp__.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/addons/document_webdav/__openerp__.py b/addons/document_webdav/__openerp__.py index 1c2e232e914..e6b8cfd3f94 100644 --- a/addons/document_webdav/__openerp__.py +++ b/addons/document_webdav/__openerp__.py @@ -38,6 +38,17 @@ You can then use any compatible browser to remotely see the attachments of OpenObject. After installation, the webDAV server can be controlled by a [webdav] section in the server's config. + Server Configuration Parameter: + [webdav] + ; enable = True ; Serve webdav over the http(s) servers + ; vdir = webdav ; the directory that webdav will be served at + ; this default val means that webdav will be + ; on "http://localhost:8069/webdav/ + ; verbose = True ; Turn on the verbose messages of webdav + ; debug = True ; Turn on the debugging messages of webdav + ; since the messages are routed to the python logging, with + ; levels "debug" and "debug_rpc" respectively, you can leave + ; these options on """, "depends" : ["base", "document"], "init_xml" : [], From e1d066b76808818e38db2c930d4b3d27324a6de0 Mon Sep 17 00:00:00 2001 From: "olt@tinyerp.com" <> Date: Wed, 20 Oct 2010 10:55:45 +0200 Subject: [PATCH 02/13] [FIX] event: invalid view: duplicate field 'user_id' bzr revid: olt@tinyerp.com-20101020085545-i8bltbsm5rq4jqiw --- addons/event/event_view.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/addons/event/event_view.xml b/addons/event/event_view.xml index 918147b79cb..6fc620abdf8 100644 --- a/addons/event/event_view.xml +++ b/addons/event/event_view.xml @@ -171,7 +171,6 @@ - From 29b353d5d211b9dd253c4064207be9e16638aff5 Mon Sep 17 00:00:00 2001 From: "Harry (OpenERP)" Date: Wed, 20 Oct 2010 16:28:16 +0530 Subject: [PATCH 03/13] [FIX] mrp: regression: production orders moves are wrongly done from 'Stock' to 'Stock' lp bug: https://launchpad.net/bugs/622948 fixed bzr revid: hmo@tinyerp.com-20101020105816-08af1r7unnxcagv0 --- addons/mrp/mrp.py | 2 +- addons/stock/stock.py | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/addons/mrp/mrp.py b/addons/mrp/mrp.py index d0402708f5f..12014f0fad8 100644 --- a/addons/mrp/mrp.py +++ b/addons/mrp/mrp.py @@ -745,7 +745,7 @@ class mrp_production(osv.osv): if rest_qty <= production_qty: production_qty = rest_qty if rest_qty > 0 : - stock_mov_obj.action_consume(cr, uid, [produce_product.id], production_qty, production.location_dest_id.id, context=context) + stock_mov_obj.action_consume(cr, uid, [produce_product.id], production_qty, context=context) for raw_product in production.move_lines2: new_parent_ids = [] diff --git a/addons/stock/stock.py b/addons/stock/stock.py index f6c5f1de554..fe984b10f22 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -2215,7 +2215,7 @@ class stock_move(osv.osv): 'product_qty': quantity, 'product_uos_qty': uos_qty, 'state': move.state, - 'location_id': location_id + 'location_id': location_id or move.location_id.id, } if move.product_id.track_production and location_id: # IF product has checked track for production lot, move lines will be split by 1 @@ -2238,9 +2238,8 @@ class stock_move(osv.osv): update_val = { 'product_qty' : quantity_rest, 'product_uos_qty' : uos_qty_rest, - 'location_id': location_id + 'location_id': location_id or move.location_id.id } - self.write(cr, uid, [move.id], update_val) product_obj = self.pool.get('product.product') From 9475077629755339394a61202454fc340cc48478 Mon Sep 17 00:00:00 2001 From: "Harry (OpenERP)" Date: Wed, 20 Oct 2010 18:32:12 +0530 Subject: [PATCH 04/13] [FIX] mrp: many2many and one2many field support domain. so removed many2many_domain,one2many_dommain in mrp.py lp bug: https://launchpad.net/bugs/663003 fixed bzr revid: hmo@tinyerp.com-20101020130212-j1373iyv4e6ysftg --- addons/mrp/mrp.py | 50 ++++------------------------------------------- 1 file changed, 4 insertions(+), 46 deletions(-) diff --git a/addons/mrp/mrp.py b/addons/mrp/mrp.py index 12014f0fad8..cee60e63023 100644 --- a/addons/mrp/mrp.py +++ b/addons/mrp/mrp.py @@ -350,48 +350,6 @@ def rounding(f, r): return f return round(f / r) * r -class many2many_domain(fields.many2many): - def set(self, cr, obj, id, name, values, user=None, context=None): - return super(many2many_domain, self).set(cr, obj, id, name, values, user=user, - context=context) - - def get(self, cr, obj, ids, name, user=None, offset=0, context=None, values=None): - if not context: - context = {} - - move_obj = obj.pool.get('stock.move') - res = {} - for i in ids: - res[i] = [] - valid_move_ids = move_obj.search(cr, user, self._domain) # move ids relative to domain argument - if valid_move_ids: - cr.execute("SELECT production_id, move_id from mrp_production_move_ids where production_id in %s and move_id in %s", - [tuple(ids), tuple(valid_move_ids)]) - related_move_map = cr.fetchall() - related_move_dict = dict((k, list(set([v[1] for v in itr]))) for k, itr in groupby(related_move_map, itemgetter(0))) - res.update(related_move_dict) - - return res - -class one2many_domain(fields.one2many): - def set(self, cr, obj, id, field, values, user=None, context=None): - return super(one2many_domain, self).set(cr, obj, id, field, values, - user=user, context=context) - - def get(self, cr, obj, ids, name, user=None, offset=0, context=None, values=None): - if not context: - context = {} - - move_obj = obj.pool.get('stock.move') - res = {} - for i in ids: - res[i] = [] - move_ids = move_obj.search(cr, user, self._domain+[('production_id', 'in', tuple(ids))], context=context) - related_move_dict = dict([(o.production_id.id, [o.id]) for o in move_obj.browse(cr, user, move_ids, context=context)]) - res.update(related_move_dict) - - return res - class mrp_production(osv.osv): """ Production Orders / Manufacturing Orders @@ -467,10 +425,10 @@ class mrp_production(osv.osv): 'picking_id': fields.many2one('stock.picking', 'Picking list', readonly=True, help="This is the internal picking list that brings the finished product to the production plan"), 'move_prod_id': fields.many2one('stock.move', 'Move product', readonly=True), - 'move_lines': many2many_domain('stock.move', 'mrp_production_move_ids', 'production_id', 'move_id', 'Products to Consume', domain=[('state','not in', ('done', 'cancel'))], states={'done':[('readonly',True)]}), - 'move_lines2': many2many_domain('stock.move', 'mrp_production_move_ids', 'production_id', 'move_id', 'Consumed Products', domain=[('state','in', ('done', 'cancel'))]), - 'move_created_ids': one2many_domain('stock.move', 'production_id', 'Moves Created', domain=[('state','not in', ('done', 'cancel'))], states={'done':[('readonly',True)]}), - 'move_created_ids2': one2many_domain('stock.move', 'production_id', 'Moves Created', domain=[('state','in', ('done', 'cancel'))]), + 'move_lines': fields.many2many('stock.move', 'mrp_production_move_ids', 'production_id', 'move_id', 'Products to Consume', domain=[('state','not in', ('done', 'cancel'))], states={'done':[('readonly',True)]}), + 'move_lines2': fields.many2many('stock.move', 'mrp_production_move_ids', 'production_id', 'move_id', 'Consumed Products', domain=[('state','in', ('done', 'cancel'))]), + 'move_created_ids': fields.one2many('stock.move', 'production_id', 'Moves Created', domain=[('state','not in', ('done', 'cancel'))], states={'done':[('readonly',True)]}), + 'move_created_ids2': fields.one2many('stock.move', 'production_id', 'Moves Created', domain=[('state','in', ('done', 'cancel'))]), 'product_lines': fields.one2many('mrp.production.product.line', 'production_id', 'Scheduled goods'), 'workcenter_lines': fields.one2many('mrp.production.workcenter.line', 'production_id', 'Work Centers Utilisation'), 'state': fields.selection([('draft','Draft'),('picking_except', 'Picking Exception'),('confirmed','Waiting Goods'),('ready','Ready to Produce'),('in_production','In Production'),('cancel','Cancelled'),('done','Done')],'State', readonly=True, From c7d50354fb880f01092be16ff8a99b66d97e89d5 Mon Sep 17 00:00:00 2001 From: "Vir (Open ERP)" Date: Wed, 20 Oct 2010 18:59:48 +0530 Subject: [PATCH 05/13] [FIX] hr_timesheet_sheet : date_from and date_to problem, hr_evaluation : date deadline problem fixed bzr revid: vir@tinyerp.com-20101020132948-1ax61wd33j1ejj18 --- addons/hr_evaluation/hr_evaluation.py | 2 +- addons/hr_timesheet_sheet/hr_timesheet_sheet.py | 2 +- addons/hr_timesheet_sheet/hr_timesheet_sheet_demo.xml | 5 +++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/addons/hr_evaluation/hr_evaluation.py b/addons/hr_evaluation/hr_evaluation.py index 3c5a150691e..4d8ef9d440f 100644 --- a/addons/hr_evaluation/hr_evaluation.py +++ b/addons/hr_evaluation/hr_evaluation.py @@ -124,7 +124,7 @@ class hr_employee(osv.osv): flag = False evaluation_plan = evaluation_plan_obj.browse(cr, uid, [evaluation_plan_id], context=context)[0] if not evaluation_date: - evaluation_date=(parser.parse(datetime.date.today().strftime('%Y-%m-%d'))+ relativedelta(months=+evaluation_plan.month_first)).strftime('%Y-%m-%d') + evaluation_date=(parser.parse(datetime.now().strftime('%Y-%m-%d'))+ relativedelta(months=+evaluation_plan.month_first)).strftime('%Y-%m-%d') flag = True else: if (parser.parse(evaluation_date) + relativedelta(months = int(evaluation_plan.month_next))).strftime('%Y-%m-%d') <= time.strftime("%Y-%m-%d"): diff --git a/addons/hr_timesheet_sheet/hr_timesheet_sheet.py b/addons/hr_timesheet_sheet/hr_timesheet_sheet.py index b152e0112eb..6411bae7bc0 100644 --- a/addons/hr_timesheet_sheet/hr_timesheet_sheet.py +++ b/addons/hr_timesheet_sheet/hr_timesheet_sheet.py @@ -319,7 +319,7 @@ class hr_timesheet_sheet(osv.osv): if r=='month': return time.strftime('%Y-%m-01') elif r=='week': - return (datetime.today() + relativedelta(weekday=0)).strftime('%Y-%m-%d') + return (datetime.today() + relativedelta(weekday=0, weeks=-1)).strftime('%Y-%m-%d') elif r=='year': return time.strftime('%Y-01-01') return time.strftime('%Y-%m-%d') diff --git a/addons/hr_timesheet_sheet/hr_timesheet_sheet_demo.xml b/addons/hr_timesheet_sheet/hr_timesheet_sheet_demo.xml index dedac8377a7..a4b4b434da6 100644 --- a/addons/hr_timesheet_sheet/hr_timesheet_sheet_demo.xml +++ b/addons/hr_timesheet_sheet/hr_timesheet_sheet_demo.xml @@ -10,11 +10,12 @@ - + From 358d1b2fe187664423e38bf6391f1de7fed77ac3 Mon Sep 17 00:00:00 2001 From: "Jay (OpenERP)" Date: Wed, 20 Oct 2010 19:10:08 +0530 Subject: [PATCH 06/13] [FIX] Account : Usability bzr revid: jvo@tinyerp.com-20101020134008-bq2gce4sjbkp6i3z --- addons/account/wizard/account_validate_move_view.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/account/wizard/account_validate_move_view.xml b/addons/account/wizard/account_validate_move_view.xml index 352d23d6b53..d4184dd9c8b 100644 --- a/addons/account/wizard/account_validate_move_view.xml +++ b/addons/account/wizard/account_validate_move_view.xml @@ -10,7 +10,7 @@
-