OCA / knowledge

Odoo Document & Knowledge Management
http://www.odoo-community.org/project/22
GNU Affero General Public License v3.0
153 stars 328 forks source link

[16.0][MIG] document_page_partner #465

Closed ntsirintanis closed 5 months ago

ntsirintanis commented 6 months ago

Renamed document_page_partner_id to document_page_partner and ported it from 10 to 16, with intermediate MR https://github.com/OCA/knowledge/pull/314

thomaspaulb commented 6 months ago

Pretty straightforward - it's just the adding of 1 field. Why still draft? And there's 1 pre-commit issue

thomaspaulb commented 6 months ago

@ntsirintanis Somehow the commits seem a bit strange - the pre-commit commit removes all the files, whereas the migration commit adds them all again under a new module name. It would be better if perhaps there's a separate "rename" commit, which renames the module, after which the pre-commit is run. Or, the renaming can be included in the migration to 16.0.

thomaspaulb commented 6 months ago

@ntsirintanis Still, I don't understand the commit structure.

I understand how this came to be, because you based yourself on https://github.com/OCA/knowledge/pull/314, who made the original choice of not renaming but copying.

But in this way you lose commit history and you can't blame back anymore to the source of a commit.

If you're going to do it in this way, you might as well remove the commits related to document_page_partner_id completely from the history, because they carry no value anymore. But better of course is to git-commit the actual rename, so as to keep history. You could do something like:

cp -R document_page_partner /tmp
git reset HEAD~3
git mv document_page_partner_id document_page_partner
pre-commit run -A
git commit -A -m "[UPD] pre-commit"
rm -Rf document_page_partner
cp -R /tmp/document_page_partner .
git add .
pre-commit run
git commit -m "[MIG] document_page_partner to 16.0"
OCA-git-bot commented 6 months ago

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

HaraldPanten commented 5 months ago

/ocabot migration document_page_partner

HaraldPanten commented 5 months ago

/ocabot merge nobump

OCA-git-bot commented 5 months ago

On my way to merge this fine PR! Prepared branch 16.0-ocabot-merge-pr-465-by-HaraldPanten-bump-nobump, awaiting test results.

OCA-git-bot commented 5 months ago

@HaraldPanten The merge process could not be finalized, because command twine upload --repository-url https://upload.pypi.org/legacy/ -u __token__ odoo_addon_document_page_partner-16.0.1.0.0.1-py3-none-any.whl failed with output:

Uploading distributions to https://upload.pypi.org/legacy/
Uploading odoo_addon_document_page_partner-16.0.1.0.0.1-py3-none-any.whl
[?25l
  0% ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 0.0/29.0 kB • --:-- • ?
  0% ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 0.0/29.0 kB • --:-- • ?
  0% ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 0.0/29.0 kB • --:-- • ?
100% ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 29.0/29.0 kB • 00:00 • 68.9 MB/s
100% ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 29.0/29.0 kB • 00:00 • 68.9 MB/s
100% ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 29.0/29.0 kB • 00:00 • 68.9 MB/s
[?25hWARNING  Error during upload. Retry with the --verbose option for more details. 
ERROR    HTTPError: 403 Forbidden from https://upload.pypi.org/legacy/          
         New uploads are temporarily disabled. See                              
         https://pypi.org/help/#admin-intervention for more information.