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] contract_variable_qty_timesheet: Migration to version 15.0 #993

Merged
Merged
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
108 changes: 108 additions & 0 deletions contract_variable_qty_timesheet/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
===============================
Contract Variable Qty Timesheet
===============================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:5ac85c806a69d7e4ecd65ddf220774240d8f64392b79b10183460c3a01d4d572
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |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-OCA%2Fcontract-lightgray.png?logo=github
:target: https://github.com/OCA/contract/tree/13.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-13-0/contract-13-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=13.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:%2013.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

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

* Fernando La Chica <[email protected]>

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

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

|maintainer-carlosdauden| |maintainer-pedrobaeza|

This module is part of the `OCA/contract <https://github.com/OCA/contract/tree/13.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": "15.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"],
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<?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">group = env['account.analytic.line'].read_group([
('account_id', '=', line.analytic_account_id.id),
('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">group = env['account.analytic.line'].read_group([
('account_id', '=', line.analytic_account_id.id),
('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">group = env['account.analytic.line'].read_group([
('account_id', '=', line.analytic_account_id.id),
('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 13.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 <[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.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 <[email protected]>\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 <[email protected]>, 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 <[email protected]>, 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 <[email protected]>\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 <[email protected]>\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
Loading