Skip to content

[19.0][MIG] project_parent#1576

Merged
OCA-git-bot merged 26 commits intoOCA:19.0from
norlinhenrik:19.0-mig-project_parent
May 4, 2026
Merged

[19.0][MIG] project_parent#1576
OCA-git-bot merged 26 commits intoOCA:19.0from
norlinhenrik:19.0-mig-project_parent

Conversation

@norlinhenrik
Copy link
Copy Markdown

No description provided.

YogeshMahera-SerpentCS and others added 24 commits October 5, 2025 14:41
Currently translated at 100.0% (5 of 5 strings)

Translation: project-13.0/project-13.0-project_parent
Translate-URL: https://translation.odoo-community.org/projects/project-13-0/project-13-0-project_parent/es/
Currently translated at 80.0% (4 of 5 strings)

Translation: project-16.0/project-16.0-project_parent
Translate-URL: https://translation.odoo-community.org/projects/project-16-0/project-16-0-project_parent/pt_BR/
Currently translated at 100.0% (6 of 6 strings)

Translation: project-16.0/project-16.0-project_parent
Translate-URL: https://translation.odoo-community.org/projects/project-16-0/project-16-0-project_parent/es/
Currently translated at 83.3% (5 of 6 strings)

Translation: project-16.0/project-16.0-project_parent
Translate-URL: https://translation.odoo-community.org/projects/project-16-0/project-16-0-project_parent/pt_BR/
Currently translated at 100.0% (6 of 6 strings)

Translation: project-17.0/project-17.0-project_parent
Translate-URL: https://translation.odoo-community.org/projects/project-17-0/project-17-0-project_parent/it/
Currently translated at 100.0% (6 of 6 strings)

Translation: project-18.0/project-18.0-project_parent
Translate-URL: https://translation.odoo-community.org/projects/project-18-0/project-18-0-project_parent/pt/
@rousseldenis
Copy link
Copy Markdown

/ocabot migration project_parent

@@ -0,0 +1,77 @@
<?xml version="1.0" encoding="utf-8" ?>
<!-- © 2017-2019 Elico Corp (https://www.elico-corp.com).
License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html). -->
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Could you clarify license here ?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
"license": "LGPL-3",

I think that is pretty clear.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This seems fine to me

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

@norlinhenrik Ok, I think it was to highlight mixed licenses across files 😅 Could you align ?

@norlinhenrik norlinhenrik force-pushed the 19.0-mig-project_parent branch from d2fcb5c to e03fc7b Compare October 16, 2025 18:59
@norlinhenrik norlinhenrik force-pushed the 19.0-mig-project_parent branch from e03fc7b to 5a9f4ed Compare October 16, 2025 19:08
)

def test_parent_childs_project(self):
self.assertIn(self.project_project_2, self.project_project_1.child_ids)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I would keep it, but with assertNotIn

Copy link
Copy Markdown
Contributor

@alexey-pelykh alexey-pelykh left a comment

Choose a reason for hiding this comment

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

Thanks for the migration!

A couple of things to address before this can go in:

  1. License headers still inconsistent -- as @rousseldenis pointed out, the manifest and views declare LGPL-3, but the Python files (__init__.py, models/__init__.py, tests/__init__.py, models/project_project.py, tests/test_project_parent.py) and the demo XML use AGPL-3.0. Please align all files to match the manifest license (LGPL-3).

  2. view_type key in action_open_child_project() -- "view_type": "form" was removed in Odoo 17+. This key should be dropped from the action dict.

  3. t-esc in kanban view -- t-esc is deprecated since Odoo 17, please use t-out instead.

  4. Test coverage -- as @leemannd suggested, it would be good to add an assertNotIn to verify that project_project_2 (which has no parent) is not in project_project_1.child_ids. The 18.0 version relied on demo data refs for this, so now that setup is manual, an explicit negative assertion strengthens the test.

@@ -0,0 +1,42 @@
# Copyright 2019 Therp BV <https://therp.nl>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

AGPL-3.0 header here but the manifest declares LGPL-3. Please align.

return {
"type": "ir.actions.act_window",
"view_type": "form",
"name": f"Children of {self.name}",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

"view_type": "form" was removed in Odoo 17. Please drop this key.

position="inside"
>
<div class="o_primary">
<span>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

t-esc is deprecated since Odoo 17. Use t-out instead:

<t t-out="record.parent_id.value" />

)

def test_parent_childs_project(self):
self.assertIn(self.project_project_3, self.project_project_1.child_ids)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Consider also asserting the negative case:

self.assertNotIn(self.project_project_2, self.project_project_1.child_ids)

This verifies that only actual children appear, not just that one child is present.

Copy link
Copy Markdown

@gdgellatly gdgellatly left a comment

Choose a reason for hiding this comment

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

Full Functional Test - works for me - Approve notwithstanding minor other comments from other reviewer to address

@norlinhenrik
Copy link
Copy Markdown
Author

Thank you all for reviewing. I have added a commit with the changes.

Copy link
Copy Markdown
Contributor

@alexey-pelykh alexey-pelykh left a comment

Choose a reason for hiding this comment

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

All four issues from the previous review are resolved:

  1. License headers: all files now consistently use LGPL-3.0, matching the manifest.
  2. view_type key: removed from action_open_child_project().
  3. t-esct-out: updated in kanban view.
  4. assertNotIn: negative assertion added to test.

CI is green. Thanks for the clean fix commit!

Co-Reviewed-By: Claude Opus 4.6 (1M context) noreply@anthropic.com

@OCA-git-bot
Copy link
Copy Markdown
Contributor

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). 🤖

Copy link
Copy Markdown
Contributor

@BhaveshHeliconia BhaveshHeliconia left a comment

Choose a reason for hiding this comment

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

Functional review LGTM!

Copy link
Copy Markdown

@AaronHForgeFlow AaronHForgeFlow left a comment

Choose a reason for hiding this comment

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

Functional ok!

@leemannd
Copy link
Copy Markdown
Contributor

leemannd commented May 4, 2026

/ocabot merge nobump

@OCA-git-bot
Copy link
Copy Markdown
Contributor

On my way to merge this fine PR!
Prepared branch 19.0-ocabot-merge-pr-1576-by-leemannd-bump-nobump, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 486dc29 into OCA:19.0 May 4, 2026
7 checks passed
@OCA-git-bot
Copy link
Copy Markdown
Contributor

Congratulations, your PR was merged at 5e40df6. Thanks a lot for contributing to OCA. ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.