[14.0][MIG] document_url: Migration to 14.0 - #306
Conversation
[MIG] document_url * bump version to 9.0.1.0.0 and make it installable * Update JS structure * Add css in order to be compliant with odoo style * Add a README.rst and OCA conventions * Improve selector * add fr.po for fr translation * open link with target='_blank'
OCA Transbot updated translations from Transifex
Without this patch, when you hover on the menu item, its background color does not change, and its cursor is a text one. With this patch, the menu item styling matches those available in all surrounding menus.
Replace char © by word Copyright Change format in usage description [UPD] Update document_url.pot [UPD] README.rst Update translation files Updated by Update PO files to match POT (msgmerge) hook in Weblate.
[UPD] README.rst [UPD] Update document_url.pot Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: knowledge-12.0/knowledge-12.0-document_url Translate-URL: https://translation.odoo-community.org/projects/knowledge-12-0/knowledge-12-0-document_url/ [UPD] README.rst
Currently translated at 100.0% (14 of 14 strings) Translation: knowledge-12.0/knowledge-12.0-document_url Translate-URL: https://translation.odoo-community.org/projects/knowledge-12-0/knowledge-12-0-document_url/hr/
[UPD] Update document_url.pot [UPD] README.rst Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: knowledge-13.0/knowledge-13.0-document_url Translate-URL: https://translation.odoo-community.org/projects/knowledge-13-0/knowledge-13-0-document_url/
document_url 13.0.1.0.1
[MIG] document_url: Migration to 14.0
pedrobaeza
left a comment
There was a problem hiding this comment.
Functional review:
- The "Add URL" button link appears in a new line, taking more space, instead of appearing in the same line as previous versions.
- Although it's not explicitly something of this module, the way URL attachments now behave seems odd: they appear as a regular attachment, but with a generic icon (non clickable), and the download button. Only clicking on such button leads to open the URL in the same tab, but it's not possible to do ctrl+click (or third-button click) to open in new tab. I think this module should add some changes to this behavior to have a special icon like in previous versions, and be totally clickable, opening the link in a new tab.
|
This is better, thanks, but I'm still unable to open it in a new tab, and it's opened by default in the same tab. The download icon can be also hidden in this type of attachment. A last thing: about the icon, isn't a more suitable icon for the link? |
836cfb3 to
4bf2679
Compare
|
Some changes have been made. There are other pending changes that would be quite difficult to make (it would require overwriting quite a bit of core code):
|
|
Then what are the changes you have made? Are you going to handle the rest? At least we need to do ctrl+click for opening in new tab. |
Sorry, I have not mentioned the changes (if they are in the commit).
|
|
This is better, thanks, although the other features are very desired. Isn't possible to add to the link ( |
|
Some more clarifications regarding the previous comment::
I think one possibility would be to suggest some changes to Odoo to help with this, what do you think? |
4bf2679 to
480f502
Compare
|
Odoo is not going to change anything about this, as URLs are not allowed anywhere in the UI. Aren't you able to intercept the mimetype compute method for putting a special one, and provide the mimetype icon here in this module instead on the main one? |
480f502 to
edfe496
Compare
|
I have added all the extra changes to the PR description to clarify all of them. |
edfe496 to
68143d1
Compare
|
Now the download button has appeared again for links. |
Define the add attachment and add URL buttons on the same line. Allow downloading of url type attachments by clicking on the icon or the name. Define the name of the url type attachments as links (allows to open it in a new tab). Hide the download button for url attachments. Force to set mimetype to "application/link" for url attachments. Displays a link icon for url attachments. TT30263
68143d1 to
0669b94
Compare
pedrobaeza
left a comment
There was a problem hiding this comment.
Now it's working as desired.
Tardo
left a comment
There was a problem hiding this comment.
LGTM 👍 Only code review.
The mimetype for attachments of type url seems not to be relevant. The field is calculated when you write/create and on the other hand the mimetype 'application/link' doesn't seem to be valid (https://www.iana.org/assignments/media-types/media-types.xhtml). So if you really want to force a mimetype... it might be more convenient to use application/octet-stream
|
Let's move on for now: /ocabot merge nobump I think the mimetype helps for displaying such icon. |
|
On my way to merge this fine PR! |
|
@pedrobaeza Merge seems stalled? |
|
/ocabot merge nobump |
|
On my way to merge this fine PR! |
|
Congratulations, your PR was merged at 77e0701. Thanks a lot for contributing to OCA. ❤️ |



Supersede from: #304
Migration to 14.0.
Extra changes:
mimetypeto "application/link" for url attachments.Please @Tardo and @pedrobaeza can you review it?
@Tecnativa TT30263