Skip to content

Commit

Permalink
Merge PR #1110 into 16.0
Browse files Browse the repository at this point in the history
Signed-off-by pedrobaeza
  • Loading branch information
OCA-git-bot committed Aug 17, 2024
2 parents 99e8281 + 4f4c465 commit 7873c83
Show file tree
Hide file tree
Showing 23 changed files with 1,052 additions and 0 deletions.
116 changes: 116 additions & 0 deletions contract_variable_qty_timesheet/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
===============================
Contract Variable Qty Timesheet
===============================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:e5498feee850c8ae2cc09cbae0c07393069f065c83bca8823127e9eec40bbe1b
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |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%2Fcontract-lightgray.png?logo=github
:target: https://github.com/OCA/contract/tree/16.0/contract_variable_qty_timesheet
:alt: OCA/contract
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/contract-16-0/contract-16-0-contract_variable_qty_timesheet
: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/contract&target_branch=16.0
:alt: Try me on Runboat

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

This module extends the functionality of contract_variable_quantity adding
several variable quantity formulas to allow to invoice lines from Timesheet
(Analytic Lines).

**Table of contents**

.. contents::
:local:

Usage
=====

To use this module, you need to:

#. Go to Invoicing > Sales > Contracts and select or create a new contract.
#. Check *Generate recurring invoices automatically*.
#. Add a new recurring invoicing line.
#. Select "Variable quantity" in column "Qty. type".
#. Select "Project Timesheets", "Tasks Timesheets" or "Analytic Same Product"
depending on your need.

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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/contract/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 <https://github.com/OCA/contract/issues/new?body=module:%20contract_variable_qty_timesheet%0Aversion:%2016.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
~~~~~~~~~~~~

* `Tecnativa <https://www.tecnativa.com>`_:

* Carlos Dauden
* Pedro M. Baeza
* Carolina Fernandez

* `Guadaltech <https://www.guadaltech.es>`_:

* Fernando La Chica <fernandolachica@gmail.com>

* `Coopdevs Treball <https://coopdevs.coop>`_:

* Daniel Palomar <daniel.palomar@coopdevs.org>

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.

.. |maintainer-carlosdauden| image:: https://github.com/carlosdauden.png?size=40px
:target: https://github.com/carlosdauden
:alt: carlosdauden
.. |maintainer-pedrobaeza| image:: https://github.com/pedrobaeza.png?size=40px
:target: https://github.com/pedrobaeza
:alt: pedrobaeza
.. |maintainer-danypr92| image:: https://github.com/danypr92.png?size=40px
:target: https://github.com/danypr92
:alt: danypr92

Current `maintainers <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-carlosdauden| |maintainer-pedrobaeza| |maintainer-danypr92|

This module is part of the `OCA/contract <https://github.com/OCA/contract/tree/16.0/contract_variable_qty_timesheet>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
1 change: 1 addition & 0 deletions contract_variable_qty_timesheet/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
17 changes: 17 additions & 0 deletions contract_variable_qty_timesheet/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Copyright 2018 Tecnativa - Carlos Dauden
# Copyright 2019 Tecnativa - Pedro M. Baeza
# Copyright 2023 Tecnativa - Carolina Fernandez
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Contract Variable Qty Timesheet",
"summary": "Add formula to invoice ",
"version": "16.0.1.0.0",
"category": "Contract Management",
"website": "https://github.com/OCA/contract",
"author": "Tecnativa, " "Odoo Community Association (OCA)",
"license": "AGPL-3",
"installable": True,
"depends": ["contract_variable_quantity", "hr_timesheet"],
"data": ["data/contract_line_qty_formula_data.xml"],
"maintainers": ["carlosdauden", "pedrobaeza", "danypr92"],
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright 2018 Tecnativa - Carlos Dauden
Copyright 2019 Tecnativa - Pedro M. Baeza
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
<odoo>
<record
id="contract_line_qty_formula_project_timesheet"
model="contract.line.qty.formula"
>
<field name='name'>Project Timesheets</field>
<field name="code">
account_analytic_ids = line.analytic_distribution and [int(_id) for _id in list(line.analytic_distribution.keys())] or []
group = env['account.analytic.line'].read_group([
('account_id', 'in', account_analytic_ids),
('product_id', '=', False),
('project_id', '!=', False),
('date', '&gt;=', period_first_date),
('date', '&lt;=', period_last_date),
], fields=['unit_amount'], groupby=[])
result = group and group[0]['unit_amount'] or 0.0
</field>
</record>
<record
id="contract_line_qty_formula_task_timesheet"
model="contract.line.qty.formula"
>
<field name='name'>Task Timesheets</field>
<field name="code">
account_analytic_ids = line.analytic_distribution and [int(_id) for _id in list(line.analytic_distribution.keys())] or []
group = env['account.analytic.line'].read_group([
('account_id', 'in', account_analytic_ids),
('product_id', '=', False),
('task_id', '!=', False),
('date', '&gt;=', period_first_date),
('date', '&lt;=', period_last_date),
], fields=['unit_amount'], groupby=[])
result = group and group[0]['unit_amount'] or 0.0
</field>
</record>
<record
id="contract_line_qty_formula_analytic_same_product"
model="contract.line.qty.formula"
>
<field name='name'>Analytic Same Product</field>
<field name="code">
account_analytic_ids = line.analytic_distribution and [int(_id) for _id in list(line.analytic_distribution.keys())] or []
group = env['account.analytic.line'].read_group([
('account_id', 'in', account_analytic_ids),
('product_id', '=', line.product_id.id),
('date', '&gt;=', period_first_date),
('date', '&lt;=', period_last_date),
], fields=['unit_amount'], groupby=[])
result = group and group[0]['unit_amount'] or 0.0
</field>
</record>
</odoo>
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * contract_variable_qty_timesheet
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 15.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: contract_variable_qty_timesheet
#: model:contract.line.qty.formula,name:contract_variable_qty_timesheet.contract_line_qty_formula_analytic_same_product
msgid "Analytic Same Product"
msgstr ""

#. module: contract_variable_qty_timesheet
#: model:contract.line.qty.formula,name:contract_variable_qty_timesheet.contract_line_qty_formula_project_timesheet
msgid "Project Timesheets"
msgstr ""

#. module: contract_variable_qty_timesheet
#: model:contract.line.qty.formula,name:contract_variable_qty_timesheet.contract_line_qty_formula_task_timesheet
msgid "Task Timesheets"
msgstr ""
32 changes: 32 additions & 0 deletions contract_variable_qty_timesheet/i18n/de.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * contract_variable_qty_timesheet
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 11.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2019-03-07 15:53+0000\n"
"Last-Translator: Maria Sparenberg <maria.sparenberg@gmx.net>\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.4\n"

#. module: contract_variable_qty_timesheet
#: model:contract.line.qty.formula,name:contract_variable_qty_timesheet.contract_line_qty_formula_analytic_same_product
msgid "Analytic Same Product"
msgstr "Gleiches Produkt"

#. module: contract_variable_qty_timesheet
#: model:contract.line.qty.formula,name:contract_variable_qty_timesheet.contract_line_qty_formula_project_timesheet
msgid "Project Timesheets"
msgstr "Projekt-Zeiterfassungen"

#. module: contract_variable_qty_timesheet
#: model:contract.line.qty.formula,name:contract_variable_qty_timesheet.contract_line_qty_formula_task_timesheet
msgid "Task Timesheets"
msgstr "Aufgaben-Zeiterfassungen"
33 changes: 33 additions & 0 deletions contract_variable_qty_timesheet/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * contract_variable_qty_timesheet
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 11.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-03-29 11:13+0200\n"
"PO-Revision-Date: 2018-03-29 11:21+0200\n"
"Last-Translator: Carlos Dauden <carlos.dauden@tecnativa.com>\n"
"Language-Team: \n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Poedit 1.8.7.1\n"

#. module: contract_variable_qty_timesheet
#: model:contract.line.qty.formula,name:contract_variable_qty_timesheet.contract_line_qty_formula_analytic_same_product
msgid "Analytic Same Product"
msgstr "Analítica mismo producto"

#. module: contract_variable_qty_timesheet
#: model:contract.line.qty.formula,name:contract_variable_qty_timesheet.contract_line_qty_formula_project_timesheet
msgid "Project Timesheets"
msgstr "Partes de horas de proyectos"

#. module: contract_variable_qty_timesheet
#: model:contract.line.qty.formula,name:contract_variable_qty_timesheet.contract_line_qty_formula_task_timesheet
msgid "Task Timesheets"
msgstr "Partes de horas de tareas"
34 changes: 34 additions & 0 deletions contract_variable_qty_timesheet/i18n/fr.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * contract_variable_qty_timesheet
#
# Translators:
# Quentin THEURET <odoo@kerpeo.com>, 2018
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 11.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-04-06 21:09+0000\n"
"PO-Revision-Date: 2018-04-06 21:09+0000\n"
"Last-Translator: Quentin THEURET <odoo@kerpeo.com>, 2018\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: contract_variable_qty_timesheet
#: model:contract.line.qty.formula,name:contract_variable_qty_timesheet.contract_line_qty_formula_analytic_same_product
msgid "Analytic Same Product"
msgstr "Même produit analytique"

#. module: contract_variable_qty_timesheet
#: model:contract.line.qty.formula,name:contract_variable_qty_timesheet.contract_line_qty_formula_project_timesheet
msgid "Project Timesheets"
msgstr "Feuilles de temps du projet"

#. module: contract_variable_qty_timesheet
#: model:contract.line.qty.formula,name:contract_variable_qty_timesheet.contract_line_qty_formula_task_timesheet
msgid "Task Timesheets"
msgstr "Feuille de temps de la tâche"
32 changes: 32 additions & 0 deletions contract_variable_qty_timesheet/i18n/it.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * contract_variable_qty_timesheet
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 11.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2018-12-24 23:58+0000\n"
"Last-Translator: Sergio Zanchetta <primes2h@gmail.com>\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"
"X-Generator: Weblate 3.3\n"

#. module: contract_variable_qty_timesheet
#: model:contract.line.qty.formula,name:contract_variable_qty_timesheet.contract_line_qty_formula_analytic_same_product
msgid "Analytic Same Product"
msgstr ""

#. module: contract_variable_qty_timesheet
#: model:contract.line.qty.formula,name:contract_variable_qty_timesheet.contract_line_qty_formula_project_timesheet
msgid "Project Timesheets"
msgstr "Fogli ore progetto"

#. module: contract_variable_qty_timesheet
#: model:contract.line.qty.formula,name:contract_variable_qty_timesheet.contract_line_qty_formula_task_timesheet
msgid "Task Timesheets"
msgstr "Fogli ore attività"
32 changes: 32 additions & 0 deletions contract_variable_qty_timesheet/i18n/pt.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * contract_variable_qty_timesheet
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2020-02-17 19:13+0000\n"
"Last-Translator: Pedro Castro Silva <pedrocs@exo.pt>\n"
"Language-Team: none\n"
"Language: pt\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: contract_variable_qty_timesheet
#: model:contract.line.qty.formula,name:contract_variable_qty_timesheet.contract_line_qty_formula_analytic_same_product
msgid "Analytic Same Product"
msgstr "Analítica Mesmo Produto"

#. module: contract_variable_qty_timesheet
#: model:contract.line.qty.formula,name:contract_variable_qty_timesheet.contract_line_qty_formula_project_timesheet
msgid "Project Timesheets"
msgstr "Folhas de Horas de Projetos"

#. module: contract_variable_qty_timesheet
#: model:contract.line.qty.formula,name:contract_variable_qty_timesheet.contract_line_qty_formula_task_timesheet
msgid "Task Timesheets"
msgstr "Folhas de horas de Tarefas"
Loading

0 comments on commit 7873c83

Please sign in to comment.