[MIG] contract_variable_quantity: Migration to 15.0

TT40289
This commit is contained in:
Víctor Martínez
2022-11-03 11:04:23 +01:00
committed by Carolina Fernandez
parent 1d6cec8247
commit aa78b00e21
31 changed files with 56 additions and 163 deletions

View File

@@ -2,10 +2,13 @@
Variable quantity in contract recurrent invoicing Variable quantity in contract recurrent invoicing
================================================= =================================================
.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !! !! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !! !! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:648dc147c00023bfda1595708efb6802c3ae0216215f6f4922a667f890e3180f
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status :target: https://odoo-community.org/page/development-status
@@ -14,14 +17,14 @@ Variable quantity in contract recurrent invoicing
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3 :alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fcontract-lightgray.png?logo=github .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fcontract-lightgray.png?logo=github
:target: https://github.com/OCA/contract/tree/14.0/contract_variable_quantity :target: https://github.com/OCA/contract/tree/15.0/contract_variable_quantity
:alt: OCA/contract :alt: OCA/contract
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/contract-14-0/contract-14-0-contract_variable_quantity :target: https://translation.odoo-community.org/projects/contract-15-0/contract-15-0-contract_variable_quantity
:alt: Translate me on Weblate :alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png .. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runbot.odoo-community.org/runbot/110/14.0 :target: https://runboat.odoo-community.org/builds?repo=OCA/contract&target_branch=15.0
:alt: Try me on Runbot :alt: Try me on Runboat
|badge1| |badge2| |badge3| |badge4| |badge5| |badge1| |badge2| |badge3| |badge4| |badge5|
@@ -49,7 +52,7 @@ Configuration
* *contract*: Contract whose line belongs to. * *contract*: Contract whose line belongs to.
* *invoice*: Invoice (header) being created. * *invoice*: Invoice (header) being created.
.. figure:: https://raw.githubusercontent.com/OCA/contract/14.0/contract_variable_quantity/images/formula_form.png .. figure:: https://raw.githubusercontent.com/OCA/contract/15.0/contract_variable_quantity/images/formula_form.png
:alt: Formula form :alt: Formula form
:width: 600 px :width: 600 px
@@ -69,8 +72,8 @@ Bug Tracker
Bugs are tracked on `GitHub Issues <https://github.com/OCA/contract/issues>`_. 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. 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 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_quantity%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_. `feedback <https://github.com/OCA/contract/issues/new?body=module:%20contract_variable_quantity%0Aversion:%2015.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. Do not contact contributors directly about support or help with technical issues.
@@ -107,6 +110,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and mission is to support the collaborative development of Odoo features and
promote its widespread use. promote its widespread use.
This module is part of the `OCA/contract <https://github.com/OCA/contract/tree/14.0/contract_variable_quantity>`_ project on GitHub. This module is part of the `OCA/contract <https://github.com/OCA/contract/tree/15.0/contract_variable_quantity>`_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

View File

@@ -5,7 +5,7 @@
{ {
"name": "Variable quantity in contract recurrent invoicing", "name": "Variable quantity in contract recurrent invoicing",
"version": "14.0.1.0.0", "version": "15.0.1.0.0",
"category": "Contract Management", "category": "Contract Management",
"license": "AGPL-3", "license": "AGPL-3",
"author": "Tecnativa, Odoo Community Association (OCA)", "author": "Tecnativa, Odoo Community Association (OCA)",

View File

@@ -254,9 +254,3 @@ msgstr ""
"enter de\n" "enter de\n"
" la quantitat a facturar a la variable\n" " la quantitat a facturar a la variable\n"
" 'resultat'." " 'resultat'."
#~ msgid "Analytic Account"
#~ msgstr "Compte analític"
#~ msgid "account.analytic.invoice.line"
#~ msgstr "account.analytic.invoice.line"

View File

@@ -4,7 +4,7 @@
# #
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Odoo Server 14.0\n" "Project-Id-Version: Odoo Server 15.0\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"Last-Translator: \n" "Last-Translator: \n"
"Language-Team: \n" "Language-Team: \n"
@@ -103,9 +103,6 @@ msgid "Created on"
msgstr "" msgstr ""
#. module: contract_variable_quantity #. module: contract_variable_quantity
#: model:ir.model.fields,field_description:contract_variable_quantity.field_contract_abstract_contract_line__display_name
#: model:ir.model.fields,field_description:contract_variable_quantity.field_contract_contract__display_name
#: model:ir.model.fields,field_description:contract_variable_quantity.field_contract_line__display_name
#: model:ir.model.fields,field_description:contract_variable_quantity.field_contract_line_qty_formula__display_name #: model:ir.model.fields,field_description:contract_variable_quantity.field_contract_line_qty_formula__display_name
msgid "Display Name" msgid "Display Name"
msgstr "" msgstr ""
@@ -142,9 +139,6 @@ msgid "Help with Python expressions."
msgstr "" msgstr ""
#. module: contract_variable_quantity #. module: contract_variable_quantity
#: model:ir.model.fields,field_description:contract_variable_quantity.field_contract_abstract_contract_line__id
#: model:ir.model.fields,field_description:contract_variable_quantity.field_contract_contract__id
#: model:ir.model.fields,field_description:contract_variable_quantity.field_contract_line__id
#: model:ir.model.fields,field_description:contract_variable_quantity.field_contract_line_qty_formula__id #: model:ir.model.fields,field_description:contract_variable_quantity.field_contract_line_qty_formula__id
msgid "ID" msgid "ID"
msgstr "" msgstr ""
@@ -155,9 +149,6 @@ msgid "If checked, contract lines with 0 qty don't create invoice line"
msgstr "" msgstr ""
#. module: contract_variable_quantity #. module: contract_variable_quantity
#: model:ir.model.fields,field_description:contract_variable_quantity.field_contract_abstract_contract_line____last_update
#: model:ir.model.fields,field_description:contract_variable_quantity.field_contract_contract____last_update
#: model:ir.model.fields,field_description:contract_variable_quantity.field_contract_line____last_update
#: model:ir.model.fields,field_description:contract_variable_quantity.field_contract_line_qty_formula____last_update #: model:ir.model.fields,field_description:contract_variable_quantity.field_contract_line_qty_formula____last_update
msgid "Last Modified on" msgid "Last Modified on"
msgstr "" msgstr ""

View File

@@ -253,9 +253,3 @@ msgstr ""
" irgendwo einen float/integer -Wert der\n" " irgendwo einen float/integer -Wert der\n"
" abzurechnenden Menge in der Variablen\n" " abzurechnenden Menge in der Variablen\n"
" 'result' speichert." " 'result' speichert."
#~ msgid "Analytic Account"
#~ msgstr "Kostenstelle"
#~ msgid "account.analytic.invoice.line"
#~ msgstr "account.analytic.invoice.line"

View File

@@ -229,6 +229,3 @@ msgid ""
" the quantity to invoice in the variable\n" " the quantity to invoice in the variable\n"
" 'result'." " 'result'."
msgstr "" msgstr ""
#~ msgid "Analytic Account"
#~ msgstr "Αναλυτικός Λογαριασμός"

View File

@@ -254,9 +254,3 @@ msgstr ""
"flotante / entero de\n" "flotante / entero de\n"
" la cantidad a facturar en la variable\n" " la cantidad a facturar en la variable\n"
" 'result'." " 'result'."
#~ msgid "Analytic Account"
#~ msgstr "Cuenta analítica"
#~ msgid "account.analytic.invoice.line"
#~ msgstr "account.analytic.invoice.line"

View File

@@ -11,8 +11,8 @@ msgstr ""
"POT-Creation-Date: 2016-09-11 02:47+0000\n" "POT-Creation-Date: 2016-09-11 02:47+0000\n"
"PO-Revision-Date: 2021-01-10 23:45+0000\n" "PO-Revision-Date: 2021-01-10 23:45+0000\n"
"Last-Translator: Ignacio Buioli <ibuioli@gmail.com>\n" "Last-Translator: Ignacio Buioli <ibuioli@gmail.com>\n"
"Language-Team: Spanish (Argentina) (https://www.transifex.com/oca/teams/" "Language-Team: Spanish (Argentina) (https://www.transifex.com/oca/"
"23907/es_AR/)\n" "teams/23907/es_AR/)\n"
"Language: es_AR\n" "Language: es_AR\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"

View File

@@ -229,6 +229,3 @@ msgid ""
" the quantity to invoice in the variable\n" " the quantity to invoice in the variable\n"
" 'result'." " 'result'."
msgstr "" msgstr ""
#~ msgid "Analytic Account"
#~ msgstr "Cuenta analítica"

View File

@@ -229,6 +229,3 @@ msgid ""
" the quantity to invoice in the variable\n" " the quantity to invoice in the variable\n"
" 'result'." " 'result'."
msgstr "" msgstr ""
#~ msgid "Analytic Account"
#~ msgstr "Analyyttinen tili"

View File

@@ -229,6 +229,3 @@ msgid ""
" the quantity to invoice in the variable\n" " the quantity to invoice in the variable\n"
" 'result'." " 'result'."
msgstr "" msgstr ""
#~ msgid "Analytic Account"
#~ msgstr "Compte analytique"

View File

@@ -230,6 +230,3 @@ msgid ""
" the quantity to invoice in the variable\n" " the quantity to invoice in the variable\n"
" 'result'." " 'result'."
msgstr "" msgstr ""
#~ msgid "Analytic Account"
#~ msgstr "Conta analítica"

View File

@@ -230,9 +230,3 @@ msgid ""
" the quantity to invoice in the variable\n" " the quantity to invoice in the variable\n"
" 'result'." " 'result'."
msgstr "" msgstr ""
#~ msgid "Analytic Account"
#~ msgstr "विश्लेषणात्मक खाता"
#~ msgid "account.analytic.invoice.line"
#~ msgstr "account.analytic.invoice.line"

View File

@@ -232,9 +232,3 @@ msgid ""
" the quantity to invoice in the variable\n" " the quantity to invoice in the variable\n"
" 'result'." " 'result'."
msgstr "" msgstr ""
#~ msgid "Analytic Account"
#~ msgstr "Analitički konto"
#~ msgid "account.analytic.invoice.line"
#~ msgstr "account.analytic.invoice.line"

View File

@@ -247,9 +247,3 @@ msgstr ""
"Morate upisati valjani blok python koda koji se u određenom trenutku " "Morate upisati valjani blok python koda koji se u određenom trenutku "
"izvršava i vraća cjelobrojnu/decimalnu vrijednost kao rezultat za količine u " "izvršava i vraća cjelobrojnu/decimalnu vrijednost kao rezultat za količine u "
"stavkama računa " "stavkama računa "
#~ msgid "Analytic Account"
#~ msgstr "Konto analitike"
#~ msgid "account.analytic.invoice.line"
#~ msgstr "account.analytic.invoice.line"

View File

@@ -228,6 +228,3 @@ msgid ""
" the quantity to invoice in the variable\n" " the quantity to invoice in the variable\n"
" 'result'." " 'result'."
msgstr "" msgstr ""
#~ msgid "Analytic Account"
#~ msgstr "Analitikus gyűjtőkód könyvelés"

View File

@@ -11,15 +11,15 @@ msgstr ""
"Project-Id-Version: Odoo Server 10.0c\n" "Project-Id-Version: Odoo Server 10.0c\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-09-11 02:47+0000\n" "POT-Creation-Date: 2016-09-11 02:47+0000\n"
"PO-Revision-Date: 2022-03-27 00:17+0000\n" "PO-Revision-Date: 2023-04-17 16:39+0000\n"
"Last-Translator: Andrea Cometa <a.cometa@apuliasoftware.it>\n" "Last-Translator: mymage <stefano.consolaro@mymage.it>\n"
"Language-Team: Italian (https://www.transifex.com/oca/teams/23907/it/)\n" "Language-Team: Italian (https://www.transifex.com/oca/teams/23907/it/)\n"
"Language: it\n" "Language: it\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n" "Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n" "Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.3.2\n" "X-Generator: Weblate 4.14.1\n"
#. module: contract_variable_quantity #. module: contract_variable_quantity
#: model_terms:ir.ui.view,arch_db:contract_variable_quantity.view_contract_line_qty_formula_form #: model_terms:ir.ui.view,arch_db:contract_variable_quantity.view_contract_line_qty_formula_form
@@ -114,7 +114,7 @@ msgstr "Creato il"
#. module: contract_variable_quantity #. module: contract_variable_quantity
#: model:ir.model.fields,field_description:contract_variable_quantity.field_contract_line_qty_formula__display_name #: model:ir.model.fields,field_description:contract_variable_quantity.field_contract_line_qty_formula__display_name
msgid "Display Name" msgid "Display Name"
msgstr "Nome da visualizzare" msgstr "Nome visualizzato"
#. module: contract_variable_quantity #. module: contract_variable_quantity
#: code:addons/contract_variable_quantity/models/contract_line_formula.py:0 #: code:addons/contract_variable_quantity/models/contract_line_formula.py:0
@@ -167,12 +167,12 @@ msgstr "Ultima modifica il"
#. module: contract_variable_quantity #. module: contract_variable_quantity
#: model:ir.model.fields,field_description:contract_variable_quantity.field_contract_line_qty_formula__write_uid #: model:ir.model.fields,field_description:contract_variable_quantity.field_contract_line_qty_formula__write_uid
msgid "Last Updated by" msgid "Last Updated by"
msgstr "Last Updated by" msgstr "Ultimo aggiornamento di"
#. module: contract_variable_quantity #. module: contract_variable_quantity
#: model:ir.model.fields,field_description:contract_variable_quantity.field_contract_line_qty_formula__write_date #: model:ir.model.fields,field_description:contract_variable_quantity.field_contract_line_qty_formula__write_date
msgid "Last Updated on" msgid "Last Updated on"
msgstr "Last Updated on" msgstr "Ultimo aggiornamento il"
#. module: contract_variable_quantity #. module: contract_variable_quantity
#: model:ir.model.fields,field_description:contract_variable_quantity.field_contract_line_qty_formula__name #: model:ir.model.fields,field_description:contract_variable_quantity.field_contract_line_qty_formula__name
@@ -235,6 +235,3 @@ msgid ""
" the quantity to invoice in the variable\n" " the quantity to invoice in the variable\n"
" 'result'." " 'result'."
msgstr "" msgstr ""
#~ msgid "Analytic Account"
#~ msgstr "Conto Analitico"

View File

@@ -229,9 +229,3 @@ msgid ""
" the quantity to invoice in the variable\n" " the quantity to invoice in the variable\n"
" 'result'." " 'result'."
msgstr "" msgstr ""
#~ msgid "Analytic Account"
#~ msgstr "Kostenplaats"
#~ msgid "account.analytic.invoice.line"
#~ msgstr "account.analytic.invoice.line"

View File

@@ -243,9 +243,3 @@ msgstr ""
"Tem que inserir um bloco válido de código Python que guarde, em algum " "Tem que inserir um bloco válido de código Python que guarde, em algum "
"momento, um valor float/integer na variável 'result' com a quantidade a " "momento, um valor float/integer na variável 'result' com a quantidade a "
"faturar." "faturar."
#~ msgid "Analytic Account"
#~ msgstr "Conta Analítica"
#~ msgid "account.analytic.invoice.line"
#~ msgstr "account.analytic.invoice.line"

View File

@@ -11,8 +11,8 @@ msgstr ""
"POT-Creation-Date: 2017-11-30 01:41+0000\n" "POT-Creation-Date: 2017-11-30 01:41+0000\n"
"PO-Revision-Date: 2022-02-01 19:33+0000\n" "PO-Revision-Date: 2022-02-01 19:33+0000\n"
"Last-Translator: Rodrigo Macedo <rmsolucoeseminformatica@protonmail.com>\n" "Last-Translator: Rodrigo Macedo <rmsolucoeseminformatica@protonmail.com>\n"
"Language-Team: Portuguese (Brazil) (https://www.transifex.com/oca/teams/" "Language-Team: Portuguese (Brazil) (https://www.transifex.com/oca/"
"23907/pt_BR/)\n" "teams/23907/pt_BR/)\n"
"Language: pt_BR\n" "Language: pt_BR\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
@@ -244,6 +244,3 @@ msgstr ""
"Você deve inserir um bloco de código Python válido que armazena em algum " "Você deve inserir um bloco de código Python válido que armazena em algum "
"momento um valor inteiro/flutuante da quantidade para faturar na variável " "momento um valor inteiro/flutuante da quantidade para faturar na variável "
"'resultado'." "'resultado'."
#~ msgid "Analytic Account"
#~ msgstr "Conta Analítica"

View File

@@ -239,6 +239,3 @@ msgid ""
" the quantity to invoice in the variable\n" " the quantity to invoice in the variable\n"
" 'result'." " 'result'."
msgstr "" msgstr ""
#~ msgid "Analytic Account"
#~ msgstr "Conta Analítica"

View File

@@ -230,6 +230,3 @@ msgid ""
" the quantity to invoice in the variable\n" " the quantity to invoice in the variable\n"
" 'result'." " 'result'."
msgstr "" msgstr ""
#~ msgid "Analytic Account"
#~ msgstr "Cont analitic"

View File

@@ -229,6 +229,3 @@ msgid ""
" the quantity to invoice in the variable\n" " the quantity to invoice in the variable\n"
" 'result'." " 'result'."
msgstr "" msgstr ""
#~ msgid "Analytic Account"
#~ msgstr "Analytický účet"

View File

@@ -230,6 +230,3 @@ msgid ""
" the quantity to invoice in the variable\n" " the quantity to invoice in the variable\n"
" 'result'." " 'result'."
msgstr "" msgstr ""
#~ msgid "Analytic Account"
#~ msgstr "Analitični konto"

View File

@@ -229,6 +229,3 @@ msgid ""
" the quantity to invoice in the variable\n" " the quantity to invoice in the variable\n"
" 'result'." " 'result'."
msgstr "" msgstr ""
#~ msgid "Analytic Account"
#~ msgstr "Analitik Hesap"

View File

@@ -230,9 +230,3 @@ msgid ""
" the quantity to invoice in the variable\n" " the quantity to invoice in the variable\n"
" 'result'." " 'result'."
msgstr "" msgstr ""
#~ msgid "Analytic Account"
#~ msgstr "Analitik Hesap"
#~ msgid "account.analytic.invoice.line"
#~ msgstr "account.analytic.invoice.line"

View File

@@ -244,9 +244,3 @@ msgid ""
msgstr "" msgstr ""
"您必须插入有效的Python代码块以便在变量'result'中存储需要发票的数量的浮点 / " "您必须插入有效的Python代码块以便在变量'result'中存储需要发票的数量的浮点 / "
"整数值。" "整数值。"
#~ msgid "Analytic Account"
#~ msgstr "分析会计"
#~ msgid "account.analytic.invoice.line"
#~ msgstr "分析会计合同明细行"

View File

@@ -238,6 +238,3 @@ msgid ""
" the quantity to invoice in the variable\n" " the quantity to invoice in the variable\n"
" 'result'." " 'result'."
msgstr "" msgstr ""
#~ msgid "Analytic Account"
#~ msgstr "核算科目"

View File

@@ -33,6 +33,6 @@ class ContractLineFormula(models.Model):
except Exception as e: except Exception as e:
raise exceptions.ValidationError( raise exceptions.ValidationError(
_("Error evaluating code.\nDetails: %s") % e _("Error evaluating code.\nDetails: %s") % e
) ) from e
if "result" not in eval_context: if "result" not in eval_context:
raise exceptions.ValidationError(_("No valid result returned.")) raise exceptions.ValidationError(_("No valid result returned."))

View File

@@ -3,18 +3,18 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.15.1: http://docutils.sourceforge.net/" /> <meta name="generator" content="Docutils: https://docutils.sourceforge.io/" />
<title>Variable quantity in contract recurrent invoicing</title> <title>Variable quantity in contract recurrent invoicing</title>
<style type="text/css"> <style type="text/css">
/* /*
:Author: David Goodger (goodger@python.org) :Author: David Goodger (goodger@python.org)
:Id: $Id: html4css1.css 7952 2016-07-26 18:15:59Z milde $ :Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $
:Copyright: This stylesheet has been placed in the public domain. :Copyright: This stylesheet has been placed in the public domain.
Default cascading style sheet for the HTML output of Docutils. Default cascading style sheet for the HTML output of Docutils.
See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
customize this style sheet. customize this style sheet.
*/ */
@@ -366,26 +366,28 @@ ul.auto-toc {
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! <!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !! !! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !! !! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:648dc147c00023bfda1595708efb6802c3ae0216215f6f4922a667f890e3180f
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/contract/tree/14.0/contract_variable_quantity"><img alt="OCA/contract" src="https://img.shields.io/badge/github-OCA%2Fcontract-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/contract-14-0/contract-14-0-contract_variable_quantity"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/110/14.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p> <p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/contract/tree/15.0/contract_variable_quantity"><img alt="OCA/contract" src="https://img.shields.io/badge/github-OCA%2Fcontract-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/contract-15-0/contract-15-0-contract_variable_quantity"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/contract&amp;target_branch=15.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>With this module, you will be able to define in recurring contracts some <p>With this module, you will be able to define in recurring contracts some
lines with variable quantity according to a provided formula.</p> lines with variable quantity according to a provided formula.</p>
<p><strong>Table of contents</strong></p> <p><strong>Table of contents</strong></p>
<div class="contents local topic" id="contents"> <div class="contents local topic" id="contents">
<ul class="simple"> <ul class="simple">
<li><a class="reference internal" href="#configuration" id="id1">Configuration</a></li> <li><a class="reference internal" href="#configuration" id="toc-entry-1">Configuration</a></li>
<li><a class="reference internal" href="#usage" id="id2">Usage</a></li> <li><a class="reference internal" href="#usage" id="toc-entry-2">Usage</a></li>
<li><a class="reference internal" href="#bug-tracker" id="id3">Bug Tracker</a></li> <li><a class="reference internal" href="#bug-tracker" id="toc-entry-3">Bug Tracker</a></li>
<li><a class="reference internal" href="#credits" id="id4">Credits</a><ul> <li><a class="reference internal" href="#credits" id="toc-entry-4">Credits</a><ul>
<li><a class="reference internal" href="#authors" id="id5">Authors</a></li> <li><a class="reference internal" href="#authors" id="toc-entry-5">Authors</a></li>
<li><a class="reference internal" href="#contributors" id="id6">Contributors</a></li> <li><a class="reference internal" href="#contributors" id="toc-entry-6">Contributors</a></li>
<li><a class="reference internal" href="#maintainers" id="id7">Maintainers</a></li> <li><a class="reference internal" href="#maintainers" id="toc-entry-7">Maintainers</a></li>
</ul> </ul>
</li> </li>
</ul> </ul>
</div> </div>
<div class="section" id="configuration"> <div class="section" id="configuration">
<h1><a class="toc-backref" href="#id1">Configuration</a></h1> <h1><a class="toc-backref" href="#toc-entry-1">Configuration</a></h1>
<ol class="arabic"> <ol class="arabic">
<li><p class="first">Go to Invoicing &gt; Configuration &gt; Contracts &gt; Formulas (quantity).</p> <li><p class="first">Go to Invoicing &gt; Configuration &gt; Contracts &gt; Formulas (quantity).</p>
</li> </li>
@@ -403,11 +405,11 @@ float/integer value of the quantity to invoice in the variable result.</p>
</li> </li>
</ol> </ol>
<div class="figure"> <div class="figure">
<img alt="Formula form" src="https://raw.githubusercontent.com/OCA/contract/14.0/contract_variable_quantity/images/formula_form.png" style="width: 600px;" /> <img alt="Formula form" src="https://raw.githubusercontent.com/OCA/contract/15.0/contract_variable_quantity/images/formula_form.png" style="width: 600px;" />
</div> </div>
</div> </div>
<div class="section" id="usage"> <div class="section" id="usage">
<h1><a class="toc-backref" href="#id2">Usage</a></h1> <h1><a class="toc-backref" href="#toc-entry-2">Usage</a></h1>
<p>To use this module, you need to:</p> <p>To use this module, you need to:</p>
<ol class="arabic simple"> <ol class="arabic simple">
<li>Go to Invoicing &gt; Sales &gt; Contracts and select or create a new contract.</li> <li>Go to Invoicing &gt; Sales &gt; Contracts and select or create a new contract.</li>
@@ -418,23 +420,23 @@ float/integer value of the quantity to invoice in the variable result.</p>
</ol> </ol>
</div> </div>
<div class="section" id="bug-tracker"> <div class="section" id="bug-tracker">
<h1><a class="toc-backref" href="#id3">Bug Tracker</a></h1> <h1><a class="toc-backref" href="#toc-entry-3">Bug Tracker</a></h1>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/contract/issues">GitHub Issues</a>. <p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/contract/issues">GitHub Issues</a>.
In case of trouble, please check there if your issue has already been reported. 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 If you spotted it first, help us to smash it by providing a detailed and welcomed
<a class="reference external" href="https://github.com/OCA/contract/issues/new?body=module:%20contract_variable_quantity%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p> <a class="reference external" href="https://github.com/OCA/contract/issues/new?body=module:%20contract_variable_quantity%0Aversion:%2015.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p> <p>Do not contact contributors directly about support or help with technical issues.</p>
</div> </div>
<div class="section" id="credits"> <div class="section" id="credits">
<h1><a class="toc-backref" href="#id4">Credits</a></h1> <h1><a class="toc-backref" href="#toc-entry-4">Credits</a></h1>
<div class="section" id="authors"> <div class="section" id="authors">
<h2><a class="toc-backref" href="#id5">Authors</a></h2> <h2><a class="toc-backref" href="#toc-entry-5">Authors</a></h2>
<ul class="simple"> <ul class="simple">
<li>Tecnativa</li> <li>Tecnativa</li>
</ul> </ul>
</div> </div>
<div class="section" id="contributors"> <div class="section" id="contributors">
<h2><a class="toc-backref" href="#id6">Contributors</a></h2> <h2><a class="toc-backref" href="#toc-entry-6">Contributors</a></h2>
<ul> <ul>
<li><p class="first"><a class="reference external" href="https://www.tecnativa.com">Tecnativa</a>:</p> <li><p class="first"><a class="reference external" href="https://www.tecnativa.com">Tecnativa</a>:</p>
<blockquote> <blockquote>
@@ -452,13 +454,13 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
</ul> </ul>
</div> </div>
<div class="section" id="maintainers"> <div class="section" id="maintainers">
<h2><a class="toc-backref" href="#id7">Maintainers</a></h2> <h2><a class="toc-backref" href="#toc-entry-7">Maintainers</a></h2>
<p>This module is maintained by the OCA.</p> <p>This module is maintained by the OCA.</p>
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a> <a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose <p>OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and mission is to support the collaborative development of Odoo features and
promote its widespread use.</p> promote its widespread use.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/contract/tree/14.0/contract_variable_quantity">OCA/contract</a> project on GitHub.</p> <p>This module is part of the <a class="reference external" href="https://github.com/OCA/contract/tree/15.0/contract_variable_quantity">OCA/contract</a> project on GitHub.</p>
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p> <p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
</div> </div>
</div> </div>

View File

@@ -4,13 +4,12 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import exceptions from odoo import exceptions
from odoo.tests.common import SavepointCase from odoo.tests import tagged
from odoo.tests.common import TransactionCase
class TestContractVariableQuantity(SavepointCase): @tagged("post_install", "-at_install")
at_install = False class TestContractVariableQuantity(TransactionCase):
post_install = True
def setUp(self): def setUp(self):
super().setUp() super().setUp()
self.partner = self.env["res.partner"].create({"name": "Test partner"}) self.partner = self.env["res.partner"].create({"name": "Test partner"})