[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()
|
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)):
|
for index in range(len(args)):
|
||||||
if args[index][0] == "res_id" and isinstance(args[index][2], basestring):
|
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)
|
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):
|
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()
|
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)):
|
for index in range(len(args)):
|
||||||
if args[index][0] == "res_id" and isinstance(args[index][2], basestring):
|
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)
|
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):
|
def write(self, cr, uid, ids, vals, context=None):
|
||||||
|
|||||||
@@ -510,7 +510,7 @@ class Home(http.Controller):
|
|||||||
redirect = '/web'
|
redirect = '/web'
|
||||||
return http.redirect_with_hash(redirect)
|
return http.redirect_with_hash(redirect)
|
||||||
request.uid = old_uid
|
request.uid = old_uid
|
||||||
values['error'] = "Wrong login/password"
|
values['error'] = _("Wrong login/password")
|
||||||
if request.env.ref('web.login', False):
|
if request.env.ref('web.login', False):
|
||||||
return request.render('web.login', values)
|
return request.render('web.login', values)
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -2661,6 +2661,12 @@ msgstr ""
|
|||||||
msgid "Wk"
|
msgid "Wk"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: web
|
||||||
|
#: code:addons/web/controllers/main.py:513
|
||||||
|
#, python-format
|
||||||
|
msgid "Wrong login/password"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#. module: web
|
#. module: web
|
||||||
#. openerp-web
|
#. openerp-web
|
||||||
#: code:addons/web/static/src/xml/base.xml:565
|
#: code:addons/web/static/src/xml/base.xml:565
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
import logging
|
||||||
import werkzeug
|
import werkzeug
|
||||||
|
|
||||||
from openerp import SUPERUSER_ID
|
from openerp import SUPERUSER_ID
|
||||||
@@ -12,6 +13,8 @@ from openerp.addons.web.controllers.main import login_redirect
|
|||||||
PPG = 20 # Products Per Page
|
PPG = 20 # Products Per Page
|
||||||
PPR = 4 # Products Per Row
|
PPR = 4 # Products Per Row
|
||||||
|
|
||||||
|
_logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
class table_compute(object):
|
class table_compute(object):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.table = {}
|
self.table = {}
|
||||||
@@ -112,6 +115,8 @@ def get_pricelist():
|
|||||||
else:
|
else:
|
||||||
partner = pool['res.users'].browse(cr, SUPERUSER_ID, uid, context=context).partner_id
|
partner = pool['res.users'].browse(cr, SUPERUSER_ID, uid, context=context).partner_id
|
||||||
pricelist = partner.property_product_pricelist
|
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
|
return pricelist
|
||||||
|
|
||||||
class website_sale(http.Controller):
|
class website_sale(http.Controller):
|
||||||
|
|||||||
@@ -276,7 +276,16 @@ class res_company(osv.osv):
|
|||||||
self.cache_restart(cr)
|
self.cache_restart(cr)
|
||||||
return super(res_company, self).create(cr, uid, vals, context=context)
|
return super(res_company, self).create(cr, uid, vals, context=context)
|
||||||
obj_partner = self.pool.get('res.partner')
|
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})
|
vals.update({'partner_id': partner_id})
|
||||||
self.cache_restart(cr)
|
self.cache_restart(cr)
|
||||||
company_id = super(res_company, self).create(cr, uid, vals, context=context)
|
company_id = super(res_company, self).create(cr, uid, vals, context=context)
|
||||||
|
|||||||
Reference in New Issue
Block a user