Skip to content

Conversation

@ByteMeAsap
Copy link

No description provided.

@ByteMeAsap ByteMeAsap force-pushed the 18.0-mig-attachment_preview branch 15 times, most recently from 5a9e1bc to 4675660 Compare July 15, 2025 07:22
@github-actions github-actions bot removed the stale PR/Issue without recent activity, it'll be soon closed automatically. label Nov 30, 2025
@ivs-cetmix
Copy link
Member

@ByteMeAsap thank you for your contribution! Please squash the last two commits. Also please squash all the administrative commits with the [UPD] tag if you feel comfortable to do this.
image

tarteo and others added 24 commits December 22, 2025 10:04
[FIX] Lint

[FIX] lint and flake

[ADD] tests

[ADD] tests

[ADD] tests

[ADD] Tests

[ADD] Package python-magic

[ADD] Tests

[FIX] Lint
[REM] Old files

[ADD] Magic to travis file

[FIX] Nagivation refresh widget
Currently translated at 100.0% (2 of 2 strings)

Translation: knowledge-12.0/knowledge-12.0-attachment_preview
Translate-URL: https://translation.odoo-community.org/projects/knowledge-12-0/knowledge-12-0-attachment_preview/sl/
Currently translated at 100.0% (2 of 2 strings)

Translation: knowledge-12.0/knowledge-12.0-attachment_preview
Translate-URL: https://translation.odoo-community.org/projects/knowledge-12-0/knowledge-12-0-attachment_preview/tr/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

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

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

Translation: knowledge-15.0/knowledge-15.0-attachment_preview
Translate-URL: https://translation.odoo-community.org/projects/knowledge-15-0/knowledge-15-0-attachment_preview/it/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: knowledge-15.0/knowledge-15.0-attachment_preview
Translate-URL: https://translation.odoo-community.org/projects/knowledge-15-0/knowledge-15-0-attachment_preview/
Increased code coverage

Changed layout of attachment_preview buttons

Updates
@ByteMeAsap ByteMeAsap force-pushed the 18.0-mig-attachment_preview branch from 8470908 to 52934ee Compare December 22, 2025 04:34
@ByteMeAsap
Copy link
Author

@ByteMeAsap thank you for your contribution! Please squash the last two commits. Also please squash all the administrative commits with the [UPD] tag if you feel comfortable to do this.
Done !!

Copy link

@tendil tendil left a comment

Choose a reason for hiding this comment

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

@ByteMeAsap thank you for your contribution!
Please check my comments

@@ -0,0 +1,3 @@
## Addon icon

- courtesy of <http://commons.wikimedia.org/wiki/Crystal_Clear>
Copy link

Choose a reason for hiding this comment

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

Remove references in CREDITS.md of past financed migrations by other companies.
wiki/Migration-to-version-18.0

],
"web.assets_frontend": [],
"web.assets_tests": [],
"web.qunit_suite_tests": [],
Copy link

Choose a reason for hiding this comment

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

remove all empty lines

self.env[model].with_context(bin_size=True).browse(ids_to_browse)
):
result[this.id] = False
# result[this.id] = False
Copy link

Choose a reason for hiding this comment

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

remove unused code

if model == self._name and binary_field == "datas" and this.store_fname:
if (
model == self._name and binary_field == "datas" and this.store_fname
): # pragma: no cover
Copy link

Choose a reason for hiding this comment

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

we deliberately do not test this execution path? (# pragma: no cover)

_inherit = "ir.attachment"

@api.model
def get_binary_extension(self, model, ids, binary_field, filename_field=None):
Copy link

Choose a reason for hiding this comment

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

all methods must have a clear dockstring in the standard format, please add

Copy link
Member

Choose a reason for hiding this comment

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

@tendil this is a migration PR, so the code stays as is

Copy link

@Aldeigja Aldeigja left a comment

Choose a reason for hiding this comment

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

@ByteMeAsap I'm not sure if this is a migration issue, but it seems that preview is currently not working for LibreOffice files.
Tested on version 14, it works there.

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.