5648cc9aa489d5ddf26d65e6e6cf4ca07f3fb964
Since #96791 the currency is reset to USD when starting a test to be less dependant of demo data when starting tests. Unfortunatelly, some l10n_modules will add account.move.line demo data leading to an error: You cannot change the currency of the company since some journal items already exist An initial solution would be to delete the existing account.move.line cls.env['account.move.line'].search([('company_id', '=', company.id)]).unlink() This is only possible passing some context flags in order to disable some checks existing = cls.env['account.move.line'].search([('company_id', '=', company.id)]) existing = existing.with_context(dynamic_unlink=True, force_delete=True) existing.unlink() Actually, unlinking account.move.line also creates other ones. existing = cls.env['account.move.line'].search([('company_id', '=', company.id)]) existing = existing.with_context(dynamic_unlink=True, force_delete=True) existing.unlink() existing = cls.env['account.move.line'].search([('company_id', '=', company.id)]) existing = existing.with_context(dynamic_unlink=True, force_delete=True) existing.unlink() Finally, it looks easier to bypass all business logic leading to the proposed solution. closes odoo/odoo#98736 Signed-off-by: Victor Feyens (vfe) <vfe@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%