diff --git a/account_invoice_constraint_chronology/i18n/hr.po b/account_invoice_constraint_chronology/i18n/hr.po index a4d0ff93..e9624ccb 100644 --- a/account_invoice_constraint_chronology/i18n/hr.po +++ b/account_invoice_constraint_chronology/i18n/hr.po @@ -3,14 +3,16 @@ # * account_invoice_constraint_chronology # # Translators: +# OCA Transbot , 2017 +# Bole , 2017 msgid "" msgstr "" -"Project-Id-Version: account-financial-tools (8.0)\n" +"Project-Id-Version: Odoo Server 10.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-07-01 13:25+0000\n" -"PO-Revision-Date: 2015-06-03 15:57+0000\n" -"Last-Translator: <>\n" -"Language-Team: Croatian (http://www.transifex.com/oca/OCA-account-financial-tools-8-0/language/hr/)\n" +"POT-Creation-Date: 2017-05-30 00:47+0000\n" +"PO-Revision-Date: 2017-05-30 00:47+0000\n" +"Last-Translator: Bole , 2017\n" +"Language-Team: Croatian (https://www.transifex.com/oca/teams/23907/hr/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" @@ -18,12 +20,12 @@ msgstr "" "Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" #. module: account_invoice_constraint_chronology -#: field:account.journal,check_chronology:0 -msgid "Check Chronology" -msgstr "" +#: model:ir.model.fields,field_description:account_invoice_constraint_chronology.field_account_journal_check_chronology +msgid "Check chronology" +msgstr "Provjeri kronološki" #. module: account_invoice_constraint_chronology -#: code:addons/account_invoice_constraint_chronology/model/account_invoice.py:59 +#: code:addons/account_invoice_constraint_chronology/model/account_invoice.py:31 #, python-format msgid "" "Chronology Error. Please confirm older draft invoices before %s and try " @@ -31,7 +33,7 @@ msgid "" msgstr "" #. module: account_invoice_constraint_chronology -#: code:addons/account_invoice_constraint_chronology/model/account_invoice.py:78 +#: code:addons/account_invoice_constraint_chronology/model/account_invoice.py:48 #, python-format msgid "" "Chronology Error. There exist at least one invoice with a date posterior to " diff --git a/account_invoice_constraint_chronology/i18n/hr_HR.po b/account_invoice_constraint_chronology/i18n/hr_HR.po new file mode 100644 index 00000000..3e6fd0c8 --- /dev/null +++ b/account_invoice_constraint_chronology/i18n/hr_HR.po @@ -0,0 +1,50 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_invoice_constraint_chronology +# +# Translators: +# Bole , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-05-30 00:47+0000\n" +"PO-Revision-Date: 2017-05-30 00:47+0000\n" +"Last-Translator: Bole , 2017\n" +"Language-Team: Croatian (Croatia) (https://www.transifex.com/oca/teams/23907/hr_HR/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: hr_HR\n" +"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" + +#. module: account_invoice_constraint_chronology +#: model:ir.model.fields,field_description:account_invoice_constraint_chronology.field_account_journal_check_chronology +msgid "Check chronology" +msgstr "" + +#. module: account_invoice_constraint_chronology +#: code:addons/account_invoice_constraint_chronology/model/account_invoice.py:31 +#, python-format +msgid "" +"Chronology Error. Please confirm older draft invoices before %s and try " +"again." +msgstr "" + +#. module: account_invoice_constraint_chronology +#: code:addons/account_invoice_constraint_chronology/model/account_invoice.py:48 +#, python-format +msgid "" +"Chronology Error. There exist at least one invoice with a date posterior to " +"%s." +msgstr "" + +#. module: account_invoice_constraint_chronology +#: model:ir.model,name:account_invoice_constraint_chronology.model_account_invoice +msgid "Invoice" +msgstr "Račun" + +#. module: account_invoice_constraint_chronology +#: model:ir.model,name:account_invoice_constraint_chronology.model_account_journal +msgid "Journal" +msgstr "" diff --git a/account_invoice_constraint_chronology/i18n/pt_PT.po b/account_invoice_constraint_chronology/i18n/pt_PT.po new file mode 100644 index 00000000..9973fe52 --- /dev/null +++ b/account_invoice_constraint_chronology/i18n/pt_PT.po @@ -0,0 +1,50 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_invoice_constraint_chronology +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-05-30 00:47+0000\n" +"PO-Revision-Date: 2017-05-30 00:47+0000\n" +"Last-Translator: OCA Transbot , 2017\n" +"Language-Team: Portuguese (Portugal) (https://www.transifex.com/oca/teams/23907/pt_PT/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: pt_PT\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: account_invoice_constraint_chronology +#: model:ir.model.fields,field_description:account_invoice_constraint_chronology.field_account_journal_check_chronology +msgid "Check chronology" +msgstr "" + +#. module: account_invoice_constraint_chronology +#: code:addons/account_invoice_constraint_chronology/model/account_invoice.py:31 +#, python-format +msgid "" +"Chronology Error. Please confirm older draft invoices before %s and try " +"again." +msgstr "" + +#. module: account_invoice_constraint_chronology +#: code:addons/account_invoice_constraint_chronology/model/account_invoice.py:48 +#, python-format +msgid "" +"Chronology Error. There exist at least one invoice with a date posterior to " +"%s." +msgstr "" + +#. module: account_invoice_constraint_chronology +#: model:ir.model,name:account_invoice_constraint_chronology.model_account_invoice +msgid "Invoice" +msgstr "" + +#. module: account_invoice_constraint_chronology +#: model:ir.model,name:account_invoice_constraint_chronology.model_account_journal +msgid "Journal" +msgstr "Diário" diff --git a/account_invoice_constraint_chronology/i18n/sl.po b/account_invoice_constraint_chronology/i18n/sl.po index 69739b1c..f5d3fc9d 100644 --- a/account_invoice_constraint_chronology/i18n/sl.po +++ b/account_invoice_constraint_chronology/i18n/sl.po @@ -3,15 +3,15 @@ # * account_invoice_constraint_chronology # # Translators: -# Matjaž Mozetič , 2015 +# OCA Transbot , 2017 msgid "" msgstr "" -"Project-Id-Version: account-financial-tools (8.0)\n" +"Project-Id-Version: Odoo Server 10.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-07-01 13:25+0000\n" -"PO-Revision-Date: 2015-07-04 11:49+0000\n" -"Last-Translator: Matjaž Mozetič \n" -"Language-Team: Slovenian (http://www.transifex.com/oca/OCA-account-financial-tools-8-0/language/sl/)\n" +"POT-Creation-Date: 2017-05-30 00:47+0000\n" +"PO-Revision-Date: 2017-05-30 00:47+0000\n" +"Last-Translator: OCA Transbot , 2017\n" +"Language-Team: Slovenian (https://www.transifex.com/oca/teams/23907/sl/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" @@ -19,20 +19,22 @@ msgstr "" "Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);\n" #. module: account_invoice_constraint_chronology -#: field:account.journal,check_chronology:0 -msgid "Check Chronology" -msgstr "Preveri kronologijo" +#: model:ir.model.fields,field_description:account_invoice_constraint_chronology.field_account_journal_check_chronology +msgid "Check chronology" +msgstr "" #. module: account_invoice_constraint_chronology -#: code:addons/account_invoice_constraint_chronology/model/account_invoice.py:59 +#: code:addons/account_invoice_constraint_chronology/model/account_invoice.py:31 #, python-format msgid "" "Chronology Error. Please confirm older draft invoices before %s and try " "again." -msgstr "Kronološka napaka. Starejše osnutke računov potrdite pred %s in poskusite ponovno." +msgstr "" +"Kronološka napaka. Starejše osnutke računov potrdite pred %s in poskusite " +"ponovno." #. module: account_invoice_constraint_chronology -#: code:addons/account_invoice_constraint_chronology/model/account_invoice.py:78 +#: code:addons/account_invoice_constraint_chronology/model/account_invoice.py:48 #, python-format msgid "" "Chronology Error. There exist at least one invoice with a date posterior to " diff --git a/account_invoice_constraint_chronology/i18n/tr_TR.po b/account_invoice_constraint_chronology/i18n/tr_TR.po new file mode 100644 index 00000000..7a4e15f8 --- /dev/null +++ b/account_invoice_constraint_chronology/i18n/tr_TR.po @@ -0,0 +1,50 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_invoice_constraint_chronology +# +# Translators: +# Ediz Duman , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-05-30 00:47+0000\n" +"PO-Revision-Date: 2017-05-30 00:47+0000\n" +"Last-Translator: Ediz Duman , 2017\n" +"Language-Team: Turkish (Turkey) (https://www.transifex.com/oca/teams/23907/tr_TR/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: tr_TR\n" +"Plural-Forms: nplurals=1; plural=0;\n" + +#. module: account_invoice_constraint_chronology +#: model:ir.model.fields,field_description:account_invoice_constraint_chronology.field_account_journal_check_chronology +msgid "Check chronology" +msgstr "" + +#. module: account_invoice_constraint_chronology +#: code:addons/account_invoice_constraint_chronology/model/account_invoice.py:31 +#, python-format +msgid "" +"Chronology Error. Please confirm older draft invoices before %s and try " +"again." +msgstr "" + +#. module: account_invoice_constraint_chronology +#: code:addons/account_invoice_constraint_chronology/model/account_invoice.py:48 +#, python-format +msgid "" +"Chronology Error. There exist at least one invoice with a date posterior to " +"%s." +msgstr "" + +#. module: account_invoice_constraint_chronology +#: model:ir.model,name:account_invoice_constraint_chronology.model_account_invoice +msgid "Invoice" +msgstr "" + +#. module: account_invoice_constraint_chronology +#: model:ir.model,name:account_invoice_constraint_chronology.model_account_journal +msgid "Journal" +msgstr "Yevmiye" diff --git a/account_invoice_constraint_chronology/model/account.py b/account_invoice_constraint_chronology/model/account.py index 81884b49..9af20294 100644 --- a/account_invoice_constraint_chronology/model/account.py +++ b/account_invoice_constraint_chronology/model/account.py @@ -8,7 +8,7 @@ from odoo import models, fields, api class AccountJournal(models.Model): _inherit = ['account.journal'] - check_chronology = fields.Boolean(string='Check Chronology', default=False) + check_chronology = fields.Boolean(default=False) @api.onchange('type') def _onchange_type(self): diff --git a/account_invoice_constraint_chronology/tests/test_account_constraint_chronology.py b/account_invoice_constraint_chronology/tests/test_account_constraint_chronology.py index 9a88bbac..7bbc94f6 100644 --- a/account_invoice_constraint_chronology/tests/test_account_constraint_chronology.py +++ b/account_invoice_constraint_chronology/tests/test_account_constraint_chronology.py @@ -2,9 +2,10 @@ # Copyright 2015-2017 ACSONE SA/NV () # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). +from datetime import datetime, timedelta + import odoo.tests.common as common from odoo.exceptions import UserError -from datetime import datetime, timedelta from odoo.tools import DEFAULT_SERVER_DATE_FORMAT @@ -53,24 +54,24 @@ class TestAccountConstraintChronology(common.TransactionCase): return journal def create_simple_invoice(self, journal_id, date): - invoice = self.env['account.invoice'].create( - {'partner_id': self.env.ref('base.res_partner_2').id, - 'account_id': self.account_account.id, - 'type': 'in_invoice', - 'journal_id': journal_id, - 'date_invoice': date, - 'state': 'draft', - }) + invoice = self.env['account.invoice'].create({ + 'partner_id': self.env.ref('base.res_partner_2').id, + 'account_id': self.account_account.id, + 'type': 'in_invoice', + 'journal_id': journal_id, + 'date_invoice': date, + 'state': 'draft', + }) - self.env['account.invoice.line'].create( - {'product_id': self.product.id, - 'quantity': 1.0, - 'price_unit': 100.0, - 'invoice_id': invoice.id, - 'name': 'product that cost 100', - 'account_id': self.account_account_line.id, - 'account_analytic_id': self.analytic_account.id, - }) + self.env['account.invoice.line'].create({ + 'product_id': self.product.id, + 'quantity': 1.0, + 'price_unit': 100.0, + 'invoice_id': invoice.id, + 'name': 'product that cost 100', + 'account_id': self.account_account_line.id, + 'account_analytic_id': self.analytic_account.id, + }) return invoice def test_invoice_draft(self):