From 77fa521db55bca297955a2781daef513eeac894c Mon Sep 17 00:00:00 2001 From: "Bharat R. Devnani (OpenERP)" Date: Mon, 2 Dec 2013 14:12:44 +0530 Subject: [PATCH 01/17] [IMP] improve warning message bzr revid: bde@tinyerp.com-20131202084244-oc0gs75vwix3wgv3 --- openerp/addons/base/res/res_currency.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/openerp/addons/base/res/res_currency.py b/openerp/addons/base/res/res_currency.py index 94a5f538b25..9b638c706a4 100644 --- a/openerp/addons/base/res/res_currency.py +++ b/openerp/addons/base/res/res_currency.py @@ -49,6 +49,7 @@ class res_currency(osv.osv): currency_rate_type = context.get('currency_rate_type_id') or None # ... and use 'is NULL' instead of '= some-id'. operator = '=' if currency_rate_type else 'is' + currency_name = self.browse(cr, uid, ids, context=context)[0].name for id in ids: cr.execute("SELECT currency_id, rate FROM res_currency_rate WHERE currency_id = %s AND name <= %s AND currency_rate_type_id " + operator +" %s ORDER BY name desc LIMIT 1" ,(id, date, currency_rate_type)) if cr.rowcount: @@ -57,7 +58,7 @@ class res_currency(osv.osv): elif not raise_on_no_rate: res[id] = 0 else: - raise osv.except_osv(_('Error!'),_("No currency rate associated for currency %d for the given period" % (id))) + raise osv.except_osv(_('Error!'),_("No currency rate associated for currency %d for the given period" % (currency_name))) return res _name = "res.currency" From ead427265235d06894edcedc8fc78c71a90f0d5f Mon Sep 17 00:00:00 2001 From: "Bharat R. Devnani (OpenERP)" Date: Mon, 2 Dec 2013 14:28:33 +0530 Subject: [PATCH 02/17] [IMP] improved the code bzr revid: bde@tinyerp.com-20131202085833-sp33bs3syiqaybsg --- openerp/addons/base/res/res_currency.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openerp/addons/base/res/res_currency.py b/openerp/addons/base/res/res_currency.py index 9b638c706a4..558f7d98770 100644 --- a/openerp/addons/base/res/res_currency.py +++ b/openerp/addons/base/res/res_currency.py @@ -58,7 +58,7 @@ class res_currency(osv.osv): elif not raise_on_no_rate: res[id] = 0 else: - raise osv.except_osv(_('Error!'),_("No currency rate associated for currency %d for the given period" % (currency_name))) + raise osv.except_osv(_('Error!'),_("No currency rate associated for currency %s for the given period" % (currency_name))) return res _name = "res.currency" From 953c8d7633d2d516e00f048f788e3347f903c33e Mon Sep 17 00:00:00 2001 From: "Bharat R. Devnani (OpenERP)" Date: Mon, 2 Dec 2013 14:29:30 +0530 Subject: [PATCH 03/17] [IMP] improved the code bzr revid: bde@tinyerp.com-20131202085930-zinqv4q332iuqql0 --- openerp/addons/base/res/res_currency.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openerp/addons/base/res/res_currency.py b/openerp/addons/base/res/res_currency.py index 558f7d98770..b8c0e1378ad 100644 --- a/openerp/addons/base/res/res_currency.py +++ b/openerp/addons/base/res/res_currency.py @@ -58,7 +58,7 @@ class res_currency(osv.osv): elif not raise_on_no_rate: res[id] = 0 else: - raise osv.except_osv(_('Error!'),_("No currency rate associated for currency %s for the given period" % (currency_name))) + raise osv.except_osv(_('Error!'),_("No currency rate associated for currency '%s' for the given period" % (currency_name))) return res _name = "res.currency" From 2a8182a07fc5480c1e355c387fdf6354458afd05 Mon Sep 17 00:00:00 2001 From: "Bharat R. Devnani (OpenERP)" Date: Tue, 3 Dec 2013 14:50:56 +0530 Subject: [PATCH 04/17] [IMP] improved the code bzr revid: bde@tinyerp.com-20131203092056-l6c8x116iwv9oax6 --- openerp/addons/base/res/res_currency.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/openerp/addons/base/res/res_currency.py b/openerp/addons/base/res/res_currency.py index b8c0e1378ad..e53a1e87842 100644 --- a/openerp/addons/base/res/res_currency.py +++ b/openerp/addons/base/res/res_currency.py @@ -49,16 +49,15 @@ class res_currency(osv.osv): currency_rate_type = context.get('currency_rate_type_id') or None # ... and use 'is NULL' instead of '= some-id'. operator = '=' if currency_rate_type else 'is' - currency_name = self.browse(cr, uid, ids, context=context)[0].name - for id in ids: - cr.execute("SELECT currency_id, rate FROM res_currency_rate WHERE currency_id = %s AND name <= %s AND currency_rate_type_id " + operator +" %s ORDER BY name desc LIMIT 1" ,(id, date, currency_rate_type)) + for currency in self.browse(cr, uid, ids, context=context): + cr.execute("SELECT currency_id, rate FROM res_currency_rate WHERE currency_id = %s AND name <= %s AND currency_rate_type_id " + operator +" %s ORDER BY name desc LIMIT 1" ,(currency.id, date, currency_rate_type)) if cr.rowcount: id, rate = cr.fetchall()[0] res[id] = rate elif not raise_on_no_rate: - res[id] = 0 + res[currency.id] = 0 else: - raise osv.except_osv(_('Error!'),_("No currency rate associated for currency '%s' for the given period" % (currency_name))) + raise osv.except_osv(_('Error!'),_("No currency rate associated for currency '%s' for the given period" % (currency.name))) return res _name = "res.currency" From e2410358cd28cdf3e9e3a157ece9f7d367c6008f Mon Sep 17 00:00:00 2001 From: "Bharat R. Devnani (OpenERP)" Date: Wed, 12 Feb 2014 15:42:45 +0530 Subject: [PATCH 05/17] [IMP] improved bzr revid: bde@tinyerp.com-20140212101245-bhp1ncpuvckvex4m --- openerp/addons/base/res/res_currency.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openerp/addons/base/res/res_currency.py b/openerp/addons/base/res/res_currency.py index 931666f3d7f..0a50631f50b 100644 --- a/openerp/addons/base/res/res_currency.py +++ b/openerp/addons/base/res/res_currency.py @@ -56,9 +56,9 @@ class res_currency(osv.osv): if cr.rowcount: res[id] = cr.fetchone()[0] elif not raise_on_no_rate: - res[currency.id] = 0 + res[id] = 0 else: - raise osv.except_osv(_('Error!'),_("No currency rate associated for currency '%s' for the given period" % (currency.name))) + raise osv.except_osv(_('Error!'),_("No currency rate associated for currency '%d' for the given period" % (id))) return res _name = "res.currency" From 7a672f0bb5dd2e4cbb400b3a8db2733be250686b Mon Sep 17 00:00:00 2001 From: "Bharat R. Devnani (OpenERP)" Date: Wed, 12 Feb 2014 15:43:34 +0530 Subject: [PATCH 06/17] [IMP] improved bzr revid: bde@tinyerp.com-20140212101334-mdhimtwrjn98d6g6 --- openerp/addons/base/res/res_currency.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openerp/addons/base/res/res_currency.py b/openerp/addons/base/res/res_currency.py index 0a50631f50b..1419cc7ccb4 100644 --- a/openerp/addons/base/res/res_currency.py +++ b/openerp/addons/base/res/res_currency.py @@ -58,7 +58,7 @@ class res_currency(osv.osv): elif not raise_on_no_rate: res[id] = 0 else: - raise osv.except_osv(_('Error!'),_("No currency rate associated for currency '%d' for the given period" % (id))) + raise osv.except_osv(_('Error!'),_("No currency rate associated for currency %d for the given period" % (id))) return res _name = "res.currency" From b0c17397df7b3255a4bc9e500c9837f9fc82696e Mon Sep 17 00:00:00 2001 From: "Bharat R. Devnani (OpenERP)" Date: Wed, 12 Feb 2014 17:16:11 +0530 Subject: [PATCH 07/17] [IMP] improved the code to get the name of currency instead of id bzr revid: bde@tinyerp.com-20140212114611-et0fw2dlwwjuq39p --- openerp/addons/base/res/res_currency.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/openerp/addons/base/res/res_currency.py b/openerp/addons/base/res/res_currency.py index 1419cc7ccb4..b62ed300439 100644 --- a/openerp/addons/base/res/res_currency.py +++ b/openerp/addons/base/res/res_currency.py @@ -46,19 +46,19 @@ class res_currency(osv.osv): currency_rate_type = context.get('currency_rate_type_id') or None # ... and use 'is NULL' instead of '= some-id'. operator = '=' if currency_rate_type else 'is' - for id in ids: + for currency in self.browse(cr, uid, ids, context=context): cr.execute('SELECT rate FROM res_currency_rate ' 'WHERE currency_id = %s ' 'AND name <= %s ' 'AND currency_rate_type_id ' + operator + ' %s ' 'ORDER BY name desc LIMIT 1', - (id, date, currency_rate_type)) + (currency.id, date, currency_rate_type)) if cr.rowcount: - res[id] = cr.fetchone()[0] + res[currency.id] = cr.fetchone()[0] elif not raise_on_no_rate: - res[id] = 0 + res[currency.id] = 0 else: - raise osv.except_osv(_('Error!'),_("No currency rate associated for currency %d for the given period" % (id))) + raise osv.except_osv(_('Error!'),_("No currency rate associated for currency '%s' for the given period" % (currency.name))) return res _name = "res.currency" From 0d3d0e95636cf8ae0d52c650a28f505a89c3dc89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Wed, 5 Mar 2014 18:36:10 +0100 Subject: [PATCH 08/17] [IMP] mail: improved link in notification, now of form Sent from using , about , access in bzr revid: tde@openerp.com-20140305173610-yw71rophyt3iyfi4 --- addons/mail/mail_followers.py | 5 ++--- addons/mail/mail_mail.py | 17 ++++++++++++++--- addons/portal/mail_mail.py | 6 +++--- 3 files changed, 19 insertions(+), 9 deletions(-) diff --git a/addons/mail/mail_followers.py b/addons/mail/mail_followers.py index 0059df90530..260d4849040 100644 --- a/addons/mail/mail_followers.py +++ b/addons/mail/mail_followers.py @@ -115,8 +115,7 @@ class mail_notification(osv.Model): Administrator

- Sent by Your Company using OpenERP. OR - Sent by Administrator using OpenERP. + Sent from Your Company using OpenERP.
""" footer = "" @@ -138,7 +137,7 @@ class mail_notification(osv.Model): company = "%s" % (website_url, user.company_id.name) else: company = user.company_id.name - sent_by = _('Sent by %(company)s using %(openerp)s.') + sent_by = _('Sent from %(company)s using %(openerp)s') signature_company = '%s' % (sent_by % { 'company': company, 'openerp': "OpenERP" diff --git a/addons/mail/mail_mail.py b/addons/mail/mail_mail.py index a8726c16a0d..eb8aaf3356e 100644 --- a/addons/mail/mail_mail.py +++ b/addons/mail/mail_mail.py @@ -148,6 +148,8 @@ class mail_mail(osv.Model): """ Generate URLs for links in mails: - partner is an user and has read access to the document: direct link to document with model, res_id """ + if context is None: + context = {} if partner and partner.user_ids: base_url = self.pool.get('ir.config_parameter').get_param(cr, uid, 'web.base.url') # the parameters to encode for the query and fragment part of url @@ -160,9 +162,9 @@ class mail_mail(osv.Model): fragment['message_id'] = mail.mail_message_id.id elif mail.model and mail.res_id: fragment.update(model=mail.model, res_id=mail.res_id) - + url = urljoin(base_url, "?%s#%s" % (urlencode(query), urlencode(fragment))) - return _("""Access your messages and documents in OpenERP""") % url + return _("""about %s %s""") % (url, context.get('model_name', ''), mail.record_name) else: return None @@ -239,10 +241,19 @@ class mail_mail(osv.Model): email sending process has failed :return: True """ + if context is None: + context = {} ir_mail_server = self.pool.get('ir.mail_server') - for mail in self.browse(cr, SUPERUSER_ID, ids, context=context): try: + # TDE note: remove me when model_id field is present on mail.message - done here to avoid doing it multiple times in the sub method + if mail.model: + model_id = self.pool['ir.model'].search(cr, SUPERUSER_ID, [('model', '=', mail.model)], context=context)[0] + model = self.pool['ir.model'].browse(cr, SUPERUSER_ID, model_id, context=context) + else: + model = None + if model: + context['model_name'] = model.name # handle attachments attachments = [] for attach in mail.attachment_ids: diff --git a/addons/portal/mail_mail.py b/addons/portal/mail_mail.py index 18eb15361a3..094b3223560 100644 --- a/addons/portal/mail_mail.py +++ b/addons/portal/mail_mail.py @@ -39,8 +39,8 @@ class mail_mail(osv.Model): if partner and not partner.user_ids: contex_signup = dict(context, signup_valid=True) signup_url = partner_obj._get_signup_url_for_action(cr, SUPERUSER_ID, [partner.id], - action='login', model=mail.model, res_id=mail.res_id, - context=contex_signup)[partner.id] - return _("""Access your messages and documents through our Customer Portal""") % signup_url + action='login', model=mail.model, res_id=mail.res_id, + context=contex_signup)[partner.id] + return _("""access %s %s through our Customer Portal""") % (context.get('model_name', ''), mail.record_name, signup_url) else: return super(mail_mail, self)._get_partner_access_link(cr, uid, mail, partner=partner, context=context) From 22df13f4fd94f99b51d335ad58e3d1907e238de6 Mon Sep 17 00:00:00 2001 From: "Richard Mathot (OpenERP)" Date: Wed, 23 Apr 2014 09:35:11 +0200 Subject: [PATCH 09/17] [FIX] res_currency: Removing unnecessary 'browse' bzr revid: rim@openerp.com-20140423073511-kkjkt0a0baxz3466 --- openerp/addons/base/res/res_currency.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/openerp/addons/base/res/res_currency.py b/openerp/addons/base/res/res_currency.py index b62ed300439..19444786935 100644 --- a/openerp/addons/base/res/res_currency.py +++ b/openerp/addons/base/res/res_currency.py @@ -46,18 +46,19 @@ class res_currency(osv.osv): currency_rate_type = context.get('currency_rate_type_id') or None # ... and use 'is NULL' instead of '= some-id'. operator = '=' if currency_rate_type else 'is' - for currency in self.browse(cr, uid, ids, context=context): + for id in ids: cr.execute('SELECT rate FROM res_currency_rate ' 'WHERE currency_id = %s ' 'AND name <= %s ' 'AND currency_rate_type_id ' + operator + ' %s ' 'ORDER BY name desc LIMIT 1', - (currency.id, date, currency_rate_type)) + (id, date, currency_rate_type)) if cr.rowcount: - res[currency.id] = cr.fetchone()[0] + res[id] = cr.fetchone()[0] elif not raise_on_no_rate: - res[currency.id] = 0 + res[id] = 0 else: + currency = self.browse(cr, uid, id, context=context) raise osv.except_osv(_('Error!'),_("No currency rate associated for currency '%s' for the given period" % (currency.name))) return res From 7c02150c97e3ba42ced8627c496559bfee7a0436 Mon Sep 17 00:00:00 2001 From: Cedric Snauwaert Date: Wed, 23 Apr 2014 09:38:40 +0200 Subject: [PATCH 10/17] [FIX]tooltip on kanban should be bind to element itself instead of body to prevent tooltip to stay visible bzr revid: csn@openerp.com-20140423073840-m85t30lwgt8uf465 --- addons/web_kanban/static/src/js/kanban.js | 25 +++++++++++++++-------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/addons/web_kanban/static/src/js/kanban.js b/addons/web_kanban/static/src/js/kanban.js index 8db6c1e6fa7..cbc8bfd8fbb 100644 --- a/addons/web_kanban/static/src/js/kanban.js +++ b/addons/web_kanban/static/src/js/kanban.js @@ -925,15 +925,22 @@ instance.web_kanban.KanbanRecord = instance.web.Widget.extend({ bind_events: function() { var self = this; this.setup_color_picker(); - this.$el.find('[title]').tooltip({ - delay: { show: 500, hide: 0}, - title: function() { - var template = $(this).attr('tooltip'); - if (!self.view.qweb.has_template(template)) { - return false; - } - return self.view.qweb.render(template, self.qweb_context); - }, + this.$el.find('[title]').each(function(){ + //in case of kanban, attach tooltip to the element itself + //otherwise it might stay on screen when kanban view reload + //since default container is body. + //(when clicking on ready for next stage for example) + $(this).tooltip({ + delay: { show: 500, hide: 0}, + container: $(this), + title: function() { + var template = $(this).attr('tooltip'); + if (!self.view.qweb.has_template(template)) { + return false; + } + return self.view.qweb.render(template, self.qweb_context); + }, + }); }); // If no draghandle is found, make the whole card as draghandle (provided one can edit) From 8ee8b7bde68a550e2950df75754ad387c8ae13b1 Mon Sep 17 00:00:00 2001 From: Cedric Snauwaert Date: Wed, 23 Apr 2014 11:14:14 +0200 Subject: [PATCH 11/17] [FIX]problem with header dropdown buttons css bzr revid: csn@openerp.com-20140423091414-llv3t70gi59orbh0 --- addons/web/static/src/css/base.css | 2 +- addons/web/static/src/css/base.sass | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/web/static/src/css/base.css b/addons/web/static/src/css/base.css index 4931ec103be..916e4ffe9ba 100644 --- a/addons/web/static/src/css/base.css +++ b/addons/web/static/src/css/base.css @@ -1890,7 +1890,7 @@ .openerp .oe_form > :not(.oe_form_nosheet) header { padding-left: 2px; } -.openerp .oe_form > :not(.oe_form_nosheet) header ul:not(.oe_tooltip_technical) { +.openerp .oe_form > :not(.oe_form_nosheet) header ul:not(.oe_tooltip_technical):not(.oe_dropdown_menu) { display: inline-block; float: right; } diff --git a/addons/web/static/src/css/base.sass b/addons/web/static/src/css/base.sass index 84758c062cb..d83b09bc897 100644 --- a/addons/web/static/src/css/base.sass +++ b/addons/web/static/src/css/base.sass @@ -1550,7 +1550,7 @@ $sheet-padding: 16px // FormView.header {{{ .oe_form > :not(.oe_form_nosheet) header padding-left: 2px - ul:not(.oe_tooltip_technical) + ul:not(.oe_tooltip_technical):not(.oe_dropdown_menu) display: inline-block float: right .oe_button From 2558b7ec015ccd58cb8125356dce4bf869d73745 Mon Sep 17 00:00:00 2001 From: Gery Debongnie Date: Wed, 23 Apr 2014 11:17:26 +0200 Subject: [PATCH 12/17] [IMP] removes double groupby in row dimension, in opportunities analysis bzr revid: ged@openerp.com-20140423091726-kgnqfqtqjqxvul45 --- addons/crm/report/crm_lead_report_view.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/addons/crm/report/crm_lead_report_view.xml b/addons/crm/report/crm_lead_report_view.xml index c4cffdc012a..083142c550d 100644 --- a/addons/crm/report/crm_lead_report_view.xml +++ b/addons/crm/report/crm_lead_report_view.xml @@ -33,7 +33,6 @@ - From 92e3455565d3f5b889c948d9438c52155cdf2595 Mon Sep 17 00:00:00 2001 From: Gery Debongnie Date: Wed, 23 Apr 2014 11:29:55 +0200 Subject: [PATCH 13/17] [IMP] removes double groupby in row dimension, in hr recruitment reporting view (addon hr_recruitment) bzr revid: ged@openerp.com-20140423092955-cong5772cxpvks3m --- addons/hr_recruitment/report/hr_recruitment_report_view.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/addons/hr_recruitment/report/hr_recruitment_report_view.xml b/addons/hr_recruitment/report/hr_recruitment_report_view.xml index c214b2efa75..4d15481070f 100644 --- a/addons/hr_recruitment/report/hr_recruitment_report_view.xml +++ b/addons/hr_recruitment/report/hr_recruitment_report_view.xml @@ -8,7 +8,6 @@ - From ff9ae691d55846bd282fa49b7b46d940f4ed0d55 Mon Sep 17 00:00:00 2001 From: "chm@openerp.com" <> Date: Wed, 23 Apr 2014 11:59:01 +0200 Subject: [PATCH 14/17] [FIX] website: snippet editor: speed up save view (construct only option with clean_for_save method); fix carousel arrow bzr revid: chm@openerp.com-20140423095901-q945d4593uet41xy --- .../static/src/js/website.snippets.editor.js | 48 +++++++------------ 1 file changed, 18 insertions(+), 30 deletions(-) diff --git a/addons/website/static/src/js/website.snippets.editor.js b/addons/website/static/src/js/website.snippets.editor.js index bae014029e1..0177e8b8b64 100644 --- a/addons/website/static/src/js/website.snippets.editor.js +++ b/addons/website/static/src/js/website.snippets.editor.js @@ -130,6 +130,7 @@ */ + var dummy = function () {}; var website = openerp.website; website.add_template_file('/website/static/src/xml/website.snippets.xml'); @@ -161,7 +162,6 @@ return this._super.apply(this, arguments); }, save: function () { - website.snippet.clean_for_save = true; this.snippets.clean_for_save(); this._super(); }, @@ -362,15 +362,21 @@ }, clean_for_save: function () { var self = this; - $(website.snippet.globalSelector).each(function () { - var $snippet = $(this); - self.make_active($snippet); - self.make_active(false); - var editor = $snippet.data("snippet-editor"); - if (editor) { - editor.clean_for_save(); + + $("*[contentEditable], *[attributeEditable]") + .removeAttr('contentEditable') + .removeAttr('attributeEditable'); + + var options = website.snippet.options; + var template = website.snippet.templateOptions; + for (var k in options) { + if (template[k] && options[k].prototype.clean_for_save !== dummy) { + var $snippet = this.dom_filter(template[k].selector); + $snippet.each(function () { + new options[k](self, null, $(this), k).clean_for_save(); + }); } - }); + } }, make_active: function ($snippet) { if ($snippet && this.$active_snipped_id && this.$active_snipped_id.get(0) === $snippet.get(0)) { @@ -854,8 +860,7 @@ } }, - clean_for_save: function () { - } + clean_for_save: dummy }); website.snippet.options.background = website.snippet.Option.extend({ @@ -943,8 +948,7 @@ this.id = this.unique_id(); this.$target.attr("id", this.id); this.$target.find("[data-slide]").attr("data-cke-saved-href", "#" + this.id); - this.$target.find("[data-slide-to]").attr("data-target", "#" + this.id); - + this.$target.find("[data-target]").attr("data-target", "#" + this.id); this.rebind_event(); }, on_clone: function ($clone) { @@ -964,7 +968,7 @@ }, clean_for_save: function () { this._super(); - this.$target.find(".item").removeClass("next prev left right"); + $(".carousel").find(".item").removeClass("next prev left right active"); if(!this.$target.find(".item.active").length) { this.$target.find(".item:first").addClass("active"); } @@ -1519,9 +1523,6 @@ }); }, onFocus : function () { - // don't open media editor before clean for save - if (website.snippet.clean_for_save) return; - var self = this; if (this.$target.parent().data("oe-field") === "image") { this.$overlay.addClass("hidden"); @@ -1761,19 +1762,6 @@ } this.$overlay.removeClass('oe_active'); }, - - /* clean_for_save - * function called just before save vue - */ - clean_for_save: function () { - for (var i in this.styles){ - this.styles[i].clean_for_save(); - } - this.$target.removeAttr('contentEditable') - .find('*').removeAttr('contentEditable'); - this.$target.removeAttr('attributeEditable') - .find('*').removeAttr('attributeEditable'); - }, }); })(); From 8ddf7a21b7c4f202440640aea724fbe8590f8db9 Mon Sep 17 00:00:00 2001 From: Cedric Snauwaert Date: Wed, 23 Apr 2014 16:52:35 +0200 Subject: [PATCH 15/17] [FIX]calendar tooltip attachment container bzr revid: csn@openerp.com-20140423145235-ajph1xj2l492q1sy --- addons/web/static/src/js/view_form.js | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index 21a34db0036..247fd2d2a1a 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -1870,11 +1870,19 @@ instance.web.form.FormWidget = instance.web.Widget.extend(instance.web.form.Invi widget = widget || this; trigger = trigger || this.$el; var container = 'body'; - //in the case we have a modal currently showing, attach tooltip - //to the modal to prevent the tooltip to show in the body in the - //case we close the modal too fast - if (window.$('.modal.in').length>0){ - container = window.$('.modal.in:last()'); + /*TODO: need to be refactor + in the case we can find the view form in the parent, + attach the element to it (to prevent tooltip to keep showing + when switching view) or if we have a modal currently showing, + attach tooltip to the modal to prevent the tooltip to show in the body in the + case we close the modal too fast*/ + if ($(trigger).parents('.oe_view_manager_view_form').length > 0){ + container = $(trigger).parents('.oe_view_manager_view_form'); + } + else { + if (window.$('.modal.in').length>0){ + container = window.$('.modal.in:last()'); + } } options = _.extend({ delay: { show: 500, hide: 0 }, From 1657ffb8e7d95ef5f94e59121737abb068371b66 Mon Sep 17 00:00:00 2001 From: "chm@openerp.com" <> Date: Wed, 23 Apr 2014 17:01:35 +0200 Subject: [PATCH 16/17] [IMP] website_project: remove preprocess_request content; user can the add link with the menu editor bzr revid: chm@openerp.com-20140423150135-ng1xkiopm2ks3v23 --- addons/website_project/controllers/main.py | 16 ---------------- addons/website_project/views/website_project.xml | 9 --------- 2 files changed, 25 deletions(-) diff --git a/addons/website_project/controllers/main.py b/addons/website_project/controllers/main.py index e487a981996..c16d49e9f44 100644 --- a/addons/website_project/controllers/main.py +++ b/addons/website_project/controllers/main.py @@ -21,22 +21,6 @@ from openerp.addons.web import http from openerp.addons.web.http import request -from openerp.osv import osv - - -class Website(osv.Model): - _inherit = "website" - - def preprocess_request(self, cr, uid, ids, request, context=None): - project_obj = request.registry['project.project'] - project_ids = project_obj.search(cr, uid, [('privacy_visibility', "=", "public")], context=request.context) - - request.context.update({ - 'website_project_ids': project_obj.browse(cr, uid, project_ids, context=request.context) - }) - - return super(Website, self).preprocess_request(cr, uid, ids, request, context=None) - class website_project(http.Controller): diff --git a/addons/website_project/views/website_project.xml b/addons/website_project/views/website_project.xml index 1d511ba3ef1..a7e8b465d73 100644 --- a/addons/website_project/views/website_project.xml +++ b/addons/website_project/views/website_project.xml @@ -2,15 +2,6 @@ - - -