From eb6d95203df28d07bad1518bdec87ff3f6e41180 Mon Sep 17 00:00:00 2001 From: hugues de keyzer Date: Mon, 2 Dec 2024 16:45:05 +0100 Subject: [PATCH] [ADD] add pro velo project link on resource form --- provelo_analytic_account/__manifest__.py | 1 + provelo_analytic_account/models/__init__.py | 1 + .../models/resource_resource.py | 14 +++++++++++ .../views/resource_resource_views.xml | 23 +++++++++++++++++++ 4 files changed, 39 insertions(+) create mode 100644 provelo_analytic_account/models/resource_resource.py create mode 100644 provelo_analytic_account/views/resource_resource_views.xml diff --git a/provelo_analytic_account/__manifest__.py b/provelo_analytic_account/__manifest__.py index 6d3a8469..1b4c4abc 100644 --- a/provelo_analytic_account/__manifest__.py +++ b/provelo_analytic_account/__manifest__.py @@ -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", ], diff --git a/provelo_analytic_account/models/__init__.py b/provelo_analytic_account/models/__init__.py index b40a6952..e9e5fe30 100644 --- a/provelo_analytic_account/models/__init__.py +++ b/provelo_analytic_account/models/__init__.py @@ -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 diff --git a/provelo_analytic_account/models/resource_resource.py b/provelo_analytic_account/models/resource_resource.py new file mode 100644 index 00000000..838efe5c --- /dev/null +++ b/provelo_analytic_account/models/resource_resource.py @@ -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", + ) diff --git a/provelo_analytic_account/views/resource_resource_views.xml b/provelo_analytic_account/views/resource_resource_views.xml new file mode 100644 index 00000000..1e9a6274 --- /dev/null +++ b/provelo_analytic_account/views/resource_resource_views.xml @@ -0,0 +1,23 @@ + + + + + + resource.planning.resource.form + resource.resource + + + + + + + + +