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

click-odoo-update: add--only-compute-hashes #153

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mt-software-de
Copy link

@mt-software-de mt-software-de commented Oct 22, 2024

If click-odoo-contrib is not installed from the beginning,
you can now initialise the hashes and then start using click-odoo-update.

@mt-software-de mt-software-de force-pushed the add-initaddonhashes branch 3 times, most recently from 43d8f21 to facee0a Compare October 22, 2024 23:42
@mt-software-de mt-software-de marked this pull request as ready for review October 22, 2024 23:45
@sbidoul
Copy link
Member

sbidoul commented Oct 23, 2024

Thanks for the contrib. Can you elaborate the use case? For instance why not run click-odoo-update to initialize the hashes?

@mt-software-de
Copy link
Author

My use case is, that i have already a running odoo environment, without click-odoo-contrib installed.
When it is getting installed, when there are already installed modules, than of course the hashes are not generated yet.
If you than would call click-odoo-update it would try to update all modules.
Since

checksums = _load_installed_checksums(cr)
is returning nothing and the check here
if _get_checksum_dir(cr, module_name) != checksums.get(module_name):
will be false.

But for sure i could implement a no parameter on click-odoo-update which is doing it instead of create a no script.

README.rst Outdated Show resolved Hide resolved
click_odoo_contrib/initaddonhashes.py Outdated Show resolved Hide resolved
click_odoo_contrib/initaddonhashes.py Outdated Show resolved Hide resolved
click_odoo_contrib/initaddonhashes.py Outdated Show resolved Hide resolved
@sbidoul sbidoul changed the title Add initaddonhashes click-odoo-update: add--only-compute-hashes Oct 23, 2024
Copy link
Contributor

@StefanRijnhart StefanRijnhart left a comment

Choose a reason for hiding this comment

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

Thanks, that mandatory update on new databases always bothered me!

Copy link
Member

@sbidoul sbidoul left a comment

Choose a reason for hiding this comment

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

Just a couple of details.

tests/test_update.py Outdated Show resolved Hide resolved
click_odoo_contrib/update.py Outdated Show resolved Hide resolved
@mt-software-de mt-software-de force-pushed the add-initaddonhashes branch 2 times, most recently from 8d7d2fb to 979f620 Compare November 25, 2024 14:24
@sbidoul
Copy link
Member

sbidoul commented Nov 25, 2024

@mt-software-de initaddonhashes.py has reappeared. Was that intended?

@mt-software-de
Copy link
Author

@mt-software-de initaddonhashes.py has reappeared. Was that intended?

no that was not on purpose. Thx

@sbidoul
Copy link
Member

sbidoul commented Nov 25, 2024

The new test is failing.

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.

3 participants