diff --git a/hr_timesheet_sheet/README.rst b/hr_timesheet_sheet/README.rst index 60f62e528a..0c7a8b28c2 100644 --- a/hr_timesheet_sheet/README.rst +++ b/hr_timesheet_sheet/README.rst @@ -17,23 +17,24 @@ HR Timesheet Sheet :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Ftimesheet-lightgray.png?logo=github - :target: https://github.com/OCA/timesheet/tree/16.0/hr_timesheet_sheet + :target: https://github.com/OCA/timesheet/tree/17.0/hr_timesheet_sheet :alt: OCA/timesheet .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/timesheet-16-0/timesheet-16-0-hr_timesheet_sheet + :target: https://translation.odoo-community.org/projects/timesheet-17-0/timesheet-17-0-hr_timesheet_sheet :alt: Translate me on Weblate .. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png - :target: https://runboat.odoo-community.org/builds?repo=OCA/timesheet&target_branch=16.0 + :target: https://runboat.odoo-community.org/builds?repo=OCA/timesheet&target_branch=17.0 :alt: Try me on Runboat |badge1| |badge2| |badge3| |badge4| |badge5| -This module supplies a new screen enabling you to manage your work encoding -(timesheet) by period. Timesheet entries are made by employees each day. At the -end of the defined period, employees submit their validated sheet and the -reviewer must then approve submitted entries. Periods are defined in the -company forms and you can set them to run monthly, weekly or daily. By default, -policy is configured to have HR Officers as reviewers. +This module supplies a new screen enabling you to manage your work +encoding (timesheet) by period. Timesheet entries are made by employees +each day. At the end of the defined period, employees submit their +validated sheet and the reviewer must then approve submitted entries. +Periods are defined in the company forms and you can set them to run +monthly, weekly or daily. By default, policy is configured to have HR +Officers as reviewers. **Table of contents** @@ -45,40 +46,46 @@ Installation This module relies on: -* The OCA module '2D matrix for x2many fields', and can be downloaded from - Github: https://github.com/OCA/web/tree/16.0/web_widget_x2many_2d_matrix +- The OCA module '2D matrix for x2many fields', and can be downloaded + from Github: + https://github.com/OCA/web/tree/16.0/web_widget_x2many_2d_matrix Configuration ============= If you want other default ranges different from weekly, you need to go: -* In the menu `Configuration` -> `Settings` -> **Timesheet Options**, - and select in **Timesheet Sheet Range** the default range you want. -* When you have a weekly range you can also specify the **Week Start Day**. +- In the menu Configuration -> Settings -> **Timesheet Options**, and + select in **Timesheet Sheet Range** the default range you want. +- When you have a weekly range you can also specify the **Week Start + Day**. -To change who reviews submitted sheets, go to *Configuration > Settings > Timesheet Options* -and configure **Timesheet Sheet Review Policy** accordingly. +To change who reviews submitted sheets, go to *Configuration > Settings +> Timesheet Options* and configure **Timesheet Sheet Review Policy** +accordingly. -For adding more review policies, look at the *hr_timesheet_sheet_policy_xxx* -extra modules. +For adding more review policies, look at the +*hr_timesheet_sheet_policy_xxx* extra modules. Usage ===== -If you modify the `Details` tab, automatically the `Summary` tab is updated. -But if you modify the `Summary` tab, you need to save in order to have the `Details` tab updated. +If you modify the Details tab, automatically the Summary tab is updated. +But if you modify the Summary tab, you need to save in order to have the +Details tab updated. -In case you modify the unit amount of both tabs, the `Details` tab will prevail. -If you modify the `Summary` tab, and you need to do a change in the `Details` tab, please save before. +In case you modify the unit amount of both tabs, the Details tab will +prevail. If you modify the Summary tab, and you need to do a change in +the Details tab, please save before. Known issues / Roadmap ====================== -* The timesheet grid is limited to display a max. of 1M cells, due to a - limitation of the tree view limit parameter not being able to dynamically - set a limit. Since default value of odoo, 40 records is too small, we decided - to set 1M, which should be good enough in the majority of scenarios. +- The timesheet grid is limited to display a max. of 1M cells, due to a + limitation of the tree view limit parameter not being able to + dynamically set a limit. Since default value of odoo, 40 records is + too small, we decided to set 1M, which should be good enough in the + majority of scenarios. Bug Tracker =========== @@ -86,7 +93,7 @@ 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 `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -94,27 +101,28 @@ Credits ======= Authors -~~~~~~~ +------- * ForgeFlow * Onestein * CorporateHub Contributors -~~~~~~~~~~~~ +------------ -* Miquel Raïch -* Andrea Stirpe -* Lois Rilo -* `CorporateHub `__ +- Miquel Raïch +- Andrea Stirpe +- Lois Rilo +- `CorporateHub `__ - * Alexey Pelykh + - Alexey Pelykh -* Dennis Sluijk -* Sunanda Chhatbar +- Dennis Sluijk +- Sunanda Chhatbar +- SodexisTeam Maintainers -~~~~~~~~~~~ +----------- This module is maintained by the OCA. @@ -126,6 +134,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use. -This module is part of the `OCA/timesheet `_ project on GitHub. +This module is part of the `OCA/timesheet `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/hr_timesheet_sheet/__manifest__.py b/hr_timesheet_sheet/__manifest__.py index 72a3422350..5b352397bf 100644 --- a/hr_timesheet_sheet/__manifest__.py +++ b/hr_timesheet_sheet/__manifest__.py @@ -6,7 +6,7 @@ { "name": "HR Timesheet Sheet", - "version": "16.0.1.1.1", + "version": "17.0.1.1.1", "category": "Human Resources", "sequence": 80, "summary": "Timesheet Sheets, Activities", diff --git a/hr_timesheet_sheet/models/account_analytic_account.py b/hr_timesheet_sheet/models/account_analytic_account.py index c65b55c07a..677e945f9e 100644 --- a/hr_timesheet_sheet/models/account_analytic_account.py +++ b/hr_timesheet_sheet/models/account_analytic_account.py @@ -12,7 +12,7 @@ class AccountAnalyticAccount(models.Model): def _check_timesheet_sheet_company_id(self): for rec in self.sudo(): sheets = rec.line_ids.mapped("sheet_id").filtered( - lambda s: s.company_id and s.company_id != rec.company_id + lambda s, rec=rec: s.company_id and rec.company_id != s.company_id ) if sheets: raise ValidationError( diff --git a/hr_timesheet_sheet/models/account_analytic_line.py b/hr_timesheet_sheet/models/account_analytic_line.py index 647f5010cf..7f6ebbacd2 100644 --- a/hr_timesheet_sheet/models/account_analytic_line.py +++ b/hr_timesheet_sheet/models/account_analytic_line.py @@ -135,5 +135,18 @@ def merge_timesheets(self): self[1:].unlink() return self[0] - def _check_can_update_timesheet(self): - return super()._check_can_update_timesheet() or not self.filtered("sheet_id") + def _check_can_write(self, values): + if not self.env.su: + if self.holiday_id and values.get( + "sheet_id", False + ): # Dont raise error during create + return True + if self.holiday_id and self.sheet_id: + raise UserError( + _( + """You cannot modify timesheets that are linked to \ +time off requests. +Please use the Time Off application to modify your time off requests instead.""" + ) + ) + return super()._check_can_write(values) diff --git a/hr_timesheet_sheet/models/hr_department.py b/hr_timesheet_sheet/models/hr_department.py index 7a9bf089a2..ea1c368d45 100644 --- a/hr_timesheet_sheet/models/hr_department.py +++ b/hr_timesheet_sheet/models/hr_department.py @@ -47,7 +47,8 @@ def _check_company_id(self): _( "You cannot change the company, " "as this %(rec_name)s (%(rec_display_name)s) " - "is assigned to %(current_name)s (%(current_display_name)s).", + "is assigned to %(current_name)s \ + (%(current_display_name)s).", rec_name=rec._name, rec_display_name=rec.display_name, current_name=field._name, diff --git a/hr_timesheet_sheet/models/hr_employee.py b/hr_timesheet_sheet/models/hr_employee.py index ebea973d36..7fbd8532f4 100644 --- a/hr_timesheet_sheet/models/hr_employee.py +++ b/hr_timesheet_sheet/models/hr_employee.py @@ -47,7 +47,8 @@ def _check_company_id(self): _( "You cannot change the company, " "as this %(rec_name)s (%(rec_display_name)s) " - "is assigned to %(current_name)s (%(current_display_name)s).", + "is assigned to %(current_name)s \ + (%(current_display_name)s).", rec_name=rec._name, rec_display_name=rec.display_name, current_name=field._name, diff --git a/hr_timesheet_sheet/models/hr_timesheet_sheet.py b/hr_timesheet_sheet/models/hr_timesheet_sheet.py index 15496811d4..a10ca93f95 100644 --- a/hr_timesheet_sheet/models/hr_timesheet_sheet.py +++ b/hr_timesheet_sheet/models/hr_timesheet_sheet.py @@ -63,7 +63,6 @@ def _default_department_id(self): default=lambda self: self._default_employee(), required=True, readonly=True, - states={"new": [("readonly", False)]}, ) user_id = fields.Many2one( comodel_name="res.users", @@ -78,7 +77,6 @@ def _default_department_id(self): required=True, index=True, readonly=True, - states={"new": [("readonly", False)]}, ) date_end = fields.Date( string="Date To", @@ -86,28 +84,24 @@ def _default_department_id(self): required=True, index=True, readonly=True, - states={"new": [("readonly", False)]}, ) timesheet_ids = fields.One2many( comodel_name="account.analytic.line", inverse_name="sheet_id", string="Timesheets", readonly=True, - states={"new": [("readonly", False)], "draft": [("readonly", False)]}, ) line_ids = fields.One2many( comodel_name="hr_timesheet.sheet.line", compute="_compute_line_ids", string="Timesheet Sheet Lines", readonly=True, - states={"new": [("readonly", False)], "draft": [("readonly", False)]}, ) new_line_ids = fields.One2many( comodel_name="hr_timesheet.sheet.new.analytic.line", inverse_name="sheet_id", string="Temporary Timesheets", readonly=True, - states={"new": [("readonly", False)], "draft": [("readonly", False)]}, ) state = fields.Selection( [ @@ -141,7 +135,6 @@ def _default_department_id(self): string="Department", default=lambda self: self._default_department_id(), readonly=True, - states={"new": [("readonly", False)]}, ) reviewer_id = fields.Many2one( comodel_name="hr.employee", string="Reviewer", readonly=True, tracking=True @@ -244,7 +237,7 @@ def _check_start_end_dates(self): def _get_complete_name_components(self): """Hook for extensions""" self.ensure_one() - return [self.employee_id.name_get()[0][1]] + return [self.employee_id.display_name] def _get_overlapping_sheet_domain(self): """Hook for extensions""" @@ -404,9 +397,9 @@ def _get_matrix_key_values_for_line(self, aal): def _get_matrix_sortby(self, key): res = [] for attribute in key: - if hasattr(attribute, "name_get"): - name = attribute.name_get() - value = name[0][1] if name else "" + if hasattr(attribute, "display_name"): + name = attribute.display_name + value = name if name else "" else: value = attribute res.append(value) @@ -612,11 +605,9 @@ def _get_dates(self): def _get_line_name(self, project_id, task_id=None, **kwargs): self.ensure_one() if task_id: - return "{} - {}".format( - project_id.name_get()[0][1], task_id.name_get()[0][1] - ) + return f"{project_id.display_name} - {task_id.display_name}" - return project_id.name_get()[0][1] + return project_id.display_name def _get_new_line_unique_id(self): """Hook for extensions""" @@ -702,7 +693,7 @@ def _is_line_of_row(self, aal, row): def delete_empty_lines(self, delete_empty_rows=False): self.ensure_one() for name in list(set(self.line_ids.mapped("value_y"))): - rows = self.line_ids.filtered(lambda l: l.value_y == name) + rows = self.line_ids.filtered(lambda x, name=name: x.value_y == name) if not rows: continue row = fields.first(rows) @@ -713,7 +704,7 @@ def delete_empty_lines(self, delete_empty_rows=False): if not check: continue row_lines = self.timesheet_ids.filtered( - lambda aal: self._is_line_of_row(aal, row) + lambda aal, row=row: self._is_line_of_row(aal, row) ) row_lines.filtered( lambda t: t.name == empty_name @@ -767,7 +758,7 @@ def add_new_line(self, line): self.ensure_one() new_line_model = self.env["hr_timesheet.sheet.new.analytic.line"] new_line = self.new_line_ids.filtered( - lambda l: self._is_compatible_new_line(l, line) + lambda x: self._is_compatible_new_line(x, line) ) if new_line: new_line.write({"unit_amount": line.unit_amount}) diff --git a/hr_timesheet_sheet/pyproject.toml b/hr_timesheet_sheet/pyproject.toml new file mode 100644 index 0000000000..4231d0cccb --- /dev/null +++ b/hr_timesheet_sheet/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/hr_timesheet_sheet/readme/CONFIGURE.md b/hr_timesheet_sheet/readme/CONFIGURE.md new file mode 100644 index 0000000000..89ebdd4e99 --- /dev/null +++ b/hr_timesheet_sheet/readme/CONFIGURE.md @@ -0,0 +1,13 @@ +If you want other default ranges different from weekly, you need to go: + +- In the menu Configuration -\> Settings -\> **Timesheet Options**, and + select in **Timesheet Sheet Range** the default range you want. +- When you have a weekly range you can also specify the **Week Start + Day**. + +To change who reviews submitted sheets, go to *Configuration \> Settings +\> Timesheet Options* and configure **Timesheet Sheet Review Policy** +accordingly. + +For adding more review policies, look at the +*hr_timesheet_sheet_policy_xxx* extra modules. diff --git a/hr_timesheet_sheet/readme/CONFIGURE.rst b/hr_timesheet_sheet/readme/CONFIGURE.rst deleted file mode 100644 index fe82ce0bdb..0000000000 --- a/hr_timesheet_sheet/readme/CONFIGURE.rst +++ /dev/null @@ -1,11 +0,0 @@ -If you want other default ranges different from weekly, you need to go: - -* In the menu `Configuration` -> `Settings` -> **Timesheet Options**, - and select in **Timesheet Sheet Range** the default range you want. -* When you have a weekly range you can also specify the **Week Start Day**. - -To change who reviews submitted sheets, go to *Configuration > Settings > Timesheet Options* -and configure **Timesheet Sheet Review Policy** accordingly. - -For adding more review policies, look at the *hr_timesheet_sheet_policy_xxx* -extra modules. diff --git a/hr_timesheet_sheet/readme/CONTRIBUTORS.md b/hr_timesheet_sheet/readme/CONTRIBUTORS.md new file mode 100644 index 0000000000..8ff0dac779 --- /dev/null +++ b/hr_timesheet_sheet/readme/CONTRIBUTORS.md @@ -0,0 +1,8 @@ +- Miquel Raïch \<\> +- Andrea Stirpe \<\> +- Lois Rilo \<\> +- [CorporateHub](https://corporatehub.eu/) + - Alexey Pelykh \<\> +- Dennis Sluijk \<\> +- Sunanda Chhatbar \<\> +- SodexisTeam \<\> diff --git a/hr_timesheet_sheet/readme/CONTRIBUTORS.rst b/hr_timesheet_sheet/readme/CONTRIBUTORS.rst deleted file mode 100644 index 2d8d4aede7..0000000000 --- a/hr_timesheet_sheet/readme/CONTRIBUTORS.rst +++ /dev/null @@ -1,9 +0,0 @@ -* Miquel Raïch -* Andrea Stirpe -* Lois Rilo -* `CorporateHub `__ - - * Alexey Pelykh - -* Dennis Sluijk -* Sunanda Chhatbar diff --git a/hr_timesheet_sheet/readme/DESCRIPTION.md b/hr_timesheet_sheet/readme/DESCRIPTION.md new file mode 100644 index 0000000000..deb5de2ea1 --- /dev/null +++ b/hr_timesheet_sheet/readme/DESCRIPTION.md @@ -0,0 +1,7 @@ +This module supplies a new screen enabling you to manage your work +encoding (timesheet) by period. Timesheet entries are made by employees +each day. At the end of the defined period, employees submit their +validated sheet and the reviewer must then approve submitted entries. +Periods are defined in the company forms and you can set them to run +monthly, weekly or daily. By default, policy is configured to have HR +Officers as reviewers. diff --git a/hr_timesheet_sheet/readme/DESCRIPTION.rst b/hr_timesheet_sheet/readme/DESCRIPTION.rst deleted file mode 100644 index c2cd54d5ce..0000000000 --- a/hr_timesheet_sheet/readme/DESCRIPTION.rst +++ /dev/null @@ -1,6 +0,0 @@ -This module supplies a new screen enabling you to manage your work encoding -(timesheet) by period. Timesheet entries are made by employees each day. At the -end of the defined period, employees submit their validated sheet and the -reviewer must then approve submitted entries. Periods are defined in the -company forms and you can set them to run monthly, weekly or daily. By default, -policy is configured to have HR Officers as reviewers. diff --git a/hr_timesheet_sheet/readme/INSTALL.md b/hr_timesheet_sheet/readme/INSTALL.md new file mode 100644 index 0000000000..fcda9f3259 --- /dev/null +++ b/hr_timesheet_sheet/readme/INSTALL.md @@ -0,0 +1,5 @@ +This module relies on: + +- The OCA module '2D matrix for x2many fields', and can be downloaded + from Github: + diff --git a/hr_timesheet_sheet/readme/INSTALL.rst b/hr_timesheet_sheet/readme/INSTALL.rst deleted file mode 100644 index d18446f254..0000000000 --- a/hr_timesheet_sheet/readme/INSTALL.rst +++ /dev/null @@ -1,4 +0,0 @@ -This module relies on: - -* The OCA module '2D matrix for x2many fields', and can be downloaded from - Github: https://github.com/OCA/web/tree/16.0/web_widget_x2many_2d_matrix diff --git a/hr_timesheet_sheet/readme/ROADMAP.md b/hr_timesheet_sheet/readme/ROADMAP.md new file mode 100644 index 0000000000..2246f76ca6 --- /dev/null +++ b/hr_timesheet_sheet/readme/ROADMAP.md @@ -0,0 +1,5 @@ +- The timesheet grid is limited to display a max. of 1M cells, due to a + limitation of the tree view limit parameter not being able to + dynamically set a limit. Since default value of odoo, 40 records is + too small, we decided to set 1M, which should be good enough in the + majority of scenarios. diff --git a/hr_timesheet_sheet/readme/ROADMAP.rst b/hr_timesheet_sheet/readme/ROADMAP.rst deleted file mode 100644 index df6a2f592d..0000000000 --- a/hr_timesheet_sheet/readme/ROADMAP.rst +++ /dev/null @@ -1,4 +0,0 @@ -* The timesheet grid is limited to display a max. of 1M cells, due to a - limitation of the tree view limit parameter not being able to dynamically - set a limit. Since default value of odoo, 40 records is too small, we decided - to set 1M, which should be good enough in the majority of scenarios. diff --git a/hr_timesheet_sheet/readme/USAGE.md b/hr_timesheet_sheet/readme/USAGE.md new file mode 100644 index 0000000000..f3a5ef27c0 --- /dev/null +++ b/hr_timesheet_sheet/readme/USAGE.md @@ -0,0 +1,7 @@ +If you modify the Details tab, automatically the Summary tab is updated. +But if you modify the Summary tab, you need to save in order to have the +Details tab updated. + +In case you modify the unit amount of both tabs, the Details tab will +prevail. If you modify the Summary tab, and you need to do a change in +the Details tab, please save before. diff --git a/hr_timesheet_sheet/readme/USAGE.rst b/hr_timesheet_sheet/readme/USAGE.rst deleted file mode 100644 index 51a71cc74b..0000000000 --- a/hr_timesheet_sheet/readme/USAGE.rst +++ /dev/null @@ -1,5 +0,0 @@ -If you modify the `Details` tab, automatically the `Summary` tab is updated. -But if you modify the `Summary` tab, you need to save in order to have the `Details` tab updated. - -In case you modify the unit amount of both tabs, the `Details` tab will prevail. -If you modify the `Summary` tab, and you need to do a change in the `Details` tab, please save before. diff --git a/hr_timesheet_sheet/static/description/index.html b/hr_timesheet_sheet/static/description/index.html index 4271c36779..be50b6ed4e 100644 --- a/hr_timesheet_sheet/static/description/index.html +++ b/hr_timesheet_sheet/static/description/index.html @@ -8,10 +8,11 @@ /* :Author: David Goodger (goodger@python.org) -:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $ +:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $ :Copyright: This stylesheet has been placed in the public domain. Default cascading style sheet for the HTML output of Docutils. +Despite the name, some widely supported CSS2 features are used. See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to customize this style sheet. @@ -274,7 +275,7 @@ margin-left: 2em ; margin-right: 2em } -pre.code .ln { color: grey; } /* line numbers */ +pre.code .ln { color: gray; } /* line numbers */ pre.code, code { background-color: #eeeeee } pre.code .comment, code .comment { color: #5C6576 } pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold } @@ -300,7 +301,7 @@ span.pre { white-space: pre } -span.problematic { +span.problematic, pre.problematic { color: red } span.section-subtitle { @@ -368,13 +369,14 @@

HR Timesheet Sheet

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! source digest: sha256:9b0cea81d5ffdb623c2b990db0977b513ab7f2f57e9367735012c98ec30c749c !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

Beta License: AGPL-3 OCA/timesheet Translate me on Weblate Try me on Runboat

-

This module supplies a new screen enabling you to manage your work encoding -(timesheet) by period. Timesheet entries are made by employees each day. At the -end of the defined period, employees submit their validated sheet and the -reviewer must then approve submitted entries. Periods are defined in the -company forms and you can set them to run monthly, weekly or daily. By default, -policy is configured to have HR Officers as reviewers.

+

Beta License: AGPL-3 OCA/timesheet Translate me on Weblate Try me on Runboat

+

This module supplies a new screen enabling you to manage your work +encoding (timesheet) by period. Timesheet entries are made by employees +each day. At the end of the defined period, employees submit their +validated sheet and the reviewer must then approve submitted entries. +Periods are defined in the company forms and you can set them to run +monthly, weekly or daily. By default, policy is configured to have HR +Officers as reviewers.

Table of contents

Configuration

If you want other default ranges different from weekly, you need to go:

    -
  • In the menu Configuration -> Settings -> Timesheet Options, -and select in Timesheet Sheet Range the default range you want.
  • -
  • When you have a weekly range you can also specify the Week Start Day.
  • +
  • In the menu Configuration -> Settings -> Timesheet Options, and +select in Timesheet Sheet Range the default range you want.
  • +
  • When you have a weekly range you can also specify the Week Start +Day.
-

To change who reviews submitted sheets, go to Configuration > Settings > Timesheet Options -and configure Timesheet Sheet Review Policy accordingly.

-

For adding more review policies, look at the hr_timesheet_sheet_policy_xxx -extra modules.

+

To change who reviews submitted sheets, go to Configuration > Settings +> Timesheet Options and configure Timesheet Sheet Review Policy +accordingly.

+

For adding more review policies, look at the +hr_timesheet_sheet_policy_xxx extra modules.

Usage

-

If you modify the Details tab, automatically the Summary tab is updated. -But if you modify the Summary tab, you need to save in order to have the Details tab updated.

-

In case you modify the unit amount of both tabs, the Details tab will prevail. -If you modify the Summary tab, and you need to do a change in the Details tab, please save before.

+

If you modify the Details tab, automatically the Summary tab is updated. +But if you modify the Summary tab, you need to save in order to have the +Details tab updated.

+

In case you modify the unit amount of both tabs, the Details tab will +prevail. If you modify the Summary tab, and you need to do a change in +the Details tab, please save before.

Known issues / Roadmap

  • The timesheet grid is limited to display a max. of 1M cells, due to a -limitation of the tree view limit parameter not being able to dynamically -set a limit. Since default value of odoo, 40 records is too small, we decided -to set 1M, which should be good enough in the majority of scenarios.
  • +limitation of the tree view limit parameter not being able to +dynamically set a limit. Since default value of odoo, 40 records is +too small, we decided to set 1M, which should be good enough in the +majority of scenarios.
@@ -433,7 +441,7 @@

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.

+feedback.

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

@@ -458,16 +466,19 @@

Contributors

  • Dennis Sluijk <d.sluijk@onestein.nl>
  • Sunanda Chhatbar <sunanda.chhatbar@initos.com>
  • +
  • SodexisTeam <dev@sodexis.com>
  • Maintainers

    This module is maintained by the OCA.

    -Odoo Community Association + +Odoo Community Association +

    OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.

    -

    This module is part of the OCA/timesheet project on GitHub.

    +

    This module is part of the OCA/timesheet project on GitHub.

    You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

    diff --git a/hr_timesheet_sheet/tests/test_hr_timesheet_sheet.py b/hr_timesheet_sheet/tests/test_hr_timesheet_sheet.py index 3404dba804..527dcee17c 100644 --- a/hr_timesheet_sheet/tests/test_hr_timesheet_sheet.py +++ b/hr_timesheet_sheet/tests/test_hr_timesheet_sheet.py @@ -373,7 +373,7 @@ def test_2(self): line_form.unit_amount = 1.0 self.assertEqual(len(sheet.new_line_ids), 1) line2 = fields.first( - sheet.line_ids.filtered(lambda l: l.date != timesheet.date) + sheet.line_ids.filtered(lambda x: x.date != timesheet.date) ) self.assertEqual(line2.unit_amount, 1.0) self.assertEqual(len(sheet.timesheet_ids), 2) @@ -473,7 +473,7 @@ def test_4(self): self.assertEqual(timesheet_1_or_2.unit_amount, 1.0) self.assertEqual(timesheet_3.unit_amount, 0.0) - line = sheet.line_ids.filtered(lambda l: l.unit_amount != 0.0) + line = sheet.line_ids.filtered(lambda x: x.unit_amount != 0.0) self.assertEqual(len(line), 1) self.assertEqual(line.unit_amount, 1.0) @@ -526,7 +526,7 @@ def test_5(self): pass # trigger edit and save self.assertEqual(len(sheet.line_ids), 7) self.assertEqual(len(sheet.timesheet_ids), 2) - line = sheet.line_ids.filtered(lambda l: l.unit_amount != 0.0) + line = sheet.line_ids.filtered(lambda x: x.unit_amount != 0.0) self.assertEqual(line.unit_amount, 4.0) timesheet_2.name = empty_name @@ -622,7 +622,7 @@ def test_6(self): pass # trigger edit and save self.assertEqual(len(sheet.line_ids), 7) self.assertEqual(len(sheet.timesheet_ids), 5) - line = sheet.line_ids.filtered(lambda l: l.unit_amount != 0.0) + line = sheet.line_ids.filtered(lambda x: x.unit_amount != 0.0) self.assertEqual(line.unit_amount, 10.0) timesheet_2.name = empty_name @@ -652,7 +652,7 @@ def test_6(self): line_form.unit_amount = 3.0 self.assertEqual(len(sheet.new_line_ids), 1) self.assertEqual(len(sheet.timesheet_ids), 4) - line = sheet.line_ids.filtered(lambda l: l.unit_amount != 0.0) + line = sheet.line_ids.filtered(lambda x: x.unit_amount != 0.0) self.assertEqual(line.unit_amount, 3.0) timesheet_3_4_and_5 = self.aal_model.search( @@ -676,7 +676,7 @@ def test_6(self): with Form(sheet.with_user(self.user)): pass # trigger edit and save self.assertEqual(len(sheet.timesheet_ids), 4) - line = sheet.line_ids.filtered(lambda l: l.unit_amount != 0.0) + line = sheet.line_ids.filtered(lambda x: x.unit_amount != 0.0) self.assertEqual(len(line), 1) self.assertEqual(line.unit_amount, 5.0) @@ -866,7 +866,7 @@ def test_12_creating_sheet(self): self.assertEqual(len(sheet.timesheet_ids), 1) self.assertEqual(len(sheet.line_ids), 7) - line = sheet.line_ids.filtered(lambda l: l.unit_amount) + line = sheet.line_ids.filtered(lambda x: x.unit_amount) self.assertEqual(len(line), 1) self.assertEqual(line.unit_amount, 2.0) diff --git a/hr_timesheet_sheet/views/account_analytic_line_views.xml b/hr_timesheet_sheet/views/account_analytic_line_views.xml index 3cff88b3bf..cc897ed006 100644 --- a/hr_timesheet_sheet/views/account_analytic_line_views.xml +++ b/hr_timesheet_sheet/views/account_analytic_line_views.xml @@ -12,10 +12,7 @@ - + diff --git a/hr_timesheet_sheet/views/hr_department_views.xml b/hr_timesheet_sheet/views/hr_department_views.xml index a898724f6a..27b3be80e2 100644 --- a/hr_timesheet_sheet/views/hr_department_views.xml +++ b/hr_timesheet_sheet/views/hr_department_views.xml @@ -40,7 +40,7 @@
    - +
    @@ -52,7 +52,7 @@ type="action" > Timesheets diff --git a/hr_timesheet_sheet/views/hr_timesheet_sheet_views.xml b/hr_timesheet_sheet/views/hr_timesheet_sheet_views.xml index 6ce6aad1ad..a06ab51e00 100644 --- a/hr_timesheet_sheet/views/hr_timesheet_sheet_views.xml +++ b/hr_timesheet_sheet/views/hr_timesheet_sheet_views.xml @@ -17,13 +17,13 @@ > - + - + @@ -35,7 +35,7 @@ 1000 - 1 + 1 @@ -53,26 +53,26 @@ string="Submit to Reviewer" type="object" class="oe_highlight" - attrs="{'invisible': [('state', '!=', 'draft')]}" + invisible="state != 'draft'" />