From b12aa8292678596d607d1c62c8a5fa5aad5fa399 Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Tue, 3 Nov 2015 14:08:15 +0100 Subject: [PATCH 01/68] [FIX] website_mail_group: Localized messages dates The messages dates in the groups pages - /groups// - /groups// - - + -
@@ -262,7 +262,7 @@ }'/> - - + - -

From 2ae37d7c9a48d029f035e996984a559a150623b4 Mon Sep 17 00:00:00 2001 From: "Adrien Peiffer (ACSONE)" Date: Fri, 30 Oct 2015 11:46:59 +0100 Subject: [PATCH 02/68] [FIX] hr_contract: access on resource.calendar.attendance for HR officer Add ACL on resource.calendar.attendance for HR Officer according access right on resource.calendar Otherwise, this isn't possible for HR officers to manage Work Details (`resource.calendar.attendance`), while they can manage Resource Calendar (`resource.calendar`) Closes #9330 --- addons/hr_contract/security/ir.model.access.csv | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/hr_contract/security/ir.model.access.csv b/addons/hr_contract/security/ir.model.access.csv index 5e35e147230..820935111f0 100644 --- a/addons/hr_contract/security/ir.model.access.csv +++ b/addons/hr_contract/security/ir.model.access.csv @@ -1,5 +1,6 @@ id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink access_hr_resource_manager,hr.employee.resource.manager,resource.model_resource_resource,base.group_hr_manager,1,1,1,1 access_hr_resource_calendar_user,hr.employee.resource.calendar.user,resource.model_resource_calendar,base.group_hr_user,1,1,1,1 +access_hr_resource_calendar_attendance_user,hr.employee.resource.calendar.attendance.user,resource.model_resource_calendar_attendance,base.group_hr_user,1,1,1,1 access_hr_contract_type_manager,hr.contract.type.manager,model_hr_contract_type,base.group_hr_manager,1,1,1,1 access_hr_contract_manager,hr.contract.manager,model_hr_contract,base.group_hr_manager,1,1,1,1 From a69205d561f5cab0691fd9835c9b633fc8597812 Mon Sep 17 00:00:00 2001 From: Nicolas Mac Rouillon Date: Thu, 3 Sep 2015 08:34:33 -0300 Subject: [PATCH 03/68] [CLA] Adding one contributor to adhoc cla --- doc/cla/corporate/adhoc.md | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/cla/corporate/adhoc.md b/doc/cla/corporate/adhoc.md index b43d8ef0e93..627065bafab 100644 --- a/doc/cla/corporate/adhoc.md +++ b/doc/cla/corporate/adhoc.md @@ -12,3 +12,4 @@ List of contributors: Damián Soriano ds@adhoc.com.ar https://github.com/damiansoriano Juan José Scarafía jjs@adhoc.com.ar https://github.com/jjscarafia +Nicolás Mac Rouillon nmr@adhoc.com.ar https://github.com/nicomacr From f18399f721592d2dd90641c7e9350e19839641d7 Mon Sep 17 00:00:00 2001 From: Nicolas Martinelli Date: Tue, 17 Nov 2015 13:40:37 +0100 Subject: [PATCH 04/68] [FIX] purchase: invoice state of PO If the invoicing policy of a PO is set to "Based on incoming shipments" and the PO contains a product of type "service", it is never considered as invoiced, and therefore reach the state "Done". The reason is that no stock move is linked to this PO line, and therefore it is never considered as invoiced since we check the invoice state of the associated sotck moves. This fix assumes that in this specific case, a PO line for a service is always invoiced, since there is anyway no incoming shipment linked to it. opw-654317 --- addons/purchase/purchase.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/addons/purchase/purchase.py b/addons/purchase/purchase.py index 45d63b15efe..d44bbfa110a 100644 --- a/addons/purchase/purchase.py +++ b/addons/purchase/purchase.py @@ -1017,6 +1017,8 @@ class purchase_order(osv.osv): all(move.invoice_state == 'invoiced' for move in po_line.move_ids if move.state == 'done') and po_line.invoice_lines and all(line.invoice_id.state not in ['draft', 'cancel'] for line in po_line.invoice_lines)): is_invoiced.append(po_line.id) + elif po_line.product_id.type == 'service': + is_invoiced.append(po_line.id) else: for po_line in po.order_line: if (po_line.invoice_lines and From 9717afbbb72638b43037bc6c304a2d15f7dc3f20 Mon Sep 17 00:00:00 2001 From: Nicolas Lempereur Date: Mon, 9 Nov 2015 10:38:19 +0100 Subject: [PATCH 05/68] [FIX] event: fix send mail to event registrant Currently, the button "Send Email" next to the email address of an event registration didn't work if a partner was not set. This commit removes the button, thus removing the feature but partially adds it back via the chatter suggested recipients in the same way it is done for a lead. It is still partially a feature regression since to work the viewing user need more access rights (e.g read access right on res.partner) than before. closes #9486 opw-653127 --- addons/event/event.py | 15 ++++++++++++++- addons/event/event_view.xml | 8 +------- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/addons/event/event.py b/addons/event/event.py index 9aab9b8ee25..20697c1a86c 100644 --- a/addons/event/event.py +++ b/addons/event/event.py @@ -23,7 +23,7 @@ from datetime import timedelta import pytz from openerp import models, fields, api, _ -from openerp.exceptions import Warning +from openerp.exceptions import AccessError, Warning class event_type(models.Model): """ Event Type """ @@ -384,6 +384,19 @@ class event_registration(models.Model): if template: mail_message = template.send_mail(self.id) + @api.multi + def message_get_suggested_recipients(self): + recipients = super(event_registration, self).message_get_suggested_recipients() + try: + for registration in self: + if registration.partner_id: + self._message_add_suggested_recipient(recipients, registration, partner=registration.partner_id, reason=_('Registrant')) + elif registration.email: + self._message_add_suggested_recipient(recipients, registration, email=registration.email, reason=_('Registrant Email')) + except AccessError: # no read access rights -> ignore suggested recipients + pass + return recipients + @api.onchange('partner_id') def _onchange_partner(self): if self.partner_id: diff --git a/addons/event/event_view.xml b/addons/event/event_view.xml index 201f5568cc4..3ee33e011b6 100644 --- a/addons/event/event_view.xml +++ b/addons/event/event_view.xml @@ -369,13 +369,7 @@ -

- -
+ From 462af90df54635087cd77e726eaaeb82a7e0b08d Mon Sep 17 00:00:00 2001 From: Panagiotis Issaris Date: Wed, 9 Sep 2015 12:19:53 +0200 Subject: [PATCH 06/68] [CLA] Panagiotis Issaris sign individual CLA Closes #8497 --- doc/cla/individual/takis.md | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 doc/cla/individual/takis.md diff --git a/doc/cla/individual/takis.md b/doc/cla/individual/takis.md new file mode 100644 index 00000000000..f4f4e3fd5a2 --- /dev/null +++ b/doc/cla/individual/takis.md @@ -0,0 +1,11 @@ +Belgium, 2015-09-09 + +I hereby agree to the terms of the Odoo Individual Contributor License +Agreement v1.0. + +I declare that I am authorized and able to make this agreement and sign this +declaration. + +Signed, + +Panagiotis Issaris takis@issaris.org https://github.com/takis From 0fd91cec1c57e161f04a050f1d98507ec4552176 Mon Sep 17 00:00:00 2001 From: Alex Comba Date: Mon, 14 Sep 2015 10:17:52 +0200 Subject: [PATCH 07/68] [CLA] Alex Comba sign individual CLA Closes #8523 --- doc/cla/individual/tafaRU.md | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 doc/cla/individual/tafaRU.md diff --git a/doc/cla/individual/tafaRU.md b/doc/cla/individual/tafaRU.md new file mode 100644 index 00000000000..ee15bc64663 --- /dev/null +++ b/doc/cla/individual/tafaRU.md @@ -0,0 +1,11 @@ +Italy, 2015-09-14 + +I hereby agree to the terms of the Odoo Individual Contributor License +Agreement v1.0. + +I declare that I am authorized and able to make this agreement and sign this +declaration. + +Signed, + +Alex Comba alex.comba@agilebg.com https://github.com/tafaRU From 2cdbd9b9bc2ff0a447265f98dbd3f79010445626 Mon Sep 17 00:00:00 2001 From: Khwunchai Jaengsawang Date: Thu, 1 Oct 2015 01:58:45 +0700 Subject: [PATCH 08/68] [CLA] Khwunchai Jaengsawang sign individual CLA Closes #8810 --- doc/cla/individual/khwunchai.md | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 doc/cla/individual/khwunchai.md diff --git a/doc/cla/individual/khwunchai.md b/doc/cla/individual/khwunchai.md new file mode 100644 index 00000000000..4770b553c2d --- /dev/null +++ b/doc/cla/individual/khwunchai.md @@ -0,0 +1,11 @@ +Thailand, 2015-10-1 + +I hereby agree to the terms of the Odoo Individual Contributor License +Agreement v1.0. + +I declare that I am authorized and able to make this agreement and sign this +declaration. + +Signed, + +Khwunchai Jaengsawang khwunchai.j@ku.th https://github.com/khwunchai From 751b6ba25a260118c5fce8ec5262d7d4debbe4f3 Mon Sep 17 00:00:00 2001 From: michaelhwalther Date: Sun, 11 Oct 2015 21:22:36 +0200 Subject: [PATCH 09/68] [CLA] michaelhwalther sign individual CLA Closes #9013 --- doc/cla/individual/michaelhwalther.md | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 doc/cla/individual/michaelhwalther.md diff --git a/doc/cla/individual/michaelhwalther.md b/doc/cla/individual/michaelhwalther.md new file mode 100644 index 00000000000..ef5026dc8ce --- /dev/null +++ b/doc/cla/individual/michaelhwalther.md @@ -0,0 +1,11 @@ +Germany, 01.10.2015 + +I hereby agree to the terms of the Odoo Individual Contributor License +Agreement v1.0. + +I declare that I am authorized and able to make this agreement and sign this +declaration. + +Signed, + +Michael H. Walther, michaelhwalther@gmail.com https://github.com/michaelhwalther From b6cade2c2d1c7a76d665db53e7569900ec5bacb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs=20Alan=20Ramos=20Rodr=C3=ADguez?= Date: Thu, 22 Oct 2015 11:17:34 -0500 Subject: [PATCH 10/68] [CLA]: Fix typo and add another e-mail to CLA --- doc/cla/corporate/jarsa.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/cla/corporate/jarsa.md b/doc/cla/corporate/jarsa.md index 624a36cf2d7..0ea0cdc9303 100644 --- a/doc/cla/corporate/jarsa.md +++ b/doc/cla/corporate/jarsa.md @@ -6,9 +6,10 @@ I declare that I am authorized and able to make this agreement and sign this dec Signed, -Alan Ramos alan.ramos@jarsa.com.mx https://github.com/alan16 +Alan Ramos alan.ramos@jarsa.com.mx https://github.com/alan196 List of contributors: Alan Ramos alan.ramos@jarsa.com.mx https://github.com/alan196 Luis Triana luis.triana@jarsa.com.mx https://github.com/xluiisx +Luis Triana luistriana.28@gmail.com From 881a46a7cecd5090aec44cb8c0237d624f619b2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs=20Alan=20Ramos=20Rodr=C3=ADguez?= Date: Thu, 22 Oct 2015 11:30:57 -0500 Subject: [PATCH 11/68] [CLA] update signature to fix the github account Closes #9202 --- doc/cla/corporate/jarsa.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/cla/corporate/jarsa.md b/doc/cla/corporate/jarsa.md index 0ea0cdc9303..105359f0bb6 100644 --- a/doc/cla/corporate/jarsa.md +++ b/doc/cla/corporate/jarsa.md @@ -12,4 +12,4 @@ List of contributors: Alan Ramos alan.ramos@jarsa.com.mx https://github.com/alan196 Luis Triana luis.triana@jarsa.com.mx https://github.com/xluiisx -Luis Triana luistriana.28@gmail.com +Luis Triana luistriana.28@gmail.com https://github.com/xluiisx From 2ae648123310636ced9843472edceb933f60a3a6 Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Tue, 3 Nov 2015 21:38:53 +0100 Subject: [PATCH 12/68] [FIX] account, crm, l10n_fr: avoid exceptions when processing parameters --- addons/account/account_move_line.py | 10 ++- addons/account/report/account_journal.py | 8 +++ .../report/crossovered_analytic.py | 64 +++++++++++++++---- addons/crm/base_partner_merge.py | 12 ++-- addons/l10n_fr/report/base_report.py | 35 +++++----- 5 files changed, 92 insertions(+), 37 deletions(-) diff --git a/addons/account/account_move_line.py b/addons/account/account_move_line.py index b5ee20e2a9f..37fd62082af 100644 --- a/addons/account/account_move_line.py +++ b/addons/account/account_move_line.py @@ -371,9 +371,15 @@ class account_move_line(osv.osv): context = {} if not args: return [] - where = ' AND '.join(map(lambda x: '(abs(sum(debit-credit))'+x[1]+str(x[2])+')',args)) + + where = ' AND '.join( + '(abs(sum(debit-credit)) %s %%s)' % operator + for field, operator, value in args + ) + params = tuple(value for field, operator, value in args) + cursor.execute('SELECT id, SUM(debit-credit) FROM account_move_line \ - GROUP BY id, debit, credit having '+where) + GROUP BY id, debit, credit having '+where, params) res = cursor.fetchall() if not res: return [('id', '=', '0')] diff --git a/addons/account/report/account_journal.py b/addons/account/report/account_journal.py index e0e4d256b27..6a355b16108 100644 --- a/addons/account/report/account_journal.py +++ b/addons/account/report/account_journal.py @@ -163,6 +163,14 @@ class journal_print(report_sxw.rml_parse, common_report_header): if self.target_move == 'posted': move_state = ['posted'] + fg = self.pool.get('account.print.journal').fields_get( + self.cr, self.uid, ['sort_selection']) + allowed = [v for v, l in fg['sort_selection']['selection']] + + assert self.sort_selection in allowed, \ + "unknown sorting directive %s expected one of %s" % ( + self.sort_selection, allowed) + self.cr.execute('SELECT l.id FROM account_move_line l, account_move am WHERE l.move_id=am.id AND am.state IN %s AND l.period_id=%s AND l.journal_id IN %s ' + self.query_get_clause + ' ORDER BY '+ self.sort_selection + ', l.move_id',(tuple(move_state), period_id, tuple(journal_id) )) ids = map(lambda x: x[0], self.cr.fetchall()) return obj_mline.browse(self.cr, self.uid, ids) diff --git a/addons/account_analytic_plans/report/crossovered_analytic.py b/addons/account_analytic_plans/report/crossovered_analytic.py index ef7589fda8e..a5a512c7ff3 100644 --- a/addons/account_analytic_plans/report/crossovered_analytic.py +++ b/addons/account_analytic_plans/report/crossovered_analytic.py @@ -71,14 +71,25 @@ class crossovered_analytic(report_sxw.rml_parse): line_pool = self.pool.get('account.analytic.line') self.dict_acc_ref = {} + filters = [ + 'date >= %(date1)s', + 'date <= %(date2)s', + ] + params = { + 'date1': form['date1'], + 'date2': form['date2'] + } if form['journal_ids']: - journal = " in (" + ','.join(map(lambda x: str(x), form['journal_ids'])) + ")" + filters.append('journal_id IN %(journal_ids)s') + params['journal_ids'] = tuple(form['journal_ids']) else: - journal = 'is not null' + filters.append('journal_id IS NOT NULL') - query_general = "SELECT id FROM account_analytic_line WHERE (journal_id " + journal +") AND date>='"+ str(form['date1']) +"'"" AND date<='" + str(form['date2']) + "'" + self.cr.execute( + "SELECT id FROM account_analytic_line WHERE " + ' AND '.join(filters), + params + ) - self.cr.execute(query_general) l_ids = self.cr.fetchall() line_ids = [x[0] for x in l_ids] @@ -103,10 +114,24 @@ class crossovered_analytic(report_sxw.rml_parse): self.base_amount = 0.0 if selected_ids: - query = "SELECT SUM(aal.amount) AS amt, SUM(aal.unit_amount) AS qty FROM account_analytic_line AS aal, account_analytic_account AS aaa \ - WHERE aal.account_id = aaa.id AND aal.id IN ("+','.join(map(str,selected_ids))+") AND (aal.journal_id " + journal +") AND aal.date>='"+ str(form['date1']) +"'"" AND aal.date<='" + str(form['date2']) + "'" + params['selected_ids'] = tuple(selected_ids) + filters = [ + 'aal.account_id = aaa.id', + 'aal.id IN %(selected_ids)s', + 'aal.date >= %(date1)s', + 'aal.date <= %(date2)s', + ] + if form['journal_ids']: + filters.append('aal.journal_id in %(journal_ids)s') + else: + filters.append('aal.journal_id IS NOT NULL') - self.cr.execute(query) + self.cr.execute( + "SELECT SUM(aal.amount) AS amt, SUM(aal.unit_amount) AS qty" + " FROM account_analytic_line AS aal, account_analytic_account AS aaa" + " WHERE " + ' AND '.join(filters), + params + ) info=self.cr.dictfetchall() res['ref_qty'] = info[0]['qty'] res['ref_amt'] = info[0]['amt'] @@ -120,10 +145,20 @@ class crossovered_analytic(report_sxw.rml_parse): if not ids: ids = self.ids + filters = [ + 'aal.account_id = aaa.id', + 'aal.date >= %(date1)s', + 'aal.date <= %(date2)s', + ] + params = { + 'date1': form['date1'], + 'date2': form['date2'], + } if form['journal_ids']: - journal=" in (" + ','.join(map(lambda x: str(x), form['journal_ids'])) + ")" + filters.append('aal.journal_id IN %(journal_ids)s') + params['journal_ids'] = tuple(form['journal_ids']) else: - journal= 'is not null' + filters.append('aal.journal_id IS NOT NULL') acc_pool = self.pool.get('account.analytic.account') line_pool = self.pool.get('account.analytic.line') @@ -136,10 +171,15 @@ class crossovered_analytic(report_sxw.rml_parse): for acc_id in self.final_list: selected_ids = line_pool.search(self.cr, self.uid, [('account_id','=',acc_id), ('move_id', 'in', self.dict_acc_ref[form['ref']])]) if selected_ids: - query="SELECT aaa.code AS code, SUM(aal.amount) AS amt, SUM(aal.unit_amount) AS qty, aaa.name AS acc_name, aal.account_id AS id FROM account_analytic_line AS aal, account_analytic_account AS aaa \ - WHERE aal.account_id=aaa.id AND aal.id IN ("+','.join(map(str,selected_ids))+") AND (aal.journal_id " + journal +") AND aal.date>='"+ str(form['date1']) +"'"" AND aal.date<='" + str(form['date2']) + "'"" GROUP BY aal.account_id,aaa.name,aaa.code ORDER BY aal.account_id" + filters.append('aal.id IN %(selected_ids)s') + params['selected_ids'] = tuple(selected_ids) - self.cr.execute(query) + self.cr.execute( + "SELECT aaa.code AS code, SUM(aal.amount) AS amt, SUM(aal.unit_amount) AS qty, aaa.name AS acc_name, aal.account_id AS id" + " FROM account_analytic_line AS aal, account_analytic_account AS aaa" + " WHERE " + ' AND '.join(filters) + + " GROUP BY aal.account_id,aaa.name,aaa.code ORDER BY aal.account_id" + ) res = self.cr.dictfetchall() if res: for element in res: diff --git a/addons/crm/base_partner_merge.py b/addons/crm/base_partner_merge.py index 9afcc9d2aa4..84038986396 100644 --- a/addons/crm/base_partner_merge.py +++ b/addons/crm/base_partner_merge.py @@ -765,9 +765,9 @@ class MergePartnerAutomatic(osv.TransientModel): # don't update the partners if they are more of one who have invoice cr.execute(""" SELECT * FROM res_partner as p - WHERE p.id != %s AND p.email LIKE '%%%s' AND + WHERE p.id != %s AND p.email LIKE %s AND EXISTS (SELECT * FROM account_invoice as a WHERE p.id = a.partner_id AND a.state in ('open','paid')) - """ % (id, email)) + """, (id, '%' + email)) if len(cr.fetchall()) > 1: _logger.info("%s MORE OF ONE COMPANY", email) @@ -776,13 +776,13 @@ class MergePartnerAutomatic(osv.TransientModel): # to display changed values cr.execute(""" SELECT id,email FROM res_partner - WHERE parent_id != %s AND id != %s AND email LIKE '%%%s' - """ % (id, id, email)) + WHERE parent_id != %s AND id != %s AND email LIKE %s + """, (id, id, '%' + email)) _logger.info("%r", cr.fetchall()) # upgrade cr.execute(""" UPDATE res_partner SET parent_id = %s - WHERE id != %s AND email LIKE '%%%s' - """ % (id, id, email)) + WHERE id != %s AND email LIKE %s + """, (id, id, '%' + email)) return False diff --git a/addons/l10n_fr/report/base_report.py b/addons/l10n_fr/report/base_report.py index 848bdfa813e..9506d5a73ea 100644 --- a/addons/l10n_fr/report/base_report.py +++ b/addons/l10n_fr/report/base_report.py @@ -73,30 +73,31 @@ class base_report(report_sxw.rml_parse): accounts[p[1]] = [p[0],p[2]] sum = 0.0 if fiscalyear.state != 'done' or not code.startswith('bpcheck'): - query_params = [] - query_cond = "(" - for account in accounts: - query_cond += "aa.code LIKE '" + account + "%%' OR " - query_cond = query_cond[:-4]+")" + conditions = ['(' + ' OR '.join( + 'aa.code LIKE %s' for _ in accounts + ) + ')'] + params = [account + '%' for account in accounts] - if len(definition['except']) > 0: - query_cond = query_cond+" and (" - for account in definition['except']: - query_cond += "aa.code NOT LIKE '"+account+"%%' AND " - query_cond = query_cond[:-5]+")" + for account in definition['except']: + conditions.append('aa.code NOT LIKE %s') + params.append(account + '%') - closed_cond = "" if fiscalyear.state == 'done': - closed_cond=" AND (aml.move_id NOT IN (SELECT account_move.id as move_id FROM account_move WHERE period_id = ANY(%s) AND journal_id=(SELECT res_id FROM ir_model_data WHERE name='closing_journal' AND module='l10n_fr')) OR (aa.type != 'income' AND aa.type !='expense'))" - query_params.append(list(period_ids)) + conditions.append("(aml.move_id NOT IN (SELECT account_move.id as move_id FROM account_move WHERE period_id IN %s AND journal_id=(SELECT res_id FROM ir_model_data WHERE name='closing_journal' AND module='l10n_fr')) OR (aa.type != 'income' AND aa.type !='expense'))") + params.append(tuple(period_ids)) + + conditions.append('aml.state = %s') + params.append('valid') + + conditions.append('aml.period_id IN %s') + params.append(tuple(period_ids)) query = "SELECT aa.code AS code, SUM(debit) as debit, SUM(credit) as credit " \ " FROM account_move_line aml LEFT JOIN account_account aa ON aa.id=aml.account_id "\ - " WHERE "+query_cond+closed_cond+" AND aml.state='valid' AND aml.period_id = ANY(%s) GROUP BY code" - query_params.append(list(period_ids)) - self.cr.execute(query, query_params) + " WHERE "+ ' AND '.join(conditions) + " GROUP BY code" + self.cr.execute(query, params) - lines =self.cr.dictfetchall() + lines = self.cr.dictfetchall() for line in lines: for account in accounts: if(line["code"].startswith(account)): From e99358415aaaee557b2555e9935c1191902710a5 Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Tue, 3 Nov 2015 21:38:53 +0100 Subject: [PATCH 13/68] [FIX] tools: ignore unknown entities while parsing --- openerp/tools/misc.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/openerp/tools/misc.py b/openerp/tools/misc.py index 4d6d204957a..4dc52424adf 100644 --- a/openerp/tools/misc.py +++ b/openerp/tools/misc.py @@ -63,7 +63,10 @@ _logger = logging.getLogger(__name__) # List of etree._Element subclasses that we choose to ignore when parsing XML. # We include the *Base ones just in case, currently they seem to be subclasses of the _* ones. -SKIPPED_ELEMENT_TYPES = (etree._Comment, etree._ProcessingInstruction, etree.CommentBase, etree.PIBase) +SKIPPED_ELEMENT_TYPES = (etree._Comment, etree._ProcessingInstruction, etree.CommentBase, etree.PIBase, etree._Entity) + +# Configure default global parser +etree.set_default_parser(etree.XMLParser(resolve_entities=False)) #---------------------------------------------------------- # Subprocesses From 43248915291a9cc54bc57875617a564365b5091b Mon Sep 17 00:00:00 2001 From: Goffin Simon Date: Tue, 3 Nov 2015 16:42:43 +0100 Subject: [PATCH 14/68] [FIX] website_sale: add to cart with optional products When clicking on button "add_to_cart" for a product with several options, the user must be redirected to the product page. In this way, the user can choose the options, he wants to buy with the product before adding the product in the cart. opw:653356 --- addons/website_sale/views/templates.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/website_sale/views/templates.xml b/addons/website_sale/views/templates.xml index 8d258e3f249..54b9fa843d1 100644 --- a/addons/website_sale/views/templates.xml +++ b/addons/website_sale/views/templates.xml @@ -116,10 +116,10 @@