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

[16.0] [MIG] knowledge #367

Closed
wants to merge 55 commits into from
Closed

Conversation

marielejeune
Copy link
Contributor

Migrated to version 16.0

TODO: change module name, since knowledge is now a distinct Odoo module.

OCA-git-bot and others added 30 commits October 3, 2022 21:44
* Copyright and various stuff
* Contributors
* External ID not found in the system: base.group_document_user
Currently translated at 93.9% (31 of 33 strings)

Translation: knowledge-11.0/knowledge-11.0-knowledge
Translate-URL: https://translation.odoo-community.org/projects/knowledge-11-0/knowledge-11-0-knowledge/pt_BR/
Updated by Update PO files to match POT (msgmerge) hook in Weblate.
Otherwise the module grants too wide permissions for all users.
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: knowledge-12.0/knowledge-12.0-knowledge
Translate-URL: https://translation.odoo-community.org/projects/knowledge-12-0/knowledge-12-0-knowledge/
@marielejeune
Copy link
Contributor Author

#366

@sbidoul
Copy link
Member

sbidoul commented Oct 19, 2022

/ocabot migration knowledge

@OCA-git-bot OCA-git-bot added this to the 16.0 milestone Oct 19, 2022
@OCA-git-bot OCA-git-bot mentioned this pull request Oct 19, 2022
12 tasks
@pedrobaeza
Copy link
Member

pedrobaeza commented Oct 19, 2022

For having the whole history with the new name for later migrations (in v17, v18...), please execute this command:

git filter-branch --tree-filter 'if [ -d old_module_name ]; then mv old_module_name new_module_name; fi' HEAD

@marielejeune
Copy link
Contributor Author

@pedrobaeza for changing module name, do you see something more to do than running https://github.com/OCA/openupgradelib/blob/94762d1a5a4172b680a7e019fe4d7db44b2bf7af/openupgradelib/openupgrade.py#L1529 in a pre-migration script?

@pedrobaeza
Copy link
Member

Hi, @marielejeune

That's only needed when you are migrating from 15.0 to 16.0, but not for the module migration itself. On OpenUpgrade, we add all the renamings/mergings in this file:

https://github.com/OCA/OpenUpgrade/blob/15.0/openupgrade_scripts/apriori.py

and the method you mentioned is called from base module migration script.

In v16 Odoo has its own knowledge module
@pedrobaeza
Copy link
Member

Good name selected. Please remember to rename whole commit history.

@sbidoul
Copy link
Member

sbidoul commented Oct 19, 2022

Please remember to rename whole commit history.

Ow, that is surprising. I understand the reason but... one more thing to add to my list of downsides of our current migration approach ;)

@sebalix as you work on oca-port, what do you think of this idea of renaming a module in past commits when migrating? Have you already thought about module renaming in oca-port?

@pedrobaeza
Copy link
Member

The problem will be similar when reusing the same branches, as git wont' find references before the renaming, so I think this is even better, as you have the occasion to accommodate the history for this case.

@marielejeune
Copy link
Contributor Author

Hi @pedrobaeza, I'm not sure to understand what this command should do?
git filter-branch --tree-filter 'if [ -d old_module_name ]; then mv old_module_name new_module_name; fi' HEAD

I launched it locally but apart new commits sha, I don't see any difference.

@pedrobaeza
Copy link
Member

You need to change old_module_name and new_module_name by the corresponding ones: knowledge and document_knowledge.

@marielejeune
Copy link
Contributor Author

Yes, that was done

@pedrobaeza
Copy link
Member

Well, if you inspect a commit before the last one, check if now the module directory has the new name.

@pedrobaeza
Copy link
Member

You can forced push it here also to be checked.

@pedrobaeza
Copy link
Member

Oh, I think you need to do a rebase over origin/16.0 before...

@sebalix
Copy link

sebalix commented Oct 20, 2022

@sbidoul I thought about a --rename-to option but nothing done right now. I didn't know we should rename the module also in the past commits.
I created OCA/oca-port#11

@sbidoul
Copy link
Member

sbidoul commented Oct 20, 2022

I didn't know we should rename the module

Well I'm not sure we should either, TBH.

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.