summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authorNicolas Martinelli <nim@odoo.com>2020-09-30 14:21:58 +0000
committerNicolas Martinelli <nim@odoo.com>2020-09-30 14:32:45 +0000
commit5053183ac7612d9cf2247b84ec6e0aac5974fd85 (patch)
treeb53da7001d5797a0d6558b448f9a5beb11fc34e4 /addons
parentfaea1fec6b0a8571e5f61c1a891cfa708b0a9075 (diff)
[FIX] account: mail alias creation
- Install accounting - Create a company with a '.' as last character of the name, e.g. 'Test Inc.' - Set the Fiscal Localization for the company An error occurs: "You cannot use anything else than unaccented latin characters in the alias address." This happens because we try to create the alias `test-inc..inv`: `..` is not allowed by the RFC 3696. We replace the `.` by `-` which is a supported character in the localpart. opw-2347965 closes odoo/odoo#58893 Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Diffstat (limited to 'addons')
-rw-r--r--addons/account/models/account_journal.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/account/models/account_journal.py b/addons/account/models/account_journal.py
index 46dbb0ac76b..f4d9180e617 100644
--- a/addons/account/models/account_journal.py
+++ b/addons/account/models/account_journal.py
@@ -545,7 +545,7 @@ class AccountJournal(models.Model):
# === Fill missing alias name ===
if journal_type in ('sale', 'purchase') and 'alias_name' not in vals:
- vals['alias_name'] = '%s.%s' % (company.name, vals.get('code'))
+ vals['alias_name'] = '%s-%s' % (company.name, vals.get('code'))
@api.model
def create(self, vals):