Saturday, June 24, 2023
4 changes · master
Miscellaneous changes
Some account terms are mistranslated, this PR aims to fix these translations. The customer provided a table with the mistakes and suggestions. The customer’s suggestions are available in the ticket. How to reproduce: 1. Ukrainian translation > chart of accounts > some terms are mistranslated OPW: 3247005 Forward-Port-Of: odoo/odoo#126129 Forward-Port-Of: odoo/odoo#125747
Original PR description
Some account terms are mistranslated, this PR aims to fix these translations. The customer provided a table with the mistakes and suggestions. The customer’s suggestions are available in the ticket. How to reproduce: 1. Ukrainian translation > chart of accounts > some terms are mistranslated OPW: 3247005 Forward-Port-Of: odoo/odoo#126129 Forward-Port-Of: odoo/odoo#125747
Steps to reproduce: - Install the lux localization - Configure Peppol for a customer: Select a customer > tab accounting > under "electronic invoicing": format: Peppol BIS Billing 3.0 Peppol e-address: 0130 - Directorates of the European Commission Peppol Endpont: testendpoint - Create an invoice for the peppol customer - Add a section or a note in the Invoice - Confirm the Invoice Issue: Raise user error: Odoo requires a tax for EACH LINE, instead of each product Solution: Excl
Original PR description
Steps to reproduce: - Install the lux localization - Configure Peppol for a customer: Select a customer > tab accounting > under "electronic invoicing": format: Peppol BIS Billing 3.0 Peppol e-address: 0130 - Directorates of the European Commission Peppol Endpont: testendpoint - Create an invoice for the peppol customer - Add a section or a note in the Invoice - Confirm the Invoice Issue: Raise user error: Odoo requires a tax for EACH LINE, instead of each product Solution: Exclude the section/note line opw-3354757 Forward-Port-Of: odoo/odoo#124806
Revision odoo/odoo@cabb9e7e573b86cd523980588360d8514090d370 introduced a regression: This is no longer possible to import a data module using `<field file="..."/>` in their data file. This revision targets to restore the feature as expected. The unit tests added covers the feature, so that regression no longer happens in the future. It introduces a new concept of temporary directory `file_open` can read from. e.g. ```py with odoo.tools.file_open_temporary_directory(self.env) as module_d
Original PR description
Revision odoo/odoo@cabb9e7e573b86cd523980588360d8514090d370 introduced a regression: This is no longer possible to import a data module using `<field file="..."/>` in their data file. This revision…
Revision odoo/odoo@cabb9e7e573b86cd523980588360d8514090d370 introduced a regression: This is no longer possible to import a data module using `<field file="..."/>` in their data file.
This revision targets to restore the feature as expected. The unit tests added covers the feature, so that regression no longer happens in the future.
It introduces a new concept of temporary directory `file_open` can read from.
e.g.
```py
with odoo.tools.file_open_temporary_directory(self.env) as module_dir:
with zipfile.ZipFile('foo.zip', "r") as z:
z.extract('foo/__manifest__.py', module_dir)
with odoo.tools.file_open('foo/__manifest__.py', env=self.env) as f:
manifest = f.read()
```
Note that `file_open` will be allowed to read from that temporary directory only if `env` is passed to `file_open`,
and if the `env` is part of the same transaction/request than the `env` passed to `file_open_temporary_directory`.
This is to avoid having users, whether from other databases, or even the same database,
trying to access these directories not belonging to them. e.g. If an admin uploads sensitive data in this temporary directory, no one than him must be allowed to read from these files, not even another user from his database.
Forward-Port-Of: odoo/odoo#126278The 'hierarchy' filter of the consolidation report was only shown when an account.group was defined. This was due to the fact this option key was initialized by the logic inherited from the parent class in account_reports module. This was wrong, as 'hierarchy' filter is overridden in consolidation to serve another purpose, and does then not depend on account.group objects. Even though it was not shown in the UI, it was actually enabled by default all the time ; so the choice made here is now
Original PR description
The 'hierarchy' filter of the consolidation report was only shown when an account.group was defined. This was due to the fact this option key was initialized by the logic inherited from the parent class in account_reports module. This was wrong, as 'hierarchy' filter is overridden in consolidation to serve another purpose, and does then not depend on account.group objects. Even though it was not shown in the UI, it was actually enabled by default all the time ; so the choice made here is now to display the filter all the time as well. The feature was tested, but the tests were poorly written, and did not call the _get_options function of the report, instead forging an options dictionary directly. This was shadowing the bug, since init_filter_hierarchy wasn't called and hence never could reset the option. This commit fixes the tests as well. Forward-Port-Of: odoo/enterprise#42944 Forward-Port-Of: odoo/enterprise#42835