From 0d19ee989d1d890860adaf360de204eb543136a5 Mon Sep 17 00:00:00 2001 From: Nicolas Martinelli Date: Wed, 15 Jun 2016 14:05:35 +0200 Subject: [PATCH 01/22] [FIX] barcodes: manage several barcode widgets In some cases, several barcode widgets can be found on the same page. This is for example the case of the stock picking: there is a widget on the `stock.picking` model (main view) itself, and a widget on the `stock.pack.operation` model (modal view). In this case, when the focus is not set directly on the field which needs to be filled in, both widgets will trigger a `barcode_scanned` scanned event. This will call the `on_barcode_scanned` Python method which can lead to errors/warning. For example, the `on_barcode_scanned` method on the `stock.picking` model raises a warning in case the barcode scanned does not match any product/package. The fix is to make sure that the event target is located in the correct DOM element. opw-677506 --- addons/barcodes/static/src/js/barcode_events.js | 4 +++- addons/barcodes/static/src/js/barcode_handler_mixin.js | 9 +++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/addons/barcodes/static/src/js/barcode_events.js b/addons/barcodes/static/src/js/barcode_events.js index 9ca93c18f3f..546faee3655 100644 --- a/addons/barcodes/static/src/js/barcode_events.js +++ b/addons/barcodes/static/src/js/barcode_events.js @@ -36,7 +36,9 @@ var BarcodeEvents = core.Class.extend(mixins.PropertiesMixin, { if (match) { var barcode = match[1]; - core.bus.trigger('barcode_scanned', barcode); + // Send the target in case there are several barcode widgets on the same page (e.g. + // registering the lot numbers in a stock picking) + core.bus.trigger('barcode_scanned', barcode, this.buffered_key_events[0].target); // Dispatch a barcode_scanned DOM event to elements that have barcode_events="true" set. if (this.buffered_key_events[0].target.getAttribute("barcode_events") === "true") diff --git a/addons/barcodes/static/src/js/barcode_handler_mixin.js b/addons/barcodes/static/src/js/barcode_handler_mixin.js index 5b01516788f..0a9480a979f 100644 --- a/addons/barcodes/static/src/js/barcode_handler_mixin.js +++ b/addons/barcodes/static/src/js/barcode_handler_mixin.js @@ -13,8 +13,13 @@ return { init: function() { var self = this; this._super.apply(this, arguments); - this.__on_barcode_scanned = function () { - self.on_barcode_scanned.apply(self, arguments); + this.__on_barcode_scanned = function (barcode, target) { + // Handle the case where there are several barcode widgets on the same page. Since the + // event is global on the page, all barcode widgets will be triggered. However, we only + // want to keep the event on the target widget. + if ($.contains(target, self.el)) { + self.on_barcode_scanned.call(self, barcode); + } }; this.start_listening(); // Handlers inside a View managed by a ViewManager only listen to barcode events while their view is displayed From 72d03e8fceb262e6e551f5289bf72c585b6cacbb Mon Sep 17 00:00:00 2001 From: Jeremy Kersten Date: Wed, 15 Jun 2016 16:52:25 +0200 Subject: [PATCH 02/22] [FIX] website_portal: check optional field --- addons/website_portal/controllers/main.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/addons/website_portal/controllers/main.py b/addons/website_portal/controllers/main.py index a11adac2ab4..05627e83416 100644 --- a/addons/website_portal/controllers/main.py +++ b/addons/website_portal/controllers/main.py @@ -60,6 +60,7 @@ class website_account(http.Controller): error_message = [] mandatory_billing_fields = ["name", "phone", "email", "street2", "city", "country_id"] + optional_billing_fields = ["zipcode", "state_id", "vat", "street"] # Validation for field_name in mandatory_billing_fields: @@ -86,4 +87,9 @@ class website_account(http.Controller): if [err for err in error.values() if err == 'missing']: error_message.append(_('Some required fields are empty.')) + unknown = [k for k in data.iterkeys() if k not in mandatory_billing_fields + optional_billing_fields] + if unknown: + error['common'] = 'Unknown field' + error_message.append("Unknown field '%s'" % ','.join(unknown)) + return error, error_message From ff95ea976d47e0b9a1283250c92ff066648fc830 Mon Sep 17 00:00:00 2001 From: Stephane Le Cornec Date: Mon, 13 Jun 2016 15:22:09 -0400 Subject: [PATCH 03/22] [CLA] Microcom.ca CCLA: Microcom Informatique Inc., Montreal Closes #12398 --- doc/cla/corporate/microcom.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 doc/cla/corporate/microcom.md diff --git a/doc/cla/corporate/microcom.md b/doc/cla/corporate/microcom.md new file mode 100644 index 00000000000..819259990dd --- /dev/null +++ b/doc/cla/corporate/microcom.md @@ -0,0 +1,20 @@ +Canada, 2016-06-09 + +Microcom agrees to the terms of the Odoo Corporate Contributor License +Agreement v1.0. + +I declare that I am authorized and able to make this agreement and sign this +declaration. + +Signed, + +Martin Malorni mmalorni@gmail.com https://github.com/mmalorni + +List of contributors: + +- Vincent Coll vincentgagnnoncoll@gmail.com https://github.com/vincentcoll +- Stéphane Le Cornec stephane.lecornec@gmail.com https://github.com/coleste +- Eric Lemire elemire@users.noreply.github.com https://github.com/elemire +- Martin Malorni mmalorni@gmail.com https://github.com/mmalorni +- Gregory Savoie gs.microcom@gmail.com https://github.com/gregsavoie +- Noreddine Ben Jillali nbj.microcom@gmail.com https://github.com/nbj-microcom From ef5dbac5293bf000b8bc3122f74fcd06b1848cb9 Mon Sep 17 00:00:00 2001 From: Nicolas Martinelli Date: Wed, 15 Jun 2016 16:19:51 +0200 Subject: [PATCH 04/22] [FIX] sale: SO name In v8, the field "Order Reference" was part of the "Import-Compatible Export" fields. This is not the case anymore in v9 since the field is always read-only. The fix uses the same logic than v8: dedine the field as non-readonly for state "Draft" in the model, but always set it to readonly in the view. opw-676095 --- addons/sale/sale.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/sale/sale.py b/addons/sale/sale.py index d5ec1833bab..351b6d0602f 100644 --- a/addons/sale/sale.py +++ b/addons/sale/sale.py @@ -98,7 +98,7 @@ class SaleOrder(models.Model): for order in self: order.order_line._compute_tax_id() - name = fields.Char(string='Order Reference', required=True, copy=False, readonly=True, index=True, default=lambda self: _('New')) + name = fields.Char(string='Order Reference', required=True, copy=False, readonly=True, states={'draft': [('readonly', False)]}, index=True, default=lambda self: _('New')) origin = fields.Char(string='Source Document', help="Reference of the document that generated this sales order request.") client_order_ref = fields.Char(string='Customer Reference', copy=False) From fad2dc8ac4bda5efb49ae69fe27396eb0cebf20a Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Thu, 16 Jun 2016 10:27:03 +0200 Subject: [PATCH 05/22] [FIX] account: statement line reconciliation cancel On the cancelation of a bank statement line reconciled with journal items created by the registering a payment, in addition to unbind the move with the statement line, the statement must be unbind from the move, and the payment must be reset to posted. opw-680128 --- addons/account/models/account_bank_statement.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/addons/account/models/account_bank_statement.py b/addons/account/models/account_bank_statement.py index 367fbc13800..562102cf869 100644 --- a/addons/account/models/account_bank_statement.py +++ b/addons/account/models/account_bank_statement.py @@ -421,20 +421,28 @@ class AccountBankStatementLine(models.Model): def button_cancel_reconciliation(self): moves_to_unbind = self.env['account.move'] moves_to_cancel = self.env['account.move'] + payment_to_unreconcile = self.env['account.payment'] for st_line in self: moves_to_unbind |= st_line.journal_entry_ids for move in st_line.journal_entry_ids: if any(line.payment_id for line in move.line_ids): + for line in move.line_ids: + payment_to_unreconcile |= line.payment_id continue moves_to_cancel |= st_line.journal_entry_ids if moves_to_unbind: moves_to_unbind.write({'statement_line_id': False}) + moves_to_unbind.line_ids.filtered(lambda x:x.statement_id == st_line.statement_id).write({'statement_id': False}) + if moves_to_cancel: for move in moves_to_cancel: move.line_ids.remove_move_reconcile() moves_to_cancel.button_cancel() moves_to_cancel.unlink() + if payment_to_unreconcile: + payment_to_unreconcile.write({'state': 'posted'}) + #################################################### # Reconciliation interface methods #################################################### From 87b46450ec5a83fa08fcfad8c74e18fbda3bc3fc Mon Sep 17 00:00:00 2001 From: Goffin Simon Date: Wed, 15 Jun 2016 14:18:49 +0200 Subject: [PATCH 06/22] [FIX] account_extra_reports: date format in Partner Ledger The dates in the Partner Ledger have to be in the date format language used by the user. opw:678575 --- .../account_extra_reports/report/account_partner_ledger.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/addons/account_extra_reports/report/account_partner_ledger.py b/addons/account_extra_reports/report/account_partner_ledger.py index 2bf1c0ca8ca..53b9164f032 100644 --- a/addons/account_extra_reports/report/account_partner_ledger.py +++ b/addons/account_extra_reports/report/account_partner_ledger.py @@ -1,7 +1,9 @@ # -*- coding: utf-8 -*- +from datetime import datetime import time from openerp import api, models +from openerp.tools import DEFAULT_SERVER_DATE_FORMAT class ReportPartnerLedger(models.AbstractModel): @@ -26,7 +28,12 @@ class ReportPartnerLedger(models.AbstractModel): self.env.cr.execute(query, tuple(params)) res = self.env.cr.dictfetchall() sum = 0.0 + lang_code = self.env.context.get('lang') or 'en_US' + lang = self.env['res.lang'] + lang_id = lang._lang_get(lang_code) + date_format = lang.browse(lang_id).date_format for r in res: + r['date'] = datetime.strptime(r['date'], DEFAULT_SERVER_DATE_FORMAT).strftime(date_format) r['displayed_name'] = '-'.join( r[field_name] for field_name in ('move_name', 'ref', 'name') if r[field_name] not in (None, '', '/') From 9114d36414d1b667bee434c549cce595000db99a Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Thu, 16 Jun 2016 12:19:36 +0200 Subject: [PATCH 07/22] [FIX] account: `statement_id` write on multiple journal items Before this revision, this was not possible to write `statment_id` on multiple journal items at a time, as the condition: `if 'statement_id' in vals and self.payment_id:` required `self` to contains only one record --- addons/account/models/account_move.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/addons/account/models/account_move.py b/addons/account/models/account_move.py index 924738d7d5b..e2b9d981543 100644 --- a/addons/account/models/account_move.py +++ b/addons/account/models/account_move.py @@ -1107,10 +1107,11 @@ class AccountMoveLine(models.Model): msg = _('New expected payment date: ') + vals['expected_pay_date'] + '.\n' + vals.get('internal_note', '') self.invoice_id.message_post(body=msg) #TODO: check it is an internal note (not a regular email)! #when making a reconciliation on an existing liquidity journal item, mark the payment as reconciled - if 'statement_id' in vals and self.payment_id: - # In case of an internal transfer, there are 2 liquidity move lines to match with a bank statement - if all(line.statement_id for line in self.payment_id.move_line_ids.filtered(lambda r: r.id != self.id and r.account_id.internal_type=='liquidity')): - self.payment_id.state = 'reconciled' + for record in self: + if 'statement_id' in vals and record.payment_id: + # In case of an internal transfer, there are 2 liquidity move lines to match with a bank statement + if all(line.statement_id for line in record.payment_id.move_line_ids.filtered(lambda r: r.id != record.id and r.account_id.internal_type=='liquidity')): + record.payment_id.state = 'reconciled' result = super(AccountMoveLine, self).write(vals) if self._context.get('check_move_validity', True): From 26dfe8944d7c113a2d3ba1694c6975924f0447a2 Mon Sep 17 00:00:00 2001 From: qdp-odoo Date: Thu, 16 Jun 2016 14:26:46 +0200 Subject: [PATCH 08/22] [FIX] account: in bank statement reconciliation widget, searching on a given amount now also return blue lines with that amount (previously it was only looking on payable/receivable lines) --- addons/account/models/account_move.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/addons/account/models/account_move.py b/addons/account/models/account_move.py index e2b9d981543..bf898d17ff6 100644 --- a/addons/account/models/account_move.py +++ b/addons/account/models/account_move.py @@ -583,7 +583,14 @@ class AccountMoveLine(models.Model): ] try: amount = float(str) - amount_domain = ['|', ('amount_residual', '=', amount), '|', ('amount_residual_currency', '=', amount), '|', ('amount_residual', '=', -amount), ('amount_residual_currency', '=', -amount)] + amount_domain = [ + '|', ('amount_residual', '=', amount), + '|', ('amount_residual_currency', '=', amount), + '|', ('amount_residual', '=', -amount), + '|', ('amount_residual_currency', '=', -amount), + '&', ('account_id.internal_type', '=', 'liquidity'), + '|', '|', ('debit', '=', amount), ('credit', '=', amount), ('amount_currency', '=', amount), + ] str_domain = expression.OR([str_domain, amount_domain]) except: pass From a59703e6527678a62ba9b8344645448f0ac61c21 Mon Sep 17 00:00:00 2001 From: qdp-odoo Date: Thu, 16 Jun 2016 14:30:20 +0200 Subject: [PATCH 09/22] [FIX] account: on opening of bank statement reconciliation widget, don't make automatic reconciliation if we have only one open invoice but also an unreconciled payment line (blue line) with the same amount --- addons/account/models/account_bank_statement.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/addons/account/models/account_bank_statement.py b/addons/account/models/account_bank_statement.py index 562102cf869..a163368d813 100644 --- a/addons/account/models/account_bank_statement.py +++ b/addons/account/models/account_bank_statement.py @@ -574,7 +574,18 @@ class AccountBankStatementLine(models.Model): else: domain = [(f, '>', 0), (f, '<', amount)] elif comparator == '=': - domain = [(f, '=', float_round(amount, precision_digits=p))] + if f == 'amount_residual': + domain = [ + '|', (f, '=', float_round(amount, precision_digits=p)), + '&', ('account_id.internal_type', '=', 'liquidity'), + '|', ('debit', '=', amount), ('credit', '=', amount), + ] + else: + domain = [ + '|', (f, '=', float_round(amount, precision_digits=p)), + '&', ('account_id.internal_type', '=', 'liquidity'), + ('amount_currency', '=', amount), + ] else: raise UserError(_("Programmation error : domain_maker_move_line_amount requires comparator '=' or '<'")) domain += [('currency_id', '=', c)] From f7ec48b6dff7ae89104a369494f5825083a44bd2 Mon Sep 17 00:00:00 2001 From: Nicolas Lempereur Date: Thu, 16 Jun 2016 15:29:05 +0200 Subject: [PATCH 10/22] [FIX] crm: needed _order for group by crm.stage When grouping result the BaseModel method _read_group_fill_results add the possible groups which had no result. But, if the order of the group is not consistent, we can get really wrong results. The code logic is expecting that the grouped result gotten and the list of groups (returned by _read_group_stage_ids of crm.lead) is in the same order. If the _order attribute of the model is not enough specific (as was the case in crm.stage) the inconsistent order would kill aggregation values (displaying 0 instead of what should have been present). opw-680952 --- addons/crm/crm_stage.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/crm/crm_stage.py b/addons/crm/crm_stage.py index 92fb1efa05d..d6fa3e74cce 100644 --- a/addons/crm/crm_stage.py +++ b/addons/crm/crm_stage.py @@ -20,7 +20,7 @@ class crm_stage(osv.Model): _name = "crm.stage" _description = "Stage of case" _rec_name = 'name' - _order = "sequence" + _order = "sequence, name, id" def _default_team_ids(self, cr, uid, context=None): return context.get('default_team_id') and [(6, 0, [context['default_team_id']])] or False From 6b1bff4ee9a0170adeef6af50139d1c8e04403d0 Mon Sep 17 00:00:00 2001 From: Cedric Snauwaert Date: Thu, 16 Jun 2016 13:55:36 +0200 Subject: [PATCH 11/22] [FIX] account: fix condition to create exchange_rate_entries, in some case we don't want to create one Typically when sum(debit) = sum(credit) and sum(amount_currency) = 0 --- addons/account/models/account_move.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/addons/account/models/account_move.py b/addons/account/models/account_move.py index bf898d17ff6..1375c02e574 100644 --- a/addons/account/models/account_move.py +++ b/addons/account/models/account_move.py @@ -1370,6 +1370,9 @@ class AccountPartialReconcile(models.Model): partial_rec_set[x] = None #then, if the total debit and credit are equal, or the total amount in currency is 0, the reconciliation is full if currency and aml_to_balance and (float_is_zero(total_amount_currency, precision_rounding=currency.rounding) or float_compare(total_debit, total_credit, precision_rounding=currency.rounding) == 0): + # If both condition are satisfied, no need to create exchange rate entry + if float_is_zero(total_amount_currency, precision_rounding=currency.rounding) and float_compare(total_debit, total_credit, precision_rounding=currency.rounding) == 0: + return res #eventually create a journal entry to book the difference due to foreign currency's exchange rate that fluctuates aml_id, partial_rec_id = partial_rec.create_exchange_rate_entry(aml_to_balance, total_debit - total_credit, total_amount_currency, currency, maxdate) return res From b350ee65a45af39e4d07a120354d5eac22919bc7 Mon Sep 17 00:00:00 2001 From: Cedric Snauwaert Date: Thu, 16 Jun 2016 16:44:26 +0200 Subject: [PATCH 12/22] [FIX] account: speed optimization of dashboard when there are too many unreconciled entries, showing dashboard is really slow, switch the computation of unreconciled entries to SQL --- .../models/account_journal_dashboard.py | 21 ++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/addons/account/models/account_journal_dashboard.py b/addons/account/models/account_journal_dashboard.py index 56298bebbba..a4b29bedcfc 100644 --- a/addons/account/models/account_journal_dashboard.py +++ b/addons/account/models/account_journal_dashboard.py @@ -142,11 +142,22 @@ class account_journal(models.Model): if self.type in ['bank', 'cash']: last_bank_stmt = self.env['account.bank.statement'].search([('journal_id', 'in', self.ids)], order="date desc, id desc", limit=1) last_balance = last_bank_stmt and last_bank_stmt[0].balance_end or 0 - ac_bnk_stmt = self.env['account.bank.statement'].search([('journal_id', 'in', self.ids),('state', '=', 'open')]) - for ac_bnk in ac_bnk_stmt: - for line in ac_bnk.line_ids: - if not line.journal_entry_ids: - number_to_reconcile += 1 + #Get the number of items to reconcile for that bank journal + self.env.cr.execute("""SELECT COUNT(DISTINCT(statement_line_id)) + FROM account_move where statement_line_id + IN (SELECT line.id + FROM account_bank_statement_line AS line + LEFT JOIN account_bank_statement AS st + ON line.statement_id = st.id + WHERE st.journal_id IN %s and st.state = 'open')""", (tuple(self.ids),)) + already_reconciled = self.env.cr.fetchone()[0] + self.env.cr.execute("""SELECT COUNT(line.id) + FROM account_bank_statement_line AS line + LEFT JOIN account_bank_statement AS st + ON line.statement_id = st.id + WHERE st.journal_id IN %s and st.state = 'open'""", (tuple(self.ids),)) + all_lines = self.env.cr.fetchone()[0] + number_to_reconcile = all_lines - already_reconciled # optimization to read sum of balance from account_move_line account_ids = tuple(filter(None, [self.default_debit_account_id.id, self.default_credit_account_id.id])) if account_ids: From 9c007ac375f5ac34c911030bbedfe6f8a2a57a48 Mon Sep 17 00:00:00 2001 From: Damien Bouvy Date: Fri, 3 Jun 2016 14:52:11 +0200 Subject: [PATCH 13/22] [IMP] db_manager: better uuid management * Always change the uuid of a duplicate database by default * Clearer message when restoring a backup --- addons/web/controllers/main.py | 3 ++- addons/web/views/database_manager.html | 15 ++++++++++++--- openerp/service/db.py | 5 +++++ openerp/tools/misc.py | 9 +++++++++ 4 files changed, 28 insertions(+), 4 deletions(-) diff --git a/addons/web/controllers/main.py b/addons/web/controllers/main.py index 3cd15189496..f9bc7999256 100644 --- a/addons/web/controllers/main.py +++ b/addons/web/controllers/main.py @@ -37,6 +37,7 @@ from openerp.modules import get_resource_path from openerp.tools import topological_sort from openerp.tools.translate import _ from openerp.tools import ustr +from openerp.tools.misc import str2bool from openerp import http from openerp.http import request, serialize_exception as _serialize_exception from openerp.exceptions import AccessError @@ -708,7 +709,7 @@ class Database(http.Controller): def restore(self, master_pwd, backup_file, name, copy=False): try: data = base64.b64encode(backup_file.read()) - request.session.proxy("db").restore(master_pwd, name, data, copy) + request.session.proxy("db").restore(master_pwd, name, data, str2bool(copy)) return http.local_redirect('/web/database/manager') except Exception, e: error = "Database restore error: %s" % e diff --git a/addons/web/views/database_manager.html b/addons/web/views/database_manager.html index ad7076313ae..8b6fd4f09e7 100644 --- a/addons/web/views/database_manager.html +++ b/addons/web/views/database_manager.html @@ -208,10 +208,19 @@
-
+ +

In order to avoid conflicts between databases, Odoo needs to know if this database was moved or copied. + If you don't know, answer "This database is a copy".

+
+
+
+
diff --git a/openerp/service/db.py b/openerp/service/db.py index f0527f0ac44..ed7a6e410d3 100644 --- a/openerp/service/db.py +++ b/openerp/service/db.py @@ -102,6 +102,11 @@ def exp_duplicate_database(db_original_name, db_name): _drop_conn(cr, db_original_name) cr.execute("""CREATE DATABASE "%s" ENCODING 'unicode' TEMPLATE "%s" """ % (db_name, db_original_name)) + registry = openerp.modules.registry.RegistryManager.new(db_name) + with registry.cursor() as cr: + # if it's a copy of a database, force generation of a new dbuuid + registry['ir.config_parameter'].init(cr, force=True) + from_fs = openerp.tools.config.filestore(db_original_name) to_fs = openerp.tools.config.filestore(db_name) if os.path.exists(from_fs) and not os.path.exists(to_fs): diff --git a/openerp/tools/misc.py b/openerp/tools/misc.py index 1e61c2323ee..7f11ad82222 100644 --- a/openerp/tools/misc.py +++ b/openerp/tools/misc.py @@ -566,6 +566,15 @@ def mod10r(number): report = codec[ (int(digit) + report) % 10 ] return result + str((10 - report) % 10) +def str2bool(s, default=None): + s = ustr(s).lower() + y = 'y yes 1 true t on'.split() + n = 'n no 0 false f off'.split() + if s not in (y + n): + if default is None: + raise ValueError('Use 0/1/yes/no/true/false/on/off') + return bool(default) + return s in y def human_size(sz): """ From 225023f1d16e5051434cbc620747fb07bbf26b8f Mon Sep 17 00:00:00 2001 From: Goffin Simon Date: Thu, 16 Jun 2016 10:32:35 +0200 Subject: [PATCH 14/22] [FIX] account: Wrong "amount_currency" in account move line after reconciliation Use case: -enable multi currency (use UDS as company currency and EUR as secondary currency) -create account account in a different currency (EUR) -create journal for the bank account in EUR -create a new tax included tax -create a new bank statement in EUR journal and add one line -reconcile -Choose a counterpart with the included tax and click on reconcile Before the fix: After reconciliation the amount_currency for tax and expense were wrong. You could check this in the journal items linked to the bank statement. Video:https://youtu.be/678rFb4OE2Q opw:680693 --- addons/account/models/account_move.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/addons/account/models/account_move.py b/addons/account/models/account_move.py index 1375c02e574..a465c7567f1 100644 --- a/addons/account/models/account_move.py +++ b/addons/account/models/account_move.py @@ -1057,13 +1057,13 @@ class AccountMoveLine(models.Model): if vals['debit'] != 0.0: vals['debit'] = res['total_excluded'] if vals['credit'] != 0.0: vals['credit'] = -res['total_excluded'] if vals.get('amount_currency'): - vals['amount_currency'] = self.env['res.currency'].browse(vals['currency_id']).round(vals['amount_currency'] * (amount / res['total_excluded'])) + vals['amount_currency'] = self.env['res.currency'].browse(vals['currency_id']).round(vals['amount_currency'] * (res['total_excluded']/amount)) # Create tax lines for tax_vals in res['taxes']: if tax_vals['amount']: account_id = (amount > 0 and tax_vals['account_id'] or tax_vals['refund_account_id']) if not account_id: account_id = vals['account_id'] - tax_lines_vals.append({ + temp = { 'account_id': account_id, 'name': vals['name'] + ' ' + tax_vals['name'], 'tax_line_id': tax_vals['id'], @@ -1072,7 +1072,12 @@ class AccountMoveLine(models.Model): 'statement_id': vals.get('statement_id'), 'debit': tax_vals['amount'] > 0 and tax_vals['amount'] or 0.0, 'credit': tax_vals['amount'] < 0 and -tax_vals['amount'] or 0.0, - }) + } + bank = self.env["account.bank.statement"].browse(vals.get('statement_id')) + if bank.currency_id != bank.company_id.currency_id: + temp['currency_id'] = bank.currency_id.id + temp['amount_currency'] = bank.company_id.currency_id.compute(tax_vals['amount'], bank.currency_id, round=True) + tax_lines_vals.append(temp) new_line = super(AccountMoveLine, self).create(vals) for tax_line_vals in tax_lines_vals: From 8ca505d6f60e5b0a799747b676209841d97b6aa8 Mon Sep 17 00:00:00 2001 From: Ross Golder Date: Sat, 26 Mar 2016 09:27:43 +0700 Subject: [PATCH 15/22] [CLA] Signature for rossigee Closes #11488 --- doc/cla/individual/rossigee.md | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 doc/cla/individual/rossigee.md diff --git a/doc/cla/individual/rossigee.md b/doc/cla/individual/rossigee.md new file mode 100644 index 00000000000..4cc35956206 --- /dev/null +++ b/doc/cla/individual/rossigee.md @@ -0,0 +1,11 @@ +Thailand, 2016-03-26 + +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, + +Ross Golder ross@golder.org https://github.com/rossigee From 9a20889fd29f8dc2e5cbadb18a811cef86d9b504 Mon Sep 17 00:00:00 2001 From: Sharjeel Ali Shaukat Date: Thu, 5 May 2016 12:05:55 +0500 Subject: [PATCH 16/22] [CLA] signature for salishaukat Closes #11940 --- doc/cla/individual/salishaukat.md | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 doc/cla/individual/salishaukat.md diff --git a/doc/cla/individual/salishaukat.md b/doc/cla/individual/salishaukat.md new file mode 100644 index 00000000000..21f1c734a45 --- /dev/null +++ b/doc/cla/individual/salishaukat.md @@ -0,0 +1,11 @@ + + +Pakistan, 2016-05-05 + +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, + +Sharjeel Ali Shaukat as_ns2002@hotmail.com https://github.com/salishaukat From 4beb1a9f7e876cb62fa45e91fbb4243f982d4ae6 Mon Sep 17 00:00:00 2001 From: Telnet Data Date: Tue, 23 Feb 2016 15:04:35 +0100 Subject: [PATCH 17/22] [CLA] Corporate signature for Telnet Servizi Srl Closes #11070 --- doc/cla/corporate/telnet_servizi_srl.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 doc/cla/corporate/telnet_servizi_srl.md diff --git a/doc/cla/corporate/telnet_servizi_srl.md b/doc/cla/corporate/telnet_servizi_srl.md new file mode 100644 index 00000000000..0178e1ce407 --- /dev/null +++ b/doc/cla/corporate/telnet_servizi_srl.md @@ -0,0 +1,16 @@ +Italy, 2016-02-23 + +Telnet Servizi Srl agrees to the terms of the Odoo Corporate Contributor License +Agreement v1.0. + +I declare that I am authorized and able to make this agreement and sign this +declaration. + +Signed, + +Telnet Data github@telnetservizi.it https://github.com/telnetdata + +List of contributors: + +Telnet Data github@telnetservizi.it https://github.com/telnetdata +Matteo Cantarutti cantarutti.matteo@live.it https://github.com/mteok From 41da40d49c1724cb769768f3821cbbc7d7c220b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jarmo=20Kortetj=C3=A4rvi?= Date: Thu, 18 Feb 2016 16:22:51 +0200 Subject: [PATCH 18/22] [CLA] Signature for jarmokortetjarvi Closes #10997 --- doc/cla/individual/jarmokortetjarvi.md | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 doc/cla/individual/jarmokortetjarvi.md diff --git a/doc/cla/individual/jarmokortetjarvi.md b/doc/cla/individual/jarmokortetjarvi.md new file mode 100644 index 00000000000..523d2857af2 --- /dev/null +++ b/doc/cla/individual/jarmokortetjarvi.md @@ -0,0 +1,11 @@ +Finland, 2016-02-18 + +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, + +Jarmo Kortetjärvi jarmo.kortetjarvi@gmail.com https://github.com/jarmokortetjarvi From 46867bbbce454df19845956a11447c6283caa6dc Mon Sep 17 00:00:00 2001 From: Ramon Bartl Date: Mon, 2 May 2016 18:25:06 +0200 Subject: [PATCH 19/22] [CLA] Corporate signature for RIDING BYTES Closes #11888 --- doc/cla/corporate/ridingbytes.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 doc/cla/corporate/ridingbytes.md diff --git a/doc/cla/corporate/ridingbytes.md b/doc/cla/corporate/ridingbytes.md new file mode 100644 index 00000000000..9abfb539d20 --- /dev/null +++ b/doc/cla/corporate/ridingbytes.md @@ -0,0 +1,15 @@ +Germany, 2016-05-02 + +RIDING BYTES agrees to the terms of the Odoo Corporate Contributor License +Agreement v1.0. + +I declare that I am authorized and able to make this agreement and sign this +declaration. + +Signed, + +Ramon Bartl, rb@ridingbytes.com https://github.com/ridingbytes + +List of contributors: + +Ramon Bartl, rb@ridingbytes.com https://github.com/ramonski From 4bb5110926123b42183cf195cec9636b32d87c27 Mon Sep 17 00:00:00 2001 From: Nicolas Martinelli Date: Thu, 16 Jun 2016 10:30:23 +0200 Subject: [PATCH 20/22] [FIX] website_livechat: prevent traceback If no image is defined for the channel, the template rendering will crash since it will concatenate a string and a boolean. opw-680938 --- addons/website_livechat/views/website_livechat.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/website_livechat/views/website_livechat.xml b/addons/website_livechat/views/website_livechat.xml index bad2c5c651e..fe1b71550c2 100644 --- a/addons/website_livechat/views/website_livechat.xml +++ b/addons/website_livechat/views/website_livechat.xml @@ -157,7 +157,7 @@
- +

From a9ea4e7cab244f2a6527b9ea5bef4aefa4e486cf Mon Sep 17 00:00:00 2001 From: Khwunchai J Date: Fri, 17 Jun 2016 13:01:57 +0700 Subject: [PATCH 21/22] [FIX] web_settings_dashboard: Incorrected plural form of "Active Users" Odoo add the extra letter "s" to the translated word "Active User". This is caused by adding "s" at the end of the word directly from the template, which makes no sense in many language. This prohibits translators from translating the plural form in any language. The plural form and singular form of "Active User" should be translate separately. Fixes #12469 Closes #12470 --- .../i18n/web_settings_dashboard.pot | 15 +++++++++++---- .../static/src/xml/dashboard.xml | 4 +++- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/addons/web_settings_dashboard/i18n/web_settings_dashboard.pot b/addons/web_settings_dashboard/i18n/web_settings_dashboard.pot index 6ddf7cee78b..c9a10eb48d7 100644 --- a/addons/web_settings_dashboard/i18n/web_settings_dashboard.pot +++ b/addons/web_settings_dashboard/i18n/web_settings_dashboard.pot @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 9.0c\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-01-28 12:13+0000\n" -"PO-Revision-Date: 2016-01-28 12:13+0000\n" +"POT-Creation-Date: 2016-06-17 08:01+0000\n" +"PO-Revision-Date: 2016-06-17 08:01+0000\n" "Last-Translator: <>\n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -25,14 +25,21 @@ msgstr "" #. module: web_settings_dashboard #. openerp-web -#: code:addons/web_settings_dashboard/static/src/xml/dashboard.xml:49 +#: code:addons/web_settings_dashboard/static/src/xml/dashboard.xml:56 #, python-format msgid "Active User" msgstr "" #. module: web_settings_dashboard #. openerp-web -#: code:addons/web_settings_dashboard/static/src/xml/dashboard.xml:9 +#: code:addons/web_settings_dashboard/static/src/xml/dashboard.xml:57 +#, python-format +msgid "Active Users" +msgstr "" + +#. module: web_settings_dashboard +#. openerp-web +#: code:addons/web_settings_dashboard/static/src/xml/dashboard.xml:42 #, python-format msgid "App store" msgstr "" diff --git a/addons/web_settings_dashboard/static/src/xml/dashboard.xml b/addons/web_settings_dashboard/static/src/xml/dashboard.xml index 5f9f9eee309..796629860d7 100644 --- a/addons/web_settings_dashboard/static/src/xml/dashboard.xml +++ b/addons/web_settings_dashboard/static/src/xml/dashboard.xml @@ -52,7 +52,9 @@ - Active Users + + Active User + Active Users
From 8284c7389f8591d287ed9050f38737340a69b513 Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Fri, 17 Jun 2016 11:09:44 +0200 Subject: [PATCH 22/22] [FIX] website_quote: avoid setting unknow field The field `delay` on `sale.order.line` has been renamed into `customer_delay` and is already set. This revert commit d0d3ba921d0d20fb9ea3e7053eb70d94b61f1892. --- addons/website_quote/models/order.py | 1 - 1 file changed, 1 deletion(-) diff --git a/addons/website_quote/models/order.py b/addons/website_quote/models/order.py index 188045831f5..8af74a76149 100644 --- a/addons/website_quote/models/order.py +++ b/addons/website_quote/models/order.py @@ -217,7 +217,6 @@ class sale_order(osv.osv): 'website_description': line.website_description, 'state': 'draft', 'customer_lead': self._get_customer_lead(cr, uid, line.product_id.product_tmpl_id), - 'delay': line.product_id.sale_delay }) lines.append((0, 0, data)) options = []