From 60c9742dfbad6c8ce8875a7f373d26e2a0db0c01 Mon Sep 17 00:00:00 2001 From: Frederik Kramer Date: Tue, 28 Aug 2018 16:59:51 +0200 Subject: [PATCH 1/2] [CLA] backport signature for initos This is a backport of 5a53e5b8e9aed4 as requested at #26638 Added Florian Kantelberg to our team of contributors --- doc/cla/corporate/initos.md | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/cla/corporate/initos.md b/doc/cla/corporate/initos.md index 3c95fe2d07f..dd7fb8ea0e5 100644 --- a/doc/cla/corporate/initos.md +++ b/doc/cla/corporate/initos.md @@ -21,3 +21,4 @@ Peter Hahn peter.hahn@initos.com https://github.com/codingforfun Claudia Haida claudia.haida@initos.com Andreas Zöllner andreas.zoellner@initos.com https://github.com/azoellner Rami Alwafaie rami.alwafaie@initos.com https://github.com/rami-wafaie +Florian Kantelberg florian.kantelberg@initos.com https://github.com/fkantelberg From cbdb7383e9a88610ae6552ef0725a54f1aacd625 Mon Sep 17 00:00:00 2001 From: Richard Mathot Date: Thu, 13 Sep 2018 11:00:15 +0200 Subject: [PATCH 2/2] [REV] account: revert 8781286f1c35a7ee97bbb76c7933f24c8afaab43 Causes a traceback "Expected singleton" when opening the Reconciliation from the accounting dashboard --- addons/account/models/account_bank_statement.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/addons/account/models/account_bank_statement.py b/addons/account/models/account_bank_statement.py index cd9d6d70717..e60c0dc09d4 100644 --- a/addons/account/models/account_bank_statement.py +++ b/addons/account/models/account_bank_statement.py @@ -298,7 +298,7 @@ class AccountBankStatement(models.Model): WHERE account_id IS NULL AND not exists (select 1 from account_move m where m.statement_line_id = stl.id) AND company_id = %s """ - params = (self.company_id.id,) + params = (self.env.user.company_id.id,) if statements: sql_query += ' AND stl.statement_id IN %s' params += (tuple(statements.ids),) @@ -323,7 +323,7 @@ class AccountBankStatement(models.Model): ) AND aml.ref IN %s """ - params = (self.company_id.id, (st_lines_left[0].journal_id.default_credit_account_id.id, st_lines_left[0].journal_id.default_debit_account_id.id), tuple(refs)) + params = (self.env.user.company_id.id, (st_lines_left[0].journal_id.default_credit_account_id.id, st_lines_left[0].journal_id.default_debit_account_id.id), tuple(refs)) if statements: sql_query += 'AND stl.id IN %s' params += (tuple(stl_to_assign_partner),) @@ -620,7 +620,7 @@ class AccountBankStatementLine(models.Model): st_line_currency = self.currency_id or self.journal_id.currency_id currency = (st_line_currency and st_line_currency != company_currency) and st_line_currency.id or False precision = st_line_currency and st_line_currency.decimal_places or company_currency.decimal_places - params = {'company_id': self.company_id.id, + params = {'company_id': self.env.user.company_id.id, 'account_payable_receivable': (self.journal_id.default_credit_account_id.id, self.journal_id.default_debit_account_id.id), 'amount': float_round(amount, precision_digits=precision), 'partner_id': self.partner_id.id, @@ -671,7 +671,7 @@ class AccountBankStatementLine(models.Model): st_line_currency = self.currency_id or self.journal_id.currency_id currency = (st_line_currency and st_line_currency != company_currency) and st_line_currency.id or False precision = st_line_currency and st_line_currency.decimal_places or company_currency.decimal_places - params = {'company_id': self.company_id.id, + params = {'company_id': self.env.user.company_id.id, 'account_payable_receivable': (self.journal_id.default_credit_account_id.id, self.journal_id.default_debit_account_id.id), 'amount': float_round(amount, precision_digits=precision), 'partner_id': self.partner_id.id,