[MERGE] forward port of branch saas-6 up to f811fff
This commit is contained in:
@@ -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):
|
||||
|
||||
@@ -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):
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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):
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user