mirror of
https://github.com/OCA/contract.git
synced 2025-02-13 17:57:24 +02:00
[IMP] contract: remove redundant method
I have detected a method that was created as redundant and with the same technique used when preparing the line values, so better to have everything together in the same method instead of having it spread.
This commit is contained in:
committed by
Carolina Fernandez
parent
aac05b9fcf
commit
079d6297de
@@ -5,7 +5,7 @@
|
||||
|
||||
{
|
||||
'name': 'Variable quantity in contract recurrent invoicing',
|
||||
'version': '12.0.2.1.1',
|
||||
'version': '12.0.2.1.2',
|
||||
'category': 'Contract Management',
|
||||
'license': 'AGPL-3',
|
||||
'author': "Tecnativa,"
|
||||
|
||||
@@ -10,23 +10,18 @@ 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: Pedro Castro Silva <pedrocs@exo.pt>, 2018\n"
|
||||
"PO-Revision-Date: 2020-02-18 19:13+0000\n"
|
||||
"Last-Translator: alvarorib <alvaro.ribeiro@exo.pt>\n"
|
||||
"Language-Team: Portuguese (https://www.transifex.com/oca/teams/23907/pt/)\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_quantity
|
||||
#: model_terms:ir.ui.view,arch_db:contract_variable_quantity.view_contract_line_qty_formula_form
|
||||
#, fuzzy
|
||||
#| msgid ""
|
||||
#| "<code>\n"
|
||||
#| " result = env['product.product']."
|
||||
#| "search_count([('sale_ok', '=', True)])\n"
|
||||
#| " </code>"
|
||||
msgid ""
|
||||
"<code>\n"
|
||||
" result =\n"
|
||||
@@ -36,8 +31,10 @@ msgid ""
|
||||
" </code>"
|
||||
msgstr ""
|
||||
"<code>\n"
|
||||
" result = env['product.product']."
|
||||
"search_count([('sale_ok', '=', True)])\n"
|
||||
" result =\n"
|
||||
" "
|
||||
"env['product.product'].search_count([('sale_ok',\n"
|
||||
" '=', True)])\n"
|
||||
" </code>"
|
||||
|
||||
#. module: contract_variable_quantity
|
||||
@@ -47,8 +44,6 @@ msgstr "<i>context</i>: Dicionário de contexto corrente."
|
||||
|
||||
#. module: contract_variable_quantity
|
||||
#: model_terms:ir.ui.view,arch_db:contract_variable_quantity.view_contract_line_qty_formula_form
|
||||
#, fuzzy
|
||||
#| msgid "<i>contract</i>: Contract whose line belongs to."
|
||||
msgid ""
|
||||
"<i>contract</i>: Contract whose line\n"
|
||||
" belongs to."
|
||||
@@ -56,17 +51,13 @@ msgstr "<i>contract</i>: Contrato a cuja linha pertence."
|
||||
|
||||
#. module: contract_variable_quantity
|
||||
#: model_terms:ir.ui.view,arch_db:contract_variable_quantity.view_contract_line_qty_formula_form
|
||||
#, fuzzy
|
||||
#| msgid "<i>env</i>: Environment variable for getting other models."
|
||||
msgid ""
|
||||
"<i>env</i>: Environment variable for\n"
|
||||
" getting other models."
|
||||
msgstr "<i>env</i>: Variável de Environment para obtenção de outros modelos."
|
||||
msgstr "<i>env</i>: Variável de ambiente para obtenção de outros modelos."
|
||||
|
||||
#. module: contract_variable_quantity
|
||||
#: model_terms:ir.ui.view,arch_db:contract_variable_quantity.view_contract_line_qty_formula_form
|
||||
#, fuzzy
|
||||
#| msgid "<i>invoice</i>: Invoice (header) being created."
|
||||
msgid ""
|
||||
"<i>invoice</i>: Invoice (header) being\n"
|
||||
" created."
|
||||
@@ -74,9 +65,6 @@ msgstr "<i>invoice</i>: Fatura (cabeçalho) a ser criada."
|
||||
|
||||
#. module: contract_variable_quantity
|
||||
#: model_terms:ir.ui.view,arch_db:contract_variable_quantity.view_contract_line_qty_formula_form
|
||||
#, fuzzy
|
||||
#| msgid ""
|
||||
#| "<i>line</i>: Contract recurring invoice line that triggers this formula."
|
||||
msgid ""
|
||||
"<i>line</i>: Contract recurring invoice\n"
|
||||
" line that triggers this formula."
|
||||
@@ -90,12 +78,12 @@ msgstr "<i>user</i>: Utilizador corrente."
|
||||
#. module: contract_variable_quantity
|
||||
#: model:ir.model,name:contract_variable_quantity.model_contract_abstract_contract_line
|
||||
msgid "Abstract Recurring Contract Line"
|
||||
msgstr ""
|
||||
msgstr "Linha de Contrato Recorrente Abstrato"
|
||||
|
||||
#. module: contract_variable_quantity
|
||||
#: model_terms:ir.actions.act_window,help:contract_variable_quantity.action_contract_quantity_formula
|
||||
msgid "Click to create a new formula for variable quantities."
|
||||
msgstr "Clique para criar uma nova fórmula para quantidades variáveis"
|
||||
msgstr "Clique para criar uma nova fórmula para quantidades variáveis."
|
||||
|
||||
#. module: contract_variable_quantity
|
||||
#: model:ir.model.fields,field_description:contract_variable_quantity.field_contract_line_qty_formula__code
|
||||
@@ -106,19 +94,17 @@ msgstr "Código"
|
||||
#. module: contract_variable_quantity
|
||||
#: model:ir.model,name:contract_variable_quantity.model_contract_contract
|
||||
msgid "Contract"
|
||||
msgstr ""
|
||||
msgstr "Contrato"
|
||||
|
||||
#. module: contract_variable_quantity
|
||||
#: model:ir.model,name:contract_variable_quantity.model_contract_line
|
||||
msgid "Contract Line"
|
||||
msgstr ""
|
||||
msgstr "Linha de Contrato"
|
||||
|
||||
#. module: contract_variable_quantity
|
||||
#: model:ir.model,name:contract_variable_quantity.model_contract_line_qty_formula
|
||||
#, fuzzy
|
||||
#| msgid "contract.line.qty.formula"
|
||||
msgid "Contract Line Formula"
|
||||
msgstr "contract.line.qty.formula"
|
||||
msgstr "Fórmula de Linha de Contrato"
|
||||
|
||||
#. module: contract_variable_quantity
|
||||
#: model:ir.model.fields,field_description:contract_variable_quantity.field_contract_line_qty_formula__create_uid
|
||||
@@ -166,7 +152,7 @@ msgstr "Fórmulas (quantidade)"
|
||||
#. module: contract_variable_quantity
|
||||
#: model_terms:ir.ui.view,arch_db:contract_variable_quantity.view_contract_line_qty_formula_form
|
||||
msgid "Help with Python expressions."
|
||||
msgstr "Ajuda de expressões Python"
|
||||
msgstr "Ajuda de expressões Python."
|
||||
|
||||
#. module: contract_variable_quantity
|
||||
#: model:ir.model.fields,field_description:contract_variable_quantity.field_contract_line_qty_formula__id
|
||||
@@ -235,8 +221,6 @@ msgstr "Quantidade variável"
|
||||
|
||||
#. module: contract_variable_quantity
|
||||
#: model_terms:ir.ui.view,arch_db:contract_variable_quantity.view_contract_line_qty_formula_form
|
||||
#, fuzzy
|
||||
#| msgid "You can use these variables to compute your formula:"
|
||||
msgid ""
|
||||
"You can use these variables to compute your\n"
|
||||
" formula:"
|
||||
@@ -244,10 +228,6 @@ msgstr "Pode usar estas variáveis na computação da sua fórmula:"
|
||||
|
||||
#. module: contract_variable_quantity
|
||||
#: model_terms:ir.ui.view,arch_db:contract_variable_quantity.view_contract_line_qty_formula_form
|
||||
#, fuzzy
|
||||
#| 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'."
|
||||
msgid ""
|
||||
"You have to insert valid Python code block that\n"
|
||||
" stores at some moment a float/integer value "
|
||||
|
||||
@@ -9,8 +9,8 @@ msgstr ""
|
||||
"Project-Id-Version: Odoo Server 10.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2017-11-30 01:41+0000\n"
|
||||
"PO-Revision-Date: 2019-12-16 15:05+0000\n"
|
||||
"Last-Translator: Augusto D. Lisbôa <augusto.diniz.l@gmail.com>\n"
|
||||
"PO-Revision-Date: 2020-02-12 05:03+0000\n"
|
||||
"Last-Translator: Marcel Savegnago <marcel.savegnago@gmail.com>\n"
|
||||
"Language-Team: Portuguese (Brazil) (https://www.transifex.com/oca/teams/"
|
||||
"23907/pt_BR/)\n"
|
||||
"Language: pt_BR\n"
|
||||
@@ -18,7 +18,7 @@ msgstr ""
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Plural-Forms: nplurals=2; plural=n > 1;\n"
|
||||
"X-Generator: Weblate 3.9.1\n"
|
||||
"X-Generator: Weblate 3.10\n"
|
||||
|
||||
#. module: contract_variable_quantity
|
||||
#: model_terms:ir.ui.view,arch_db:contract_variable_quantity.view_contract_line_qty_formula_form
|
||||
@@ -86,7 +86,7 @@ msgstr "<i>user</i>: Usuário atual."
|
||||
#. module: contract_variable_quantity
|
||||
#: model:ir.model,name:contract_variable_quantity.model_contract_abstract_contract_line
|
||||
msgid "Abstract Recurring Contract Line"
|
||||
msgstr "Linha do Contrato Recorrente Abstrato"
|
||||
msgstr "Linha de Contrato Recorrente Abstrato"
|
||||
|
||||
#. module: contract_variable_quantity
|
||||
#: model_terms:ir.actions.act_window,help:contract_variable_quantity.action_contract_quantity_formula
|
||||
@@ -165,7 +165,7 @@ msgstr "Ajuda com Expressões Python."
|
||||
#. module: contract_variable_quantity
|
||||
#: model:ir.model.fields,field_description:contract_variable_quantity.field_contract_line_qty_formula__id
|
||||
msgid "ID"
|
||||
msgstr "Identificação"
|
||||
msgstr "ID"
|
||||
|
||||
#. module: contract_variable_quantity
|
||||
#: model:ir.model.fields,help:contract_variable_quantity.field_contract_contract__skip_zero_qty
|
||||
|
||||
@@ -11,18 +11,20 @@ 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: Pedro Castro Silva <pedrocs@sossia.pt>, 2016\n"
|
||||
"Language-Team: Portuguese (Portugal) (https://www.transifex.com/oca/"
|
||||
"teams/23907/pt_PT/)\n"
|
||||
"PO-Revision-Date: 2020-02-14 21:13+0000\n"
|
||||
"Last-Translator: alvarorib <alvaro.ribeiro@exo.pt>\n"
|
||||
"Language-Team: Portuguese (Portugal) (https://www.transifex.com/oca/teams/"
|
||||
"23907/pt_PT/)\n"
|
||||
"Language: pt_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_quantity
|
||||
#: model_terms:ir.ui.view,arch_db:contract_variable_quantity.view_contract_line_qty_formula_form
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
"<code>\n"
|
||||
" result =\n"
|
||||
@@ -31,6 +33,12 @@ msgid ""
|
||||
" '=', True)])\n"
|
||||
" </code>"
|
||||
msgstr ""
|
||||
"<code>\n"
|
||||
" result =\n"
|
||||
" "
|
||||
"env['product.product'].search_count([('sale_ok',\n"
|
||||
" '=', True)])\n"
|
||||
" </code>"
|
||||
|
||||
#. module: contract_variable_quantity
|
||||
#: model_terms:ir.ui.view,arch_db:contract_variable_quantity.view_contract_line_qty_formula_form
|
||||
|
||||
@@ -44,9 +44,9 @@ class AccountAnalyticInvoiceLine(models.Model):
|
||||
return quantity
|
||||
|
||||
@api.multi
|
||||
def _prepare_invoice_line(self, invoice_id=False):
|
||||
def _prepare_invoice_line(self, invoice_id=False, invoice_values=False):
|
||||
vals = super(AccountAnalyticInvoiceLine, self)._prepare_invoice_line(
|
||||
invoice_id=invoice_id
|
||||
invoice_id=invoice_id, invoice_values=invoice_values,
|
||||
)
|
||||
if (
|
||||
'quantity' in vals
|
||||
|
||||
Reference in New Issue
Block a user