Skip to content

[18.0][MIG] dms_field: Migration to 18.0#416

Merged
OCA-git-bot merged 44 commits intoOCA:18.0from
Tecnativa:18.0-MIG-dms_field
May 8, 2025
Merged

[18.0][MIG] dms_field: Migration to 18.0#416
OCA-git-bot merged 44 commits intoOCA:18.0from
Tecnativa:18.0-MIG-dms_field

Conversation

@CarlosRoca13
Copy link
Copy Markdown
Contributor

Jaime Arroyo and others added 30 commits April 21, 2025 12:25
... so to speak.

@Tecnativa TT29847
Co-authored-by: luismalta <luis.malta@kmee.com.br>
Currently translated at 100.0% (75 of 75 strings)

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

Translation: dms-15.0/dms-15.0-dms_field
Translate-URL: https://translation.odoo-community.org/projects/dms-15-0/dms-15-0-dms_field/it/
The root directory can't be opened using the contextual action menu (`open`)

Impacted versions:

    12.0 and above

Steps to reproduce:

    Go to "DMS directories" in the partner form view
    Create a new root directory
    Right-click and choose `Open`

Current behavior:

    Odoo raises an error `TypeError: record is null`

Expected behavior:

    Open the directory like if we click on the `Open` button in the right section (Document preview)
- Create dms.field.template to set model, groups and directory structure.
- Remove the wizard to create a directory from a record.
- Directory structure is created when record is created (partner for example).
- Change the information on the right side.
- Have directory/file tree open when loading.

TT46804

TT46804
…cut several files and paste them into another directory)

TT47482
…n as default state

Before this change, when lauching the reload, the child directories
of the reloaded one are opened too.

By doing at this step and not setting the default state, the reloads are
done just for the implied nodes.

Furthermore, the code is improved to just reload the directories that
have being changed.
Currently translated at 100.0% (75 of 75 strings)

Translation: dms-15.0/dms-15.0-dms_field
Translate-URL: https://translation.odoo-community.org/projects/dms-15-0/dms-15-0-dms_field/es/
With hr_dms_field
The steps to reproduce the problem are:

1. Open Employee
2. Go to Documents Page
3. Drop a file on a directory
4. Go to another Employee
5. Try to drop a file

The file can not be dropped.
In the migration, the view type is changed from dms_tree to
dms_list. That's because in this point https://github.com/odoo/odoo/blob/16.0/addons/web/static/src/views/fields/field.js#L282
the 'tree' string is replaced by 'list' what is causing problems
trying to set the view type as it was before.
A parent directory can be set in templates, if set, the directory that is created
linked to a record will be a "child" of that directory.

TT48650
…ors when creating directories from a template.

Example of use case:
- Create a partner.
- Create a template linked to partners.
- Create a directory through the template.
- An access group linked to the partner is created.
- Delete the partner directory.
- Creates a new directory through the template.
- No error will occur and the previous access group will be re-used.
…ring

Now the process will be as follows:
- The auto-generated access group will be created.
- The user will be defined in explicit_user_ids of the group
created in the previous step.

In the directory created (from the corresponding record) the auto-generated
group (for the user to have access) + the access groups that the template
had will be used.
mymage and others added 4 commits April 29, 2025 10:57
Currently translated at 100.0% (62 of 62 strings)

Translation: dms-16.0/dms-16.0-dms_field
Translate-URL: https://translation.odoo-community.org/projects/dms-16-0/dms-16-0-dms_field/it/
We need to avoid applying a template except when testing functionality
with dms_field* modules to avoid the error that a directory with the same
name already exists (example: create partner).

Related to OCA#378
… if the user does not have access to the linked directory.

Example use case:
- Define a dms template with an access group and set only Admin as the explicit user (without groups).
- Create a "Test employee" employee.
- Modify the employee with Marc Demo and link him a new user (test-user)
- The auto-generated access group of test-employee will have test-user defined as explicit user.

TT55368
Copy link
Copy Markdown
Member

@victoralmau victoralmau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you check the following?

Error when trying to create a template.
ejemplo-1

Error when trying to access a partner's file.
ejemplo-2

@pedrobaeza
Copy link
Copy Markdown
Member

/ocabot migration dms_field

@OCA-git-bot OCA-git-bot added this to the 18.0 milestone Apr 29, 2025
@OCA-git-bot OCA-git-bot mentioned this pull request Apr 29, 2025
8 tasks
@CarlosRoca13
Copy link
Copy Markdown
Contributor Author

@victoralmau the problems should be solved 😄

Copy link
Copy Markdown
Member

@victoralmau victoralmau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Functional review OK.

@victoralmau
Copy link
Copy Markdown
Member

Ping @pilarvargas-tecnativa

@CarlosRoca13 CarlosRoca13 force-pushed the 18.0-MIG-dms_field branch from 68deb80 to 3fc1902 Compare May 8, 2025 13:15
@CarlosRoca13
Copy link
Copy Markdown
Contributor Author

Changed @pilarvargas-tecnativa

@OCA-git-bot
Copy link
Copy Markdown
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

@pedrobaeza
Copy link
Copy Markdown
Member

/ocabot merge nobump

@OCA-git-bot
Copy link
Copy Markdown
Contributor

This PR looks fantastic, let's merge it!
Prepared branch 18.0-ocabot-merge-pr-416-by-pedrobaeza-bump-nobump, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 36bf793 into OCA:18.0 May 8, 2025
7 checks passed
@OCA-git-bot
Copy link
Copy Markdown
Contributor

Congratulations, your PR was merged at a0de801. Thanks a lot for contributing to OCA. ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.