Browse Source
Merge pull request #155 from Tecnativa/11.0-ADD-contract_variable_qty_timesheet
Merge pull request #155 from Tecnativa/11.0-ADD-contract_variable_qty_timesheet
[11.0][ADD] contract_variable_qty_timesheet: New modulepull/152/head
Pedro M. Baeza
7 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 166 additions and 0 deletions
-
68contract_variable_qty_timesheet/README.rst
-
1contract_variable_qty_timesheet/__init__.py
-
20contract_variable_qty_timesheet/__manifest__.py
-
44contract_variable_qty_timesheet/data/contract_line_qty_formula_data.xml
-
33contract_variable_qty_timesheet/i18n/es.po
-
BINcontract_variable_qty_timesheet/static/description/icon.png
@ -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. |
@ -0,0 +1 @@ |
|||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). |
@ -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,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" |
|||
"Language-Team: \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" |
|||
"Last-Translator: Carlos Dauden <carlos.dauden@tecnativa.com>\n" |
|||
"Language: es\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" |
After Width: 128 | Height: 128 | Size: 9.2 KiB |
Write
Preview
Loading…
Cancel
Save
Reference in new issue