Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[16.0][MIG] dms #261

Closed
wants to merge 132 commits into from
Closed

[16.0][MIG] dms #261

wants to merge 132 commits into from

Conversation

vancouver29
Copy link

[16.0][MIG] dms

Mathias Markl and others added 30 commits August 9, 2023 22:25
versions of muk_dms than 12.0.2.0.0.

Tested from 1.2.4 version.
In v13, this test is programmed in such a way that the demo user is supposed to be able to copy that subdirectory: https://github.com/OCA/dms/blob/c3f802db43362127e70d8c7b4987fb71d4c1f01c/dms/tests/test_directory.py#L40

However, in OCA#7 that test was modified indicating that demo user didn't have permissions to do that: https://github.com/OCA/dms/blob/e3b6d8d24534f2a68bfb88e310cc70cefe46bb64/dms/tests/test_directory.py#L39

Rolling back that change to ensure premissions remain the same in both versions of the module.

Also changing the directory to test to ensure it contains no SVG files, whose detection seems to differ among environments, and which have some specific permission restrictions that can make the modified test fail or pass.

@Tecnativa TT25645
victoralmau and others added 28 commits August 9, 2023 22:26
…ich you have access) in the portal view.

TT41585
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: dms-15.0/dms-15.0-dms
Translate-URL: https://translation.odoo-community.org/projects/dms-15-0/dms-15-0-dms/
The method _compute_image_1920 of dms_file checks if the file is of
mimetype image and tries to use it as a thumbnail.
However, there are several types of image files that Odoo/PIL
cannot work with, leading to the following error:

```
Traceback (most recent call last):
  File "/opt/odoo/custom/src/odoo/odoo/tools/image.py", line 404, in base64_to_image
    return Image.open(io.BytesIO(base64.b64decode(base64_source)))
  File "/usr/local/lib/python3.6/site-packages/PIL/Image.py", line 2687, in open
    % (filename if filename else fp))
OSError: cannot identify image file <_io.BytesIO object at 0x7f0a6ecb1780>
```

and also further down

```
odoo.exceptions.UserError: ('This file could not be decoded as an image file. Please try with a different file.', '')
```

Examples of such files are CAD files (mimetype: image/vnd.dwg)
For a list of all mimetypes starting with "image/" see:
https://www.iana.org/assignments/media-types/media-types.xhtml#image
Change in the permissions for DMS Access Groups:

- Not every user can create new access groups, but only dms_users.
- DMS managers (not admin users) can manage every access group
- Add tests

After this change:

- the base user has read only access
- the group_dms_user can create, and can write and unlink their own groups
- the group_dms_manager can do everything on every group.
Currently translated at 94.3% (319 of 338 strings)

Translation: dms-15.0/dms-15.0-dms
Translate-URL: https://translation.odoo-community.org/projects/dms-15-0/dms-15-0-dms/es/
Currently translated at 100.0% (338 of 338 strings)

Translation: dms-15.0/dms-15.0-dms
Translate-URL: https://translation.odoo-community.org/projects/dms-15-0/dms-15-0-dms/es/
@vancouver29 vancouver29 deleted the 16.0-mig-dms-kbui branch September 18, 2023 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.