- Jun 24, 2023
-
-
Denis Ledoux authored
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. closes odoo/odoo#126278 closes odoo/odoo#126337 Signed-off-by:
Denis Ledoux (dle) <dle@odoo.com>
-
- Jun 18, 2023
-
-
Odoo Translation Bot authored
-
- Jun 09, 2023
-
-
Denis Ledoux authored
The revision dd3f918c introduced a regression: it was no longer possible to set an icon in the import module, and if no icon is provided, the icon should fall back to the base module icon, which wasn't the case either. In this last case, it even leaded to a crash: ``` File "/home/odoo/src/14.0/odoo/odoo/addons/base/models/ir_module.py", line 251, in _get_icon_image with tools.file_open(path, 'rb') as image_file: File "/home/odoo/src/14.0/odoo/odoo/tools/misc.py", line 176, in file_open return _fileopen(name, mode=mode, basedir=base, pathinfo=pathinfo, basename=basename, filter_ext=filter_ext) File "/home/odoo/src/14.0/odoo/odoo/tools/misc.py", line 211, in _fileopen raise ValueError("Unknown path: %s" % name) Exception ValueError: Unknown path: /base/static/description/icon.png ``` opw-3340652 closes odoo/odoo#124307 Signed-off-by:
Denis Ledoux (dle) <dle@odoo.com>
-
- Jun 04, 2023
-
-
Odoo Translation Bot authored
-
- May 02, 2023
-
-
Arnaud Baes authored
For performance reasons, instead of extracting the whole zip, extract only the files which are actually used during in the `_import_module`, in case people put additional crap in the archive which are ignored during the import. That way, we avoid useless I/O. Also, adding the temporary directory in the addons path wasn't thread-safe. This revision changes this to make the module import feature thread-safe. closes odoo/odoo#80120 Signed-off-by:
Pierre Masereel <pim@odoo.com>
-
- Apr 30, 2023
-
-
Odoo Translation Bot authored
-
- Apr 23, 2023
-
-
Odoo Translation Bot authored
-
- Apr 09, 2023
-
-
Odoo Translation Bot authored
-
- Mar 19, 2023
-
-
Odoo Translation Bot authored
-
- Feb 26, 2023
-
-
Odoo Translation Bot authored
-
- Jan 29, 2023
-
-
Odoo Translation Bot authored
-
- Jan 15, 2023
-
-
Odoo Translation Bot authored
-
- Jan 01, 2023
-
-
Odoo Translation Bot authored
-
- Nov 18, 2022
-
-
Raphael Collet authored
The existing code was generating misleading errors for imported Odoo modules that could not be loaded. Although there was a specific hack for module 'studio_customization', imported modules were not handled properly. This patch adds the right condition in the SQL query in the module that introduces imported modules. closes odoo/odoo#105955 Signed-off-by:
Vincent Schippefilt (vsc) <vsc@odoo.com>
-
- Jul 24, 2022
-
-
Odoo Translation Bot authored
-
- Jul 10, 2022
-
-
Odoo Translation Bot authored
-
- Jun 29, 2022
-
-
Thibault Francois authored
This commit fix 3 problem Don't count studio field ------------------------ the commit https://github.com/odoo/odoo/commit/75b8c4eb1ed6e44f427886eea06ad216995e16c8 was supposed to stop counting count field generate by addins a smart button with studio. It works fine when base import module is not installed which is never the case. When base_import_module the field is counted as a field that belong to a imported module installed : studio_customization studio_customization should not be counted as an imported module installed Count Field with standard xml_id -------------------------------- With https://github.com/odoo/odoo/commit/9afce4805fc8bac45fdba817488aa867fddff69b Each manual can end up with an xml_id from a standard module: the original module of the model A standard module should never create a manual field so we can consider they should be counted unless they match the criteria of the first problem If a field has a standard module xml_id and no other the module should be odoo/studio and not the name of the standard module Make possible to exclude some db record from cloc ------------------------------------------------- It's possible to exclude some file in python module but it's not possible to exclude some field or SA in the database from the count Make it possible if they are link to an xml_id from the module __cloc_exclude__ The exclude record will be shown in cloc report with the verbose mode closes odoo/odoo#94803 X-original-commit: 58c3b45c Related: odoo/enterprise#28947 Signed-off-by:
Christophe Simonis <chs@odoo.com> Signed-off-by:
Thibault Francois <tfr@odoo.com>
-
- May 01, 2022
-
-
Odoo Translation Bot authored
-
- Mar 02, 2022
-
-
Thibault Francois authored
* Studio generate computed field "count" when the user add a button in the button box. Since those lines are written by studio with drag and drop it should not be counted for the maintenance subscription. We can detect them because field created by the user in studio start with x_studio and fields created outside studio does not have studio_customization xml_id * Add test to make no standard module introduce customization in the database during the install the will be counted by cloc see https://github.com/odoo/enterprise/pull/22664 closes odoo/odoo#85707 X-original-commit: abdce539 Signed-off-by:
Christophe Simonis <chs@odoo.com>
-
- Feb 15, 2022
-
-
Odoo Translation Bot authored
-
- Oct 17, 2021
-
-
Odoo Translation Bot authored
-
- Oct 03, 2021
-
-
Odoo Translation Bot authored
-
- Aug 08, 2021
-
-
Odoo Translation Bot authored
-
- Jul 26, 2021
-
-
Xavier-Do authored
The license is missing in most enterprise manifest so the decision was taken to make it explicit in all cases. When not defined, a warning will be triggered starting from 14.0 when falling back on the default LGPL-3. closes odoo/odoo#74231 Related: odoo/enterprise#19850 Related: odoo/design-themes#43 Signed-off-by:
Xavier Dollé (xdo) <xdo@odoo.com>
-
- Jul 18, 2021
-
-
Odoo Translation Bot authored
-
- Jul 11, 2021
-
-
Odoo Translation Bot authored
-
- Jun 27, 2021
-
-
Odoo Translation Bot authored
-
- Jun 20, 2021
-
-
Odoo Translation Bot authored
-
- Jun 06, 2021
-
-
Odoo Translation Bot authored
-
- Apr 25, 2021
-
-
Odoo Translation Bot authored
-
- Mar 28, 2021
-
-
Odoo Translation Bot authored
-
- Mar 14, 2021
-
-
Odoo Translation Bot authored
-
- Mar 07, 2021
-
-
Odoo Translation Bot authored
-
- Feb 21, 2021
-
-
Odoo Translation Bot authored
-
- Feb 14, 2021
-
-
Odoo Translation Bot authored
-
- Feb 07, 2021
-
-
Odoo Translation Bot authored
-
- Jan 31, 2021
-
-
Odoo Translation Bot authored
-
- Jan 17, 2021
-
-
Odoo Translation Bot authored
-
- Jan 10, 2021
-
-
Odoo Translation Bot authored
-
- Dec 27, 2020
-
-
Odoo Translation Bot authored
-