diff --git a/addons/auth_oauth/controllers/main.py b/addons/auth_oauth/controllers/main.py index 7652420d7c6..1a166c39cde 100644 --- a/addons/auth_oauth/controllers/main.py +++ b/addons/auth_oauth/controllers/main.py @@ -49,7 +49,8 @@ class OAuthLogin(Home): def list_providers(self): try: provider_obj = request.registry.get('auth.oauth.provider') - providers = provider_obj.search_read(request.cr, SUPERUSER_ID, [('enabled', '=', True)]) + providers = provider_obj.search_read(request.cr, SUPERUSER_ID, [('enabled', '=', True), ('auth_endpoint', '!=', False), ('validation_endpoint', '!=', False)]) + # TODO in forwardport: remove conditions on 'auth_endpoint' and 'validation_endpoint' when these fields will be 'required' in model except Exception: providers = [] for provider in providers: diff --git a/addons/auth_signup/res_users.py b/addons/auth_signup/res_users.py index 5a744c21c81..576a778be45 100644 --- a/addons/auth_signup/res_users.py +++ b/addons/auth_signup/res_users.py @@ -201,6 +201,14 @@ class res_users(osv.Model): partner.write({'signup_token': False, 'signup_type': False, 'signup_expiration': False}) partner_user = partner.user_ids and partner.user_ids[0] or False + + # avoid overwriting existing (presumably correct) values with geolocation data + if partner.country_id or partner.zip or partner.city: + values.pop('city', None) + values.pop('country_id', None) + if partner.lang: + values.pop('lang', None) + if partner_user: # user exists, modify it according to values values.pop('login', None) diff --git a/addons/crm/sales_team.py b/addons/crm/sales_team.py index 8a1e9f938af..cd75417816d 100644 --- a/addons/crm/sales_team.py +++ b/addons/crm/sales_team.py @@ -1,6 +1,9 @@ +# -*- coding: utf-8 -*- + import calendar from datetime import date from dateutil import relativedelta +import json from openerp import tools from openerp.osv import fields, osv @@ -30,8 +33,8 @@ class crm_case_section(osv.Model): res[id] = dict() lead_domain = lead_pre_domain + [('section_id', '=', id)] opp_domain = opp_pre_domain + [('section_id', '=', id)] - res[id]['monthly_open_leads'] = self.__get_bar_values(cr, uid, obj, lead_domain, ['create_date'], 'create_date_count', 'create_date', context=context) - res[id]['monthly_planned_revenue'] = self.__get_bar_values(cr, uid, obj, opp_domain, ['planned_revenue', 'date_deadline'], 'planned_revenue', 'date_deadline', context=context) + res[id]['monthly_open_leads'] = json.dumps(self.__get_bar_values(cr, uid, obj, lead_domain, ['create_date'], 'create_date_count', 'create_date', context=context)) + res[id]['monthly_planned_revenue'] = json.dumps(self.__get_bar_values(cr, uid, obj, opp_domain, ['planned_revenue', 'date_deadline'], 'planned_revenue', 'date_deadline', context=context)) return res _columns = { diff --git a/addons/document/document.py b/addons/document/document.py index b67d252db8f..d611539a00a 100644 --- a/addons/document/document.py +++ b/addons/document/document.py @@ -235,18 +235,8 @@ class document_directory(osv.osv): _parent(dir_id, path) return path - def _check_recursion(self, cr, uid, ids, context=None): - level = 100 - while len(ids): - cr.execute('select distinct parent_id from document_directory where id in ('+','.join(map(str,ids))+')') - ids = filter(None, map(lambda x:x[0], cr.fetchall())) - if not level: - return False - level -= 1 - return True - _constraints = [ - (_check_recursion, 'Error! You cannot create recursive directories.', ['parent_id']) + (osv.osv._check_recursion, 'Error! You cannot create recursive directories.', ['parent_id']) ] def onchange_content_id(self, cr, uid, ids, ressource_type_id): diff --git a/addons/hr_holidays/hr_holidays.py b/addons/hr_holidays/hr_holidays.py index ed25b75aa83..d38cb705339 100644 --- a/addons/hr_holidays/hr_holidays.py +++ b/addons/hr_holidays/hr_holidays.py @@ -522,8 +522,8 @@ class hr_employee(osv.osv): where h.state='validate' and s.limit=False and - h.employee_id in (%s) - group by h.employee_id"""% (','.join(map(str,ids)),) ) + h.employee_id in %s + group by h.employee_id""", (tuple(ids),)) res = cr.dictfetchall() remaining = {} for r in res: diff --git a/addons/l10n_multilang/__openerp__.py b/addons/l10n_multilang/__openerp__.py index 5c91e1472c4..0b804c27263 100644 --- a/addons/l10n_multilang/__openerp__.py +++ b/addons/l10n_multilang/__openerp__.py @@ -32,7 +32,7 @@ templates to target objects. """, 'website': 'http://www.openerp.com', - 'depends' : ['account_accountant'], + 'depends' : ['account'], 'data': [], 'demo': [], 'installable': True, diff --git a/addons/mail/static/src/css/mail.css b/addons/mail/static/src/css/mail.css index d226689af05..8d461af8586 100644 --- a/addons/mail/static/src/css/mail.css +++ b/addons/mail/static/src/css/mail.css @@ -132,15 +132,9 @@ border-radius: 3px; margin: 0px; padding-left: 3px; - padding-right: 15px; + padding-right: 5px; margin-right: 5px; } -.openerp .oe_mail .oe_mail_vote_count .oe_e{ - position: absolute; - bottom: 1px; - right: 2px; - font-size: 26px; -} /* c) Message action icons */ diff --git a/addons/mail/static/src/xml/mail.xml b/addons/mail/static/src/xml/mail.xml index 86041cfcdae..14818313d36 100644 --- a/addons/mail/static/src/xml/mail.xml +++ b/addons/mail/static/src/xml/mail.xml @@ -341,7 +341,7 @@ - 8 + like diff --git a/addons/marketing_campaign/report/campaign_analysis_view.xml b/addons/marketing_campaign/report/campaign_analysis_view.xml index 26cfa050248..be12935b27d 100644 --- a/addons/marketing_campaign/report/campaign_analysis_view.xml +++ b/addons/marketing_campaign/report/campaign_analysis_view.xml @@ -62,8 +62,7 @@ - - + diff --git a/addons/mass_mailing/models/mass_mailing.py b/addons/mass_mailing/models/mass_mailing.py index d1c3e7facd4..a1077a3fffa 100644 --- a/addons/mass_mailing/models/mass_mailing.py +++ b/addons/mass_mailing/models/mass_mailing.py @@ -113,26 +113,38 @@ class MassMailingCampaign(osv.Model): def _get_statistics(self, cr, uid, ids, name, arg, context=None): """ Compute statistics of the mass mailing campaign """ - Statistics = self.pool['mail.mail.statistics'] - results = dict.fromkeys(ids, False) - for cid in ids: - stat_ids = Statistics.search(cr, uid, [('mass_mailing_campaign_id', '=', cid)], context=context) - stats = Statistics.browse(cr, uid, stat_ids, context=context) - results[cid] = { - 'total': len(stats), - 'failed': len([s for s in stats if not s.scheduled is False and s.sent is False and not s.exception is False]), - 'scheduled': len([s for s in stats if not s.scheduled is False and s.sent is False and s.exception is False]), - 'sent': len([s for s in stats if not s.sent is False]), - 'opened': len([s for s in stats if not s.opened is False]), - 'replied': len([s for s in stats if not s.replied is False]), - 'bounced': len([s for s in stats if not s.bounced is False]), - } - results[cid]['delivered'] = results[cid]['sent'] - results[cid]['bounced'] - results[cid]['received_ratio'] = 100.0 * results[cid]['delivered'] / (results[cid]['total'] or 1) - results[cid]['opened_ratio'] = 100.0 * results[cid]['opened'] / (results[cid]['total'] or 1) - results[cid]['replied_ratio'] = 100.0 * results[cid]['replied'] / (results[cid]['total'] or 1) + results = {} + cr.execute(""" + SELECT + c.id as campaign_id, + COUNT(s.id) AS total, + COUNT(CASE WHEN s.sent is not null THEN 1 ELSE null END) AS sent, + COUNT(CASE WHEN s.scheduled is not null AND s.sent is null AND s.exception is null THEN 1 ELSE null END) AS scheduled, + COUNT(CASE WHEN s.scheduled is not null AND s.sent is null AND s.exception is not null THEN 1 ELSE null END) AS failed, + COUNT(CASE WHEN s.id is not null AND s.bounced is null THEN 1 ELSE null END) AS delivered, + COUNT(CASE WHEN s.opened is not null THEN 1 ELSE null END) AS opened, + COUNT(CASE WHEN s.replied is not null THEN 1 ELSE null END) AS replied , + COUNT(CASE WHEN s.bounced is not null THEN 1 ELSE null END) AS bounced + FROM + mail_mail_statistics s + RIGHT JOIN + mail_mass_mailing_campaign c + ON (c.id = s.mass_mailing_campaign_id) + WHERE + c.id IN %s + GROUP BY + c.id + """, (tuple(ids), )) + for row in cr.dictfetchall(): + results[row.pop('campaign_id')] = row + total = row['total'] or 1 + row['delivered'] = row['sent'] - row['bounced'] + row['received_ratio'] = 100.0 * row['delivered'] / total + row['opened_ratio'] = 100.0 * row['opened'] / total + row['replied_ratio'] = 100.0 * row['replied'] / total return results + _columns = { 'name': fields.char('Name', required=True), 'stage_id': fields.many2one('mail.mass_mailing.stage', 'Stage', required=True), @@ -283,26 +295,38 @@ class MassMailing(osv.Model): def _get_statistics(self, cr, uid, ids, name, arg, context=None): """ Compute statistics of the mass mailing campaign """ - Statistics = self.pool['mail.mail.statistics'] - results = dict.fromkeys(ids, False) - for mid in ids: - stat_ids = Statistics.search(cr, uid, [('mass_mailing_id', '=', mid)], context=context) - stats = Statistics.browse(cr, uid, stat_ids, context=context) - results[mid] = { - 'total': len(stats), - 'failed': len([s for s in stats if not s.scheduled is False and s.sent is False and not s.exception is False]), - 'scheduled': len([s for s in stats if not s.scheduled is False and s.sent is False and s.exception is False]), - 'sent': len([s for s in stats if not s.sent is False]), - 'opened': len([s for s in stats if not s.opened is False]), - 'replied': len([s for s in stats if not s.replied is False]), - 'bounced': len([s for s in stats if not s.bounced is False]), - } - results[mid]['delivered'] = results[mid]['sent'] - results[mid]['bounced'] - results[mid]['received_ratio'] = 100.0 * results[mid]['delivered'] / (results[mid]['total'] or 1) - results[mid]['opened_ratio'] = 100.0 * results[mid]['opened'] / (results[mid]['total'] or 1) - results[mid]['replied_ratio'] = 100.0 * results[mid]['replied'] / (results[mid]['total'] or 1) + results = {} + cr.execute(""" + SELECT + m.id as mailing_id, + COUNT(s.id) AS total, + COUNT(CASE WHEN s.sent is not null THEN 1 ELSE null END) AS sent, + COUNT(CASE WHEN s.scheduled is not null AND s.sent is null AND s.exception is null THEN 1 ELSE null END) AS scheduled, + COUNT(CASE WHEN s.scheduled is not null AND s.sent is null AND s.exception is not null THEN 1 ELSE null END) AS failed, + COUNT(CASE WHEN s.id is not null AND s.bounced is null THEN 1 ELSE null END) AS delivered, + COUNT(CASE WHEN s.opened is not null THEN 1 ELSE null END) AS opened, + COUNT(CASE WHEN s.replied is not null THEN 1 ELSE null END) AS replied , + COUNT(CASE WHEN s.bounced is not null THEN 1 ELSE null END) AS bounced + FROM + mail_mail_statistics s + RIGHT JOIN + mail_mass_mailing m + ON (m.id = s.mass_mailing_id) + WHERE + m.id IN %s + GROUP BY + m.id + """, (tuple(ids), )) + for row in cr.dictfetchall(): + results[row.pop('mailing_id')] = row + total = row['total'] or 1 + row['delivered'] = row['sent'] - row['bounced'] + row['received_ratio'] = 100.0 * row['delivered'] / total + row['opened_ratio'] = 100.0 * row['opened'] / total + row['replied_ratio'] = 100.0 * row['replied'] / total return results + def _get_mailing_model(self, cr, uid, context=None): res = [] for model_name in self.pool: diff --git a/addons/project_issue_sheet/project_issue_sheet_view.xml b/addons/project_issue_sheet/project_issue_sheet_view.xml index 6d813b44239..39ff9ca0010 100644 --- a/addons/project_issue_sheet/project_issue_sheet_view.xml +++ b/addons/project_issue_sheet/project_issue_sheet_view.xml @@ -32,6 +32,7 @@ + diff --git a/addons/sale/sales_team.py b/addons/sale/sales_team.py index ba9f3e3f5e1..3d831ef54c5 100644 --- a/addons/sale/sales_team.py +++ b/addons/sale/sales_team.py @@ -3,6 +3,7 @@ import calendar from datetime import date from dateutil import relativedelta +import json from openerp import tools from openerp.osv import fields, osv @@ -20,9 +21,9 @@ class crm_case_section(osv.osv): for id in ids: res[id] = dict() created_domain = [('section_id', '=', id), ('state', '=', 'draft'), ('date_order', '>=', date_begin), ('date_order', '<=', date_end)] - res[id]['monthly_quoted'] = self.__get_bar_values(cr, uid, obj, created_domain, ['amount_total', 'date_order'], 'amount_total', 'date_order', context=context) + res[id]['monthly_quoted'] = json.dumps(self.__get_bar_values(cr, uid, obj, created_domain, ['amount_total', 'date_order'], 'amount_total', 'date_order', context=context)) validated_domain = [('section_id', '=', id), ('state', 'not in', ['draft', 'sent', 'cancel']), ('date_order', '>=', date_begin), ('date_order', '<=', date_end)] - res[id]['monthly_confirmed'] = self.__get_bar_values(cr, uid, obj, validated_domain, ['amount_total', 'date_order'], 'amount_total', 'date_order', context=context) + res[id]['monthly_confirmed'] = json.dumps(self.__get_bar_values(cr, uid, obj, validated_domain, ['amount_total', 'date_order'], 'amount_total', 'date_order', context=context)) return res def _get_invoices_data(self, cr, uid, ids, field_name, arg, context=None): @@ -33,11 +34,11 @@ class crm_case_section(osv.osv): date_end = month_begin.replace(day=calendar.monthrange(month_begin.year, month_begin.month)[1]).strftime(tools.DEFAULT_SERVER_DATE_FORMAT) for id in ids: created_domain = [('section_id', '=', id), ('state', 'not in', ['draft', 'cancel']), ('date', '>=', date_begin), ('date', '<=', date_end)] - res[id] = self.__get_bar_values(cr, uid, obj, created_domain, ['price_total', 'date'], 'price_total', 'date', context=context) + res[id] = json.dumps(self.__get_bar_values(cr, uid, obj, created_domain, ['price_total', 'date'], 'price_total', 'date', context=context)) return res _columns = { - 'use_quotations': fields.boolean('Opportunities', help="Check this box to manage quotations in this sales team."), + 'use_quotations': fields.boolean('Quotations', help="Check this box to manage quotations in this sales team."), 'invoiced_forecast': fields.integer(string='Invoice Forecast', help="Forecast of the invoice revenue for the current month. This is the amount the sales \n" "team should invoice this month. It is used to compute the progression ratio \n" diff --git a/addons/stock/stock.py b/addons/stock/stock.py index 0b31983150c..c1e544960ed 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -21,7 +21,7 @@ from datetime import date, datetime from dateutil import relativedelta - +import json import time from openerp.osv import fields, osv @@ -1930,7 +1930,6 @@ class stock_move(osv.osv): result = { 'product_uom_qty': 0.00 } - warning = {} if (not product_id) or (product_uos_qty <= 0.0): result['product_uos_qty'] = 0.0 @@ -1939,21 +1938,14 @@ class stock_move(osv.osv): product_obj = self.pool.get('product.product') uos_coeff = product_obj.read(cr, uid, product_id, ['uos_coeff']) - # Warn if the quantity was decreased - for move in self.read(cr, uid, ids, ['product_uos_qty']): - if product_uos_qty < move['product_uos_qty']: - warning.update({ - 'title': _('Warning: No Back Order'), - 'message': _("By changing the quantity here, you accept the " - "new quantity as complete: OpenERP will not " - "automatically generate a Back Order.")}) - break + # No warning if the quantity was decreased to avoid double warnings: + # The clients should call onchange_quantity too anyway if product_uos and product_uom and (product_uom != product_uos): result['product_uom_qty'] = product_uos_qty / uos_coeff['uos_coeff'] else: result['product_uom_qty'] = product_uos_qty - return {'value': result, 'warning': warning} + return {'value': result} def onchange_product_id(self, cr, uid, ids, prod_id=False, loc_id=False, loc_dest_id=False, partner_id=False): """ On change of product id, if finds UoM, UoS, quantity and UoS quantity. @@ -4102,12 +4094,12 @@ class stock_picking_type(osv.osv): tristates = [] for picking in picking_obj.browse(cr, uid, picking_ids, context=context): if picking.date_done > picking.date: - tristates.insert(0, {'tooltip': picking.name or '' + _(': Late'), 'value': -1}) + tristates.insert(0, {'tooltip': picking.name or '' + ": " + _('Late'), 'value': -1}) elif picking.backorder_id: - tristates.insert(0, {'tooltip': picking.name or '' + _(': Backorder exists'), 'value': 0}) + tristates.insert(0, {'tooltip': picking.name or '' + ": " + _('Backorder exists'), 'value': 0}) else: - tristates.insert(0, {'tooltip': picking.name or '' + _(': OK'), 'value': 1}) - res[picking_type_id] = tristates + tristates.insert(0, {'tooltip': picking.name or '' + ": " + _('OK'), 'value': 1}) + res[picking_type_id] = json.dumps(tristates) return res def _get_picking_count(self, cr, uid, ids, field_names, arg, context=None): diff --git a/addons/survey/survey.py b/addons/survey/survey.py index a05ea0d4308..39f3135c36b 100644 --- a/addons/survey/survey.py +++ b/addons/survey/survey.py @@ -365,7 +365,7 @@ class survey_survey(osv.Model): for cell in product(rows.keys(), answers.keys()): res[cell] = 0 for input_line in question.user_input_line_ids: - if input_line.answer_type == 'suggestion' and not(current_filters) or input_line.user_input_id.id in current_filters: + if input_line.answer_type == 'suggestion' and (not(current_filters) or input_line.user_input_id.id in current_filters): res[(input_line.value_suggested_row.id, input_line.value_suggested.id)] += 1 result_summary = {'answers': answers, 'rows': rows, 'result': res} @@ -998,6 +998,8 @@ class survey_user_input_line(osv.Model): def __get_mark(self, cr, uid, value_suggested, context=None): try: mark = self.pool.get('survey.label').browse(cr, uid, int(value_suggested), context=context).quizz_mark + except AttributeError: + mark = 0.0 except KeyError: mark = 0.0 except ValueError: @@ -1145,7 +1147,7 @@ class survey_user_input_line(osv.Model): comment_answer = post.pop(("%s_%s" % (answer_tag, 'comment')), '').strip() if comment_answer: - vals.update({'answer_type': 'text', 'value_text': comment_answer}) + vals.update({'answer_type': 'text', 'value_text': comment_answer, 'skipped': False}) self.create(cr, uid, vals, context=context) return True diff --git a/addons/web_kanban_gauge/static/src/js/kanban_gauge.js b/addons/web_kanban_gauge/static/src/js/kanban_gauge.js index fdae9534764..29a77723696 100644 --- a/addons/web_kanban_gauge/static/src/js/kanban_gauge.js +++ b/addons/web_kanban_gauge/static/src/js/kanban_gauge.js @@ -38,6 +38,9 @@ instance.web_kanban.GaugeWidget = instance.web_kanban.AbstractField.extend({ var title = this.$node.html() || this.field.string; // current gauge value var val = this.field.value; + if (_.isArray(JSON.parse(val))) { + val = JSON.parse(val); + } var value = _.isArray(val) && val.length ? val[val.length-1]['value'] : val; // displayed value under gauge var gauge_value = value; diff --git a/addons/web_kanban_sparkline/static/src/js/kanban_sparkline.js b/addons/web_kanban_sparkline/static/src/js/kanban_sparkline.js index dd2f9ca75d5..b8c7761d103 100644 --- a/addons/web_kanban_sparkline/static/src/js/kanban_sparkline.js +++ b/addons/web_kanban_sparkline/static/src/js/kanban_sparkline.js @@ -11,8 +11,9 @@ instance.web_kanban.SparklineBarWidget = instance.web_kanban.AbstractField.exten var self = this; var title = this.$node.html() || this.field.string; setTimeout(function () { - var value = _.pluck(self.field.value, 'value'); - var tooltips = _.pluck(self.field.value, 'tooltip'); + var field_value = JSON.parse(self.field.value); + var value = _.pluck(field_value, 'value'); + var tooltips = _.pluck(field_value, 'tooltip'); var suffix = self.options.tooltip_suffix || ""; var tooltipFormat = self.options.type == 'tristate' && '{{offset:offset}}' + suffix || '{{offset:offset}} {{value:value}}' + suffix var sparkline_options = _.extend({ diff --git a/addons/web_linkedin/web_linkedin.py b/addons/web_linkedin/web_linkedin.py index aa365bced69..208f7ae8c04 100644 --- a/addons/web_linkedin/web_linkedin.py +++ b/addons/web_linkedin/web_linkedin.py @@ -34,7 +34,7 @@ class Binary(openerp.http.Controller): _scheme, _netloc, path, params, query, fragment = urlparse(url) # media.linkedin.com is the master domain for LinkedIn media (replicated to CDNs), # so forcing it should always work and prevents abusing this method to load arbitrary URLs - url = urlunparse(('http', 'media.linkedin.com', path, params, query, fragment)) + url = urlunparse(('http', 'media.licdn.com', path, params, query, fragment)) bfile = urllib2.urlopen(url) return base64.b64encode(bfile.read()) diff --git a/addons/website/models/website.py b/addons/website/models/website.py index f1c2aa283ae..34a5494acc8 100644 --- a/addons/website/models/website.py +++ b/addons/website/models/website.py @@ -269,7 +269,7 @@ class website(osv.osv): # Compute Pager page_count = int(math.ceil(float(total) / step)) - page = max(1, min(int(page), page_count)) + page = max(1, min(int(page if str(page).isdigit() else 1), page_count)) scope -= 1 pmin = max(page - int(math.floor(scope/2)), 1) diff --git a/addons/website/views/website_templates.xml b/addons/website/views/website_templates.xml index 8a04df450ba..0f85be71d3b 100644 --- a/addons/website/views/website_templates.xml +++ b/addons/website/views/website_templates.xml @@ -393,7 +393,7 @@ - +
diff --git a/addons/website_crm/controllers/main.py b/addons/website_crm/controllers/main.py index b60a5862af9..37d661e8a04 100644 --- a/addons/website_crm/controllers/main.py +++ b/addons/website_crm/controllers/main.py @@ -2,7 +2,6 @@ import base64 from openerp.tools.translate import _ - from openerp.addons.web import http from openerp.addons.web.http import request from openerp import SUPERUSER_ID @@ -53,6 +52,8 @@ class contactus(http.Controller): elif field_name not in _TECHNICAL: # allow to add some free fields or blacklisted field like ID post_description.append("%s: %s" % (field_name, field_value)) + if "name" not in kwargs and values.get("contact_name"): # if kwarg.name is empty, it's an error, we cannot copy the contact_name + values["name"] = values.get("contact_name") # fields validation : Check that required field from model crm_lead exists error = set(field for field in _REQUIRED if not kwargs.get(field)) diff --git a/addons/website_event/controllers/main.py b/addons/website_event/controllers/main.py index 2e9aa4616d2..a25542898ef 100644 --- a/addons/website_event/controllers/main.py +++ b/addons/website_event/controllers/main.py @@ -24,6 +24,7 @@ from datetime import datetime, timedelta from dateutil.relativedelta import relativedelta import werkzeug.urls +from werkzeug.exceptions import NotFound from openerp import http from openerp import tools @@ -165,6 +166,16 @@ class website_event(http.Controller): 'event': event, 'main_object': event } + + if '.' not in page: + page = 'website_event.%s' % page + + try: + request.website.get_template(page) + except ValueError, e: + # page not found + raise NotFound + return request.website.render(page, values) @http.route(['/event/'], type='http', auth="public", website=True) diff --git a/addons/website_sale_delivery/__openerp__.py b/addons/website_sale_delivery/__openerp__.py index 99899ea59a4..2864727e42e 100644 --- a/addons/website_sale_delivery/__openerp__.py +++ b/addons/website_sale_delivery/__openerp__.py @@ -16,5 +16,5 @@ Delivery Costs ], 'demo': [], 'qweb': [], - 'installable': False, + 'installable': True, } diff --git a/addons/website_sale_delivery/controllers/main.py b/addons/website_sale_delivery/controllers/main.py index fef661e5c40..93c6aa2bfaa 100644 --- a/addons/website_sale_delivery/controllers/main.py +++ b/addons/website_sale_delivery/controllers/main.py @@ -10,7 +10,7 @@ class website_sale(openerp.addons.website_sale.controllers.main.website_sale): @http.route(['/shop/payment'], type='http', auth="public", website=True) def payment(self, **post): cr, uid, context = request.cr, request.uid, request.context - order = self.get_order() + order = request.website.sale_get_order(context=context) carrier_id = post.get('carrier_id') if carrier_id: carrier_id = int(carrier_id) diff --git a/openerp/addons/base/res/res_partner.py b/openerp/addons/base/res/res_partner.py index acb1a33ea4a..baf85787dd6 100644 --- a/openerp/addons/base/res/res_partner.py +++ b/openerp/addons/base/res/res_partner.py @@ -592,7 +592,7 @@ class res_partner(osv.osv, format_address): """ Supported syntax: - 'Raoul ': will find name and email address - otherwise: default, everything is set as the name """ - emails = tools.email_split(text) + emails = tools.email_split(text.replace(' ',',')) if emails: email = emails[0] name = text[:text.index(email)].replace('"', '').replace('<', '').strip() diff --git a/openerp/addons/base/res/res_partner_view.xml b/openerp/addons/base/res/res_partner_view.xml index b94d4be803f..4e25279e555 100644 --- a/openerp/addons/base/res/res_partner_view.xml +++ b/openerp/addons/base/res/res_partner_view.xml @@ -158,8 +158,8 @@
-