forked from OCA/contract
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request OCA#139 from Tecnativa/11.0-mig-contract_variable_…
…quantity [MIG] contract_variable_quantity: Migration to 11.0
- Loading branch information
Showing
80 changed files
with
13,438 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg | ||
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html | ||
:alt: License: AGPL-3 | ||
|
||
================================================= | ||
Variable quantity in contract recurrent invoicing | ||
================================================= | ||
|
||
With this module, you will be able to define in recurring contracts some | ||
lines with variable quantity according to a provided formula. | ||
|
||
Configuration | ||
============= | ||
|
||
#. Go to Sales > Configuration > Contracts > Formulas (quantity). | ||
#. Define any formula based on Python code that stores at some moment a | ||
float/integer value of the quantity to invoice in the variable 'result'. | ||
|
||
You can use these variables to compute your formula: | ||
|
||
* *env*: Environment variable for getting other models. | ||
* *context*: Current context dictionary. | ||
* *user*: Current user. | ||
* *line*: Contract recurring invoice line that triggers this formula. | ||
* *contract*: Contract whose line belongs to. | ||
* *invoice*: Invoice (header) being created. | ||
|
||
.. figure:: images/formula_form.png | ||
:alt: Formula form | ||
:width: 600 px | ||
|
||
Usage | ||
===== | ||
|
||
To use this module, you need to: | ||
|
||
#. Go to 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 one of the possible formulas to use (previously created). | ||
|
||
.. 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 smashing it by providing a detailed and welcomed feedback. | ||
|
||
Credits | ||
======= | ||
|
||
Contributors | ||
------------ | ||
|
||
* Pedro M. Baeza <[email protected]> | ||
* Dave Lasley <[email protected]> | ||
|
||
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 models |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# © 2016 Pedro M. Baeza <[email protected]> | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
||
{ | ||
'name': 'Variable quantity in contract recurrent invoicing', | ||
'version': '11.0.1.0.0', | ||
'category': 'Contract Management', | ||
'license': 'AGPL-3', | ||
'author': "Tecnativa," | ||
"Odoo Community Association (OCA)", | ||
'website': 'https://www.tecnativa.com', | ||
'depends': [ | ||
'contract', | ||
], | ||
'data': [ | ||
'security/ir.model.access.csv', | ||
'views/contract_view.xml', | ||
], | ||
'installable': True, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,187 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * contract_variable_quantity | ||
# | ||
# Translators: | ||
# OCA Transbot <[email protected]>, 2016 | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 10.0c\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2016-09-11 02:47+0000\n" | ||
"PO-Revision-Date: 2016-09-11 02:47+0000\n" | ||
"Last-Translator: OCA Transbot <[email protected]>, 2016\n" | ||
"Language-Team: Amharic (https://www.transifex.com/oca/teams/23907/am/)\n" | ||
"MIME-Version: 1.0\n" | ||
"Content-Type: text/plain; charset=UTF-8\n" | ||
"Content-Transfer-Encoding: \n" | ||
"Language: am\n" | ||
"Plural-Forms: nplurals=2; plural=(n > 1);\n" | ||
|
||
#. module: contract_variable_quantity | ||
#: model:ir.ui.view,arch_db:contract_variable_quantity.view_contract_line_qty_formula_form | ||
msgid "" | ||
"<code>\n" | ||
" result = env['product.product'].search_count([('sale_ok', '=', True)])\n" | ||
" </code>" | ||
msgstr "" | ||
|
||
#. module: contract_variable_quantity | ||
#: model:ir.ui.view,arch_db:contract_variable_quantity.view_contract_line_qty_formula_form | ||
msgid "<i>context</i>: Current context dictionary." | ||
msgstr "" | ||
|
||
#. module: contract_variable_quantity | ||
#: model:ir.ui.view,arch_db:contract_variable_quantity.view_contract_line_qty_formula_form | ||
msgid "<i>contract</i>: Contract whose line belongs to." | ||
msgstr "" | ||
|
||
#. module: contract_variable_quantity | ||
#: model:ir.ui.view,arch_db:contract_variable_quantity.view_contract_line_qty_formula_form | ||
msgid "<i>env</i>: Environment variable for getting other models." | ||
msgstr "" | ||
|
||
#. module: contract_variable_quantity | ||
#: model:ir.ui.view,arch_db:contract_variable_quantity.view_contract_line_qty_formula_form | ||
msgid "<i>invoice</i>: Invoice (header) being created." | ||
msgstr "" | ||
|
||
#. module: contract_variable_quantity | ||
#: model:ir.ui.view,arch_db:contract_variable_quantity.view_contract_line_qty_formula_form | ||
msgid "" | ||
"<i>line</i>: Contract recurring invoice line that triggers this formula." | ||
msgstr "" | ||
|
||
#. module: contract_variable_quantity | ||
#: model:ir.ui.view,arch_db:contract_variable_quantity.view_contract_line_qty_formula_form | ||
msgid "<i>user</i>: Current user." | ||
msgstr "" | ||
|
||
#. module: contract_variable_quantity | ||
#: model:ir.model,name:contract_variable_quantity.model_account_analytic_account | ||
msgid "Analytic Account" | ||
msgstr "" | ||
|
||
#. module: contract_variable_quantity | ||
#: model:ir.actions.act_window,help:contract_variable_quantity.action_contract_quantity_formula | ||
msgid "Click to create a new formula for variable quantities." | ||
msgstr "" | ||
|
||
#. module: contract_variable_quantity | ||
#: model:ir.model.fields,field_description:contract_variable_quantity.field_contract_line_qty_formula_code | ||
#: model:ir.ui.view,arch_db:contract_variable_quantity.view_contract_line_qty_formula_form | ||
msgid "Code" | ||
msgstr "" | ||
|
||
#. module: contract_variable_quantity | ||
#: model:ir.model.fields,field_description:contract_variable_quantity.field_contract_line_qty_formula_create_uid | ||
msgid "Created by" | ||
msgstr "Creado por" | ||
|
||
#. module: contract_variable_quantity | ||
#: model:ir.model.fields,field_description:contract_variable_quantity.field_contract_line_qty_formula_create_date | ||
msgid "Created on" | ||
msgstr "Creado en" | ||
|
||
#. module: contract_variable_quantity | ||
#: model:ir.model.fields,field_description:contract_variable_quantity.field_contract_line_qty_formula_display_name | ||
msgid "Display Name" | ||
msgstr "" | ||
|
||
#. module: contract_variable_quantity | ||
#: code:addons/contract_variable_quantity/models/contract.py:64 | ||
#, python-format | ||
msgid "" | ||
"Error evaluating code.\n" | ||
"Details: %s" | ||
msgstr "" | ||
|
||
#. module: contract_variable_quantity | ||
#: model:ir.ui.view,arch_db:contract_variable_quantity.view_contract_line_qty_formula_form | ||
msgid "Example of Python code" | ||
msgstr "" | ||
|
||
#. module: contract_variable_quantity | ||
#: selection:account.analytic.invoice.line,qty_type:0 | ||
msgid "Fixed quantity" | ||
msgstr "" | ||
|
||
#. module: contract_variable_quantity | ||
#: model:ir.actions.act_window,name:contract_variable_quantity.action_contract_quantity_formula | ||
#: model:ir.ui.menu,name:contract_variable_quantity.menu_contract_quantity_formula | ||
msgid "Formulas (quantity)" | ||
msgstr "" | ||
|
||
#. module: contract_variable_quantity | ||
#: model:ir.ui.view,arch_db:contract_variable_quantity.view_contract_line_qty_formula_form | ||
msgid "Help with Python expressions." | ||
msgstr "" | ||
|
||
#. module: contract_variable_quantity | ||
#: model:ir.model.fields,field_description:contract_variable_quantity.field_contract_line_qty_formula_id | ||
msgid "ID" | ||
msgstr "ID" | ||
|
||
#. module: contract_variable_quantity | ||
#: model:ir.model.fields,field_description:contract_variable_quantity.field_contract_line_qty_formula___last_update | ||
msgid "Last Modified on" | ||
msgstr "" | ||
|
||
#. module: contract_variable_quantity | ||
#: model:ir.model.fields,field_description:contract_variable_quantity.field_contract_line_qty_formula_write_uid | ||
msgid "Last Updated by" | ||
msgstr "Última actualización por" | ||
|
||
#. module: contract_variable_quantity | ||
#: model:ir.model.fields,field_description:contract_variable_quantity.field_contract_line_qty_formula_write_date | ||
msgid "Last Updated on" | ||
msgstr "Última actualización en" | ||
|
||
#. module: contract_variable_quantity | ||
#: model:ir.model.fields,field_description:contract_variable_quantity.field_contract_line_qty_formula_name | ||
#: model:ir.ui.view,arch_db:contract_variable_quantity.view_contract_line_qty_formula_form | ||
msgid "Name" | ||
msgstr "" | ||
|
||
#. module: contract_variable_quantity | ||
#: code:addons/contract_variable_quantity/models/contract.py:66 | ||
#, python-format | ||
msgid "No valid result returned." | ||
msgstr "" | ||
|
||
#. module: contract_variable_quantity | ||
#: model:ir.model.fields,field_description:contract_variable_quantity.field_account_analytic_invoice_line_qty_formula_id | ||
msgid "Qty. formula" | ||
msgstr "" | ||
|
||
#. module: contract_variable_quantity | ||
#: model:ir.model.fields,field_description:contract_variable_quantity.field_account_analytic_invoice_line_qty_type | ||
msgid "Qty. type" | ||
msgstr "" | ||
|
||
#. module: contract_variable_quantity | ||
#: selection:account.analytic.invoice.line,qty_type:0 | ||
msgid "Variable quantity" | ||
msgstr "" | ||
|
||
#. module: contract_variable_quantity | ||
#: model:ir.ui.view,arch_db:contract_variable_quantity.view_contract_line_qty_formula_form | ||
msgid "You can use these variables to compute your formula:" | ||
msgstr "" | ||
|
||
#. module: contract_variable_quantity | ||
#: model:ir.ui.view,arch_db:contract_variable_quantity.view_contract_line_qty_formula_form | ||
msgid "" | ||
"You have to insert valid Python code block that stores at some moment a " | ||
"float/integer value of the quantity to invoice in the variable 'result'." | ||
msgstr "" | ||
|
||
#. module: contract_variable_quantity | ||
#: model:ir.model,name:contract_variable_quantity.model_account_analytic_invoice_line | ||
msgid "account.analytic.invoice.line" | ||
msgstr "" | ||
|
||
#. module: contract_variable_quantity | ||
#: model:ir.model,name:contract_variable_quantity.model_contract_line_qty_formula | ||
msgid "contract.line.qty.formula" | ||
msgstr "" |
Oops, something went wrong.