diff --git a/addons/calendar/calendar.py b/addons/calendar/calendar.py index 1079e16bd87..46d0fbb38c3 100644 --- a/addons/calendar/calendar.py +++ b/addons/calendar/calendar.py @@ -1759,10 +1759,11 @@ class mail_message(osv.Model): ''' convert the search on real ids in the case it was asked on virtual ids, then call super() ''' + args = list(args) for index in range(len(args)): if args[index][0] == "res_id": if isinstance(args[index][2], basestring): - args[index][2] = get_real_ids(args[index][2]) + args[index] = (args[index][0], args[index][1], get_real_ids(args[index][2])) elif isinstance(args[index][2], list): args[index] = (args[index][0], args[index][1], map(lambda x: get_real_ids(x), args[index][2])) return super(mail_message, self).search(cr, uid, args, offset=offset, limit=limit, order=order, context=context, count=count) @@ -1784,9 +1785,10 @@ class ir_attachment(osv.Model): ''' convert the search on real ids in the case it was asked on virtual ids, then call super() ''' + args = list(args) for index in range(len(args)): if args[index][0] == "res_id" and isinstance(args[index][2], basestring): - args[index][2] = get_real_ids(args[index][2]) + args[index] = (args[index][0], args[index][1], get_real_ids(args[index][2])) return super(ir_attachment, self).search(cr, uid, args, offset=offset, limit=limit, order=order, context=context, count=count) def write(self, cr, uid, ids, vals, context=None): diff --git a/addons/web/controllers/main.py b/addons/web/controllers/main.py index 8e76e3d5342..ce5bd3d81b0 100644 --- a/addons/web/controllers/main.py +++ b/addons/web/controllers/main.py @@ -486,7 +486,7 @@ class Home(http.Controller): redirect = '/web' return http.redirect_with_hash(redirect) request.uid = old_uid - values['error'] = "Wrong login/password" + values['error'] = _("Wrong login/password") return request.render('web.login', values) class WebClient(http.Controller): diff --git a/addons/web/i18n/web.pot b/addons/web/i18n/web.pot index d1e7d728667..e405afb96ca 100644 --- a/addons/web/i18n/web.pot +++ b/addons/web/i18n/web.pot @@ -2440,6 +2440,12 @@ msgstr "" msgid "XML ID:" msgstr "" +#. module: web +#: code:addons/web/controllers/main.py:513 +#, python-format +msgid "Wrong login/password" +msgstr "" + #. module: web #. openerp-web #: code:addons/web/static/src/xml/base.xml:628 diff --git a/addons/website_sale/controllers/main.py b/addons/website_sale/controllers/main.py index 1f782562b2e..4923567aea9 100644 --- a/addons/website_sale/controllers/main.py +++ b/addons/website_sale/controllers/main.py @@ -1,4 +1,5 @@ # -*- coding: utf-8 -*- +import logging import werkzeug from openerp import SUPERUSER_ID @@ -11,6 +12,8 @@ from openerp.addons.website.models.website import slug PPG = 20 # Products Per Page PPR = 4 # Products Per Row +_logger = logging.getLogger(__name__) + class table_compute(object): def __init__(self): self.table = {} @@ -105,6 +108,8 @@ class QueryURL(object): def get_pricelist(): return request.website.get_current_pricelist() + if not pricelist: + _logger.error('Fail to find pricelist for partner "%s" (id %s)', partner.name, partner.id) class website_sale(http.Controller): diff --git a/openerp/addons/base/res/res_company.py b/openerp/addons/base/res/res_company.py index 8372acc55d4..166b0aad9db 100644 --- a/openerp/addons/base/res/res_company.py +++ b/openerp/addons/base/res/res_company.py @@ -198,7 +198,16 @@ class res_company(osv.osv): self.cache_restart(cr) return super(res_company, self).create(cr, uid, vals, context=context) obj_partner = self.pool.get('res.partner') - partner_id = obj_partner.create(cr, uid, {'name': vals['name'], 'is_company':True, 'image': vals.get('logo', False), 'customer': False}, context=context) + partner_id = obj_partner.create(cr, uid, { + 'name': vals['name'], + 'is_company': True, + 'image': vals.get('logo', False), + 'customer': False, + 'email': vals.get('email'), + 'phone': vals.get('phone'), + 'website': vals.get('website'), + 'vat': vals.get('vat'), + }, context=context) vals.update({'partner_id': partner_id}) self.cache_restart(cr) company_id = super(res_company, self).create(cr, uid, vals, context=context)