diff --git a/addons/auth_signup/auth_signup_data.xml b/addons/auth_signup/auth_signup_data.xml index 043733873b1..f153f03237d 100644 --- a/addons/auth_signup/auth_signup_data.xml +++ b/addons/auth_signup/auth_signup_data.xml @@ -11,8 +11,8 @@ - - + + _usertemplate diff --git a/addons/auth_signup/res_users.py b/addons/auth_signup/res_users.py index 66f7913c966..a9469e4de0d 100644 --- a/addons/auth_signup/res_users.py +++ b/addons/auth_signup/res_users.py @@ -234,8 +234,6 @@ class res_users(osv.Model): # create a copy of the template user (attached to a specific partner_id if given) values['active'] = True - if 'alias_name' not in values: # allow behavior change via inheritance (like using the name) - values['alias_name'] = False context = dict(context or {}, no_reset_password=True) return self.copy(cr, uid, template_user_id, values, context=context) diff --git a/addons/im_livechat/im_livechat.py b/addons/im_livechat/im_livechat.py index b21a31d8362..e322467e64e 100644 --- a/addons/im_livechat/im_livechat.py +++ b/addons/im_livechat/im_livechat.py @@ -211,5 +211,5 @@ class im_session(osv.osv): _inherit = 'im.session' _columns = { - 'channel_id': fields.many2one("im.user", "Channel"), + 'channel_id': fields.many2one("im_livechat.channel", "Channel"), } diff --git a/addons/mail/res_users.py b/addons/mail/res_users.py index ac1d406c29a..e335929ec2f 100644 --- a/addons/mail/res_users.py +++ b/addons/mail/res_users.py @@ -81,6 +81,12 @@ class res_users(osv.Model): self._create_welcome_message(cr, uid, user, context=context) return user_id + def copy_data(self, *args, **kwargs): + data = super(res_users, self).copy_data(*args, **kwargs) + if data.get('alias_name'): + data['alias_name'] = data['login'] + return data + def _create_welcome_message(self, cr, uid, user, context=None): if not self.has_group(cr, uid, 'base.group_user'): return False diff --git a/addons/portal_sale/portal_sale_data.xml b/addons/portal_sale/portal_sale_data.xml index 750ae12995f..2da55bcb081 100644 --- a/addons/portal_sale/portal_sale_data.xml +++ b/addons/portal_sale/portal_sale_data.xml @@ -13,6 +13,7 @@ ${(object.name or '').replace('/','_')}_${object.state == 'draft' and 'draft' or ''} + ${object.partner_id.lang} @@ -102,6 +103,7 @@ Invoice_${(object.number or '').replace('/','_')}_${object.state == 'draft' and 'draft' or ''} + ${object.partner_id.lang} diff --git a/addons/sale_stock/sale_stock.py b/addons/sale_stock/sale_stock.py index 341aaef8ca8..26d9d80f13e 100644 --- a/addons/sale_stock/sale_stock.py +++ b/addons/sale_stock/sale_stock.py @@ -70,7 +70,7 @@ class sale_order(osv.osv): company_id = self.pool.get('res.users')._get_company(cr, uid, context=context) warehouse_ids = self.pool.get('stock.warehouse').search(cr, uid, [('company_id', '=', company_id)], context=context) if not warehouse_ids: - raise osv.except_osv(_('Error!'), _('There is no warehouse defined for current company.')) + return False return warehouse_ids[0] # This is False