[19.0][MIG] project_parent#1576
Conversation
…iews.xml, remove post_install file
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/
|
/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). --> | |||
There was a problem hiding this comment.
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
"license": "LGPL-3",
I think that is pretty clear.
There was a problem hiding this comment.
@norlinhenrik Ok, I think it was to highlight mixed licenses across files 😅 Could you align ?
d2fcb5c to
e03fc7b
Compare
e03fc7b to
5a9f4ed
Compare
| ) | ||
|
|
||
| def test_parent_childs_project(self): | ||
| self.assertIn(self.project_project_2, self.project_project_1.child_ids) |
There was a problem hiding this comment.
I would keep it, but with assertNotIn
alexey-pelykh
left a comment
There was a problem hiding this comment.
Thanks for the migration!
A couple of things to address before this can go in:
-
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). -
view_typekey inaction_open_child_project()--"view_type": "form"was removed in Odoo 17+. This key should be dropped from the action dict. -
t-escin kanban view --t-escis deprecated since Odoo 17, please uset-outinstead. -
Test coverage -- as @leemannd suggested, it would be good to add an
assertNotInto verify thatproject_project_2(which has no parent) is not inproject_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). | |||
There was a problem hiding this comment.
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}", |
There was a problem hiding this comment.
"view_type": "form" was removed in Odoo 17. Please drop this key.
| position="inside" | ||
| > | ||
| <div class="o_primary"> | ||
| <span> |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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.
gdgellatly
left a comment
There was a problem hiding this comment.
Full Functional Test - works for me - Approve notwithstanding minor other comments from other reviewer to address
|
Thank you all for reviewing. I have added a commit with the changes. |
alexey-pelykh
left a comment
There was a problem hiding this comment.
All four issues from the previous review are resolved:
- License headers: all files now consistently use LGPL-3.0, matching the manifest.
view_typekey: removed fromaction_open_child_project().t-esc→t-out: updated in kanban view.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
|
This PR has the |
BhaveshHeliconia
left a comment
There was a problem hiding this comment.
Functional review LGTM!
|
/ocabot merge nobump |
|
On my way to merge this fine PR! |
|
Congratulations, your PR was merged at 5e40df6. Thanks a lot for contributing to OCA. ❤️ |
No description provided.