OCA / dms

Odoo modules for a Document Management System
GNU Affero General Public License v3.0
116 stars 171 forks source link

Migration to version 17.0 #269

Open OCA-git-bot opened 1 year ago

OCA-git-bot commented 1 year ago

Todo

https://github.com/OCA/maintainer-tools/wiki/Migration-to-version-17.0

Modules to migrate

Missing module? Check https://github.com/OCA/maintainer-tools/wiki/%5BFAQ%5D-Missing-modules-in-migration-issue-list

tva-subteno-it commented 7 months ago

Hi, I'm currently migrating dms to v17, and I noticed that the web_drop_target module was removed from the manifest in v16, but the many_drop_target.js file using it was kept. From what I read in the discussion of the migration issue to v16 this module is no longer needed ? Can I then delete many_drop_target.js ? I don't understand how it can works if web_drop_target is not installed and is not useful anymore.

tva-subteno-it commented 7 months ago

Also I noticed in src/xml a file named views.xml. It extends from DocumentViewer but it seems to have been removed since Odoo v16. You just removed the file from the manifest during the v15->v16 migration of DMS, but you didn't deleted the file itself, is there a reason ?

pedrobaeza commented 7 months ago

@vancouver29 can you answer?

tva-subteno-it commented 7 months ago

I have the answer for DocumentViewer. It's not useful at all since now displaying an image/pdf is handled by the useFileViewer hook, which displays the web.FileViewer component.

pedrobaeza commented 7 months ago

Great, can you propose the PR?

tva-subteno-it commented 7 months ago

Sure thing, it's the PR #323 currently in draft since I'm still working on it.

tva-subteno-it commented 7 months ago

Icons has drastically changed in V17, so I changed the icon in order to fit with the global design. I'm no designer so it might not be perfect. What do you think about it ? I'm not sure if the curved style of the pinkish part is right, maybe a more straight cut could be better.

icon

But I think overall it fits quite well among the other icons. I don't know if I'm allowed to use the icon of the enterprise version (I don't think I am).

Capture d’écran 2024-04-11 à 11 34 49
tva-subteno-it commented 7 months ago

About the web_drop_target and many_drop_target.js, indeed it's now in Odoo. No need to use other modules. At least, for DMS it works fine without it, you can still drop one or more files into the views.

frankofno commented 5 months ago

is this v17 working with odoo ce v 17?

the official OCA app page is listing dms only up to odoo v16 https://odoo-community.org/shop/document-management-system-5619?search=dms#attr=940531

tva-subteno-it commented 5 months ago

Hi @frankofno , yes it is working for ce v17, that's what I have been using. The module is not listed yet because the migration is still pending. I have finished my migration work, and it's now up to the reviewer to merge or not the PR. But if now how to do it, you can still download it manually from my fork: https://github.com/tva-subteno-it/dms/tree/17.0-mig-dms

rishi-manglesh commented 5 months ago

Hi @tva-subteno-it,

I am also following this migration to use this app in my database, so would like to thank you for the superb migration work. However, while testing I could not Create Directory. Whatever I try, I get permission issues while creating the root directory. I have Document Manager role and also assigning these permissions in groups tab of the directory creation form. Am I missing something or is it a bug that user does not inherit the permissions.

image
tva-subteno-it commented 5 months ago

Hi @tva-subteno-it,

I am also following this migration to use this app in my database, so would like to thank you for the superb migration work. However, while testing I could not Create Directory. Whatever I try, I get permission issues while creating the root directory. I have Document Manager role and also assigning these permissions in groups tab of the directory creation form. Am I missing something or is it a bug that user does not inherit the permissions. image

Hi @rishi-manglesh , thanks for your interest in this migration. Indeed, this is a bug. The problem was that the rules giving you the access of what you can see was cached (meaning, not always up to date). I was doing my dev with the argument --dev=xml meaning I could refresh my page to see the changes I was doing in live. But this had the side effect of also refreshing the cache, therefore refreshing my rules. I pushed a fix. Feel free to try again and tell me if the problem is solved, or if you see other problems.

rishi-manglesh commented 5 months ago

Hi @tva-subteno-it, I am also following this migration to use this app in my database, so would like to thank you for the superb migration work. However, while testing I could not Create Directory. Whatever I try, I get permission issues while creating the root directory. I have Document Manager role and also assigning these permissions in groups tab of the directory creation form. Am I missing something or is it a bug that user does not inherit the permissions. image

Hi @rishi-manglesh , thanks for your interest in this migration. Indeed, this is a bug. The problem was that the rules giving you the access of what you can see was cached (meaning, not always up to date). I was doing my dev with the argument --dev=xml meaning I could refresh my page to see the changes I was doing in live. But this had the side effect of also refreshing the cache, therefore refreshing my rules. I pushed a fix. Feel free to try again and tell me if the problem is solved, or if you see other problems.

Thanks @tva-subteno-it, It was sorted out and works well.

While further testing, it seems it gives an error while I want to upload files in the directory. I can help you with testing and collaborate in completing the task. Please feel free to let me know if this is right way to collaborate and I will be happy to amend my ways.

Please see the error log below:

RPC_ERROR Odoo Server Error Traceback (most recent call last): File "/var/odoo/staging.hundredsolutions.com/src/odoo/http.py", line 1770, in _serve_db return service_model.retrying(self._serve_ir_http, self.env) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/var/odoo/staging.hundredsolutions.com/src/odoo/service/model.py", line 133, in retrying result = func() ^^^^^^ File "/var/odoo/staging.hundredsolutions.com/src/odoo/http.py", line 1797, in _serve_ir_http response = self.dispatcher.dispatch(rule.endpoint, args) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/var/odoo/staging.hundredsolutions.com/src/odoo/http.py", line 2001, in dispatch result = self.request.registry['ir.http']._dispatch(endpoint) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/var/odoo/staging.hundredsolutions.com/src/addons/website/models/ir_http.py", line 235, in _dispatch response = super()._dispatch(endpoint) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/var/odoo/staging.hundredsolutions.com/src/odoo/addons/base/models/ir_http.py", line 222, in _dispatch result = endpoint(request.params) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/var/odoo/staging.hundredsolutions.com/src/odoo/http.py", line 725, in route_wrapper result = endpoint(self, *args, *params_ok) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/var/odoo/staging.hundredsolutions.com/src/addons/web/controllers/dataset.py", line 24, in call_kw return self._call_kw(model, method, args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/var/odoo/staging.hundredsolutions.com/src/addons/web/controllers/dataset.py", line 20, in _call_kw return call_kw(request.env[model], method, args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/var/odoo/staging.hundredsolutions.com/src/odoo/api.py", line 464, in call_kw result = _call_kw_model(method, model, args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/var/odoo/staging.hundredsolutions.com/src/odoo/api.py", line 435, in _call_kw_model result = method(recs, args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: DMSFile.get_dms_files_from_attachments() takes from 1 to 2 positional arguments but 3 were given

The above server error caused the following client error: RPC_ERROR://staging.hundredsolutions.com/web/assets/36e249f/web.assets_web.min.js:2871:163) at XMLHttpRequest. (https://staging.hundredsolutions.com/web/assets/36e249f/web.assets_web.min.js:2875:13)

tva-subteno-it commented 5 months ago

Thanks @rishi-manglesh ! I pushed the fix. To collaborate, we can do as you like. I can either add you as collaborator of my fork, or you can keep testing and tell me when a bug occurs.

rishi-manglesh commented 5 months ago

Thanks @rishi-manglesh ! I pushed the fix. To collaborate, we can do as you like. I can either add you as collaborator of my fork, or you can keep testing and tell me when a bug occurs.

Hi @tva-subteno-it, It works well now :) I find the onboarding banner loads again & again even though I close it. Although not major bug but it is little annoying and uses premium screen space. I would assume if a user has a created a file, which would mean the purpose of the onboarding banner has been solved and it should not be displayed again.

image

tva-subteno-it commented 5 months ago

@rishi-manglesh I pushed the fix. It was just a stupid mistake, I created two different onboarding panel (for file and of directory), but both banner was closing the file banner. Meaning the directory one was never closed :x

victoralmau commented 5 months ago

Please, all these comments should be done at https://github.com/OCA/dms/pull/323.

telenieko commented 3 months ago

What is the status of v17 support? #323 is merged and the OCA website lists v17 as a supported version.

But this issue is open, and the default branch in the repository is still v15.

tva-subteno-it commented 3 months ago

Hello @telenieko. Indeed, the PR is merged. I don't have the rights to close this issue, so I can't do anything much. About the branch, I don't know what the required process is before changing the default branch. Sorry I don't have many answers to give, it would be better if an OCA member could answer itself.

pedrobaeza commented 3 months ago

There are more modules to migrate than just dms

pedrobaeza commented 3 months ago

Default branch switched to 17.0

BernatObrador commented 2 months ago

Working on dms_storage

SapphireHotS commented 1 month ago

Hi @tva-subteno-it,

I am also following this migration to use this app in my database, so would like to thank you for the superb migration work. However, while testing I could not Create Directory. Whatever I try, I get permission issues while creating the root directory. I have Document Manager role and also assigning these permissions in groups tab of the directory creation form. Am I missing something or is it a bug that user does not inherit the permissions. image

Hello, I still get this error. Wasn't it fixed @tva-subteno-it ? It happens when you want to create a directory in a storage, type filestore