mirror of
https://github.com/OCA/contract.git
synced 2025-02-13 17:57:24 +02:00
[IMP] contract_variable_qty_timesheet: New module
This commit is contained in:
committed by
Pedro M. Baeza
parent
6f197621ee
commit
5bd43bab22
68
contract_variable_qty_timesheet/README.rst
Normal file
68
contract_variable_qty_timesheet/README.rst
Normal file
@@ -0,0 +1,68 @@
|
|||||||
|
.. image:: https://img.shields.io/badge/license-AGPL--3-blue.png
|
||||||
|
:target: https://www.gnu.org/licenses/agpl
|
||||||
|
:alt: License: AGPL-3
|
||||||
|
|
||||||
|
===============================
|
||||||
|
Contract Variable Qty Timesheet
|
||||||
|
===============================
|
||||||
|
|
||||||
|
This module extends the functionality of contract_variable_quantity adding
|
||||||
|
several variable quantity formulas to allow to invoice lines from Timesheet
|
||||||
|
(Analytic Lines)
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
|
||||||
|
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
|
||||||
|
:alt: Try me on Runbot
|
||||||
|
:target: https://runbot.odoo-community.org/runbot/110/11.0
|
||||||
|
|
||||||
|
|
||||||
|
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 smash it by providing detailed and welcomed feedback.
|
||||||
|
|
||||||
|
Credits
|
||||||
|
=======
|
||||||
|
|
||||||
|
Images
|
||||||
|
------
|
||||||
|
|
||||||
|
* Odoo Community Association: `Icon <https://odoo-community.org/logo.png>`_.
|
||||||
|
|
||||||
|
Contributors
|
||||||
|
------------
|
||||||
|
|
||||||
|
* `Tecnativa <https://www.tecnativa.com>`_:
|
||||||
|
* Carlos Dauden
|
||||||
|
|
||||||
|
Do not contact contributors directly about support or help with technical issues.
|
||||||
|
|
||||||
|
Maintainer
|
||||||
|
----------
|
||||||
|
|
||||||
|
.. image:: https://odoo-community.org/logo.png
|
||||||
|
:alt: Odoo Community Association
|
||||||
|
:target: https://odoo-community.org
|
||||||
|
|
||||||
|
This module is maintained by the OCA.
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
To contribute to this module, please visit https://odoo-community.org.
|
||||||
1
contract_variable_qty_timesheet/__init__.py
Normal file
1
contract_variable_qty_timesheet/__init__.py
Normal file
@@ -0,0 +1 @@
|
|||||||
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||||
20
contract_variable_qty_timesheet/__manifest__.py
Normal file
20
contract_variable_qty_timesheet/__manifest__.py
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
# Copyright 2018 Tecnativa - Carlos Dauden
|
||||||
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||||
|
{
|
||||||
|
'name': 'Contract Variable Qty Timesheet',
|
||||||
|
'summary': 'Add formula to invoice ',
|
||||||
|
'version': '11.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',
|
||||||
|
],
|
||||||
|
}
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- Copyright 2018 Tecnativa - Carlos Dauden
|
||||||
|
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', '=', contract.id),
|
||||||
|
('product_id', '=', False),
|
||||||
|
('project_id', '!=', False),
|
||||||
|
('date', '>=', line.date_from),
|
||||||
|
('date', '<=', line.date_to),
|
||||||
|
], 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', '=', contract.id),
|
||||||
|
('product_id', '=', False),
|
||||||
|
('task_id', '!=', False),
|
||||||
|
('date', '>=', line.date_from),
|
||||||
|
('date', '<=', line.date_to),
|
||||||
|
], 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', '=', contract.id),
|
||||||
|
('product_id', '=', line.product_id.id),
|
||||||
|
('date', '>=', line.date_from),
|
||||||
|
('date', '<=', line.date_to),
|
||||||
|
], fields=['unit_amount'], groupby=[])
|
||||||
|
result = group and group[0]['unit_amount'] or 0.0
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
</odoo>
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
# 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"
|
||||||
|
"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 ""
|
||||||
|
|
||||||
33
contract_variable_qty_timesheet/i18n/es.po
Normal file
33
contract_variable_qty_timesheet/i18n/es.po
Normal file
@@ -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
contract_variable_qty_timesheet/i18n/fr.po
Normal file
34
contract_variable_qty_timesheet/i18n/fr.po
Normal file
@@ -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"
|
||||||
34
contract_variable_qty_timesheet/i18n/zh.po
Normal file
34
contract_variable_qty_timesheet/i18n/zh.po
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
# Translation of Odoo Server.
|
||||||
|
# This file contains the translation of the following modules:
|
||||||
|
# * contract_variable_qty_timesheet
|
||||||
|
#
|
||||||
|
# Translators:
|
||||||
|
# DIT INTL <ditintlgroup@gmail.com>, 2018
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: Odoo Server 11.0\n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"POT-Creation-Date: 2018-04-27 01:12+0000\n"
|
||||||
|
"PO-Revision-Date: 2018-04-27 01:12+0000\n"
|
||||||
|
"Last-Translator: DIT INTL <ditintlgroup@gmail.com>, 2018\n"
|
||||||
|
"Language-Team: Chinese (https://www.transifex.com/oca/teams/23907/zh/)\n"
|
||||||
|
"Language: zh\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: \n"
|
||||||
|
"Plural-Forms: nplurals=1; plural=0;\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 "任务时间表"
|
||||||
BIN
contract_variable_qty_timesheet/static/description/icon.png
Normal file
BIN
contract_variable_qty_timesheet/static/description/icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.2 KiB |
Reference in New Issue
Block a user