From 87556716f98f108824dc24051694ff58be860b06 Mon Sep 17 00:00:00 2001 From: Victor Champonnois Date: Mon, 18 Mar 2024 14:41:43 +0100 Subject: [PATCH 1/5] [REF] contract_line time_spent --- contract_timesheet_monitoring/README.rst | 70 +++ contract_timesheet_monitoring/__init__.py | 1 + contract_timesheet_monitoring/__manifest__.py | 19 + .../models/__init__.py | 1 + .../models/contract_line.py | 40 ++ .../readme/DESCRIPTION.md | 6 + .../readme/ROADMAP.md | 1 + .../static/description/index.html | 412 ++++++++++++++++++ .../tests/__init__.py | 1 + .../tests/test_contract.py | 58 +++ .../views/contract.xml | 13 + .../views/contract_portal_templates.xml | 24 + .../odoo/addons/contract_timesheet_monitoring | 1 + setup/contract_timesheet_monitoring/setup.py | 6 + 14 files changed, 653 insertions(+) create mode 100644 contract_timesheet_monitoring/README.rst create mode 100644 contract_timesheet_monitoring/__init__.py create mode 100644 contract_timesheet_monitoring/__manifest__.py create mode 100644 contract_timesheet_monitoring/models/__init__.py create mode 100644 contract_timesheet_monitoring/models/contract_line.py create mode 100644 contract_timesheet_monitoring/readme/DESCRIPTION.md create mode 100644 contract_timesheet_monitoring/readme/ROADMAP.md create mode 100644 contract_timesheet_monitoring/static/description/index.html create mode 100644 contract_timesheet_monitoring/tests/__init__.py create mode 100644 contract_timesheet_monitoring/tests/test_contract.py create mode 100644 contract_timesheet_monitoring/views/contract.xml create mode 100644 contract_timesheet_monitoring/views/contract_portal_templates.xml create mode 120000 setup/contract_timesheet_monitoring/odoo/addons/contract_timesheet_monitoring create mode 100644 setup/contract_timesheet_monitoring/setup.py diff --git a/contract_timesheet_monitoring/README.rst b/contract_timesheet_monitoring/README.rst new file mode 100644 index 000000000..411268640 --- /dev/null +++ b/contract_timesheet_monitoring/README.rst @@ -0,0 +1,70 @@ +============================= +Contract timesheet monitoring +============================= + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:00fb3cdc565442ffcd3351e97d0516ce6f4ceb55402981b183f7e717a1e23173 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png + :target: https://odoo-community.org/page/development-status + :alt: Production/Stable +.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 +.. |badge3| image:: https://img.shields.io/badge/github-coopiteasy%2Faddons-lightgray.png?logo=github + :target: https://github.com/coopiteasy/addons/tree/16.0/contract_timesheet_monitoring + :alt: coopiteasy/addons + +|badge1| |badge2| |badge3| + +Context +======= + +This module was developped for clients paying a subscription fee for +functional support. We wanted to invoice a fixed amount per period, but +invoice excess time. This module provide a way for the clients and the +service provider to monitor the time spent to compare it with the +threshold. + +**Table of contents** + +.. contents:: + :local: + +Known issues / Roadmap +====================== + +In order to provide past information about time spent, add a field +time_spent on invoice generated by contracts, computed the same way as +the contract line. Display it on the invoice line table (backend and +portal.) + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues `_. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us to smash it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +------- + +* Coop IT Easy SC + +Maintainers +----------- + +This module is part of the `coopiteasy/addons `_ project on GitHub. + +You are welcome to contribute. diff --git a/contract_timesheet_monitoring/__init__.py b/contract_timesheet_monitoring/__init__.py new file mode 100644 index 000000000..0650744f6 --- /dev/null +++ b/contract_timesheet_monitoring/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/contract_timesheet_monitoring/__manifest__.py b/contract_timesheet_monitoring/__manifest__.py new file mode 100644 index 000000000..8e93c4970 --- /dev/null +++ b/contract_timesheet_monitoring/__manifest__.py @@ -0,0 +1,19 @@ +# Copyright 2017 Tecnativa - Luis M. Ontalba +# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html + +{ + "name": "Contract timesheet monitoring", + "summary": "Compute time spent on service contracts", + "version": "16.0.1.0.0", + "category": "Sales", + "author": "Coop IT Easy SC, Odoo Community Association (OCA)", + "website": "https://github.com/coopiteasy/addons", + "depends": ["contract", "hr_timesheet"], + "development_status": "Production/Stable", + "data": [ + "views/contract.xml", + "views/contract_portal_templates.xml", + ], + "license": "AGPL-3", + "installable": True, +} diff --git a/contract_timesheet_monitoring/models/__init__.py b/contract_timesheet_monitoring/models/__init__.py new file mode 100644 index 000000000..6143a3650 --- /dev/null +++ b/contract_timesheet_monitoring/models/__init__.py @@ -0,0 +1 @@ +from . import contract_line diff --git a/contract_timesheet_monitoring/models/contract_line.py b/contract_timesheet_monitoring/models/contract_line.py new file mode 100644 index 000000000..5dcbbea55 --- /dev/null +++ b/contract_timesheet_monitoring/models/contract_line.py @@ -0,0 +1,40 @@ +from odoo import fields, models + + +class ContractLine(models.Model): + _inherit = "contract.line" + + time_spent = fields.Float( + string="Time Spent this Period", compute="_compute_time_spent" + ) + + def get_time_spent(self, analytic_distribution, start_date, end_date=None): + total_time_spent = 0 + for analytic_account, percentage in analytic_distribution.items(): + analytic_account_id = int(analytic_account) + analytic_account_lines = ( + self.env["account.analytic.account"] + .browse(analytic_account_id) + .line_ids + ) + timesheets = analytic_account_lines.filtered( + # keep only timesheets + # ensure the uom is the same as the one configure for the project + # timesheets (hours or day) + lambda x: (x.encoding_uom_id == x.project_id.timesheet_encode_uom_id) + ) + time_spent_on_account = timesheets.filtered( + lambda x: (x.date >= start_date) + ).mapped("unit_amount") + total_time_spent_on_account = sum(time_spent_on_account) + total_time_spent += total_time_spent_on_account * percentage / 100 + return total_time_spent + + def _compute_time_spent(self): + if self.analytic_distribution: + period_start_date = self.last_date_invoiced or self.date_start + self.time_spent = self.get_time_spent( + self.analytic_distribution, period_start_date + ) + else: + self.time_spent = False diff --git a/contract_timesheet_monitoring/readme/DESCRIPTION.md b/contract_timesheet_monitoring/readme/DESCRIPTION.md new file mode 100644 index 000000000..496d60395 --- /dev/null +++ b/contract_timesheet_monitoring/readme/DESCRIPTION.md @@ -0,0 +1,6 @@ +# Context + +This module was developped for clients paying a subscription fee for functional support. We wanted to invoice a fixed amount per period, but invoice excess time. +This module provide a way for the clients and the service provider to monitor the time spent to compare it with the threshold. + + diff --git a/contract_timesheet_monitoring/readme/ROADMAP.md b/contract_timesheet_monitoring/readme/ROADMAP.md new file mode 100644 index 000000000..901c3f9c6 --- /dev/null +++ b/contract_timesheet_monitoring/readme/ROADMAP.md @@ -0,0 +1 @@ +In order to provide past information about time spent, add a field time_spent on invoice generated by contracts, computed the same way as the contract line. Display it on the invoice line table (backend and portal.) diff --git a/contract_timesheet_monitoring/static/description/index.html b/contract_timesheet_monitoring/static/description/index.html new file mode 100644 index 000000000..ea4eee57e --- /dev/null +++ b/contract_timesheet_monitoring/static/description/index.html @@ -0,0 +1,412 @@ + + + + + +Contract timesheet monitoring + + + +
+

Contract timesheet monitoring

+ + +

Production/Stable License: AGPL-3 coopiteasy/addons

+
+

Context

+

This module was developped for clients paying a subscription fee for +functional support. We wanted to invoice a fixed amount per period, but +invoice excess time. This module provide a way for the clients and the +service provider to monitor the time spent to compare it with the +threshold.

+

Table of contents

+
+
+

Known issues / Roadmap

+

In order to provide past information about time spent, add a field +time_spent on invoice generated by contracts, computed the same way as +the contract line. Display it on the invoice line table (backend and +portal.)

+
+
+

Bug Tracker

+

Bugs are tracked on GitHub Issues. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us to smash it by providing a detailed and welcomed +feedback.

+

Do not contact contributors directly about support or help with technical issues.

+
+
+

Credits

+
+

Authors

+
    +
  • Coop IT Easy SC
  • +
+
+
+

Maintainers

+

This module is part of the coopiteasy/addons project on GitHub.

+

You are welcome to contribute.

+
+
+
+ + diff --git a/contract_timesheet_monitoring/tests/__init__.py b/contract_timesheet_monitoring/tests/__init__.py new file mode 100644 index 000000000..3c02082d6 --- /dev/null +++ b/contract_timesheet_monitoring/tests/__init__.py @@ -0,0 +1 @@ +from . import test_contract diff --git a/contract_timesheet_monitoring/tests/test_contract.py b/contract_timesheet_monitoring/tests/test_contract.py new file mode 100644 index 000000000..5b8bd587f --- /dev/null +++ b/contract_timesheet_monitoring/tests/test_contract.py @@ -0,0 +1,58 @@ +from odoo.addons.hr_timesheet.tests.test_timesheet import TestCommonTimesheet + + +class TestContractTimeSpent(TestCommonTimesheet): + @classmethod + def setUpClass(cls): + super(TestContractTimeSpent, cls).setUpClass() + + cls.contract = cls.env["contract.contract"].create( + { + "name": "Test Contract Service", + "partner_id": cls.partner.id, + # "pricelist_id": cls.partner.property_product_pricelist.id, + # "line_recurrence": True, + # "contract_type": "purchase", + "contract_line_ids": [ + ( + 0, + 0, + { + # "product_id": cls.product_1.id, + "name": "Services from #START# to #END#", + "analytic_distribution": {cls.analytic_account.id: 100}, + "quantity": 1, + "uom_id": cls.env.ref("uom.product_uom_hour").id, + "price_unit": 100, + "recurring_rule_type": "monthly", + "recurring_interval": 1, + "date_start": "2024-01-01", + "recurring_next_date": "2024-12-31", + }, + ) + ], + } + ) + cls.env["account.analytic.line"].create( + { + "project_id": cls.project_customer.id, + "task_id": cls.task1.id, + "name": "timesheet1", + "unit_amount": 1, + "date": "2024-02-01", + "employee_id": cls.empl_employee2.id, + } + ) + cls.env["account.analytic.line"].create( + { + "project_id": cls.project_customer.id, + "task_id": cls.task1.id, + "name": "timesheet2", + "unit_amount": 1, + "date": "2023-02-01", + "employee_id": cls.empl_employee2.id, + } + ) + + def test_time_spent_in_period(self): + self.assertEqual(self.contract.contract_line_ids[0].time_spent, 1) diff --git a/contract_timesheet_monitoring/views/contract.xml b/contract_timesheet_monitoring/views/contract.xml new file mode 100644 index 000000000..969fa2f81 --- /dev/null +++ b/contract_timesheet_monitoring/views/contract.xml @@ -0,0 +1,13 @@ + + + + contract.contract.form.view + contract.contract + + + + + + + + diff --git a/contract_timesheet_monitoring/views/contract_portal_templates.xml b/contract_timesheet_monitoring/views/contract_portal_templates.xml new file mode 100644 index 000000000..fbb742db1 --- /dev/null +++ b/contract_timesheet_monitoring/views/contract_portal_templates.xml @@ -0,0 +1,24 @@ + + + + + diff --git a/setup/contract_timesheet_monitoring/odoo/addons/contract_timesheet_monitoring b/setup/contract_timesheet_monitoring/odoo/addons/contract_timesheet_monitoring new file mode 120000 index 000000000..43b50ce5d --- /dev/null +++ b/setup/contract_timesheet_monitoring/odoo/addons/contract_timesheet_monitoring @@ -0,0 +1 @@ +../../../../contract_timesheet_monitoring \ No newline at end of file diff --git a/setup/contract_timesheet_monitoring/setup.py b/setup/contract_timesheet_monitoring/setup.py new file mode 100644 index 000000000..28c57bb64 --- /dev/null +++ b/setup/contract_timesheet_monitoring/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +) From 3e238be4f448ae6a243f1ae9c49629b951effa64 Mon Sep 17 00:00:00 2001 From: Victor Champonnois Date: Mon, 18 Mar 2024 16:53:13 +0100 Subject: [PATCH 2/5] [ADD] time spent on invoice (need refacto!) --- contract_timesheet_monitoring/__manifest__.py | 4 +- .../models/__init__.py | 1 + .../models/account_move_line.py | 46 +++++++++++++++++++ .../models/contract_line.py | 15 +++--- .../views/account_invoice_report.xml | 27 +++++++++++ .../views/account_move.xml | 13 ++++++ 6 files changed, 98 insertions(+), 8 deletions(-) create mode 100644 contract_timesheet_monitoring/models/account_move_line.py create mode 100644 contract_timesheet_monitoring/views/account_invoice_report.xml create mode 100644 contract_timesheet_monitoring/views/account_move.xml diff --git a/contract_timesheet_monitoring/__manifest__.py b/contract_timesheet_monitoring/__manifest__.py index 8e93c4970..6b24c914b 100644 --- a/contract_timesheet_monitoring/__manifest__.py +++ b/contract_timesheet_monitoring/__manifest__.py @@ -8,10 +8,12 @@ "category": "Sales", "author": "Coop IT Easy SC, Odoo Community Association (OCA)", "website": "https://github.com/coopiteasy/addons", - "depends": ["contract", "hr_timesheet"], + "depends": ["contract", "hr_timesheet", "contract_invoice_start_end_dates"], "development_status": "Production/Stable", "data": [ "views/contract.xml", + "views/account_move.xml", + "views/account_invoice_report.xml", "views/contract_portal_templates.xml", ], "license": "AGPL-3", diff --git a/contract_timesheet_monitoring/models/__init__.py b/contract_timesheet_monitoring/models/__init__.py index 6143a3650..88f1e786c 100644 --- a/contract_timesheet_monitoring/models/__init__.py +++ b/contract_timesheet_monitoring/models/__init__.py @@ -1 +1,2 @@ from . import contract_line +from . import account_move_line diff --git a/contract_timesheet_monitoring/models/account_move_line.py b/contract_timesheet_monitoring/models/account_move_line.py new file mode 100644 index 000000000..c1994e2b0 --- /dev/null +++ b/contract_timesheet_monitoring/models/account_move_line.py @@ -0,0 +1,46 @@ +# Copyright 2016 Tecnativa - Carlos Dauden +# Copyright 2018 ACSONE SA/NV. +# Copyright 2020 Tecnativa - Pedro M. Baeza +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from odoo import fields, models + + +class AccountMoveLine(models.Model): + _inherit = "account.move.line" + + time_spent = fields.Float( + string="Time Spent this Period", compute="_compute_time_spent" + ) + + def get_time_spent(self, analytic_distribution, start_date, end_date=None): + total_time_spent = 0 + for analytic_account, percentage in analytic_distribution.items(): + analytic_account_id = int(analytic_account) + analytic_account_lines = ( + self.env["account.analytic.account"] + .browse(analytic_account_id) + .line_ids + ) + timesheets = analytic_account_lines.filtered( + # keep only timesheets + # ensure the uom is the same as the one configure for the project + # timesheets (hours or day) + lambda x: (x.encoding_uom_id == x.project_id.timesheet_encode_uom_id) + ) + if timesheets: + time_spent_on_account = timesheets.filtered( + lambda x: (x.date >= start_date) + ).mapped("unit_amount") + total_time_spent_on_account = sum(time_spent_on_account) + total_time_spent += total_time_spent_on_account * percentage / 100 + return total_time_spent + + def _compute_time_spent(self): + for line in self: + if line.analytic_distribution and line.start_date: + line.time_spent = line.get_time_spent( + line.analytic_distribution, line.start_date + ) + else: + line.time_spent = False diff --git a/contract_timesheet_monitoring/models/contract_line.py b/contract_timesheet_monitoring/models/contract_line.py index 5dcbbea55..8925ed7c7 100644 --- a/contract_timesheet_monitoring/models/contract_line.py +++ b/contract_timesheet_monitoring/models/contract_line.py @@ -31,10 +31,11 @@ def get_time_spent(self, analytic_distribution, start_date, end_date=None): return total_time_spent def _compute_time_spent(self): - if self.analytic_distribution: - period_start_date = self.last_date_invoiced or self.date_start - self.time_spent = self.get_time_spent( - self.analytic_distribution, period_start_date - ) - else: - self.time_spent = False + for line in self: + if line.analytic_distribution: + period_start_date = line.last_date_invoiced or line.date_start + line.time_spent = line.get_time_spent( + line.analytic_distribution, period_start_date + ) + else: + line.time_spent = False diff --git a/contract_timesheet_monitoring/views/account_invoice_report.xml b/contract_timesheet_monitoring/views/account_invoice_report.xml new file mode 100644 index 000000000..93597cacc --- /dev/null +++ b/contract_timesheet_monitoring/views/account_invoice_report.xml @@ -0,0 +1,27 @@ + + + + + diff --git a/contract_timesheet_monitoring/views/account_move.xml b/contract_timesheet_monitoring/views/account_move.xml new file mode 100644 index 000000000..aacba2218 --- /dev/null +++ b/contract_timesheet_monitoring/views/account_move.xml @@ -0,0 +1,13 @@ + + + + account.move.form.view + account.move + + + + + + + + From 0b012c974d8f0d675d8ea4ffa0814d2155c95706 Mon Sep 17 00:00:00 2001 From: Victor Champonnois Date: Thu, 21 Mar 2024 11:18:03 +0100 Subject: [PATCH 3/5] [REF] get_time_spent in analytic.account --- .../models/__init__.py | 1 + .../models/account_analytic_account.py | 19 ++++++++++++++ .../models/account_move_line.py | 26 +++++++------------ .../models/contract_line.py | 23 ++++++---------- 4 files changed, 37 insertions(+), 32 deletions(-) create mode 100644 contract_timesheet_monitoring/models/account_analytic_account.py diff --git a/contract_timesheet_monitoring/models/__init__.py b/contract_timesheet_monitoring/models/__init__.py index 88f1e786c..1e0a868ab 100644 --- a/contract_timesheet_monitoring/models/__init__.py +++ b/contract_timesheet_monitoring/models/__init__.py @@ -1,2 +1,3 @@ from . import contract_line from . import account_move_line +from . import account_analytic_account diff --git a/contract_timesheet_monitoring/models/account_analytic_account.py b/contract_timesheet_monitoring/models/account_analytic_account.py new file mode 100644 index 000000000..e58ec3a5f --- /dev/null +++ b/contract_timesheet_monitoring/models/account_analytic_account.py @@ -0,0 +1,19 @@ +from odoo import models + + +class AccountAnalyticAccount(models.Model): + _inherit = "account.analytic.account" + + def get_time_spent_for_period(self, start_date, end_date=None): + analytic_account_lines = self.line_ids + timesheets = analytic_account_lines.filtered( + # keep only timesheets + # ensure the uom is the same as the one configure for the project + # timesheets (hours or day) + lambda x: (x.encoding_uom_id == x.project_id.timesheet_encode_uom_id) + ) + if timesheets: + time_spent_on_account = timesheets.filtered( + lambda x: (x.date >= start_date) + ).mapped("unit_amount") + return sum(time_spent_on_account) diff --git a/contract_timesheet_monitoring/models/account_move_line.py b/contract_timesheet_monitoring/models/account_move_line.py index c1994e2b0..3e3f2b737 100644 --- a/contract_timesheet_monitoring/models/account_move_line.py +++ b/contract_timesheet_monitoring/models/account_move_line.py @@ -13,34 +13,26 @@ class AccountMoveLine(models.Model): string="Time Spent this Period", compute="_compute_time_spent" ) + # this method is a duplicate from get_time_spent in contract.line + # but this is due to the fact that contract line tend to mimic account move lines + # it make sense to keep these methods separated. def get_time_spent(self, analytic_distribution, start_date, end_date=None): total_time_spent = 0 for analytic_account, percentage in analytic_distribution.items(): - analytic_account_id = int(analytic_account) - analytic_account_lines = ( - self.env["account.analytic.account"] - .browse(analytic_account_id) - .line_ids + analytic_account = self.env["account.analytic.account"].browse( + int(analytic_account) ) - timesheets = analytic_account_lines.filtered( - # keep only timesheets - # ensure the uom is the same as the one configure for the project - # timesheets (hours or day) - lambda x: (x.encoding_uom_id == x.project_id.timesheet_encode_uom_id) + time_spent_on_account = analytic_account.get_time_spent_for_period( + start_date ) - if timesheets: - time_spent_on_account = timesheets.filtered( - lambda x: (x.date >= start_date) - ).mapped("unit_amount") - total_time_spent_on_account = sum(time_spent_on_account) - total_time_spent += total_time_spent_on_account * percentage / 100 + total_time_spent += time_spent_on_account * percentage / 100 return total_time_spent def _compute_time_spent(self): for line in self: if line.analytic_distribution and line.start_date: line.time_spent = line.get_time_spent( - line.analytic_distribution, line.start_date + line.analytic_distribution, line.start_date, line.end_date ) else: line.time_spent = False diff --git a/contract_timesheet_monitoring/models/contract_line.py b/contract_timesheet_monitoring/models/contract_line.py index 8925ed7c7..d36e39d98 100644 --- a/contract_timesheet_monitoring/models/contract_line.py +++ b/contract_timesheet_monitoring/models/contract_line.py @@ -8,26 +8,19 @@ class ContractLine(models.Model): string="Time Spent this Period", compute="_compute_time_spent" ) + # this method is a duplicate from get_time_spent in account.move.line + # but this is due to the fact that contract line tend to mimic account move lines + # it make sense to keep these methods separated. def get_time_spent(self, analytic_distribution, start_date, end_date=None): total_time_spent = 0 for analytic_account, percentage in analytic_distribution.items(): - analytic_account_id = int(analytic_account) - analytic_account_lines = ( - self.env["account.analytic.account"] - .browse(analytic_account_id) - .line_ids + analytic_account = self.env["account.analytic.account"].browse( + int(analytic_account) ) - timesheets = analytic_account_lines.filtered( - # keep only timesheets - # ensure the uom is the same as the one configure for the project - # timesheets (hours or day) - lambda x: (x.encoding_uom_id == x.project_id.timesheet_encode_uom_id) + time_spent_on_account = analytic_account.get_time_spent_for_period( + start_date ) - time_spent_on_account = timesheets.filtered( - lambda x: (x.date >= start_date) - ).mapped("unit_amount") - total_time_spent_on_account = sum(time_spent_on_account) - total_time_spent += total_time_spent_on_account * percentage / 100 + total_time_spent += time_spent_on_account * percentage / 100 return total_time_spent def _compute_time_spent(self): From c63ae2514a00e127e86f2a26f6c85a62642b736e Mon Sep 17 00:00:00 2001 From: Victor Champonnois Date: Thu, 21 Mar 2024 11:22:24 +0100 Subject: [PATCH 4/5] fixup --- contract_timesheet_monitoring/README.rst | 4 ++-- contract_timesheet_monitoring/__manifest__.py | 1 - contract_timesheet_monitoring/static/description/index.html | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/contract_timesheet_monitoring/README.rst b/contract_timesheet_monitoring/README.rst index 411268640..3606cf9b2 100644 --- a/contract_timesheet_monitoring/README.rst +++ b/contract_timesheet_monitoring/README.rst @@ -10,9 +10,9 @@ Contract timesheet monitoring !! source digest: sha256:00fb3cdc565442ffcd3351e97d0516ce6f4ceb55402981b183f7e717a1e23173 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -.. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png +.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png :target: https://odoo-community.org/page/development-status - :alt: Production/Stable + :alt: Beta .. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 diff --git a/contract_timesheet_monitoring/__manifest__.py b/contract_timesheet_monitoring/__manifest__.py index 6b24c914b..51f557f7d 100644 --- a/contract_timesheet_monitoring/__manifest__.py +++ b/contract_timesheet_monitoring/__manifest__.py @@ -9,7 +9,6 @@ "author": "Coop IT Easy SC, Odoo Community Association (OCA)", "website": "https://github.com/coopiteasy/addons", "depends": ["contract", "hr_timesheet", "contract_invoice_start_end_dates"], - "development_status": "Production/Stable", "data": [ "views/contract.xml", "views/account_move.xml", diff --git a/contract_timesheet_monitoring/static/description/index.html b/contract_timesheet_monitoring/static/description/index.html index ea4eee57e..6470b1bb0 100644 --- a/contract_timesheet_monitoring/static/description/index.html +++ b/contract_timesheet_monitoring/static/description/index.html @@ -368,7 +368,7 @@

Contract timesheet monitoring

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! source digest: sha256:00fb3cdc565442ffcd3351e97d0516ce6f4ceb55402981b183f7e717a1e23173 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

Production/Stable License: AGPL-3 coopiteasy/addons

+

Beta License: AGPL-3 coopiteasy/addons

Context

This module was developped for clients paying a subscription fee for From 945934877777e9cec6ce9d5a5b207e6ca6dd4d62 Mon Sep 17 00:00:00 2001 From: Victor Champonnois Date: Thu, 21 Mar 2024 13:54:22 +0100 Subject: [PATCH 5/5] update description --- contract_timesheet_monitoring/README.rst | 17 ++++------ .../readme/DESCRIPTION.md | 4 +-- .../readme/ROADMAP.md | 1 - contract_timesheet_monitoring/readme/USAGE.md | 2 ++ .../static/description/index.html | 34 ++++++++++++------- 5 files changed, 32 insertions(+), 26 deletions(-) delete mode 100644 contract_timesheet_monitoring/readme/ROADMAP.md create mode 100644 contract_timesheet_monitoring/readme/USAGE.md diff --git a/contract_timesheet_monitoring/README.rst b/contract_timesheet_monitoring/README.rst index 3606cf9b2..32f52fcbb 100644 --- a/contract_timesheet_monitoring/README.rst +++ b/contract_timesheet_monitoring/README.rst @@ -22,27 +22,24 @@ Contract timesheet monitoring |badge1| |badge2| |badge3| -Context -======= - This module was developped for clients paying a subscription fee for functional support. We wanted to invoice a fixed amount per period, but invoice excess time. This module provide a way for the clients and the service provider to monitor the time spent to compare it with the -threshold. +quantity bought. **Table of contents** .. contents:: :local: -Known issues / Roadmap -====================== +Usage +===== -In order to provide past information about time spent, add a field -time_spent on invoice generated by contracts, computed the same way as -the contract line. Display it on the invoice line table (backend and -portal.) +The time spent for the current period is indicated in the contract line. +Time spent for past periods is indicated in the previous invoices. Note +: this might be confusing if the contract is configured to create +invoices at the begining of the period. Bug Tracker =========== diff --git a/contract_timesheet_monitoring/readme/DESCRIPTION.md b/contract_timesheet_monitoring/readme/DESCRIPTION.md index 496d60395..7c07c3e31 100644 --- a/contract_timesheet_monitoring/readme/DESCRIPTION.md +++ b/contract_timesheet_monitoring/readme/DESCRIPTION.md @@ -1,6 +1,6 @@ -# Context This module was developped for clients paying a subscription fee for functional support. We wanted to invoice a fixed amount per period, but invoice excess time. -This module provide a way for the clients and the service provider to monitor the time spent to compare it with the threshold. +This module provide a way for the clients and the service provider to monitor the time spent to compare it with the quantity bought. + diff --git a/contract_timesheet_monitoring/readme/ROADMAP.md b/contract_timesheet_monitoring/readme/ROADMAP.md deleted file mode 100644 index 901c3f9c6..000000000 --- a/contract_timesheet_monitoring/readme/ROADMAP.md +++ /dev/null @@ -1 +0,0 @@ -In order to provide past information about time spent, add a field time_spent on invoice generated by contracts, computed the same way as the contract line. Display it on the invoice line table (backend and portal.) diff --git a/contract_timesheet_monitoring/readme/USAGE.md b/contract_timesheet_monitoring/readme/USAGE.md new file mode 100644 index 000000000..42dd081ad --- /dev/null +++ b/contract_timesheet_monitoring/readme/USAGE.md @@ -0,0 +1,2 @@ +The time spent for the current period is indicated in the contract line. Time spent for past periods is indicated in the previous invoices. +Note : this might be confusing if the contract is configured to create invoices at the begining of the period. diff --git a/contract_timesheet_monitoring/static/description/index.html b/contract_timesheet_monitoring/static/description/index.html index 6470b1bb0..821f15548 100644 --- a/contract_timesheet_monitoring/static/description/index.html +++ b/contract_timesheet_monitoring/static/description/index.html @@ -369,24 +369,32 @@

Contract timesheet monitoring

!! source digest: sha256:00fb3cdc565442ffcd3351e97d0516ce6f4ceb55402981b183f7e717a1e23173 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

Beta License: AGPL-3 coopiteasy/addons

-
-

Context

This module was developped for clients paying a subscription fee for functional support. We wanted to invoice a fixed amount per period, but invoice excess time. This module provide a way for the clients and the service provider to monitor the time spent to compare it with the -threshold.

+quantity bought.

Table of contents

+ -
-

Known issues / Roadmap

-

In order to provide past information about time spent, add a field -time_spent on invoice generated by contracts, computed the same way as -the contract line. Display it on the invoice line table (backend and -portal.)

+
+

Usage

+

The time spent for the current period is indicated in the contract line. +Time spent for past periods is indicated in the previous invoices. Note +: this might be confusing if the contract is configured to create +invoices at the begining of the period.

-

Bug Tracker

+

Bug Tracker

Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed @@ -394,15 +402,15 @@

Bug Tracker

Do not contact contributors directly about support or help with technical issues.

-

Credits

+

Credits

-

Authors

+

Authors

  • Coop IT Easy SC
-

Maintainers

+

Maintainers

This module is part of the coopiteasy/addons project on GitHub.

You are welcome to contribute.