summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2018-09-13 11:32:43 +0200
committerChristophe Simonis <chs@odoo.com>2018-09-13 11:32:43 +0200
commit7322b7ee56f56dfc534d2ba3a5ab1c88fd5e7feb (patch)
tree5da4943ea914821fc5d0697af971dcca75802366
parent72b2bab8c84e8df9bf410757d3104ddd3d9ddba2 (diff)
parentdd20539ffe36f0c7edba4bbf5b51307f393fb260 (diff)
[MERGE] forward port branch 10.0 up to dd20539ffe3
-rw-r--r--addons/account/models/account_bank_statement.py8
-rw-r--r--doc/cla/corporate/initos.md1
2 files changed, 5 insertions, 4 deletions
diff --git a/addons/account/models/account_bank_statement.py b/addons/account/models/account_bank_statement.py
index 280fbc446eb..f3243ecfafe 100644
--- a/addons/account/models/account_bank_statement.py
+++ b/addons/account/models/account_bank_statement.py
@@ -289,7 +289,7 @@ class AccountBankStatement(models.Model):
WHERE account_id IS NULL AND not exists (select 1 from account_move_line aml where aml.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),)
@@ -317,7 +317,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),)
@@ -618,7 +618,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_repr(float_round(amount, precision_digits=precision), precision_digits=precision),
'partner_id': self.partner_id.id,
@@ -669,7 +669,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,
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