Skip to content

Commit

Permalink
[ADD] add pro velo project link on resource form
Browse files Browse the repository at this point in the history
  • Loading branch information
huguesdk committed Dec 2, 2024
1 parent 8d8d372 commit 61aad50
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 0 deletions.
1 change: 1 addition & 0 deletions provelo_analytic_account/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"views/resource_location_views.xml",
"views/account_invoice_views.xml",
"views/resource_activity_type_views.xml",
"views/resource_resource_views.xml",
"views/actions.xml",
"views/menus.xml",
],
Expand Down
1 change: 1 addition & 0 deletions provelo_analytic_account/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@
from . import provelo_project
from . import account_invoice
from . import resource_activity_type
from . import resource_resource
from . import sale_order
14 changes: 14 additions & 0 deletions provelo_analytic_account/models/resource_resource.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# SPDX-FileCopyrightText: 2024 Coop IT Easy SC
#
# SPDX-License-Identifier: AGPL-3.0-or-later

from odoo import fields, models


class ResourceResource(models.Model):
_inherit = "resource.resource"

pv_project_id = fields.Many2one(
"pv.project",
string="Pro Velo Project",
)
20 changes: 20 additions & 0 deletions provelo_analytic_account/views/resource_resource_views.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8" ?>
<!--
SPDX-FileCopyrightText: 2024 Coop IT Easy SC
SPDX-License-Identifier: AGPL-3.0-or-later
-->
<odoo>

<record id="resource_planning_resource_form" model="ir.ui.view">
<field name="name">resource.planning.resource.form</field>
<field name="model">resource.resource</field>
<field name="inherit_id" ref="resource_planning.resource_planning_resource_form" />
<field name="arch" type="xml">
<field name="location" position="after">
<field name="pv_project_id" />
</field>
</field>
</record>

</odoo>

0 comments on commit 61aad50

Please sign in to comment.