Skip to content

Commit

Permalink
[MIG] project_stage_extra_info: Migration to 18.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Borruso committed Nov 27, 2024
1 parent 898c49e commit 1da9dfa
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 3 deletions.
2 changes: 1 addition & 1 deletion project_stage_extra_info/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"author": "InitOS GmbH, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/project",
"category": "Project Management",
"version": "16.0.1.0.0",
"version": "18.0.1.0.0",
"license": "AGPL-3",
"depends": ["project"],
"data": [
Expand Down
1 change: 1 addition & 0 deletions project_stage_extra_info/tests/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import test_project_stage_extra_info
28 changes: 28 additions & 0 deletions project_stage_extra_info/tests/test_project_stage_extra_info.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
from odoo.tests.common import TransactionCase


class TestProjectStageExtraInfo(TransactionCase):
def setUp(self):
super().setUp()

self.stage_to_do = self.env["project.project.stage"].create({"name": "To Do"})
self.stage_done = self.env["project.project.stage"].create(
{"name": "Done", "is_closed": True}
)
self.project = self.env["project.project"].create({"name": "Project"})

def test_project_stages(self):
"""Test to verify the behavior of project stages' and is_closed field."""
self.project.stage_id = self.stage_to_do.id
self.assertEqual(
self.project.stage_id.is_closed,
False,
"The project stage 'To Do' should not be marked as closed.",
)

self.project.stage_id = self.stage_done.id
self.assertEqual(
self.project.stage_id.is_closed,
True,
"The project stage 'Done' should be marked as closed.",
)
4 changes: 2 additions & 2 deletions project_stage_extra_info/views/project_stage_view.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record id="project_project_stage_view_tree" model="ir.ui.view">
<field name="name">project.project.stage.view.tree</field>
<record id="project_project_stage_view_list" model="ir.ui.view">
<field name="name">project.project.stage.view.list</field>
<field name="model">project.project.stage</field>
<field name="inherit_id" ref="project.project_project_stage_view_tree" />
<field name="arch" type="xml">
Expand Down

0 comments on commit 1da9dfa

Please sign in to comment.