[FIX] contract_sale_generation: it doesn't create sales (#141)

* Change the method called in the view
* Complete the create_invoice method
* Bump version + authoring
* Correct bad call of method
  Small Documentation
* Add super call in python test
* FIX bad field names causing bad quantities in sale.order.line
This commit is contained in:
Florent THOMAS
2018-04-01 19:21:52 +02:00
committed by Ilyas
parent f422a4bc50
commit 8a661fd957
17 changed files with 108 additions and 49 deletions

View File

@@ -12,10 +12,10 @@ msgstr ""
"PO-Revision-Date: 2017-04-27 02:40+0000\n" "PO-Revision-Date: 2017-04-27 02:40+0000\n"
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2017\n" "Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2017\n"
"Language-Team: German (https://www.transifex.com/oca/teams/23907/de/)\n" "Language-Team: German (https://www.transifex.com/oca/teams/23907/de/)\n"
"Language: de\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"
"Language: de\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. module: product_contract #. module: product_contract

View File

@@ -13,10 +13,10 @@ msgstr ""
"PO-Revision-Date: 2018-02-10 03:15+0000\n" "PO-Revision-Date: 2018-02-10 03:15+0000\n"
"Last-Translator: enjolras <yo@miguelrevilla.com>, 2018\n" "Last-Translator: enjolras <yo@miguelrevilla.com>, 2018\n"
"Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\n" "Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\n"
"Language: es\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"
"Language: es\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. module: product_contract #. module: product_contract

View File

@@ -12,10 +12,10 @@ msgstr ""
"PO-Revision-Date: 2018-03-10 01:44+0000\n" "PO-Revision-Date: 2018-03-10 01:44+0000\n"
"Last-Translator: Jarmo Kortetjärvi <jarmo.kortetjarvi@gmail.com>, 2018\n" "Last-Translator: Jarmo Kortetjärvi <jarmo.kortetjarvi@gmail.com>, 2018\n"
"Language-Team: Finnish (https://www.transifex.com/oca/teams/23907/fi/)\n" "Language-Team: Finnish (https://www.transifex.com/oca/teams/23907/fi/)\n"
"Language: fi\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"
"Language: fi\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. module: product_contract #. module: product_contract

View File

@@ -4,18 +4,20 @@
# #
# Translators: # Translators:
# leemannd <denis.leemann@camptocamp.com>, 2017 # leemannd <denis.leemann@camptocamp.com>, 2017
# David BEAL, 2018
# Fabien Bourgeois <fabien@yaltik.com>, 2018
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Odoo Server 10.0\n" "Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-04-27 02:40+0000\n" "POT-Creation-Date: 2018-05-19 02:01+0000\n"
"PO-Revision-Date: 2017-04-27 02:40+0000\n" "PO-Revision-Date: 2018-05-19 02:01+0000\n"
"Last-Translator: leemannd <denis.leemann@camptocamp.com>, 2017\n" "Last-Translator: Fabien Bourgeois <fabien@yaltik.com>, 2018\n"
"Language-Team: French (https://www.transifex.com/oca/teams/23907/fr/)\n" "Language-Team: French (https://www.transifex.com/oca/teams/23907/fr/)\n"
"Language: fr\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"
"Language: fr\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n"
#. module: product_contract #. module: product_contract
@@ -27,7 +29,7 @@ msgstr "Contrat"
#: model:ir.model.fields,field_description:product_contract.field_product_product_contract_template_id #: model:ir.model.fields,field_description:product_contract.field_product_product_contract_template_id
#: model:ir.model.fields,field_description:product_contract.field_product_template_contract_template_id #: model:ir.model.fields,field_description:product_contract.field_product_template_contract_template_id
msgid "Contract Template" msgid "Contract Template"
msgstr "" msgstr "Modèle de contrat"
#. module: product_contract #. module: product_contract
#: model:ir.model.fields,field_description:product_contract.field_product_product_is_contract #: model:ir.model.fields,field_description:product_contract.field_product_product_is_contract
@@ -43,7 +45,7 @@ msgstr ""
#. module: product_contract #. module: product_contract
#: model:ir.model,name:product_contract.model_sale_order #: model:ir.model,name:product_contract.model_sale_order
msgid "Sales Order" msgid "Sales Order"
msgstr "" msgstr "Vente"
#. module: product_contract #. module: product_contract
#: model:ir.model,name:product_contract.model_sale_order_line #: model:ir.model,name:product_contract.model_sale_order_line

View File

@@ -11,11 +11,12 @@ msgstr ""
"POT-Creation-Date: 2017-08-17 01:05+0000\n" "POT-Creation-Date: 2017-08-17 01:05+0000\n"
"PO-Revision-Date: 2017-08-17 01:05+0000\n" "PO-Revision-Date: 2017-08-17 01:05+0000\n"
"Last-Translator: Ashish Deshmukh <ashish.p.deshmukh@gmail.com>, 2017\n" "Last-Translator: Ashish Deshmukh <ashish.p.deshmukh@gmail.com>, 2017\n"
"Language-Team: Hindi (India) (https://www.transifex.com/oca/teams/23907/hi_IN/)\n" "Language-Team: Hindi (India) (https://www.transifex.com/oca/teams/23907/"
"hi_IN/)\n"
"Language: hi_IN\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"
"Language: hi_IN\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. module: product_contract #. module: product_contract

View File

@@ -12,11 +12,12 @@ msgstr ""
"PO-Revision-Date: 2018-02-10 03:15+0000\n" "PO-Revision-Date: 2018-02-10 03:15+0000\n"
"Last-Translator: Bole <bole@dajmi5.com>, 2017\n" "Last-Translator: Bole <bole@dajmi5.com>, 2017\n"
"Language-Team: Croatian (https://www.transifex.com/oca/teams/23907/hr/)\n" "Language-Team: Croatian (https://www.transifex.com/oca/teams/23907/hr/)\n"
"Language: hr\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"
"Language: hr\n" "Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && 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" "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
#. module: product_contract #. module: product_contract
#: model:ir.model.fields,field_description:product_contract.field_sale_order_line_contract_id #: model:ir.model.fields,field_description:product_contract.field_sale_order_line_contract_id

View File

@@ -12,12 +12,14 @@ msgstr ""
"POT-Creation-Date: 2017-06-17 01:39+0000\n" "POT-Creation-Date: 2017-06-17 01:39+0000\n"
"PO-Revision-Date: 2017-06-17 01:39+0000\n" "PO-Revision-Date: 2017-06-17 01:39+0000\n"
"Last-Translator: Bole <bole@dajmi5.com>, 2017\n" "Last-Translator: Bole <bole@dajmi5.com>, 2017\n"
"Language-Team: Croatian (Croatia) (https://www.transifex.com/oca/teams/23907/hr_HR/)\n" "Language-Team: Croatian (Croatia) (https://www.transifex.com/oca/teams/23907/"
"hr_HR/)\n"
"Language: hr_HR\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"
"Language: hr_HR\n" "Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && 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" "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
#. module: product_contract #. module: product_contract
#: model:ir.model.fields,field_description:product_contract.field_sale_order_line_contract_id #: model:ir.model.fields,field_description:product_contract.field_sale_order_line_contract_id

View File

@@ -12,10 +12,10 @@ msgstr ""
"PO-Revision-Date: 2017-04-27 02:40+0000\n" "PO-Revision-Date: 2017-04-27 02:40+0000\n"
"Last-Translator: Lorenzo Battistini <lorenzo.battistini@agilebg.com>, 2017\n" "Last-Translator: Lorenzo Battistini <lorenzo.battistini@agilebg.com>, 2017\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"
"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"
"Language: it\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. module: product_contract #. module: product_contract

View File

@@ -13,10 +13,10 @@ msgstr ""
"PO-Revision-Date: 2018-01-06 03:17+0000\n" "PO-Revision-Date: 2018-01-06 03:17+0000\n"
"Last-Translator: lfreeke <lfreeke@therp.nl>, 2018\n" "Last-Translator: lfreeke <lfreeke@therp.nl>, 2018\n"
"Language-Team: Dutch (https://www.transifex.com/oca/teams/23907/nl/)\n" "Language-Team: Dutch (https://www.transifex.com/oca/teams/23907/nl/)\n"
"Language: nl\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"
"Language: nl\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. module: product_contract #. module: product_contract

View File

@@ -11,11 +11,12 @@ msgstr ""
"POT-Creation-Date: 2017-06-09 01:10+0000\n" "POT-Creation-Date: 2017-06-09 01:10+0000\n"
"PO-Revision-Date: 2017-06-09 01:10+0000\n" "PO-Revision-Date: 2017-06-09 01:10+0000\n"
"Last-Translator: Peter Hageman <hageman.p@gmail.com>, 2017\n" "Last-Translator: Peter Hageman <hageman.p@gmail.com>, 2017\n"
"Language-Team: Dutch (Netherlands) (https://www.transifex.com/oca/teams/23907/nl_NL/)\n" "Language-Team: Dutch (Netherlands) (https://www.transifex.com/oca/"
"teams/23907/nl_NL/)\n"
"Language: nl_NL\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"
"Language: nl_NL\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. module: product_contract #. module: product_contract

View File

@@ -0,0 +1,47 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * product_contract
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: product_contract
#: model:ir.model.fields,field_description:product_contract.field_sale_order_line_contract_id
msgid "Contract"
msgstr ""
#. module: product_contract
#: model:ir.model.fields,field_description:product_contract.field_product_product_contract_template_id
#: model:ir.model.fields,field_description:product_contract.field_product_template_contract_template_id
msgid "Contract Template"
msgstr ""
#. module: product_contract
#: model:ir.model.fields,field_description:product_contract.field_product_product_is_contract
#: model:ir.model.fields,field_description:product_contract.field_product_template_is_contract
msgid "Is a contract"
msgstr ""
#. module: product_contract
#: model:ir.model,name:product_contract.model_product_template
msgid "Product Template"
msgstr ""
#. module: product_contract
#: model:ir.model,name:product_contract.model_sale_order
msgid "Sales Order"
msgstr ""
#. module: product_contract
#: model:ir.model,name:product_contract.model_sale_order_line
msgid "Sales Order Line"
msgstr ""

View File

@@ -12,10 +12,10 @@ msgstr ""
"PO-Revision-Date: 2017-07-15 01:24+0000\n" "PO-Revision-Date: 2017-07-15 01:24+0000\n"
"Last-Translator: Pedro Castro Silva <pedrocs@sossia.pt>, 2017\n" "Last-Translator: Pedro Castro Silva <pedrocs@sossia.pt>, 2017\n"
"Language-Team: Portuguese (https://www.transifex.com/oca/teams/23907/pt/)\n" "Language-Team: Portuguese (https://www.transifex.com/oca/teams/23907/pt/)\n"
"Language: pt\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"
"Language: pt\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. module: product_contract #. module: product_contract

View File

@@ -12,11 +12,12 @@ msgstr ""
"POT-Creation-Date: 2017-06-13 02:40+0000\n" "POT-Creation-Date: 2017-06-13 02:40+0000\n"
"PO-Revision-Date: 2017-06-13 02:40+0000\n" "PO-Revision-Date: 2017-06-13 02:40+0000\n"
"Last-Translator: falexandresilva <falexandresilva@gmail.com>, 2017\n" "Last-Translator: falexandresilva <falexandresilva@gmail.com>, 2017\n"
"Language-Team: Portuguese (Brazil) (https://www.transifex.com/oca/teams/23907/pt_BR/)\n" "Language-Team: Portuguese (Brazil) (https://www.transifex.com/oca/"
"teams/23907/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"
"Content-Transfer-Encoding: \n" "Content-Transfer-Encoding: \n"
"Language: pt_BR\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n"
#. module: product_contract #. module: product_contract

View File

@@ -12,11 +12,13 @@ msgstr ""
"PO-Revision-Date: 2018-03-17 03:26+0000\n" "PO-Revision-Date: 2018-03-17 03:26+0000\n"
"Last-Translator: nek, 2018\n" "Last-Translator: nek, 2018\n"
"Language-Team: Russian (https://www.transifex.com/oca/teams/23907/ru/)\n" "Language-Team: Russian (https://www.transifex.com/oca/teams/23907/ru/)\n"
"Language: ru\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"
"Language: ru\n" "Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);\n" "%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n"
"%100>=11 && n%100<=14)? 2 : 3);\n"
#. module: product_contract #. module: product_contract
#: model:ir.model.fields,field_description:product_contract.field_sale_order_line_contract_id #: model:ir.model.fields,field_description:product_contract.field_sale_order_line_contract_id

View File

@@ -8,14 +8,14 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Odoo Server 10.0\n" "Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-05-13 09:15+0000\n" "POT-Creation-Date: 2018-04-21 01:48+0000\n"
"PO-Revision-Date: 2017-05-13 09:15+0000\n" "PO-Revision-Date: 2018-04-21 01:48+0000\n"
"Last-Translator: Ediz Duman <neps1192@gmail.com>, 2017\n" "Last-Translator: Ediz Duman <neps1192@gmail.com>, 2017\n"
"Language-Team: Turkish (https://www.transifex.com/oca/teams/23907/tr/)\n" "Language-Team: Turkish (https://www.transifex.com/oca/teams/23907/tr/)\n"
"Language: tr\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"
"Language: tr\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n"
#. module: product_contract #. module: product_contract
@@ -33,19 +33,19 @@ msgstr "Sözleşme Şablonu"
#: model:ir.model.fields,field_description:product_contract.field_product_product_is_contract #: model:ir.model.fields,field_description:product_contract.field_product_product_is_contract
#: model:ir.model.fields,field_description:product_contract.field_product_template_is_contract #: model:ir.model.fields,field_description:product_contract.field_product_template_is_contract
msgid "Is a contract" msgid "Is a contract"
msgstr "" msgstr "Sözleşmeli"
#. module: product_contract #. module: product_contract
#: model:ir.model,name:product_contract.model_product_template #: model:ir.model,name:product_contract.model_product_template
msgid "Product Template" msgid "Product Template"
msgstr "" msgstr "Ürün Şablonu"
#. module: product_contract #. module: product_contract
#: model:ir.model,name:product_contract.model_sale_order #: model:ir.model,name:product_contract.model_sale_order
msgid "Sales Order" msgid "Sales Order"
msgstr "" msgstr "Satış Siparişi"
#. module: product_contract #. module: product_contract
#: model:ir.model,name:product_contract.model_sale_order_line #: model:ir.model,name:product_contract.model_sale_order_line
msgid "Sales Order Line" msgid "Sales Order Line"
msgstr "" msgstr "Satış Sipariş Satırı"

View File

@@ -11,11 +11,12 @@ msgstr ""
"POT-Creation-Date: 2017-04-27 02:40+0000\n" "POT-Creation-Date: 2017-04-27 02:40+0000\n"
"PO-Revision-Date: 2017-04-27 02:40+0000\n" "PO-Revision-Date: 2017-04-27 02:40+0000\n"
"Last-Translator: Ediz Duman <neps1192@gmail.com>, 2017\n" "Last-Translator: Ediz Duman <neps1192@gmail.com>, 2017\n"
"Language-Team: Turkish (Turkey) (https://www.transifex.com/oca/teams/23907/tr_TR/)\n" "Language-Team: Turkish (Turkey) (https://www.transifex.com/oca/teams/23907/"
"tr_TR/)\n"
"Language: tr_TR\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"
"Language: tr_TR\n"
"Plural-Forms: nplurals=1; plural=0;\n" "Plural-Forms: nplurals=1; plural=0;\n"
#. module: product_contract #. module: product_contract

View File

@@ -24,6 +24,7 @@ class TestSaleOrder(TransactionCase):
self.env['account.analytic.account']._revert_method( self.env['account.analytic.account']._revert_method(
'create', 'create',
) )
super(TestSaleOrder, self).tearDown()
def test_action_done(self): def test_action_done(self):
""" It should create a contract when the sale for a contract is set """ It should create a contract when the sale for a contract is set