Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[15.0][MIG]hr_timesheet_sheet_policy_project_manager : Migration to V15 #574

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
a9bc92e
[ADD] hr_timesheet_sheet: policies
alexey-pelykh Nov 12, 2019
79f6684
[UPD] Update hr_timesheet_sheet_policy_project_manager.pot
oca-travis Nov 19, 2019
25580f9
[UPD] README.rst
OCA-git-bot Nov 19, 2019
8b3fae2
[ADD] icon.png
OCA-git-bot Nov 19, 2019
c9cbe54
[FIX] hr_timesheet_sheet_policy*: admin always reviewer
astirpe Dec 23, 2019
fc59bf2
[UPD] Update hr_timesheet_sheet_policy_project_manager.pot
oca-travis Dec 24, 2019
4ddbb9a
hr_timesheet_sheet_policy_project_manager 12.0.1.1.0
OCA-git-bot Dec 24, 2019
811d68e
[UPD] Update hr_timesheet_sheet_policy_project_manager.pot
oca-travis Dec 24, 2019
de5513b
Added translation using Weblate (Spanish)
ruthbeat Mar 8, 2020
771de49
Translated using Weblate (Spanish)
josepmy May 18, 2020
738256a
[IMP] hr_timesheet_sheet_policy_project_manager: black, isort, prettier
davejames Jul 28, 2020
7ab07f6
[MIG] hr_timesheet_sheet_policy_project_manager: Migration to 13.0
davejames Jul 28, 2020
da5bfe9
[UPD] Update hr_timesheet_sheet_policy_project_manager.pot
oca-travis Jul 31, 2020
0a42880
[UPD] README.rst
OCA-git-bot Jul 31, 2020
97ba6cd
Update translation files
oca-transbot Aug 1, 2020
3a85c90
[UPD] Brainbean Apps => CorporateHub
alexey-pelykh Nov 8, 2020
36d2aca
[UPD] README.rst
OCA-git-bot Nov 8, 2020
994c58f
[IMP] hr_timesheet_sheet_policy_project_manager: Black, isort, prett…
fshah-initos Mar 10, 2021
c198c00
[MIG] Migrate module "hr_timesheet_sheet_policy_project_manager" to …
fshah-initos Mar 10, 2021
fdb78f4
[UPD] Update hr_timesheet_sheet_policy_project_manager.pot
oca-travis Apr 30, 2021
1654127
[UPD] README.rst
OCA-git-bot Apr 30, 2021
fba9df9
Added translation using Weblate (Italian)
mymage Jan 10, 2023
094d41b
[IMP]hr_timesheet_sheet_policy_project_manager: black, isort, prettier
bizzappdev Feb 24, 2023
eb134f1
[MIG][15.0]hr_timesheet_sheet_policy_project_manager: Migration to 15.0
bizzappdev Feb 24, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 75 additions & 0 deletions hr_timesheet_sheet_policy_project_manager/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
==========================================
HR Timesheet Sheet: Project Manager Policy
==========================================

.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
: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
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Ftimesheet-lightgray.png?logo=github
:target: https://github.com/OCA/timesheet/tree/14.0/hr_timesheet_sheet_policy_project_manager
:alt: OCA/timesheet
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/timesheet-14-0/timesheet-14-0-hr_timesheet_sheet_policy_project_manager
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
:target: https://runbot.odoo-community.org/runbot/117/14.0
:alt: Try me on Runbot

|badge1| |badge2| |badge3| |badge4| |badge5|

This module allows setting Department Manager as Reviewer on Timesheet Sheets.

**Table of contents**

.. contents::
:local:

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/timesheet/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
`feedback <https://github.com/OCA/timesheet/issues/new?body=module:%20hr_timesheet_sheet_policy_project_manager%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

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

Credits
=======

Authors
~~~~~~~

* CorporateHub

Contributors
~~~~~~~~~~~~

* `CorporateHub <https://corporatehub.eu/>`__

* Alexey Pelykh <alexey.pelykh@corphub.eu>

Maintainers
~~~~~~~~~~~

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

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 <https://github.com/OCA/timesheet/tree/14.0/hr_timesheet_sheet_policy_project_manager>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
3 changes: 3 additions & 0 deletions hr_timesheet_sheet_policy_project_manager/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from . import models
16 changes: 16 additions & 0 deletions hr_timesheet_sheet_policy_project_manager/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Copyright 2019 Brainbean Apps (https://brainbeanapps.com)
# Copyright 2020 CorporateHub (https://corporatehub.eu)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

{
"name": "HR Timesheet Sheet: Project Manager Policy",
"version": "15.0.1.0.0",
"author": "CorporateHub, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/timesheet",
"license": "AGPL-3",
"category": "Human Resources",
"summary": "Allows setting Project Manager as Reviewer",
"depends": ["hr_timesheet_sheet"],
"data": ["views/hr_timesheet_sheet.xml"],
"installable": True,
}
82 changes: 82 additions & 0 deletions hr_timesheet_sheet_policy_project_manager/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * hr_timesheet_sheet_policy_project_manager
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2020-05-18 20:19+0000\n"
"Last-Translator: Josep M <jmyepes@mac.com>\n"
"Language-Team: none\n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 3.10\n"

#. module: hr_timesheet_sheet_policy_project_manager
#: model:ir.model,name:hr_timesheet_sheet_policy_project_manager.model_account_analytic_line
msgid "Analytic Line"
msgstr "Línea analítica"

#. module: hr_timesheet_sheet_policy_project_manager
#: model:ir.model.fields.selection,name:hr_timesheet_sheet_policy_project_manager.selection__res_company__timesheet_sheet_review_policy__project_manager
msgid "By Project Manager"
msgstr "Por responsable de proyecto"

#. module: hr_timesheet_sheet_policy_project_manager
#: model:ir.model,name:hr_timesheet_sheet_policy_project_manager.model_res_company
msgid "Companies"
msgstr "Compañías"

#. module: hr_timesheet_sheet_policy_project_manager
#: model:ir.model.fields,help:hr_timesheet_sheet_policy_project_manager.field_res_company__timesheet_sheet_review_policy
msgid "How Timesheet Sheets review is performed."
msgstr "Cómo ser realiza la revisión de Partes de horas."

#. module: hr_timesheet_sheet_policy_project_manager
#: code:addons/hr_timesheet_sheet_policy_project_manager/models/hr_timesheet_sheet.py:0
#, python-format
msgid "Only a Project Manager can review the sheet."
msgstr "Solo un responsable de proyecto puede revisar el parte."

#. module: hr_timesheet_sheet_policy_project_manager
#: model:ir.model.fields,field_description:hr_timesheet_sheet_policy_project_manager.field_hr_timesheet_sheet__project_id
#: model_terms:ir.ui.view,arch_db:hr_timesheet_sheet_policy_project_manager.view_hr_timesheet_sheet_filter
msgid "Project"
msgstr "Proyecto"

#. module: hr_timesheet_sheet_policy_project_manager
#: code:addons/hr_timesheet_sheet_policy_project_manager/models/hr_timesheet_sheet.py:0
#, python-format
msgid "Review policy \"By Project Manager\" requires Project to be set"
msgstr ""
"La política de revisión \"Por Project Manager\" requiere que se configure en "
"el proyecto"

#. module: hr_timesheet_sheet_policy_project_manager
#: code:addons/hr_timesheet_sheet_policy_project_manager/models/hr_timesheet_sheet.py:0
#, python-format
msgid "The Company in the Timesheet Sheet and in the Project must be the same."
msgstr "La empresa en el parte de horas y en el proyecto deben ser la misma."

#. module: hr_timesheet_sheet_policy_project_manager
#: model:ir.model,name:hr_timesheet_sheet_policy_project_manager.model_hr_timesheet_sheet
msgid "Timesheet Sheet"
msgstr "Parte de horas"

#. module: hr_timesheet_sheet_policy_project_manager
#: model:ir.model.fields,field_description:hr_timesheet_sheet_policy_project_manager.field_res_company__timesheet_sheet_review_policy
msgid "Timesheet Sheet Review Policy"
msgstr "Política de revisión de Parte de horas"

#~ msgid "By Department Manager"
#~ msgstr "Por el responsable del departamento"

#~ msgid "By Direct Manager"
#~ msgstr "Por responsable directo"

#~ msgid "By HR Manager/Officer"
#~ msgstr "Por Reponsable de RRHH"
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * hr_timesheet_sheet_policy_project_manager
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: hr_timesheet_sheet_policy_project_manager
#: model:ir.model,name:hr_timesheet_sheet_policy_project_manager.model_account_analytic_line
msgid "Analytic Line"
msgstr ""

#. module: hr_timesheet_sheet_policy_project_manager
#: model:ir.model.fields.selection,name:hr_timesheet_sheet_policy_project_manager.selection__res_company__timesheet_sheet_review_policy__project_manager
msgid "By Project Manager"
msgstr ""

#. module: hr_timesheet_sheet_policy_project_manager
#: model:ir.model,name:hr_timesheet_sheet_policy_project_manager.model_res_company
msgid "Companies"
msgstr ""

#. module: hr_timesheet_sheet_policy_project_manager
#: model:ir.model.fields,field_description:hr_timesheet_sheet_policy_project_manager.field_account_analytic_line__display_name
#: model:ir.model.fields,field_description:hr_timesheet_sheet_policy_project_manager.field_hr_timesheet_sheet__display_name
#: model:ir.model.fields,field_description:hr_timesheet_sheet_policy_project_manager.field_res_company__display_name
msgid "Display Name"
msgstr ""

#. module: hr_timesheet_sheet_policy_project_manager
#: model:ir.model.fields,help:hr_timesheet_sheet_policy_project_manager.field_res_company__timesheet_sheet_review_policy
msgid "How Timesheet Sheets review is performed."
msgstr ""

#. module: hr_timesheet_sheet_policy_project_manager
#: model:ir.model.fields,field_description:hr_timesheet_sheet_policy_project_manager.field_account_analytic_line__id
#: model:ir.model.fields,field_description:hr_timesheet_sheet_policy_project_manager.field_hr_timesheet_sheet__id
#: model:ir.model.fields,field_description:hr_timesheet_sheet_policy_project_manager.field_res_company__id
msgid "ID"
msgstr ""

#. module: hr_timesheet_sheet_policy_project_manager
#: model:ir.model.fields,field_description:hr_timesheet_sheet_policy_project_manager.field_account_analytic_line____last_update
#: model:ir.model.fields,field_description:hr_timesheet_sheet_policy_project_manager.field_hr_timesheet_sheet____last_update
#: model:ir.model.fields,field_description:hr_timesheet_sheet_policy_project_manager.field_res_company____last_update
msgid "Last Modified on"
msgstr ""

#. module: hr_timesheet_sheet_policy_project_manager
#: code:addons/hr_timesheet_sheet_policy_project_manager/models/hr_timesheet_sheet.py:0
#, python-format
msgid "Only a Project Manager can review the sheet."
msgstr ""

#. module: hr_timesheet_sheet_policy_project_manager
#: model:ir.model.fields,field_description:hr_timesheet_sheet_policy_project_manager.field_hr_timesheet_sheet__project_id
#: model_terms:ir.ui.view,arch_db:hr_timesheet_sheet_policy_project_manager.view_hr_timesheet_sheet_filter
msgid "Project"
msgstr ""

#. module: hr_timesheet_sheet_policy_project_manager
#: code:addons/hr_timesheet_sheet_policy_project_manager/models/hr_timesheet_sheet.py:0
#: code:addons/hr_timesheet_sheet_policy_project_manager/models/hr_timesheet_sheet.py:0
#, python-format
msgid "Review policy \"By Project Manager\" requires Project to be set"
msgstr ""

#. module: hr_timesheet_sheet_policy_project_manager
#: code:addons/hr_timesheet_sheet_policy_project_manager/models/hr_timesheet_sheet.py:0
#, python-format
msgid ""
"The Company in the Timesheet Sheet and in the Project must be the same."
msgstr ""

#. module: hr_timesheet_sheet_policy_project_manager
#: model:ir.model,name:hr_timesheet_sheet_policy_project_manager.model_hr_timesheet_sheet
msgid "Timesheet Sheet"
msgstr ""

#. module: hr_timesheet_sheet_policy_project_manager
#: model:ir.model.fields,field_description:hr_timesheet_sheet_policy_project_manager.field_res_company__timesheet_sheet_review_policy
msgid "Timesheet Sheet Review Policy"
msgstr ""
92 changes: 92 additions & 0 deletions hr_timesheet_sheet_policy_project_manager/i18n/it.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * hr_timesheet_sheet_policy_project_manager
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: Automatically generated\n"
"Language-Team: none\n"
"Language: it\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"

#. module: hr_timesheet_sheet_policy_project_manager
#: model:ir.model,name:hr_timesheet_sheet_policy_project_manager.model_account_analytic_line
msgid "Analytic Line"
msgstr ""

#. module: hr_timesheet_sheet_policy_project_manager
#: model:ir.model.fields.selection,name:hr_timesheet_sheet_policy_project_manager.selection__res_company__timesheet_sheet_review_policy__project_manager
msgid "By Project Manager"
msgstr ""

#. module: hr_timesheet_sheet_policy_project_manager
#: model:ir.model,name:hr_timesheet_sheet_policy_project_manager.model_res_company
msgid "Companies"
msgstr ""

#. module: hr_timesheet_sheet_policy_project_manager
#: model:ir.model.fields,field_description:hr_timesheet_sheet_policy_project_manager.field_account_analytic_line__display_name
#: model:ir.model.fields,field_description:hr_timesheet_sheet_policy_project_manager.field_hr_timesheet_sheet__display_name
#: model:ir.model.fields,field_description:hr_timesheet_sheet_policy_project_manager.field_res_company__display_name
msgid "Display Name"
msgstr ""

#. module: hr_timesheet_sheet_policy_project_manager
#: model:ir.model.fields,help:hr_timesheet_sheet_policy_project_manager.field_res_company__timesheet_sheet_review_policy
msgid "How Timesheet Sheets review is performed."
msgstr ""

#. module: hr_timesheet_sheet_policy_project_manager
#: model:ir.model.fields,field_description:hr_timesheet_sheet_policy_project_manager.field_account_analytic_line__id
#: model:ir.model.fields,field_description:hr_timesheet_sheet_policy_project_manager.field_hr_timesheet_sheet__id
#: model:ir.model.fields,field_description:hr_timesheet_sheet_policy_project_manager.field_res_company__id
msgid "ID"
msgstr ""

#. module: hr_timesheet_sheet_policy_project_manager
#: model:ir.model.fields,field_description:hr_timesheet_sheet_policy_project_manager.field_account_analytic_line____last_update
#: model:ir.model.fields,field_description:hr_timesheet_sheet_policy_project_manager.field_hr_timesheet_sheet____last_update
#: model:ir.model.fields,field_description:hr_timesheet_sheet_policy_project_manager.field_res_company____last_update
msgid "Last Modified on"
msgstr ""

#. module: hr_timesheet_sheet_policy_project_manager
#: code:addons/hr_timesheet_sheet_policy_project_manager/models/hr_timesheet_sheet.py:0
#, python-format
msgid "Only a Project Manager can review the sheet."
msgstr ""

#. module: hr_timesheet_sheet_policy_project_manager
#: model:ir.model.fields,field_description:hr_timesheet_sheet_policy_project_manager.field_hr_timesheet_sheet__project_id
#: model_terms:ir.ui.view,arch_db:hr_timesheet_sheet_policy_project_manager.view_hr_timesheet_sheet_filter
msgid "Project"
msgstr ""

#. module: hr_timesheet_sheet_policy_project_manager
#: code:addons/hr_timesheet_sheet_policy_project_manager/models/hr_timesheet_sheet.py:0
#: code:addons/hr_timesheet_sheet_policy_project_manager/models/hr_timesheet_sheet.py:0
#, python-format
msgid "Review policy \"By Project Manager\" requires Project to be set"
msgstr ""

#. module: hr_timesheet_sheet_policy_project_manager
#: code:addons/hr_timesheet_sheet_policy_project_manager/models/hr_timesheet_sheet.py:0
#, python-format
msgid ""
"The Company in the Timesheet Sheet and in the Project must be the same."
msgstr ""

#. module: hr_timesheet_sheet_policy_project_manager
#: model:ir.model,name:hr_timesheet_sheet_policy_project_manager.model_hr_timesheet_sheet
msgid "Timesheet Sheet"
msgstr ""

#. module: hr_timesheet_sheet_policy_project_manager
#: model:ir.model.fields,field_description:hr_timesheet_sheet_policy_project_manager.field_res_company__timesheet_sheet_review_policy
msgid "Timesheet Sheet Review Policy"
msgstr ""
5 changes: 5 additions & 0 deletions hr_timesheet_sheet_policy_project_manager/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from . import account_analytic_line
from . import hr_timesheet_sheet
from . import res_company
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Copyright 2019 Brainbean Apps (https://brainbeanapps.com)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).

from odoo import models


class AccountAnalyticLine(models.Model):
_inherit = "account.analytic.line"

def _get_sheet_domain(self):
domain = super()._get_sheet_domain()
if self.company_id.timesheet_sheet_review_policy == "project_manager":
domain += [("project_id", "=", self.project_id.id)]
return domain
Loading