summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2019-07-04 11:39:07 +0200
committerChristophe Simonis <chs@odoo.com>2019-07-04 11:39:07 +0200
commit2c81916f5d65b60f5a5c7b8475dc147e101879af (patch)
tree3c1c27fec24875b046ea304efcc4d7fa5f218b83 /addons
parent59c663ae4252d140d83662e63ee4b6562a98e962 (diff)
parentaaaf32fedd2a3a4e307d765c7fd8b9ddcd2bd5e0 (diff)
[MERGE] forward port branch saas-15 up to aaaf32fedd2
Diffstat (limited to 'addons')
-rw-r--r--addons/account/models/partner.py4
-rw-r--r--addons/l10n_fr_fec/wizard/account_fr_fec.py2
2 files changed, 3 insertions, 3 deletions
diff --git a/addons/account/models/partner.py b/addons/account/models/partner.py
index be10b0bab1a..59d53f2162d 100644
--- a/addons/account/models/partner.py
+++ b/addons/account/models/partner.py
@@ -240,9 +240,9 @@ class ResPartner(models.Model):
LEFT JOIN account_move_line aml ON aml.partner_id = partner.id
RIGHT JOIN account_account acc ON aml.account_id = acc.id
WHERE acc.internal_type = %s
- AND NOT acc.deprecated
+ AND NOT acc.deprecated AND acc.company_id = %s
GROUP BY partner.id
- HAVING %s * COALESCE(SUM(aml.amount_residual), 0) ''' + operator + ''' %s''', (account_type, sign, operand))
+ HAVING %s * COALESCE(SUM(aml.amount_residual), 0) ''' + operator + ''' %s''', (account_type, self.env.user.company_id.id, sign, operand))
res = self._cr.fetchall()
if not res:
return [('id', '=', '0')]
diff --git a/addons/l10n_fr_fec/wizard/account_fr_fec.py b/addons/l10n_fr_fec/wizard/account_fr_fec.py
index 24e35187736..90b5288c71a 100644
--- a/addons/l10n_fr_fec/wizard/account_fr_fec.py
+++ b/addons/l10n_fr_fec/wizard/account_fr_fec.py
@@ -308,7 +308,7 @@ class AccountFrFec(models.TransientModel):
TO_CHAR(am.date, 'YYYYMMDD') AS PieceDate,
CASE WHEN aml.name IS NULL OR aml.name = '' THEN '/'
WHEN aml.name SIMILAR TO '[\t|\s|\n]*' THEN '/'
- ELSE replace(replace(replace(aml.name, '|', '/'), '\t', ''), '\n', '') END AS EcritureLib,
+ ELSE replace(replace(replace(replace(aml.name, '|', '/'), '\t', ''), '\n', ''), '\r', '') END AS EcritureLib,
replace(CASE WHEN aml.debit = 0 THEN '0,00' ELSE to_char(aml.debit, '000000000000000D99') END, '.', ',') AS Debit,
replace(CASE WHEN aml.credit = 0 THEN '0,00' ELSE to_char(aml.credit, '000000000000000D99') END, '.', ',') AS Credit,
CASE WHEN rec.name IS NULL THEN '' ELSE rec.name END AS EcritureLet,