Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
54 changes: 54 additions & 0 deletions crm_claim_timesheet/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
===================
CRM Claim Timesheet
===================

.. |badge1| 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


|badge1|

This module allows to generate timesheets from claims.

**Table of contents**

.. contents::
:local:

Usage
=====

* In pipeline/lead forms you have Timesheet tab.

Known issues / Roadmap
======================

* Window actions `crm.crm_lead_all_leads` and
`crm.crm_lead_opportunities_tree_view` contexts are overwritten for
hiding the lead field in timesheet embedded view. As this is not
accumulative, this change might be lost by other module overwritting the
same action, or this masks another module overwritting.

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:%20crm_timesheet%0Aversion:%2012.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
~~~~~~~

* Tecnativa

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


1 change: 1 addition & 0 deletions crm_claim_timesheet/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
20 changes: 20 additions & 0 deletions crm_claim_timesheet/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Copyright 2019 Oihane Crucelaegui - AvanzOSC
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).

{
"name": "CRM Claim Timesheet",
"version": "12.0.1.0.0",
"category": "Customer Relationship Management",
"license": "AGPL-3",
"author": "AvanzOSC",
"website": "http://www.avanzosc.es",
"depends": [
"crm_claim",
"hr_timesheet"
],
"data": [
"views/crm_claim_view.xml",
"views/hr_timesheet_view.xml",
],
"installable": True,
}
38 changes: 38 additions & 0 deletions crm_claim_timesheet/i18n/crm_timesheet.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * crm_timesheet
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.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: crm_timesheet
#: model:ir.model,name:crm_timesheet.model_account_analytic_line
msgid "Analytic Line"
msgstr ""

#. module: crm_timesheet
#: model:ir.model,name:crm_timesheet.model_crm_lead
#: model:ir.model.fields,field_description:crm_timesheet.field_account_analytic_line__lead_id
msgid "Lead/Opportunity"
msgstr ""

#. module: crm_timesheet
#: model:ir.model.fields,field_description:crm_timesheet.field_crm_lead__project_id
msgid "Project"
msgstr ""

#. module: crm_timesheet
#: model:ir.model.fields,field_description:crm_timesheet.field_crm_lead__timesheet_ids
#: model_terms:ir.ui.view,arch_db:crm_timesheet.crm_case_form_view_leads
#: model_terms:ir.ui.view,arch_db:crm_timesheet.crm_case_form_view_oppor
msgid "Timesheet"
msgstr ""

43 changes: 43 additions & 0 deletions crm_claim_timesheet/i18n/cs_CZ.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * crm_timesheet
#
# Translators:
# Lukáš Spurný <[email protected]>, 2018
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-02-23 01:55+0000\n"
"PO-Revision-Date: 2018-02-23 01:55+0000\n"
"Last-Translator: Lukáš Spurný <[email protected]>, 2018\n"
"Language-Team: Czech (Czech Republic) (https://www.transifex.com/oca/"
"teams/23907/cs_CZ/)\n"
"Language: cs_CZ\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"

#. module: crm_timesheet
#: model:ir.model,name:crm_timesheet.model_account_analytic_line
msgid "Analytic Line"
msgstr "Analytická linka"

#. module: crm_timesheet
#: model:ir.model,name:crm_timesheet.model_crm_lead
#: model:ir.model.fields,field_description:crm_timesheet.field_account_analytic_line__lead_id
msgid "Lead/Opportunity"
msgstr "Vedoucí/příležitost"

#. module: crm_timesheet
#: model:ir.model.fields,field_description:crm_timesheet.field_crm_lead__project_id
msgid "Project"
msgstr "Projekt"

#. module: crm_timesheet
#: model:ir.model.fields,field_description:crm_timesheet.field_crm_lead__timesheet_ids
#: model_terms:ir.ui.view,arch_db:crm_timesheet.crm_case_form_view_leads
#: model_terms:ir.ui.view,arch_db:crm_timesheet.crm_case_form_view_oppor
msgid "Timesheet"
msgstr "Rozvrh hodin"
40 changes: 40 additions & 0 deletions crm_claim_timesheet/i18n/de.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * crm_timesheet
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2019-07-11 12:43+0000\n"
"Last-Translator: Maria Sparenberg <[email protected]>\n"
"Language-Team: none\n"
"Language: de\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.7.1\n"

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

#. module: crm_timesheet
#: model:ir.model,name:crm_timesheet.model_crm_lead
#: model:ir.model.fields,field_description:crm_timesheet.field_account_analytic_line__lead_id
msgid "Lead/Opportunity"
msgstr "Interessent / Chance"

#. module: crm_timesheet
#: model:ir.model.fields,field_description:crm_timesheet.field_crm_lead__project_id
msgid "Project"
msgstr "Projekt"

#. module: crm_timesheet
#: model:ir.model.fields,field_description:crm_timesheet.field_crm_lead__timesheet_ids
#: model_terms:ir.ui.view,arch_db:crm_timesheet.crm_case_form_view_leads
#: model_terms:ir.ui.view,arch_db:crm_timesheet.crm_case_form_view_oppor
msgid "Timesheet"
msgstr "Zeiterfassung"
43 changes: 43 additions & 0 deletions crm_claim_timesheet/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * crm_timesheet
#
# Translators:
# OCA Transbot <[email protected]>, 2018
# enjolras <[email protected]>, 2018
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-03-03 05:20+0000\n"
"PO-Revision-Date: 2018-03-03 05:20+0000\n"
"Last-Translator: enjolras <[email protected]>, 2018\n"
"Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\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"

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

#. module: crm_timesheet
#: model:ir.model,name:crm_timesheet.model_crm_lead
#: model:ir.model.fields,field_description:crm_timesheet.field_account_analytic_line__lead_id
msgid "Lead/Opportunity"
msgstr "Iniciativa/Oportunidad"

#. module: crm_timesheet
#: model:ir.model.fields,field_description:crm_timesheet.field_crm_lead__project_id
msgid "Project"
msgstr "Proyecto"

#. module: crm_timesheet
#: model:ir.model.fields,field_description:crm_timesheet.field_crm_lead__timesheet_ids
#: model_terms:ir.ui.view,arch_db:crm_timesheet.crm_case_form_view_leads
#: model_terms:ir.ui.view,arch_db:crm_timesheet.crm_case_form_view_oppor
msgid "Timesheet"
msgstr "Parte de horas"
42 changes: 42 additions & 0 deletions crm_claim_timesheet/i18n/fr.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * crm_timesheet
#
# Translators:
# Quentin THEURET <[email protected]>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-08-18 00:44+0000\n"
"PO-Revision-Date: 2017-08-18 00:44+0000\n"
"Last-Translator: Quentin THEURET <[email protected]>, 2017\n"
"Language-Team: French (https://www.transifex.com/oca/teams/23907/fr/)\n"
"Language: fr\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: crm_timesheet
#: model:ir.model,name:crm_timesheet.model_account_analytic_line
msgid "Analytic Line"
msgstr "Ligne analytique"

#. module: crm_timesheet
#: model:ir.model,name:crm_timesheet.model_crm_lead
#: model:ir.model.fields,field_description:crm_timesheet.field_account_analytic_line__lead_id
msgid "Lead/Opportunity"
msgstr "Piste/Opportunité"

#. module: crm_timesheet
#: model:ir.model.fields,field_description:crm_timesheet.field_crm_lead__project_id
msgid "Project"
msgstr ""

#. module: crm_timesheet
#: model:ir.model.fields,field_description:crm_timesheet.field_crm_lead__timesheet_ids
#: model_terms:ir.ui.view,arch_db:crm_timesheet.crm_case_form_view_leads
#: model_terms:ir.ui.view,arch_db:crm_timesheet.crm_case_form_view_oppor
msgid "Timesheet"
msgstr "Feuille de temps"
43 changes: 43 additions & 0 deletions crm_claim_timesheet/i18n/it.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * crm_timesheet
#
# Translators:
# Marco Calcagni <[email protected]>, 2018
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-03-31 04:45+0000\n"
"PO-Revision-Date: 2018-10-28 23:00+0000\n"
"Last-Translator: Sergio Zanchetta <[email protected]>\n"
"Language-Team: Italian (https://www.transifex.com/oca/teams/23907/it/)\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"
"X-Generator: Weblate 3.2.1\n"

#. module: crm_timesheet
#: model:ir.model,name:crm_timesheet.model_account_analytic_line
msgid "Analytic Line"
msgstr "Riga analitica"

#. module: crm_timesheet
#: model:ir.model,name:crm_timesheet.model_crm_lead
#: model:ir.model.fields,field_description:crm_timesheet.field_account_analytic_line__lead_id
msgid "Lead/Opportunity"
msgstr "Lead/Opportunità"

#. module: crm_timesheet
#: model:ir.model.fields,field_description:crm_timesheet.field_crm_lead__project_id
msgid "Project"
msgstr "Progetto"

#. module: crm_timesheet
#: model:ir.model.fields,field_description:crm_timesheet.field_crm_lead__timesheet_ids
#: model_terms:ir.ui.view,arch_db:crm_timesheet.crm_case_form_view_leads
#: model_terms:ir.ui.view,arch_db:crm_timesheet.crm_case_form_view_oppor
msgid "Timesheet"
msgstr "Foglio ore"
2 changes: 2 additions & 0 deletions crm_claim_timesheet/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from . import crm_claim
from . import account_analytic_line
18 changes: 18 additions & 0 deletions crm_claim_timesheet/models/account_analytic_line.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Copyright 2019 Oihane Crucelaegui - AvanzOSC
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).

from odoo import api, fields, models


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

claim_id = fields.Many2one(
comodel_name='crm.claim',
string='Claim',
)

@api.onchange('claim_id')
def _onchange_claim_id(self):
if self.claim_id.project_id:
self.project_id = self.claim_id.project_id
19 changes: 19 additions & 0 deletions crm_claim_timesheet/models/crm_claim.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Copyright 2019 Oihane Crucelaegui - AvanzOSC
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).


from odoo import fields, models


class CrmClaim(models.Model):
_inherit = 'crm.claim'

project_id = fields.Many2one(
comodel_name='project.project',
string="Project",
)
timesheet_ids = fields.One2many(
comodel_name='account.analytic.line',
inverse_name='claim_id',
string="Timesheet",
)
3 changes: 3 additions & 0 deletions crm_claim_timesheet/tests/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from . import test_account_analytic_line
Loading