Skip to content

Commit 51a93d8

Browse files
committed
[IMP] vpc_management: add vcp.repository.branch menu entry
1 parent d465f9d commit 51a93d8

5 files changed

Lines changed: 67 additions & 26 deletions

File tree

vcp_management/__manifest__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"views/vcp_request.xml",
2020
"views/vcp_request_label.xml",
2121
"views/vcp_repository.xml",
22+
"views/vcp_repository_branch.xml",
2223
"views/vcp_branch.xml",
2324
"views/vcp_platform.xml",
2425
"views/vcp_organization.xml",

vcp_management/models/vcp_repository_branch.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,13 @@ class VcpRepositoryBranch(models.Model):
1818
"vcp.branch",
1919
string="Branch",
2020
required=True,
21+
readonly=True,
2122
ondelete="cascade",
2223
)
2324
repository_id = fields.Many2one(
2425
"vcp.repository",
2526
required=True,
27+
readonly=True,
2628
ondelete="cascade",
2729
)
2830
platform_id = fields.Many2one(

vcp_management/views/menu.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,12 @@
3636
action="vcp_branch_act_window"
3737
sequence="10"
3838
/>
39+
<menuitem
40+
id="vcp_repository_branch_menu"
41+
name="Repository Branches"
42+
action="vcp_repository_branch_act_window"
43+
sequence="20"
44+
/>
3945
<menuitem
4046
id="vcp_comment_menu"
4147
name="Comments"

vcp_management/views/vcp_repository.xml

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -155,32 +155,6 @@
155155
</field>
156156
</record>
157157

158-
<record model="ir.ui.view" id="vcp_repository_branch_form_view">
159-
<field name="model">vcp.repository.branch</field>
160-
<field name="arch" type="xml">
161-
<form>
162-
<sheet>
163-
<group>
164-
<field name="repository_id" />
165-
<field
166-
name="branch_id"
167-
domain="[('platform_id', '=', platform_id)]"
168-
/>
169-
<field name="rule_ids" widget="many2many_tags" />
170-
<field name="override_parent_rules" />
171-
<field name="platform_id" invisible="1" />
172-
<field name="last_commit" />
173-
</group>
174-
<notebook>
175-
<page string="Information" name="information">
176-
<field name="rule_information_ids" />
177-
</page>
178-
</notebook>
179-
</sheet>
180-
</form>
181-
</field>
182-
</record>
183-
184158
<record model="ir.actions.act_window" id="vcp_repository_act_window">
185159
<field name="name">Repositories</field>
186160
<field name="path">vcp-repository</field>
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<!-- Copyright 2026 Dixmit
3+
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
4+
<odoo>
5+
<record model="ir.ui.view" id="vcp_repository_branch_form_view">
6+
<field name="model">vcp.repository.branch</field>
7+
<field name="arch" type="xml">
8+
<form>
9+
<sheet>
10+
<group>
11+
<field name="repository_id" />
12+
<field name="branch_id" />
13+
<field name="rule_ids" widget="many2many_tags" />
14+
<field name="override_parent_rules" />
15+
<field name="platform_id" />
16+
<field name="last_commit" />
17+
</group>
18+
<notebook>
19+
<page string="Information" name="information">
20+
<field name="rule_information_ids" />
21+
</page>
22+
</notebook>
23+
</sheet>
24+
</form>
25+
</field>
26+
</record>
27+
28+
<record model="ir.ui.view" id="vcp_repository_branch_search_view">
29+
<field name="model">vcp.repository.branch</field>
30+
<field name="arch" type="xml">
31+
<search>
32+
<field name="repository_id" />
33+
<field name="branch_id" />
34+
<field name="platform_id" />
35+
</search>
36+
</field>
37+
</record>
38+
39+
<record model="ir.ui.view" id="vcp_repository_branch_tree_view">
40+
<field name="model">vcp.repository.branch</field>
41+
<field name="arch" type="xml">
42+
<list>
43+
<field name="platform_id" />
44+
<field name="repository_id" />
45+
<field name="branch_id" />
46+
</list>
47+
</field>
48+
</record>
49+
50+
<record model="ir.actions.act_window" id="vcp_repository_branch_act_window">
51+
<field name="name">Repository Branches</field>
52+
<field name="path">vcp-repository-branch</field>
53+
<field name="res_model">vcp.repository.branch</field>
54+
<field name="view_mode">list,form</field>
55+
<field name="domain">[]</field>
56+
<field name="context">{}</field>
57+
</record>
58+
</odoo>

0 commit comments

Comments
 (0)