From 507cd402b72361bebd6c4802f37e26553180b630 Mon Sep 17 00:00:00 2001 From: "Randhir Mayatra (OpenERP)" Date: Wed, 17 Apr 2013 15:25:44 +0530 Subject: [PATCH 001/277] [IMP] changes the labels string as per suggestion bzr revid: rma@tinyerp.com-20130417095544-wl04gd57vuv4k2c4 --- addons/point_of_sale/point_of_sale.py | 4 ++-- addons/point_of_sale/point_of_sale_view.xml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/addons/point_of_sale/point_of_sale.py b/addons/point_of_sale/point_of_sale.py index 349ad8b4f81..97c1955fb8e 100644 --- a/addons/point_of_sale/point_of_sale.py +++ b/addons/point_of_sale/point_of_sale.py @@ -61,7 +61,7 @@ class pos_config(osv.osv): 'iface_cashdrawer' : fields.boolean('Cashdrawer Interface'), 'iface_payment_terminal' : fields.boolean('Payment Terminal Interface'), 'iface_electronic_scale' : fields.boolean('Electronic Scale Interface'), - 'iface_vkeyboard' : fields.boolean('Virtual KeyBoard Interface'), + 'iface_vkeyboard' : fields.boolean('Virtual Keyboard Interface'), 'iface_print_via_proxy' : fields.boolean('Print via Proxy'), 'state' : fields.selection(POS_CONFIG_STATE, 'Status', required=True, readonly=True), @@ -1333,7 +1333,7 @@ class product_product(osv.osv): 'available_in_pos': fields.boolean('Available in the Point of Sale', help='Check if you want this product to appear in the Point of Sale'), 'pos_categ_id': fields.many2one('pos.category','Point of Sale Category', help="The Point of Sale Category this products belongs to. Those categories are used to group similar products and are specific to the Point of Sale."), - 'to_weight' : fields.boolean('To Weight', help="Check if the product should be weighted (mainly used with self check-out interface)."), + 'to_weight' : fields.boolean('To Weigh', help="Check if the product should be weighted (mainly used with self check-out interface)."), } def _default_pos_categ_id(self, cr, uid, context=None): diff --git a/addons/point_of_sale/point_of_sale_view.xml b/addons/point_of_sale/point_of_sale_view.xml index 8a53015b7d7..778395e6c53 100644 --- a/addons/point_of_sale/point_of_sale_view.xml +++ b/addons/point_of_sale/point_of_sale_view.xml @@ -121,7 +121,7 @@ Click to create a new order.

Use this menu to browse your preceeding orders. To record new - orders, you should better use the menu Your Session for + orders, you may use the menu Your Session for the touchscreen interface.

@@ -1013,7 +1013,7 @@ currencies in your cash registers at the beginning and the end of each session.

- Note that you should better to use the menu Your Session + Note that you may to use the menu Your Session to quickly open a new session.

From 1f930d3c4cb60ea1785a3af87376417ac6d2c675 Mon Sep 17 00:00:00 2001 From: "Randhir Mayatra (OpenERP)" Date: Wed, 17 Apr 2013 15:38:06 +0530 Subject: [PATCH 002/277] [IMP] improve the code bzr revid: rma@tinyerp.com-20130417100806-ti12zqg8cl1tfrit --- addons/point_of_sale/point_of_sale_view.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/point_of_sale/point_of_sale_view.xml b/addons/point_of_sale/point_of_sale_view.xml index 778395e6c53..7089464128c 100644 --- a/addons/point_of_sale/point_of_sale_view.xml +++ b/addons/point_of_sale/point_of_sale_view.xml @@ -120,7 +120,7 @@

Click to create a new order.

- Use this menu to browse your preceeding orders. To record new + Use this menu to browse previous orders. To record new orders, you may use the menu Your Session for the touchscreen interface.

From de149b50f98c5f7c8f6e0c9e2a01c3f1843c062b Mon Sep 17 00:00:00 2001 From: "Randhir Mayatra (OpenERP)" Date: Wed, 17 Apr 2013 17:08:38 +0530 Subject: [PATCH 003/277] [IMP] Improve code bzr revid: rma@tinyerp.com-20130417113838-kit0g1g2iybvj2t9 --- addons/point_of_sale/point_of_sale_view.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/point_of_sale/point_of_sale_view.xml b/addons/point_of_sale/point_of_sale_view.xml index 7089464128c..c254ea42c95 100644 --- a/addons/point_of_sale/point_of_sale_view.xml +++ b/addons/point_of_sale/point_of_sale_view.xml @@ -1013,7 +1013,7 @@ currencies in your cash registers at the beginning and the end of each session.

- Note that you may to use the menu Your Session + Note that you may use the menu Your Session to quickly open a new session.

From d43bb76e99c9d4a0af7b929b3c0e46ba8d7cb4e0 Mon Sep 17 00:00:00 2001 From: "Randhir Mayatra (OpenERP)" Date: Fri, 31 May 2013 16:08:47 +0530 Subject: [PATCH 004/277] [IMP] remove extraneous whitespaces bzr revid: rma@tinyerp.com-20130531103847-hhyro1m9oldzujkm --- addons/point_of_sale/point_of_sale.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/point_of_sale/point_of_sale.py b/addons/point_of_sale/point_of_sale.py index 97c1955fb8e..b8c0401e30f 100644 --- a/addons/point_of_sale/point_of_sale.py +++ b/addons/point_of_sale/point_of_sale.py @@ -61,7 +61,7 @@ class pos_config(osv.osv): 'iface_cashdrawer' : fields.boolean('Cashdrawer Interface'), 'iface_payment_terminal' : fields.boolean('Payment Terminal Interface'), 'iface_electronic_scale' : fields.boolean('Electronic Scale Interface'), - 'iface_vkeyboard' : fields.boolean('Virtual Keyboard Interface'), + 'iface_vkeyboard': fields.boolean('Virtual Keyboard Interface'), 'iface_print_via_proxy' : fields.boolean('Print via Proxy'), 'state' : fields.selection(POS_CONFIG_STATE, 'Status', required=True, readonly=True), @@ -1333,7 +1333,7 @@ class product_product(osv.osv): 'available_in_pos': fields.boolean('Available in the Point of Sale', help='Check if you want this product to appear in the Point of Sale'), 'pos_categ_id': fields.many2one('pos.category','Point of Sale Category', help="The Point of Sale Category this products belongs to. Those categories are used to group similar products and are specific to the Point of Sale."), - 'to_weight' : fields.boolean('To Weigh', help="Check if the product should be weighted (mainly used with self check-out interface)."), + 'to_weight': fields.boolean('To Weigh', help="Check if the product should be weighted (mainly used with self check-out interface)."), } def _default_pos_categ_id(self, cr, uid, context=None): From 9d7a35accc2408dce35d9a499aac62ca7db3cf81 Mon Sep 17 00:00:00 2001 From: "Randhir Mayatra (OpenERP)" Date: Thu, 29 Aug 2013 18:41:48 +0530 Subject: [PATCH 005/277] [IMP] change the label name of 'to_weight' field bzr revid: rma@tinyerp.com-20130829131148-oak9gqmkm2jqqvdq --- addons/point_of_sale/point_of_sale.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/point_of_sale/point_of_sale.py b/addons/point_of_sale/point_of_sale.py index f5010ad3d8e..cd8e1b1fdb8 100644 --- a/addons/point_of_sale/point_of_sale.py +++ b/addons/point_of_sale/point_of_sale.py @@ -1354,7 +1354,7 @@ class product_product(osv.osv): 'available_in_pos': fields.boolean('Available in the Point of Sale', help='Check if you want this product to appear in the Point of Sale'), 'pos_categ_id': fields.many2one('pos.category','Point of Sale Category', help="These products belong to those categories that are used to group similar products and are specific to the Point of Sale."), - 'to_weight' : fields.boolean('To Weight', help="Check if the product should be weighted (mainly used with self check-out interface)."), + 'to_weight' : fields.boolean('To Weigh', help="Check if the product should be weighted (mainly used with self check-out interface)."), } def _default_pos_categ_id(self, cr, uid, context=None): From 0365981a721878c1a45a68aa7e117167809e5abf Mon Sep 17 00:00:00 2001 From: "Jignesh Rathod (OpenERP)" Date: Thu, 19 Dec 2013 12:54:42 +0530 Subject: [PATCH 006/277] [ADD] Account : Set default supplier on partner for Bank Statements. bzr revid: jir@tinyerp.com-20131219072442-d8a5nl052x2wxo1h --- addons/account/account_view.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/account/account_view.xml b/addons/account/account_view.xml index ed2d88b7386..69485639b0d 100644 --- a/addons/account/account_view.xml +++ b/addons/account/account_view.xml @@ -588,7 +588,7 @@ + '|',('customer','=',True),('supplier','=',True)]" context="{'default_customer': 0, 'default_supplier': 1}"/> @@ -599,7 +599,7 @@ - + From 50d67b6461474f2a62af2071b23fbc0a573cdc92 Mon Sep 17 00:00:00 2001 From: "Turkesh Patel (Open ERP)" Date: Mon, 23 Dec 2013 15:53:29 +0530 Subject: [PATCH 007/277] [IMP] post welcome employee message only if employee created from applicant. bzr revid: tpa@tinyerp.com-20131223102329-147mo4x9o1mc59lq --- addons/hr/hr.py | 23 ----------------------- addons/hr_recruitment/hr_recruitment.py | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 23 deletions(-) diff --git a/addons/hr/hr.py b/addons/hr/hr.py index 37d1bae7fea..a7c1efc9e8e 100644 --- a/addons/hr/hr.py +++ b/addons/hr/hr.py @@ -229,29 +229,6 @@ class hr_employee(osv.osv): 'color': 0, } - def create(self, cr, uid, data, context=None): - if context is None: - context = {} - create_ctx = dict(context, mail_create_nolog=True) - employee_id = super(hr_employee, self).create(cr, uid, data, context=create_ctx) - employee = self.browse(cr, uid, employee_id, context=context) - if employee.user_id: - res_users = self.pool['res.users'] - # send a copy to every user of the company - # TODO: post to the `Whole Company` mail.group when we'll be able to link to the employee record - _model, group_id = self.pool['ir.model.data'].get_object_reference(cr, uid, 'base', 'group_user') - user_ids = res_users.search(cr, uid, [('company_id', '=', employee.user_id.company_id.id), - ('groups_id', 'in', group_id)]) - partner_ids = list(set(u.partner_id.id for u in res_users.browse(cr, uid, user_ids, context=context))) - else: - partner_ids = [] - self.message_post(cr, uid, [employee_id], - body=_('Welcome to %s! Please help him/her take the first steps with OpenERP!') % (employee.name), - partner_ids=partner_ids, - subtype='mail.mt_comment', context=context - ) - return employee_id - def unlink(self, cr, uid, ids, context=None): resource_ids = [] for employee in self.browse(cr, uid, ids, context=context): diff --git a/addons/hr_recruitment/hr_recruitment.py b/addons/hr_recruitment/hr_recruitment.py index c293c689a5b..7386893b296 100644 --- a/addons/hr_recruitment/hr_recruitment.py +++ b/addons/hr_recruitment/hr_recruitment.py @@ -437,6 +437,7 @@ class hr_applicant(osv.Model): hr_employee = self.pool.get('hr.employee') model_data = self.pool.get('ir.model.data') act_window = self.pool.get('ir.actions.act_window') + res_users = self.pool['res.users'] emp_id = False for applicant in self.browse(cr, uid, ids, context=context): address_id = contact_name = False @@ -453,6 +454,21 @@ class hr_applicant(osv.Model): 'work_email': applicant.department_id and applicant.department_id.company_id and applicant.department_id.company_id.email or False, 'work_phone': applicant.department_id and applicant.department_id.company_id and applicant.department_id.company_id.phone or False, }) + partner_ids = [] + create_ctx = dict(context, mail_create_nolog=True) + employee = hr_employee.browse(cr, uid, emp_id, context=context) + if employee.user_id: + # send a copy to every user of the company + # TODO: post to the `Whole Company` mail.group when we'll be able to link to the employee record + _model, group_id = self.pool['ir.model.data'].get_object_reference(cr, uid, 'base', 'group_user') + user_ids = res_users.search(cr, uid, [('company_id', '=', employee.user_id.company_id.id), + ('groups_id', 'in', group_id)], context=context) + partner_ids = list(set(u.partner_id.id for u in res_users.browse(cr, uid, user_ids, context=context))) + hr_employee.message_post(cr, uid, [emp_id], + body=_('Welcome to %s! Please help him/her take the first steps with OpenERP!') % (employee.name), + partner_ids=partner_ids, + subtype='mail.mt_comment', context=context + ) self.write(cr, uid, [applicant.id], {'emp_id': emp_id}, context=context) else: raise osv.except_osv(_('Warning!'), _('You must define an Applied Job and a Contact Name for this applicant.')) From 08d4a84c1162f24e6038919afb724e0d542eac8f Mon Sep 17 00:00:00 2001 From: "Jignesh Rathod (OpenERP)" Date: Mon, 23 Dec 2013 17:48:42 +0530 Subject: [PATCH 008/277] [IMP] Remove required on BIC. bzr revid: jir@tinyerp.com-20131223121842-ib854hq5crmlge7y --- addons/base_iban/base_iban_data.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/base_iban/base_iban_data.xml b/addons/base_iban/base_iban_data.xml index eafc8dfcff8..e4f520db4d5 100644 --- a/addons/base_iban/base_iban_data.xml +++ b/addons/base_iban/base_iban_data.xml @@ -13,7 +13,7 @@ bank_bic - + From adfd67d7f99a786dc81ebbd588ed8b94b1a08e50 Mon Sep 17 00:00:00 2001 From: "Jignesh Rathod (OpenERP)" Date: Thu, 26 Dec 2013 19:10:21 +0530 Subject: [PATCH 009/277] [IMP] Improve code and add domain on partner field on bank statement view. bzr revid: jir@tinyerp.com-20131226134021-88xfmcjiqh8i3vhq --- addons/account/account_view.xml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/addons/account/account_view.xml b/addons/account/account_view.xml index 69485639b0d..74dd7d0c1d0 100644 --- a/addons/account/account_view.xml +++ b/addons/account/account_view.xml @@ -588,7 +588,7 @@ + '|',('customer','=',True),('supplier','=',True)]" context="{'default_supplier': 1}"/> @@ -599,7 +599,10 @@ - + From d133efb0077dc9a598f53c99c4ac9604912077c1 Mon Sep 17 00:00:00 2001 From: "Turkesh Patel (Open ERP)" Date: Fri, 27 Dec 2013 18:32:34 +0530 Subject: [PATCH 010/277] [IMP] improved log at creation time bzr revid: tpa@tinyerp.com-20131227130234-bmem1riolid98kk6 --- addons/hr_recruitment/hr_recruitment.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/hr_recruitment/hr_recruitment.py b/addons/hr_recruitment/hr_recruitment.py index 7386893b296..3d37b29f449 100644 --- a/addons/hr_recruitment/hr_recruitment.py +++ b/addons/hr_recruitment/hr_recruitment.py @@ -446,6 +446,7 @@ class hr_applicant(osv.Model): contact_name = self.pool.get('res.partner').name_get(cr, uid, [applicant.partner_id.id])[0][1] if applicant.job_id and (applicant.partner_name or contact_name): applicant.job_id.write({'no_of_recruitment': applicant.job_id.no_of_recruitment - 1}) + create_ctx = dict(context, mail_create_nolog=True) emp_id = hr_employee.create(cr, uid, {'name': applicant.partner_name or contact_name, 'job_id': applicant.job_id.id, 'address_home_id': address_id, @@ -453,9 +454,8 @@ class hr_applicant(osv.Model): 'address_id': applicant.company_id and applicant.company_id.partner_id and applicant.company_id.partner_id.id or False, 'work_email': applicant.department_id and applicant.department_id.company_id and applicant.department_id.company_id.email or False, 'work_phone': applicant.department_id and applicant.department_id.company_id and applicant.department_id.company_id.phone or False, - }) + }, context=create_ctx) partner_ids = [] - create_ctx = dict(context, mail_create_nolog=True) employee = hr_employee.browse(cr, uid, emp_id, context=context) if employee.user_id: # send a copy to every user of the company From 07746868f66cd1c54fed0c16b49fc57154fc8252 Mon Sep 17 00:00:00 2001 From: "Turkesh Patel (Open ERP)" Date: Fri, 3 Jan 2014 18:12:34 +0530 Subject: [PATCH 011/277] [FIX] improved code to serch users of company based on eployees company intead of using company of related user of employee bzr revid: tpa@tinyerp.com-20140103124234-a3euvu0e6bs1n14q --- addons/hr_recruitment/hr_recruitment.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/addons/hr_recruitment/hr_recruitment.py b/addons/hr_recruitment/hr_recruitment.py index 3d37b29f449..a9f14564aa9 100644 --- a/addons/hr_recruitment/hr_recruitment.py +++ b/addons/hr_recruitment/hr_recruitment.py @@ -455,15 +455,13 @@ class hr_applicant(osv.Model): 'work_email': applicant.department_id and applicant.department_id.company_id and applicant.department_id.company_id.email or False, 'work_phone': applicant.department_id and applicant.department_id.company_id and applicant.department_id.company_id.phone or False, }, context=create_ctx) - partner_ids = [] employee = hr_employee.browse(cr, uid, emp_id, context=context) - if employee.user_id: - # send a copy to every user of the company - # TODO: post to the `Whole Company` mail.group when we'll be able to link to the employee record - _model, group_id = self.pool['ir.model.data'].get_object_reference(cr, uid, 'base', 'group_user') - user_ids = res_users.search(cr, uid, [('company_id', '=', employee.user_id.company_id.id), - ('groups_id', 'in', group_id)], context=context) - partner_ids = list(set(u.partner_id.id for u in res_users.browse(cr, uid, user_ids, context=context))) + # send a copy to every user of the company + # TODO: post to the `Whole Company` mail.group when we'll be able to link to the employee record + _model, group_id = self.pool['ir.model.data'].get_object_reference(cr, uid, 'base', 'group_user') + user_ids = res_users.search(cr, uid, [('company_id', '=', employee.company_id.id), + ('groups_id', 'in', group_id)], context=context) + partner_ids = list(set(u.partner_id.id for u in res_users.browse(cr, uid, user_ids, context=context))) hr_employee.message_post(cr, uid, [emp_id], body=_('Welcome to %s! Please help him/her take the first steps with OpenERP!') % (employee.name), partner_ids=partner_ids, From 181aee3c506c5ccac3dd9cbcbe7f85c1c693855b Mon Sep 17 00:00:00 2001 From: "Turkesh Patel (Open ERP)" Date: Wed, 5 Feb 2014 11:35:00 +0530 Subject: [PATCH 012/277] [IMP] as per TDE's suggetion dont move code of posting message in hr_recruitment just do it based on context key bzr revid: tpa@tinyerp.com-20140205060500-v70n8oy9rm1dflwf --- addons/hr/hr.py | 26 +++++++++++++++++++++++++ addons/hr_recruitment/hr_recruitment.py | 15 +------------- 2 files changed, 27 insertions(+), 14 deletions(-) diff --git a/addons/hr/hr.py b/addons/hr/hr.py index 5b38676d459..e07fdbf1a5b 100644 --- a/addons/hr/hr.py +++ b/addons/hr/hr.py @@ -227,6 +227,32 @@ class hr_employee(osv.osv): 'color': 0, } + def create(self, cr, uid, data, context=None): + if context is None: + context = {} + if context.get("mail_broadcast"): + create_ctx = dict(context, mail_create_nolog=True) + employee_id = super(hr_employee, self).create(cr, uid, data, context=create_ctx) + employee = self.browse(cr, uid, employee_id, context=context) + if employee.user_id: + res_users = self.pool['res.users'] + # send a copy to every user of the company + # TODO: post to the `Whole Company` mail.group when we'll be able to link to the employee record + _model, group_id = self.pool['ir.model.data'].get_object_reference(cr, uid, 'base', 'group_user') + user_ids = res_users.search(cr, uid, [('company_id', '=', employee.user_id.company_id.id), + ('groups_id', 'in', group_id)], context=context) + partner_ids = list(set(u.partner_id.id for u in res_users.browse(cr, uid, user_ids, context=context))) + else: + partner_ids = [] + self.message_post(cr, uid, [employee_id], + body=_('Welcome to %s! Please help him/her take the first steps with OpenERP!') % (employee.name), + partner_ids=partner_ids, + subtype='mail.mt_comment', context=context + ) + else: + employee_id = super(hr_employee, self).create(cr, uid, data, context=context) + return employee_id + def unlink(self, cr, uid, ids, context=None): resource_ids = [] for employee in self.browse(cr, uid, ids, context=context): diff --git a/addons/hr_recruitment/hr_recruitment.py b/addons/hr_recruitment/hr_recruitment.py index a6c1dd30249..57fd37bf509 100644 --- a/addons/hr_recruitment/hr_recruitment.py +++ b/addons/hr_recruitment/hr_recruitment.py @@ -437,7 +437,6 @@ class hr_applicant(osv.Model): hr_employee = self.pool.get('hr.employee') model_data = self.pool.get('ir.model.data') act_window = self.pool.get('ir.actions.act_window') - res_users = self.pool['res.users'] emp_id = False for applicant in self.browse(cr, uid, ids, context=context): address_id = contact_name = False @@ -446,7 +445,7 @@ class hr_applicant(osv.Model): contact_name = self.pool.get('res.partner').name_get(cr, uid, [applicant.partner_id.id])[0][1] if applicant.job_id and (applicant.partner_name or contact_name): applicant.job_id.write({'no_of_recruitment': applicant.job_id.no_of_recruitment - 1}) - create_ctx = dict(context, mail_create_nolog=True) + create_ctx = dict(context, mail_broadcast=True) emp_id = hr_employee.create(cr, uid, {'name': applicant.partner_name or contact_name, 'job_id': applicant.job_id.id, 'address_home_id': address_id, @@ -455,18 +454,6 @@ class hr_applicant(osv.Model): 'work_email': applicant.department_id and applicant.department_id.company_id and applicant.department_id.company_id.email or False, 'work_phone': applicant.department_id and applicant.department_id.company_id and applicant.department_id.company_id.phone or False, }, context=create_ctx) - employee = hr_employee.browse(cr, uid, emp_id, context=context) - # send a copy to every user of the company - # TODO: post to the `Whole Company` mail.group when we'll be able to link to the employee record - _model, group_id = self.pool['ir.model.data'].get_object_reference(cr, uid, 'base', 'group_user') - user_ids = res_users.search(cr, uid, [('company_id', '=', employee.company_id.id), - ('groups_id', 'in', group_id)], context=context) - partner_ids = list(set(u.partner_id.id for u in res_users.browse(cr, uid, user_ids, context=context))) - hr_employee.message_post(cr, uid, [emp_id], - body=_('Welcome to %s! Please help him/her take the first steps with OpenERP!') % (employee.name), - partner_ids=partner_ids, - subtype='mail.mt_comment', context=context - ) self.write(cr, uid, [applicant.id], {'emp_id': emp_id}, context=context) else: raise osv.except_osv(_('Warning!'), _('You must define an Applied Job and a Contact Name for this applicant.')) From 42952bb7cf514b43eac598397e7bfad4cd943bc7 Mon Sep 17 00:00:00 2001 From: Fabien Meghazi Date: Wed, 5 Feb 2014 10:17:49 +0100 Subject: [PATCH 013/277] [REM] Remove LoginForm javascript bzr revid: fme@openerp.com-20140205091749-39333kr3hz0dt4wg --- addons/web/controllers/main.py | 5 ++++- addons/web/static/src/js/chrome.js | 20 +------------------- addons/web/views/webclient_templates.xml | 21 +++++---------------- 3 files changed, 10 insertions(+), 36 deletions(-) diff --git a/addons/web/controllers/main.py b/addons/web/controllers/main.py index 02a909c5c92..d87d2b3cb1e 100644 --- a/addons/web/controllers/main.py +++ b/addons/web/controllers/main.py @@ -637,7 +637,10 @@ class Home(http.Controller): if uid is not False: return http.redirect_with_hash(redirect) values['error'] = "Wrong login/password" - return render_bootstrap_template(request.session.db, 'web.login', values, lazy=True) + + def callback(template, values): + return request.registry['ir.ui.view'].render(request.cr, openerp.SUPERUSER_ID, template, values) + return LazyResponse(callback, template='web.login', values=values) @http.route('/login', type='http', auth="none") def login(self, db, login, key, redirect="/web", **kw): diff --git a/addons/web/static/src/js/chrome.js b/addons/web/static/src/js/chrome.js index afa761d7025..377c5755ce9 100644 --- a/addons/web/static/src/js/chrome.js +++ b/addons/web/static/src/js/chrome.js @@ -513,7 +513,7 @@ instance.web.DatabaseManager = instance.web.Widget.extend({ var fields = $(form).serializeArray(); self.rpc("/web/database/create", {'fields': fields}).done(function(result) { if (result) { - instance.web.redirect('/web') + instance.web.redirect('/web'); } else { alert("Failed to create database"); } @@ -1483,24 +1483,6 @@ instance.web.embed = function (origin, dbname, login, key, action, options) { client.insertAfter(currentScript); }; -openerp.web.LoginForm = openerp.web.Widget.extend({ - init: function ($form) { - this._super(/* no parent */); - this.setElement($form); - this.$el.on('submit', this.on_submit); - this.start(); - }, - start: function () { - if (location.hash) { - this.$el.attr('action', this.$el.attr('action') + location.hash); - } - return this._super(); - }, - on_submit: function () { - return true; - }, -}); - })(); // vim:et fdc=0 fdl=0 foldnestmax=3 fdm=syntax: diff --git a/addons/web/views/webclient_templates.xml b/addons/web/views/webclient_templates.xml index 0e08f743f6c..6e80af9c32c 100644 --- a/addons/web/views/webclient_templates.xml +++ b/addons/web/views/webclient_templates.xml @@ -47,6 +47,10 @@