Skip to content

Commit

Permalink
[IMP] contract_variable_quantity: Make name translatable
Browse files Browse the repository at this point in the history
  • Loading branch information
pedrobaeza authored and victoralmau committed Sep 23, 2021
1 parent a64ea3c commit 7ab8f0f
Show file tree
Hide file tree
Showing 7 changed files with 92 additions and 33 deletions.
2 changes: 1 addition & 1 deletion contract_variable_quantity/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

{
'name': 'Variable quantity in contract recurrent invoicing',
'version': '11.0.1.1.0',
'version': '11.0.1.2.0',
'category': 'Contract Management',
'license': 'AGPL-3',
'author': "Tecnativa,"
Expand Down
36 changes: 22 additions & 14 deletions contract_variable_quantity/i18n/es.po
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * contract_variable_quantity
#
#
# Translators:
# OCA Transbot <[email protected]>, 2018
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 11.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-03-27 14:42+0200\n"
"PO-Revision-Date: 2018-03-27 14:44+0200\n"
"Last-Translator: Carlos Dauden <[email protected]>\n"
"POT-Creation-Date: 2018-03-30 11:59+0000\n"
"PO-Revision-Date: 2018-03-30 11:59+0000\n"
"Last-Translator: OCA Transbot <[email protected]>, 2018\n"
"Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Content-Transfer-Encoding: \n"
"Language: es\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Poedit 1.8.7.1\n"

#. module: contract_variable_quantity
#: model:ir.ui.view,arch_db:contract_variable_quantity.view_contract_line_qty_formula_form
Expand Down Expand Up @@ -52,8 +51,11 @@ msgstr "<i>invoice</i>: Factura (cabecera) siendo creada."

#. 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 "<i>line</i>: Línea del contrato de facturación recurrente que lanza esta fórmula."
msgid ""
"<i>line</i>: Contract recurring invoice line that triggers this formula."
msgstr ""
"<i>line</i>: Línea del contrato de facturación recurrente que lanza esta "
"fórmula."

#. module: contract_variable_quantity
#: model:ir.ui.view,arch_db:contract_variable_quantity.view_contract_line_qty_formula_form
Expand Down Expand Up @@ -92,7 +94,7 @@ msgid "Display Name"
msgstr "Nombre mostrado"

#. module: contract_variable_quantity
#: code:addons/contract_variable_quantity/models/contract.py:63
#: code:addons/contract_variable_quantity/models/contract.py:77
#, python-format
msgid ""
"Error evaluating code.\n"
Expand Down Expand Up @@ -132,7 +134,9 @@ msgstr "ID (identificación)"
#: model:ir.model.fields,help:contract_variable_quantity.field_account_analytic_account_skip_zero_qty
#: model:ir.model.fields,help:contract_variable_quantity.field_project_project_skip_zero_qty
msgid "If checked, contract lines with 0 qty don't create invoice line"
msgstr "Si está marcado, las lineas de contrato con cantidad 0 no crearán líneas de factura"
msgstr ""
"Si está marcado, las lineas de contrato con cantidad 0 no crearán líneas de "
"factura"

#. module: contract_variable_quantity
#: model:ir.model.fields,field_description:contract_variable_quantity.field_contract_line_qty_formula___last_update
Expand All @@ -156,7 +160,7 @@ msgid "Name"
msgstr "Nombre"

#. module: contract_variable_quantity
#: code:addons/contract_variable_quantity/models/contract.py:65
#: code:addons/contract_variable_quantity/models/contract.py:79
#, python-format
msgid "No valid result returned."
msgstr "No se devuelve un valor válido."
Expand Down Expand Up @@ -192,8 +196,12 @@ msgstr "Puede usar estas variables para calcular su fórmula:"

#. 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 "Debe insertar un bloque de código Python que almacene en algún momento un valor entero o decimal de la cantidad a facturar en la variable 'result'."
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 ""
"Debe insertar un bloque de código Python que almacene en algún momento un "
"valor entero o decimal de la cantidad a facturar en la variable 'result'."

#. module: contract_variable_quantity
#: model:ir.model,name:contract_variable_quantity.model_account_analytic_invoice_line
Expand Down
20 changes: 16 additions & 4 deletions contract_variable_quantity/i18n/hi_IN.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 11.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-01-17 13:50+0000\n"
"PO-Revision-Date: 2018-01-17 13:50+0000\n"
"POT-Creation-Date: 2018-03-30 11:59+0000\n"
"PO-Revision-Date: 2018-03-30 11:59+0000\n"
"Last-Translator: OCA Transbot <[email protected]>, 2018\n"
"Language-Team: Hindi (India) (https://www.transifex.com/oca/teams/23907/hi_IN/)\n"
"MIME-Version: 1.0\n"
Expand Down Expand Up @@ -89,7 +89,7 @@ msgid "Display Name"
msgstr ""

#. module: contract_variable_quantity
#: code:addons/contract_variable_quantity/models/contract.py:63
#: code:addons/contract_variable_quantity/models/contract.py:77
#, python-format
msgid ""
"Error evaluating code.\n"
Expand Down Expand Up @@ -123,6 +123,12 @@ msgstr ""
msgid "ID"
msgstr "आईडी"

#. module: contract_variable_quantity
#: model:ir.model.fields,help:contract_variable_quantity.field_account_analytic_account_skip_zero_qty
#: model:ir.model.fields,help:contract_variable_quantity.field_project_project_skip_zero_qty
msgid "If checked, contract lines with 0 qty don't create invoice line"
msgstr ""

#. module: contract_variable_quantity
#: model:ir.model.fields,field_description:contract_variable_quantity.field_contract_line_qty_formula___last_update
msgid "Last Modified on"
Expand All @@ -145,7 +151,7 @@ msgid "Name"
msgstr "नाम"

#. module: contract_variable_quantity
#: code:addons/contract_variable_quantity/models/contract.py:65
#: code:addons/contract_variable_quantity/models/contract.py:79
#, python-format
msgid "No valid result returned."
msgstr "कोई वैध परिणाम नहीं मिला।"
Expand All @@ -162,6 +168,12 @@ msgstr ""
msgid "Qty. type"
msgstr ""

#. module: contract_variable_quantity
#: model:ir.model.fields,field_description:contract_variable_quantity.field_account_analytic_account_skip_zero_qty
#: model:ir.model.fields,field_description:contract_variable_quantity.field_project_project_skip_zero_qty
msgid "Skip Zero Qty Lines"
msgstr ""

#. module: contract_variable_quantity
#: selection:account.analytic.contract.line,qty_type:0
#: selection:account.analytic.invoice.line,qty_type:0
Expand Down
20 changes: 16 additions & 4 deletions contract_variable_quantity/i18n/hr.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 11.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-01-17 13:50+0000\n"
"PO-Revision-Date: 2018-01-17 13:50+0000\n"
"POT-Creation-Date: 2018-03-30 11:59+0000\n"
"PO-Revision-Date: 2018-03-30 11:59+0000\n"
"Last-Translator: OCA Transbot <[email protected]>, 2018\n"
"Language-Team: Croatian (https://www.transifex.com/oca/teams/23907/hr/)\n"
"MIME-Version: 1.0\n"
Expand Down Expand Up @@ -89,7 +89,7 @@ msgid "Display Name"
msgstr "Prikaži naziv"

#. module: contract_variable_quantity
#: code:addons/contract_variable_quantity/models/contract.py:63
#: code:addons/contract_variable_quantity/models/contract.py:77
#, python-format
msgid ""
"Error evaluating code.\n"
Expand Down Expand Up @@ -123,6 +123,12 @@ msgstr "Pomoć sa python izrazima"
msgid "ID"
msgstr "ID"

#. module: contract_variable_quantity
#: model:ir.model.fields,help:contract_variable_quantity.field_account_analytic_account_skip_zero_qty
#: model:ir.model.fields,help:contract_variable_quantity.field_project_project_skip_zero_qty
msgid "If checked, contract lines with 0 qty don't create invoice line"
msgstr ""

#. module: contract_variable_quantity
#: model:ir.model.fields,field_description:contract_variable_quantity.field_contract_line_qty_formula___last_update
msgid "Last Modified on"
Expand All @@ -145,7 +151,7 @@ msgid "Name"
msgstr "Naziv"

#. module: contract_variable_quantity
#: code:addons/contract_variable_quantity/models/contract.py:65
#: code:addons/contract_variable_quantity/models/contract.py:79
#, python-format
msgid "No valid result returned."
msgstr "Nijedan valjani rezultat nije vraćen."
Expand All @@ -162,6 +168,12 @@ msgstr "Formula za količinu"
msgid "Qty. type"
msgstr "Tip količine"

#. module: contract_variable_quantity
#: model:ir.model.fields,field_description:contract_variable_quantity.field_account_analytic_account_skip_zero_qty
#: model:ir.model.fields,field_description:contract_variable_quantity.field_project_project_skip_zero_qty
msgid "Skip Zero Qty Lines"
msgstr ""

#. module: contract_variable_quantity
#: selection:account.analytic.contract.line,qty_type:0
#: selection:account.analytic.invoice.line,qty_type:0
Expand Down
20 changes: 16 additions & 4 deletions contract_variable_quantity/i18n/hr_HR.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 11.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-01-17 13:50+0000\n"
"PO-Revision-Date: 2018-01-17 13:50+0000\n"
"POT-Creation-Date: 2018-03-30 11:59+0000\n"
"PO-Revision-Date: 2018-03-30 11:59+0000\n"
"Last-Translator: OCA Transbot <[email protected]>, 2018\n"
"Language-Team: Croatian (Croatia) (https://www.transifex.com/oca/teams/23907/hr_HR/)\n"
"MIME-Version: 1.0\n"
Expand Down Expand Up @@ -92,7 +92,7 @@ msgid "Display Name"
msgstr "Naziv"

#. module: contract_variable_quantity
#: code:addons/contract_variable_quantity/models/contract.py:63
#: code:addons/contract_variable_quantity/models/contract.py:77
#, python-format
msgid ""
"Error evaluating code.\n"
Expand Down Expand Up @@ -128,6 +128,12 @@ msgstr "Pomoć u Python izrazima"
msgid "ID"
msgstr "ID"

#. module: contract_variable_quantity
#: model:ir.model.fields,help:contract_variable_quantity.field_account_analytic_account_skip_zero_qty
#: model:ir.model.fields,help:contract_variable_quantity.field_project_project_skip_zero_qty
msgid "If checked, contract lines with 0 qty don't create invoice line"
msgstr ""

#. module: contract_variable_quantity
#: model:ir.model.fields,field_description:contract_variable_quantity.field_contract_line_qty_formula___last_update
msgid "Last Modified on"
Expand All @@ -150,7 +156,7 @@ msgid "Name"
msgstr "Naziv"

#. module: contract_variable_quantity
#: code:addons/contract_variable_quantity/models/contract.py:65
#: code:addons/contract_variable_quantity/models/contract.py:79
#, python-format
msgid "No valid result returned."
msgstr "Nije vraćen nijedan valjani rezultat."
Expand All @@ -167,6 +173,12 @@ msgstr "Formula količine"
msgid "Qty. type"
msgstr "Tip količine"

#. module: contract_variable_quantity
#: model:ir.model.fields,field_description:contract_variable_quantity.field_account_analytic_account_skip_zero_qty
#: model:ir.model.fields,field_description:contract_variable_quantity.field_project_project_skip_zero_qty
msgid "Skip Zero Qty Lines"
msgstr ""

#. module: contract_variable_quantity
#: selection:account.analytic.contract.line,qty_type:0
#: selection:account.analytic.invoice.line,qty_type:0
Expand Down
25 changes: 20 additions & 5 deletions contract_variable_quantity/i18n/pt.po
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@
#
# Translators:
# OCA Transbot <[email protected]>, 2018
# Pedro Castro Silva <[email protected]>, 2018
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 11.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-01-17 13:50+0000\n"
"PO-Revision-Date: 2018-01-17 13:50+0000\n"
"Last-Translator: OCA Transbot <[email protected]>, 2018\n"
"POT-Creation-Date: 2018-04-17 02:41+0000\n"
"PO-Revision-Date: 2018-04-17 02:41+0000\n"
"Last-Translator: Pedro Castro Silva <[email protected]>, 2018\n"
"Language-Team: Portuguese (https://www.transifex.com/oca/teams/23907/pt/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
Expand Down Expand Up @@ -92,7 +93,7 @@ msgid "Display Name"
msgstr "Nome a Apresentar"

#. module: contract_variable_quantity
#: code:addons/contract_variable_quantity/models/contract.py:63
#: code:addons/contract_variable_quantity/models/contract.py:77
#, python-format
msgid ""
"Error evaluating code.\n"
Expand Down Expand Up @@ -128,6 +129,14 @@ msgstr "Ajuda de expressões Python"
msgid "ID"
msgstr "ID"

#. module: contract_variable_quantity
#: model:ir.model.fields,help:contract_variable_quantity.field_account_analytic_account_skip_zero_qty
#: model:ir.model.fields,help:contract_variable_quantity.field_project_project_skip_zero_qty
msgid "If checked, contract lines with 0 qty don't create invoice line"
msgstr ""
"Se assinalado, as linhas de contrato com quantidade 0 não criarão linhas de "
"faturas"

#. module: contract_variable_quantity
#: model:ir.model.fields,field_description:contract_variable_quantity.field_contract_line_qty_formula___last_update
msgid "Last Modified on"
Expand All @@ -150,7 +159,7 @@ msgid "Name"
msgstr "Nome"

#. module: contract_variable_quantity
#: code:addons/contract_variable_quantity/models/contract.py:65
#: code:addons/contract_variable_quantity/models/contract.py:79
#, python-format
msgid "No valid result returned."
msgstr "Não foi retornado nenhum resultado válido."
Expand All @@ -167,6 +176,12 @@ msgstr "Fórmula de Qtd."
msgid "Qty. type"
msgstr "Tipo de Qtd."

#. module: contract_variable_quantity
#: model:ir.model.fields,field_description:contract_variable_quantity.field_account_analytic_account_skip_zero_qty
#: model:ir.model.fields,field_description:contract_variable_quantity.field_project_project_skip_zero_qty
msgid "Skip Zero Qty Lines"
msgstr "Ignorar Linhas com Qtd. Zero"

#. module: contract_variable_quantity
#: selection:account.analytic.contract.line,qty_type:0
#: selection:account.analytic.invoice.line,qty_type:0
Expand Down
2 changes: 1 addition & 1 deletion contract_variable_quantity/models/contract.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class AccountAnalyticInvoiceLine(models.Model):
class ContractLineFormula(models.Model):
_name = 'contract.line.qty.formula'

name = fields.Char(required=True)
name = fields.Char(required=True, translate=True)
code = fields.Text(required=True, default="result = 0")

@api.constrains('code')
Expand Down

0 comments on commit 7ab8f0f

Please sign in to comment.