31c7a2ff90728baa7c1c2e16a1a88fd1535bd77e
Steps to reproduce:
- Install Accounting app
- Go to the Accounting app
- Go to Configuration > Chart of Accounts and create a New account with a name containing %
- Go to Accounting > Journal Items
- Select a Jounral item and from Actions, choose move to Account
- In the popup displayed, choose the new account created ealier in the To field, and choose a Journal
- Click `Create Journal Entries`, an error arises
Invistigation:
When the `account_target_name` contains a % literal (ex. "test %"), the `transfer_format` beccomes `"{amount} ({debit_credit}) from %s were transferred to <strong>test %</strong> by {link}"` https://github.com/odoo/odoo/blob/a56586119845969e9d867a220f5330a6c7daa5c2/addons/account/wizard/account_automatic_entry_wizard.py#L429-
- You can notice that now the string has two % placeholders that need two be substituted, but only argument is provided which is `account.display_name` and so we get a the error `TypeError: not enough arguments for format string` https://github.com/odoo/odoo/blob/a56586119845969e9d867a220f5330a6c7daa5c2/addons/account/wizard/account_automatic_entry_wizard.py#L433
opw-3601886
closes odoo/odoo#145762
X-original-commit: 1582a0ae28fec12175845dcfdebbb8d6b4bcde33
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Ali Hassan Youssef (alhy) <alhy@odoo.com>
…
…
…
Odoo
Odoo is a suite of web based open source business apps.
The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...
Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.
Getting started with Odoo
For a standard installation please follow the Setup instructions from the documentation.
To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials
Languages
Python
49.6%
JavaScript
47.8%
SCSS
2%
CSS
0.3%
HTML
0.2%