[MERGE] forward port of branch 8.0 up to 7e51d98
This commit is contained in:
@@ -1760,9 +1760,10 @@ 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" 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(mail_message, self).search(cr, uid, args, offset=offset, limit=limit, order=order, context=context, count=count)
|
||||
|
||||
def _find_allowed_model_wise(self, cr, uid, doc_model, doc_dict, context=None):
|
||||
@@ -1782,9 +1783,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):
|
||||
|
||||
@@ -510,7 +510,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")
|
||||
if request.env.ref('web.login', False):
|
||||
return request.render('web.login', values)
|
||||
else:
|
||||
|
||||
@@ -2661,6 +2661,12 @@ msgstr ""
|
||||
msgid "Wk"
|
||||
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:565
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
import logging
|
||||
import werkzeug
|
||||
|
||||
from openerp import SUPERUSER_ID
|
||||
@@ -12,6 +13,8 @@ from openerp.addons.web.controllers.main import login_redirect
|
||||
PPG = 20 # Products Per Page
|
||||
PPR = 4 # Products Per Row
|
||||
|
||||
_logger = logging.getLogger(__name__)
|
||||
|
||||
class table_compute(object):
|
||||
def __init__(self):
|
||||
self.table = {}
|
||||
@@ -112,6 +115,8 @@ def get_pricelist():
|
||||
else:
|
||||
partner = pool['res.users'].browse(cr, SUPERUSER_ID, uid, context=context).partner_id
|
||||
pricelist = partner.property_product_pricelist
|
||||
if not pricelist:
|
||||
_logger.error('Fail to find pricelist for partner "%s" (id %s)', partner.name, partner.id)
|
||||
return pricelist
|
||||
|
||||
class website_sale(http.Controller):
|
||||
|
||||
@@ -276,7 +276,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