From da4288b900324c8e0034b97886dae79d8a217d73 Mon Sep 17 00:00:00 2001 From: "Harry (OpenERP)" Date: Wed, 6 Oct 2010 12:05:52 +0530 Subject: [PATCH 01/12] [REVERT] calendar: regresstion on recurrent due to rev: olt@tinyerp.com-20100924131709-cqsd1ut234ni6txn. so revert this revision work bzr revid: hmo@tinyerp.com-20101006063552-eqydv670c30teqob --- addons/base_calendar/base_calendar.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/addons/base_calendar/base_calendar.py b/addons/base_calendar/base_calendar.py index 7ccd07351f0..25609b45fba 100644 --- a/addons/base_calendar/base_calendar.py +++ b/addons/base_calendar/base_calendar.py @@ -1438,7 +1438,8 @@ true, it will allow you to hide the event alarm information without removing it. res = super(calendar_event, self).search(cr, uid, args_without_date, \ offset, limit, order, context, count) - return self.get_recurrent_ids(cr, uid, res, start_date, until_date, limit) + res = self.get_recurrent_ids(cr, uid, res, start_date, until_date, limit) + return res def write(self, cr, uid, ids, vals, context=None, check=True, update_check=True): """ @@ -1533,11 +1534,9 @@ true, it will allow you to hide the event alarm information without removing it. if fields and 'date' not in fields: fields.append('date') - real_ids = [item2 for item1, item2 in select] - event_values = dict([(res['id'], res) for res in super(calendar_event, self).read(cr, uid, real_ids, fields=fields, context=context, load=load)]) - for base_calendar_id, real_id in select: - res = event_values[real_id] + #REVET: Revision ID: olt@tinyerp.com-20100924131709-cqsd1ut234ni6txn + res = super(calendar_event, self).read(cr, uid, real_id, fields=fields, context=context, load=load) ls = base_calendar_id2real_id(base_calendar_id, with_date=res and res.get('duration', 0) or 0) if not isinstance(ls, (str, int, long)) and len(ls) >= 2: res['date'] = ls[1] From 469691d5cff52fe60d7d16f1dcd06a942c9e36da Mon Sep 17 00:00:00 2001 From: "Harry (OpenERP)" Date: Wed, 6 Oct 2010 12:38:24 +0530 Subject: [PATCH 02/12] [FIX] calnedar bzr revid: hmo@tinyerp.com-20101006070824-ajgof4nw60osle4j --- addons/base_calendar/base_calendar.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/base_calendar/base_calendar.py b/addons/base_calendar/base_calendar.py index 25609b45fba..1ff7777cf36 100644 --- a/addons/base_calendar/base_calendar.py +++ b/addons/base_calendar/base_calendar.py @@ -978,7 +978,7 @@ class calendar_event(osv.osv): if not context: context = {} for event_id in ids: - cr.execute('select id from %s where recurrent_uid=%s' % (self._table, event_id)) + cr.execute("select id from %s where recurrent_uid=%%s" % (self._table), (event_id,)) r_ids = map(lambda x: x[0], cr.fetchall()) self.unlink(cr, uid, r_ids, context=context) return True @@ -1065,7 +1065,7 @@ class calendar_event(osv.osv): 'rule_type': rrule_type, 'id': id, }) - cr.execute(qry, val) # Hopefully psycopg2 works with dicts. But, FIXME + cr.execute(qry % val) return True def _get_rulestring(self, cr, uid, ids, name, arg, context=None): From 551862ccc61d042fb25b170c335b710419d393a8 Mon Sep 17 00:00:00 2001 From: "Harry (OpenERP)" Date: Wed, 6 Oct 2010 13:09:12 +0530 Subject: [PATCH 03/12] [FIX] calnedar: fix bzr revid: hmo@tinyerp.com-20101006073912-0gkb7k9a9bz4ry7b --- addons/caldav/calendar.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/addons/caldav/calendar.py b/addons/caldav/calendar.py index d22fa98f6e4..068af56459f 100644 --- a/addons/caldav/calendar.py +++ b/addons/caldav/calendar.py @@ -63,11 +63,12 @@ def uid2openobjectid(cr, uidval, oomodel, rdate): return (False, None) qry = 'SELECT DISTINCT(id) FROM %s' % model_obj._table if rdate: - qry += " WHERE recurrent_id=%s" - cr.execute(qry, (rdate,)) + qry += " where recurrent_id='%s'" % (rdate) #TOFIX: sql injection + cr.execute(qry) r_id = cr.fetchone() if r_id: return (id, r_id[0]) + cr.execute(qry) ids = map(lambda x: str(x[0]), cr.fetchall()) if id in ids: From 622e39465b006df40574f02cf70d9e7008d10ac7 Mon Sep 17 00:00:00 2001 From: "Vianney,Anup(OpenERP)" <> Date: Wed, 6 Oct 2010 16:42:47 +0530 Subject: [PATCH 04/12] [FIX] project_long_term : _compute() method corrected and view of project phase corrected. lp bug: https://launchpad.net/bugs/655316 fixed bzr revid: ach@tinyerp.com-20101006111247-53h19u0qw8z97u4u --- addons/project_long_term/project_long_term.py | 6 ++--- .../project_long_term_view.xml | 25 ++++++++++--------- 2 files changed, 15 insertions(+), 16 deletions(-) diff --git a/addons/project_long_term/project_long_term.py b/addons/project_long_term/project_long_term.py index 2caf36766b0..0c31c485753 100644 --- a/addons/project_long_term/project_long_term.py +++ b/addons/project_long_term/project_long_term.py @@ -92,7 +92,7 @@ class project_phase(osv.osv): model_data_id = model_data_obj._get_id(cr, uid, 'product', 'uom_hour') return model_data_obj.read(cr, uid, [model_data_id], ['res_id'])[0]['res_id'] - def _compute(self, cr, uid, ids, context=None): + def _compute(self, cr, uid, ids,field_name, arg, context=None): res = {} if not ids: return res @@ -100,9 +100,7 @@ class project_phase(osv.osv): tot = 0.0 for task in phase.task_ids: tot += task.planned_hours - res[phase.id] = { - 'total_hours' : tot - } + res[phase.id] = tot return res _columns = { diff --git a/addons/project_long_term/project_long_term_view.xml b/addons/project_long_term/project_long_term_view.xml index 3412ba7ca08..fa645af4127 100644 --- a/addons/project_long_term/project_long_term_view.xml +++ b/addons/project_long_term/project_long_term_view.xml @@ -110,22 +110,23 @@ form
- - + + - + + + - - - - + + + + + + + - - - - - + From 2d327459ec6c655f1371b6fe3851d0cad9b8efcc Mon Sep 17 00:00:00 2001 From: Ferdinand <> Date: Wed, 6 Oct 2010 16:51:16 +0530 Subject: [PATCH 05/12] [FIX] stock : Quantity Field's Type Corrected lp bug: https://launchpad.net/bugs/649053 fixed bzr revid: ach@tinyerp.com-20101006112116-fnu6960u8lxbxx03 --- addons/stock/report/report_stock_move.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/stock/report/report_stock_move.py b/addons/stock/report/report_stock_move.py index 6907f4ed3d5..92fb4559345 100644 --- a/addons/stock/report/report_stock_move.py +++ b/addons/stock/report/report_stock_move.py @@ -43,8 +43,8 @@ class report_stock_move(osv.osv): 'location_id': fields.many2one('stock.location', 'Source Location', readonly=True, select=True, help="Sets a location if you produce at a fixed location. This can be a partner location if you subcontract the manufacturing operations."), 'location_dest_id': fields.many2one('stock.location', 'Dest. Location', readonly=True, select=True, help="Location where the system will stock the finished products."), 'state': fields.selection([('draft', 'Draft'), ('waiting', 'Waiting'), ('confirmed', 'Confirmed'), ('assigned', 'Available'), ('done', 'Done'), ('cancel', 'Cancelled')], 'State', readonly=True, select=True), - 'product_qty_in':fields.integer('In Qty',readonly=True), - 'product_qty_out':fields.integer('Out Qty',readonly=True), + 'product_qty_in':fields.float('In Qty',readonly=True), + 'product_qty_out':fields.float('Out Qty',readonly=True), 'value' : fields.float('Total Value', required=True, digits_compute=dp.get_precision('Sale Price')), 'day_diff2':fields.float('Delay (Days)',readonly=True, digits=(16,2), group_operator="avg"), 'day_diff1':fields.float('Planned (Days)',readonly=True, digits=(16,2), group_operator="avg"), From f2e0e0ead91cbd385adb2972c2382d4381de95d6 Mon Sep 17 00:00:00 2001 From: "Albert Cervera i Areny - http://www.NaN-tic.com" <> Date: Wed, 6 Oct 2010 19:01:59 +0530 Subject: [PATCH 06/12] [FIX] Account : Automatic reonciliation now sorts move lines by maturity date lp bug: https://launchpad.net/bugs/599087 fixed bzr revid: jvo@tinyerp.com-20101006133159-sekg06vnxxu7trc9 --- addons/account/wizard/account_automatic_reconcile.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/addons/account/wizard/account_automatic_reconcile.py b/addons/account/wizard/account_automatic_reconcile.py index efce4bc4da4..f94082445da 100644 --- a/addons/account/wizard/account_automatic_reconcile.py +++ b/addons/account/wizard/account_automatic_reconcile.py @@ -200,7 +200,8 @@ class account_automatic_reconcile(osv.osv_memory): "AND partner_id=%s " \ "AND reconcile_id IS NULL " \ "AND state <> 'draft' " \ - "AND debit > 0", + "AND debit > 0 " \ + "ORDER BY date_maturity", (account_id, partner_id)) debits = cr.fetchall() @@ -212,7 +213,8 @@ class account_automatic_reconcile(osv.osv_memory): "AND partner_id=%s " \ "AND reconcile_id IS NULL " \ "AND state <> 'draft' " \ - "AND credit > 0", + "AND credit > 0 " \ + "ORDER BY date_maturity", (account_id, partner_id)) credits = cr.fetchall() From 43fe238c96c27d923e41eb6276a02dd700d48ed9 Mon Sep 17 00:00:00 2001 From: "Jay (OpenERP)" Date: Wed, 6 Oct 2010 19:57:45 +0530 Subject: [PATCH 07/12] [FIX] Account/stock : Better context-handling at tax computation to avoid wrong context-passing bzr revid: jvo@tinyerp.com-20101006142745-hosp53x09d6hjnr5 --- addons/account/invoice.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/addons/account/invoice.py b/addons/account/invoice.py index 1aa4e30d95d..777955d5a8e 100644 --- a/addons/account/invoice.py +++ b/addons/account/invoice.py @@ -650,18 +650,19 @@ class account_invoice(osv.osv): return ok def button_reset_taxes(self, cr, uid, ids, context=None): - if not context: + if context is None: context = {} + ctx = context.copy() ait_obj = self.pool.get('account.invoice.tax') for id in ids: cr.execute("DELETE FROM account_invoice_tax WHERE invoice_id=%s", (id,)) - partner = self.browse(cr, uid, id, context=context).partner_id + partner = self.browse(cr, uid, id, context=ctx).partner_id if partner.lang: - context.update({'lang': partner.lang}) - for taxe in ait_obj.compute(cr, uid, id, context=context).values(): + ctx.update({'lang': partner.lang}) + for taxe in ait_obj.compute(cr, uid, id, context=ctx).values(): ait_obj.create(cr, uid, taxe) # Update the stored value (fields.function), so we write to trigger recompute - self.pool.get('account.invoice').write(cr, uid, ids, {'invoice_line':[]}, context=context) + self.pool.get('account.invoice').write(cr, uid, ids, {'invoice_line':[]}, context=ctx) return True def button_compute(self, cr, uid, ids, context=None, set_total=False): From 9e1d2deb5d377af830a91f620d2d03236b067b8a Mon Sep 17 00:00:00 2001 From: Fabien Pinckaers Date: Wed, 6 Oct 2010 18:16:52 +0200 Subject: [PATCH 08/12] modifs bzr revid: fp@tinyerp.com-20101006161652-7uftzxuoxu5zcmxu --- addons/association/profile_association.xml | 5 ++- .../base_report_designer_installer.xml | 17 ++++---- addons/base_setup/base_setup_installer.xml | 1 + addons/base_setup/base_setup_todo.xml | 2 +- addons/crm/crm_installer_view.xml | 43 ++++++++++--------- .../document_ics_config_wizard.xml | 1 + addons/hr/hr_installer.xml | 1 + addons/knowledge/knowledge_installer.xml | 1 + addons/marketing/marketing_view.xml | 1 + addons/mrp/mrp_installer.xml | 1 + addons/profile_tools/misc_tools_installer.xml | 1 + addons/project/board_project_manager_view.xml | 39 ++--------------- addons/project/project_installer.xml | 5 ++- .../report_designer_installer.xml | 1 + addons/sale/sale_installer.py | 8 ++-- addons/sale/sale_installer.xml | 3 +- addons/sale/sale_view.xml | 1 + addons/sale/wizard/sale_line_invoice.xml | 16 +++---- addons/thunderbird/thunderbird_installer.xml | 5 ++- 19 files changed, 67 insertions(+), 85 deletions(-) diff --git a/addons/association/profile_association.xml b/addons/association/profile_association.xml index 8460cfa6cc9..d5a5baab946 100644 --- a/addons/association/profile_association.xml +++ b/addons/association/profile_association.xml @@ -48,8 +48,9 @@ - - 3 + + 3 + always diff --git a/addons/base_report_designer/base_report_designer_installer.xml b/addons/base_report_designer/base_report_designer_installer.xml index 4ea4970d19a..2c0cf191e4e 100644 --- a/addons/base_report_designer/base_report_designer_installer.xml +++ b/addons/base_report_designer/base_report_designer_installer.xml @@ -19,7 +19,7 @@ This plug-in allows you to create/modify OpenERP Reports into OpenOffice Writer. - +