From b52467afb28034ae3016fa47f09f8a95be73def2 Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Mon, 18 Jan 2016 18:18:08 +0100 Subject: [PATCH 01/44] [FIX] product: pricelist applied on product categories This is related to revision 2ebbcba33a7034d737e25c25af0e74dc76db844d The above revision introduces a regression: the ability to configure pricelist items applied on product categories. If you configured a pricelist with items applied on products categories, then the first item with a product category matched all products, even if the products were not in the according category. This is because the condition checking that the product is within the pricelist item product category has been completely removed, by the above commit. opw-666059 --- addons/product/pricelist.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/addons/product/pricelist.py b/addons/product/pricelist.py index ab8c84f6433..d1b01f15de0 100644 --- a/addons/product/pricelist.py +++ b/addons/product/pricelist.py @@ -193,6 +193,15 @@ class product_pricelist(osv.osv): if rule.product_id and product.id != rule.product_id.id: continue + if rule.categ_id: + cat = product.categ_id + while cat: + if cat.id == rule.categ_id.id: + break + cat = cat.parent_id + if not cat: + continue + if rule.base == 'pricelist' and rule.base_pricelist_id: price_tmp = self._price_get_multi(cr, uid, rule.base_pricelist_id, [(product, qty, partner)], context=context)[product.id] ptype_src = rule.base_pricelist_id.currency_id.id From e079382d4b5fd88783a808ca539b36716bce60f2 Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Tue, 19 Jan 2016 12:11:37 +0100 Subject: [PATCH 02/44] [FIX] website_event: events located time Basically, this apply what was done in 87090c1b8b55363efd14abf30ea11da3706c4a00 everywhere where the events begin & end dates are displayed, so all the events dates displayed in the front-end are the same, so they are all within the event own timezone instead of the user browser time zone. opw-667065 --- addons/website_event/views/website_event.xml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/addons/website_event/views/website_event.xml b/addons/website_event/views/website_event.xml index 0fb5117791a..637117e4076 100644 --- a/addons/website_event/views/website_event.xml +++ b/addons/website_event/views/website_event.xml @@ -67,7 +67,7 @@
- to () + to ()

- To + From
+ To
@@ -403,7 +403,7 @@ Event Subscription - + Unlimited @@ -498,7 +498,7 @@

- to + to
Date: Tue, 19 Jan 2016 13:16:09 +0100 Subject: [PATCH 04/44] [FIX] gamification: colspan in badge form view --- addons/gamification/views/badge.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/gamification/views/badge.xml b/addons/gamification/views/badge.xml index 4c0408cff86..315e0fbbc29 100644 --- a/addons/gamification/views/badge.xml +++ b/addons/gamification/views/badge.xml @@ -54,7 +54,7 @@ -
+
Security rules to define who is allowed to manually grant badges. Not enforced for administrator.
From 40a9991ba8f9d76351a6f7387d0dae769315dac1 Mon Sep 17 00:00:00 2001 From: Christophe Matthieu Date: Tue, 19 Jan 2016 12:03:14 +0100 Subject: [PATCH 05/44] [FIX] website_links: update the chart when user change tab or resize Issue: On the front-end try to see the statistics and change tab, the graph is very messy. (The chart width equal 5px when the bootstrap tab is closed) Use trigger resize to update graph but use trigger is an error, must call all update directly. opw-666405 --- .../static/src/js/website_links_charts.js | 32 ++++++++----------- 1 file changed, 14 insertions(+), 18 deletions(-) diff --git a/addons/website_links/static/src/js/website_links_charts.js b/addons/website_links/static/src/js/website_links_charts.js index c463ff24c1e..326e6304758 100644 --- a/addons/website_links/static/src/js/website_links_charts.js +++ b/addons/website_links/static/src/js/website_links_charts.js @@ -78,9 +78,7 @@ if(!$('.o_website_links_chart').length) { .datum(chart_data) .call(chart); - nv.utils.windowResize(chart.update); - - return chart; + return self.chart = chart; }); }, }); @@ -114,8 +112,7 @@ if(!$('.o_website_links_chart').length) { .transition().duration(1200) .call(chart); - nv.utils.windowResize(chart.update); - return chart; + return self.chart = chart; }); }, }); @@ -123,10 +120,11 @@ if(!$('.o_website_links_chart').length) { base.ready().done(function() { // Resize the chart when a tab is opened, because NVD3 automatically reduce the size // of the chart to 5px width when the bootstrap tab is closed. + var charts = {}; $(".graph-tabs li a").click(function (e) { e.preventDefault(); $(this).tab('show'); - $(window).trigger('resize'); // Force NVD3 to redraw the chart + _.chain(charts).pluck('chart').invoke('update'); // Force NVD3 to redraw the chart }); // Get the code of the link @@ -181,28 +179,26 @@ if(!$('.o_website_links_chart').length) { // Process all time line chart data var now = moment(); - var all_time_chart = new BarChart('#all_time_clicks_chart', begin_date, now, formatted_clicks_by_day); - all_time_chart.start(); + charts.all_time_bar = new BarChart('#all_time_clicks_chart', begin_date, now, formatted_clicks_by_day); // Process month line chart data begin_date = moment().subtract(30, 'days'); - var month_chart = new BarChart('#last_month_clicks_chart', begin_date, now, formatted_clicks_by_day); - month_chart.start(); + charts.last_month_bar = new BarChart('#last_month_clicks_chart', begin_date, now, formatted_clicks_by_day); // Process week line chart data begin_date = moment().subtract(7, 'days'); - var week_chart = new BarChart('#last_week_clicks_chart', begin_date, now, formatted_clicks_by_day); - week_chart.start(); + charts.last_week_bar = new BarChart('#last_week_clicks_chart', begin_date, now, formatted_clicks_by_day); // Process pie charts - var all_time_pie_chart = new PieChart('#all_time_countries_charts', clicks_by_country); - all_time_pie_chart.start(); + charts.all_time_pie = new PieChart('#all_time_countries_charts', clicks_by_country); + charts.last_month_pie = new PieChart('#last_month_countries_charts', last_month_clicks_by_country); + charts.last_week_pie = new PieChart('#last_week_countries_charts', last_week_clicks_by_country); - var last_month_pie_chart = new PieChart('#last_month_countries_charts', last_month_clicks_by_country); - last_month_pie_chart.start(); + _.invoke(charts, 'start'); - var last_week_pie_chart = new PieChart('#last_week_countries_charts', last_week_clicks_by_country); - last_week_pie_chart.start(); + nv.utils.windowResize(function () { + _.chain(charts).pluck('chart').invoke('update'); + }); } else { $('#all_time_charts').prepend('There is no data to show'); From ab9a0cb679a618eca4581b502c441fdda463ea1a Mon Sep 17 00:00:00 2001 From: Christophe Matthieu Date: Tue, 19 Jan 2016 12:07:00 +0100 Subject: [PATCH 06/44] [FIX] website_links: don't show the label on the pie chart The label is already display just before the pie and the label are display one over the other preventing visibility. opw-666405 --- addons/website_links/static/src/js/website_links_charts.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/website_links/static/src/js/website_links_charts.js b/addons/website_links/static/src/js/website_links_charts.js index 326e6304758..73d90ecf52b 100644 --- a/addons/website_links/static/src/js/website_links_charts.js +++ b/addons/website_links/static/src/js/website_links_charts.js @@ -105,7 +105,7 @@ if(!$('.o_website_links_chart').length) { var chart = nv.models.pieChart() .x(function(d) { return d.label; }) .y(function(d) { return d.value; }) - .showLabels(true); + .showLabels(false); d3.select(self.$element + ' svg') .datum(processed_data) From e0ea7c04f96452e930b38d32e5bdff5e0c02de20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9ry=20Debongnie?= Date: Tue, 19 Jan 2016 11:25:46 +0100 Subject: [PATCH 07/44] [FIX] mail: fix issue with disappearing filters in some cases The client action had a weird issue: going back from a breadcrumb to the client action made the searchview (filters/favorites) buttons disappear. This is caused by a weird behavior of the control panel. This fix is the safest for now, but working on the control panel behavior would be a better long term solution. --- addons/mail/static/src/js/client_action.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/addons/mail/static/src/js/client_action.js b/addons/mail/static/src/js/client_action.js index 46190c1dd0b..38cc26e8997 100644 --- a/addons/mail/static/src/js/client_action.js +++ b/addons/mail/static/src/js/client_action.js @@ -214,7 +214,9 @@ var ChatAction = Widget.extend(ControlPanelMixin, { var def1 = this.thread.appendTo(this.$('.o_mail_chat_content')); var def2 = this.basic_composer.appendTo(this.$('.o_mail_chat_content')); var def3 = this.extended_composer.appendTo(this.$('.o_mail_chat_content')); - var def4 = this.searchview.appendTo($("
")); + var def4 = this.searchview.appendTo($("
")).then(function () { + self.$searchview_buttons = self.searchview.$buttons.contents(); + }); this.render_sidebar(); @@ -486,7 +488,7 @@ var ChatAction = Widget.extend(ControlPanelMixin, { cp_content: { $buttons: this.$buttons, $searchview: this.searchview.$el, - $searchview_buttons: this.searchview.$buttons.contents(), + $searchview_buttons: this.$searchview_buttons, }, searchview: this.searchview, }); From 667909ae4a02fcc4b4dd6f6f910f9fe7df110e36 Mon Sep 17 00:00:00 2001 From: Martin Geubelle Date: Tue, 19 Jan 2016 13:58:33 +0100 Subject: [PATCH 08/44] [FIX] web_kanban: duplicated tags on load more When clicking on 'load more', the kanban view only needs to add tags for new records displayed by load more ; the existing records already have their tags so one duplicates them. --- addons/web_kanban/static/src/js/kanban_view.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/addons/web_kanban/static/src/js/kanban_view.js b/addons/web_kanban/static/src/js/kanban_view.js index df049a014e0..915f575e0f4 100644 --- a/addons/web_kanban/static/src/js/kanban_view.js +++ b/addons/web_kanban/static/src/js/kanban_view.js @@ -550,11 +550,11 @@ var KanbanView = View.extend({ dataset.read_ids(_.uniq(rel.ids), ['name', 'color']).done(function(result) { result.forEach(function(record) { // Does not display the tag if color = 0 - if (record['color']){ + if (record.color){ var $tag = $('') - .addClass('o_tag o_tag_color_' + record['color']) - .attr('title', _.str.escapeHTML(record['name'])); - $(rel.elements[record['id']]).append($tag); + .addClass('o_tag o_tag_color_' + record.color) + .attr('title', _.str.escapeHTML(record.name)); + $(rel.elements[record.id]).append($tag); } }); // we use boostrap tooltips for better and faster display @@ -718,7 +718,7 @@ var KanbanView = View.extend({ column.offset += self.limit; column.remaining = Math.max(column.remaining - self.limit, 0); column.update_column(); - self.postprocess_m2m_tags(column.records); + self.postprocess_m2m_tags(column.records.slice(column.offset)); }); }, From c81e2720b2e8548965afa38395584d1f7761a1c6 Mon Sep 17 00:00:00 2001 From: qsm-odoo Date: Fri, 15 Jan 2016 16:47:21 +0100 Subject: [PATCH 09/44] [FIX] web,calendar: m2m attendee tag color The colors for attendee tags were not used and were reset for all tags each time the color was changed for a single tag. --- addons/calendar/calendar.py | 3 ++- addons/calendar/static/src/js/base_calendar.js | 13 ++++++------- addons/web/static/src/xml/base.xml | 4 +--- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/addons/calendar/calendar.py b/addons/calendar/calendar.py index 8686d62b4d4..24f074a805c 100644 --- a/addons/calendar/calendar.py +++ b/addons/calendar/calendar.py @@ -307,10 +307,11 @@ class res_partner(osv.Model): meeting = self.pool['calendar.event'].browse(cr, uid, get_real_ids(meeting_id), context=context) for partner in self.browse(cr, uid, ids, context=context): data = self.name_get(cr, uid, [partner.id], context)[0] + data = [data[0], data[1], False, partner.color] if meeting: for attendee in meeting.attendee_ids: if attendee.partner_id.id == partner.id: - data = (data[0], data[1], attendee.state) + data[2] = attendee.state datas.append(data) return datas diff --git a/addons/calendar/static/src/js/base_calendar.js b/addons/calendar/static/src/js/base_calendar.js index 445234bb0f7..a10395ac548 100644 --- a/addons/calendar/static/src/js/base_calendar.js +++ b/addons/calendar/static/src/js/base_calendar.js @@ -240,17 +240,16 @@ WebClient.include({ var Many2ManyAttendee = FieldMany2ManyTags.extend({ tag_template: "Many2ManyAttendeeTag", - get_render_data: function(ids){ - var dataset = new data.DataSetStatic(this, this.field.relation, this.build_context()); - return dataset.call('get_attendee_detail',[ids, this.getParent().datarecord.id || false]) - .then(process_data); + get_render_data: function (ids) { + return this.dataset.call('get_attendee_detail', [ids, this.getParent().datarecord.id || false]) + .then(process_data); function process_data(data) { - return _.map(data, function(d) { - return _.object(['id', 'display_name', 'status'], d); + return _.map(data, function (d) { + return _.object(['id', 'display_name', 'status', 'color'], d); }); } - } + }, }); function showCalendarInvitation(db, action, id, view, attendee_data) { diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml index db5d823590e..6d0ab1851ec 100644 --- a/addons/web/static/src/xml/base.xml +++ b/addons/web/static/src/xml/base.xml @@ -869,13 +869,11 @@ > - - + - From b01e24b6aff606ce9f831512d9e6aa24ce71aad8 Mon Sep 17 00:00:00 2001 From: Nicolas Martinelli Date: Mon, 18 Jan 2016 14:54:08 +0100 Subject: [PATCH 10/44] [FIX] account: company currency in payment The company currency should be the company currency of the invoice, not the company currency of the account journal linked to the payment. The following use case causes an issue: - invoice in GBP - journal of the invoice in AED - journal of the payment in CHF In this case, residual_company_signed will be considered to be in CHF while it was recorded in AED. opw-666595 --- addons/account/models/account_payment.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/addons/account/models/account_payment.py b/addons/account/models/account_payment.py index 5ea2b0bfd23..6da8085e961 100644 --- a/addons/account/models/account_payment.py +++ b/addons/account/models/account_payment.py @@ -87,10 +87,12 @@ class account_abstract_payment(models.AbstractModel): if all(inv.currency_id == payment_currency for inv in invoices): total = sum(invoices.mapped('residual_signed')) else: - total = sum(invoices.mapped('residual_company_signed')) - company_currency = self.company_id.currency_id if self.company_id else self.env.user.company_id.currency_id - if company_currency and company_currency != payment_currency: - total = company_currency.with_context(date=self.payment_date).compute(total, payment_currency) + total = 0 + for inv in invoices: + if inv.company_currency_id != payment_currency: + total += inv.company_currency_id.with_context(date=self.payment_date).compute(inv.residual_company_signed, payment_currency) + else: + total += inv.residual_company_signed return abs(total) From 205037736f6073940857f5632bf15d1c4e356b8b Mon Sep 17 00:00:00 2001 From: Nicolas Martinelli Date: Tue, 19 Jan 2016 11:11:02 +0100 Subject: [PATCH 11/44] [FIX] web_kanban, *: missing translated term The progress bar in the web kanban module uses the option 'title' in order to display the title of the gauge. However, this option is not taken into account when it comes to translation, because the translation of such option is not accessible at the JS level. The fix defines the title of the gauge as the parameter `title` of the widget. Indeed, such a parameter is in the list of parameters translated and made accessible in the JS layer (see variable TRANSLATED_ATTRS in translate.py). With such a modification, the translation is accessible on the node. opw-666577 --- addons/hr_holidays/hr_dashboard.xml | 2 +- addons/hr_holidays/i18n/hr_holidays.pot | 5 +++++ addons/hr_recruitment/i18n/hr_recruitment.pot | 5 +++++ addons/hr_recruitment/views/hr_job_views.xml | 2 +- addons/mass_mailing/i18n/mass_mailing.pot | 1 + addons/mass_mailing/views/mass_mailing.xml | 2 +- addons/sale/i18n/sale.pot | 1 + addons/sale/sales_team_dashboard.xml | 2 +- addons/web_kanban/static/src/js/kanban_widgets.js | 7 +++++-- 9 files changed, 21 insertions(+), 6 deletions(-) diff --git a/addons/hr_holidays/hr_dashboard.xml b/addons/hr_holidays/hr_dashboard.xml index c53022521c2..6fd7e73d7ea 100644 --- a/addons/hr_holidays/hr_dashboard.xml +++ b/addons/hr_holidays/hr_dashboard.xml @@ -38,7 +38,7 @@
- +
diff --git a/addons/hr_holidays/i18n/hr_holidays.pot b/addons/hr_holidays/i18n/hr_holidays.pot index 70ace026048..f1b2d682777 100644 --- a/addons/hr_holidays/i18n/hr_holidays.pot +++ b/addons/hr_holidays/i18n/hr_holidays.pot @@ -82,6 +82,11 @@ msgstr "" msgid "Able to see Remaining Leaves" msgstr "" +#. module: hr_holidays +#: model:ir.ui.view,arch_db:hr_holidays.hr_department_view_kanban +msgid "Absence" +msgstr "" + #. module: hr_holidays #: model:ir.model.fields,field_description:hr_holidays.field_hr_department_absence_of_today msgid "Absence by Today" diff --git a/addons/hr_recruitment/i18n/hr_recruitment.pot b/addons/hr_recruitment/i18n/hr_recruitment.pot index cb8e289b48d..7980cc06979 100644 --- a/addons/hr_recruitment/i18n/hr_recruitment.pot +++ b/addons/hr_recruitment/i18n/hr_recruitment.pot @@ -868,6 +868,11 @@ msgstr "" msgid "HR Department" msgstr "" +#. module: hr_recruitment +#: model:ir.ui.view,arch_db:hr_recruitment.view_hr_job_kanban +msgid "Hired Employees" +msgstr "" + #. module: hr_recruitment #: model:ir.model.fields,field_description:hr_recruitment.field_hr_applicant_category_id #: model:ir.model.fields,field_description:hr_recruitment.field_hr_applicant_id diff --git a/addons/hr_recruitment/views/hr_job_views.xml b/addons/hr_recruitment/views/hr_job_views.xml index 726875c08c6..e54d6e89d52 100644 --- a/addons/hr_recruitment/views/hr_job_views.xml +++ b/addons/hr_recruitment/views/hr_job_views.xml @@ -74,7 +74,7 @@
- +
diff --git a/addons/mass_mailing/i18n/mass_mailing.pot b/addons/mass_mailing/i18n/mass_mailing.pot index fee9a173eb7..58de13f63fa 100644 --- a/addons/mass_mailing/i18n/mass_mailing.pot +++ b/addons/mass_mailing/i18n/mass_mailing.pot @@ -470,6 +470,7 @@ msgstr "" #: model:ir.model.fields,field_description:mass_mailing.field_mail_mass_mailing_campaign_delivered #: model:ir.model.fields,field_description:mass_mailing.field_mail_mass_mailing_delivered #: model:ir.model.fields,field_description:mass_mailing.field_mail_statistics_report_delivered +#: model:ir.ui.view,arch_db:mass_mailing.view_mail_mass_mailing_kanban msgid "Delivered" msgstr "" diff --git a/addons/mass_mailing/views/mass_mailing.xml b/addons/mass_mailing/views/mass_mailing.xml index f7543a50ad1..a8df251edf3 100644 --- a/addons/mass_mailing/views/mass_mailing.xml +++ b/addons/mass_mailing/views/mass_mailing.xml @@ -572,7 +572,7 @@
- +
diff --git a/addons/sale/i18n/sale.pot b/addons/sale/i18n/sale.pot index 4667e8a5aec..e158af64e08 100644 --- a/addons/sale/i18n/sale.pot +++ b/addons/sale/i18n/sale.pot @@ -812,6 +812,7 @@ msgstr "" #. module: sale #: model:ir.ui.menu,name:sale.menu_sale_invoicing +#: model:ir.ui.view,arch_db:sale.crm_team_salesteams_view_kanban #: model:ir.ui.view,arch_db:sale.view_order_form msgid "Invoicing" msgstr "" diff --git a/addons/sale/sales_team_dashboard.xml b/addons/sale/sales_team_dashboard.xml index c4b5c851200..fe1f1d7192c 100644 --- a/addons/sale/sales_team_dashboard.xml +++ b/addons/sale/sales_team_dashboard.xml @@ -47,7 +47,7 @@
- +
Click to define a team target diff --git a/addons/web_kanban/static/src/js/kanban_widgets.js b/addons/web_kanban/static/src/js/kanban_widgets.js index 5062ccc62e0..014e50dec3f 100644 --- a/addons/web_kanban/static/src/js/kanban_widgets.js +++ b/addons/web_kanban/static/src/js/kanban_widgets.js @@ -10,6 +10,7 @@ var Registry = require('web.Registry'); var session = require('web.session'); var Widget = require('web.Widget'); var QWeb = core.qweb; +var _t = core._t; /** * Interface to be implemented by kanban fields. * @@ -168,11 +169,13 @@ var KanbanAttachmentImage = AbstractField.extend({ /** * Kanban widgets: ProgressBar + * parameters + * - title: title of the gauge, displayed on top of the gauge * options * - editable: boolean if current_value is editable * - current_value: get the current_value from the field that must be present in the view * - max_value: get the max_value from the field that must be present in the view - * - title: title of the gauge, displayed on top of the gauge + * - title: title of the gauge, displayed on top of the gauge --> not translated, use parameter "title" instead * - on_change: action to call when cliking and setting a value */ var KanbanProgressBar = AbstractField.extend({ @@ -192,7 +195,7 @@ var KanbanProgressBar = AbstractField.extend({ readonly: true, value: record[this.options.current_value].raw_value, max_value: record[this.options.max_value].raw_value, - title: this.options.title, + title: _t(node && node[0].title || this.options.title), edit_max_value: this.options.edit_max_value, }); From de9c2135a63851106818d052e29326e73ad0b418 Mon Sep 17 00:00:00 2001 From: Aaron Bohy Date: Tue, 19 Jan 2016 09:24:21 +0100 Subject: [PATCH 12/44] [FIX] im_livechat,mail: external lib: missing dependency @navbar-height was used in chat_window.less since rev. 8397abd but wasn't defined in the external_lib bundle (light bundle to embed im_livechat in external pages). This rev. also fixes some glitches of the chat window due to missing font-awesome, and global rule 'box-sizing: border-box' on all elements. --- .../src/less/im_livechat_bootstrap.less | 27 ++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/addons/im_livechat/static/src/less/im_livechat_bootstrap.less b/addons/im_livechat/static/src/less/im_livechat_bootstrap.less index 83c3bfb7757..8df74c9796d 100644 --- a/addons/im_livechat/static/src/less/im_livechat_bootstrap.less +++ b/addons/im_livechat/static/src/less/im_livechat_bootstrap.less @@ -1,7 +1,32 @@ -// bootstrap variables needed for embedding of im_livechat outside website +// bootstrap variables and vendor prefixes needed to embed im_livechat in external pages @gray-light: lighten(#000, 46.7%); // #777 @gray-lighter: lighten(#000, 93.5%); // #eee @screen-xs-max: 767px; +@navbar-height: 44px; .text-muted { color: @gray-light; } +.box-sizing(@boxmodel) { + -webkit-box-sizing: @boxmodel; + -moz-box-sizing: @boxmodel; + box-sizing: @boxmodel; +} + +.o_chat_window { + &,* { + .box-sizing(border-box); + } + .o_chat_header { + height: 28px; + .fa-close { + text-decoration: none; + font-weight: bold; + &:before { + content: "X"; + } + } + > span { + margin: auto 0; + } + } +} From 5b338b665e636690ac3fd1d2a56df8b56922a842 Mon Sep 17 00:00:00 2001 From: Aaron Bohy Date: Tue, 19 Jan 2016 10:21:49 +0100 Subject: [PATCH 13/44] [FIX] im_livechat: external loader: server_url undefined Since rev. 100d604, the web.session module is always loaded in external pages, even if no operator is available. Thus, server_url should always be computed. --- addons/im_livechat/models/im_livechat_channel.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/im_livechat/models/im_livechat_channel.py b/addons/im_livechat/models/im_livechat_channel.py index 7a664654f23..c4f66518c50 100644 --- a/addons/im_livechat/models/im_livechat_channel.py +++ b/addons/im_livechat/models/im_livechat_channel.py @@ -194,8 +194,8 @@ class ImLivechatChannel(models.Model): def get_livechat_info(self, channel_id, username='Visitor'): info = {} info['available'] = len(self.browse(channel_id).get_available_users()) > 0 + info['server_url'] = self.env['ir.config_parameter'].get_param('web.base.url') if info['available']: - info['server_url'] = self.env['ir.config_parameter'].get_param('web.base.url') info['options'] = self.sudo().get_channel_infos(channel_id) info['options']["default_username"] = username return info From 44ac7903cc7027eb76ad428c7255f51c7195eed6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9ry=20Debongnie?= Date: Tue, 19 Jan 2016 15:29:27 +0100 Subject: [PATCH 14/44] [FIX] mail: prevent crash when interacting with inactive partner when a user is disaninactivated, it makes sense to disaninactivate his/her corresponding res_partner. This had the unfortunate effect of changing the result of the channel_slot call for the direct messages with this user. As a result, the discuss interface was not happy. This commit does what it needs to keep the discuss interface happy. That's what we want, right? --- addons/mail/models/mail_channel.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/addons/mail/models/mail_channel.py b/addons/mail/models/mail_channel.py index c19a18e8107..5dffc85c736 100644 --- a/addons/mail/models/mail_channel.py +++ b/addons/mail/models/mail_channel.py @@ -312,7 +312,11 @@ class Channel(models.Model): info['info'] = extra_info # add the partner for 'direct mesage' channel if channel.channel_type == 'chat': - info['direct_partner'] = channel.sudo().channel_partner_ids.filtered(lambda p: p.id != self.env.user.partner_id.id).read(['id', 'name', 'im_status']) + info['direct_partner'] = (channel.sudo() + .with_context(active_test=False) + .channel_partner_ids + .filtered(lambda p: p.id != self.env.user.partner_id.id) + .read(['id', 'name', 'im_status'])) # add user session state, if available and if user is logged if partner_channels.ids: partner_channel = partner_channels.filtered(lambda c: channel.id == c.channel_id.id) From e5112ee00b1e552ab9127c910862accc4c9720c1 Mon Sep 17 00:00:00 2001 From: Christophe Matthieu Date: Wed, 20 Jan 2016 00:14:00 +0100 Subject: [PATCH 15/44] [FIX] web_editor: use iframe only for html widget with style-inline mode --- addons/web_editor/static/src/js/backend.js | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/addons/web_editor/static/src/js/backend.js b/addons/web_editor/static/src/js/backend.js index 6fe895b154b..b4e0898613d 100644 --- a/addons/web_editor/static/src/js/backend.js +++ b/addons/web_editor/static/src/js/backend.js @@ -65,12 +65,17 @@ var FieldTextHtmlSimple = widget.extend({ this.$content = $(); if (this.get("effective_readonly")) { - this.$textarea.hide().after('