From ffd43386393f493cd098339c9cb3f812dea1dd5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9ry=20Debongnie?= Date: Wed, 23 Aug 2017 10:56:57 +0200 Subject: [PATCH 1/4] [FIX] web_kanban: allow special chaaracters in kanban tooltip --- addons/web_kanban/static/src/js/kanban_column.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/addons/web_kanban/static/src/js/kanban_column.js b/addons/web_kanban/static/src/js/kanban_column.js index f848c266944..b4fa2e8d010 100644 --- a/addons/web_kanban/static/src/js/kanban_column.js +++ b/addons/web_kanban/static/src/js/kanban_column.js @@ -65,9 +65,10 @@ var KanbanColumn = Widget.extend({ }); var self = this; - if (group_data.options && group_data.options.group_by_tooltip) { - this.tooltip_info = _.map(group_data.options.group_by_tooltip, function (key, value, list) { - return (self.values && self.values[value] && "
" +key + "
" + self.values[value] + "
") || ''; + if (group_data.options && group_data.options.group_by_tooltip && this.values) { + this.tooltip_info = _.map(group_data.options.group_by_tooltip, function (key, value) { + if (!self.values[value]) { return ''; } + return $('
').text(key + '
' + self.values[value]).text(); }).join(''); } else { this.tooltip_info = ""; From 11c523f69357b850cabf6c238d9d4f40d43b3d77 Mon Sep 17 00:00:00 2001 From: Do Vuong Tien Date: Thu, 24 Aug 2017 12:28:03 +0700 Subject: [PATCH 2/4] [CLA] Signature for vuongtien2411 Done at #19025 --- doc/cla/individual/vuongtien2411.md | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 doc/cla/individual/vuongtien2411.md diff --git a/doc/cla/individual/vuongtien2411.md b/doc/cla/individual/vuongtien2411.md new file mode 100644 index 00000000000..821a9881a43 --- /dev/null +++ b/doc/cla/individual/vuongtien2411.md @@ -0,0 +1,11 @@ +Vietnam, 2017-08-24 + +I hereby agree to the terms of the Odoo Individual Contributor License +Agreement v1.0. + +I declare that I am authorized and able to make this agreement and sign this +declaration. + +Signed, + +Do Vuong Tien tiendv@trobz.com https://github.com/vuongtien2411 From dedff1842b7ea3ae3f2b0935ab0684201cc4aac0 Mon Sep 17 00:00:00 2001 From: Nicolas Martinelli Date: Fri, 2 Dec 2016 14:19:30 +0100 Subject: [PATCH 3/4] [FIX] account: account domain in reconciliation In the reconciliation widget, create a counterpart line. No domain is applied on the "Account" field regarding the company, meaning that we can select an account from any company. opw-694149 --- addons/account/models/account_journal_dashboard.py | 4 ++-- .../account/static/src/js/account_reconciliation_widgets.js | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/addons/account/models/account_journal_dashboard.py b/addons/account/models/account_journal_dashboard.py index 505442c36dd..edb2e5a01ff 100644 --- a/addons/account/models/account_journal_dashboard.py +++ b/addons/account/models/account_journal_dashboard.py @@ -264,11 +264,11 @@ class account_journal(models.Model): return { 'type': 'ir.actions.client', 'tag': 'bank_statement_reconciliation_view', - 'context': {'statement_ids': bank_stmt.ids}, + 'context': {'statement_ids': bank_stmt.ids, 'company_ids': self.mapped('company_id').ids}, } else: # Open reconciliation view for customers/suppliers - action_context = {'show_mode_selector': False} + action_context = {'show_mode_selector': False, 'company_ids': self.mapped('company_id').ids} if self.type == 'sale': action_context.update({'mode': 'customers'}) elif self.type == 'purchase': diff --git a/addons/account/static/src/js/account_reconciliation_widgets.js b/addons/account/static/src/js/account_reconciliation_widgets.js index dbbb55bddb1..6aacbb24c68 100644 --- a/addons/account/static/src/js/account_reconciliation_widgets.js +++ b/addons/account/static/src/js/account_reconciliation_widgets.js @@ -91,6 +91,10 @@ var abstractReconciliation = Widget.extend(ControlPanelMixin, { // NB : for presets to work correctly, a field id must be the same string as a preset field this.presets = {}; // Description of the fields to initialize in the "create new line" form + var domain_account_id = [['deprecated', '=', false]]; + if (context && context.context && context.context.company_ids) { + domain_account_id.push(['company_id', 'in', context.context.company_ids]); + } this.create_form_fields = { account_id: { id: "account_id", @@ -103,7 +107,7 @@ var abstractReconciliation = Widget.extend(ControlPanelMixin, { relation: "account.account", string: _t("Account"), type: "many2one", - domain: [['deprecated', '=', false]], + domain: domain_account_id, }, }, label: { From b5aaf0d527cdab794058ccbbf3cd5d215fd9a5af Mon Sep 17 00:00:00 2001 From: Joren Van Onder Date: Mon, 21 Aug 2017 18:34:56 -0700 Subject: [PATCH 4/4] [FIX] point_of_sale: handle fiscal positions that remove taxes A tax can be mapped to nothing, so first check if _map_tax_fiscal_position actually returned something. Fixes #17963 --- addons/point_of_sale/static/src/js/models.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/addons/point_of_sale/static/src/js/models.js b/addons/point_of_sale/static/src/js/models.js index 5d7d96b5178..31c678e107c 100644 --- a/addons/point_of_sale/static/src/js/models.js +++ b/addons/point_of_sale/static/src/js/models.js @@ -1360,6 +1360,9 @@ exports.Orderline = Backbone.Model.extend({ if (!no_map_tax){ tax = self._map_tax_fiscal_position(tax); } + if (!tax){ + return; + } if (tax.amount_type === 'group'){ var ret = self.compute_all(tax.children_tax_ids, price_unit, quantity, currency_rounding); total_excluded = ret.total_excluded;