mirror of
https://github.com/OCA/contract.git
synced 2025-02-13 17:57:24 +02:00
[10.0][FIX+IMP] contract: Improve usability and don't fail on wrong data (#130)
* [FIX+IMP] contract: Improve usability and don't fail on wrong data * Cron create invoices masked for avoiding silent errors * New constraints for assuring data consistency * UI helps for entering consistent data * Spanish translation * Remove double company_id field on form * [FIX] contract_sale_generation: Adapt tests to upstream contract
This commit is contained in:
committed by
Jesús Feliciano Valdez Cruz [Vauxoo]
parent
06e1ec8747
commit
7079d1075e
@@ -4,13 +4,14 @@
|
||||
#
|
||||
# Translators:
|
||||
# OCA Transbot <transbot@odoo-community.org>, 2017
|
||||
# Ismael Calvo <ismaelcj@gmail.com>, 2018
|
||||
msgid ""
|
||||
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: 2017-11-30 01:41+0000\n"
|
||||
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2017\n"
|
||||
"POT-Creation-Date: 2018-02-08 10:20+0000\n"
|
||||
"PO-Revision-Date: 2018-02-08 10:20+0000\n"
|
||||
"Last-Translator: Ismael Calvo <ismaelcj@gmail.com>, 2018\n"
|
||||
"Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
@@ -26,7 +27,7 @@ msgstr "Cuenta analítica"
|
||||
#. module: contract_sale_generation
|
||||
#: model:ir.ui.view,arch_db:contract_sale_generation.account_analytic_account_recurring_sale_form
|
||||
msgid "Create sales"
|
||||
msgstr ""
|
||||
msgstr "Crear ventas"
|
||||
|
||||
#. module: contract_sale_generation
|
||||
#: selection:account.analytic.account,type:0
|
||||
@@ -38,24 +39,24 @@ msgstr "Factura"
|
||||
#: selection:account.analytic.account,type:0
|
||||
#: selection:account.analytic.contract,type:0
|
||||
msgid "Sale"
|
||||
msgstr ""
|
||||
msgstr "Venta"
|
||||
|
||||
#. module: contract_sale_generation
|
||||
#: model:ir.model.fields,field_description:contract_sale_generation.field_account_analytic_account_sale_autoconfirm
|
||||
#: model:ir.model.fields,field_description:contract_sale_generation.field_account_analytic_contract_sale_autoconfirm
|
||||
msgid "Sale autoconfirm"
|
||||
msgstr ""
|
||||
msgstr "Autoconfirmar venta"
|
||||
|
||||
#. module: contract_sale_generation
|
||||
#: model:ir.actions.act_window,name:contract_sale_generation.act_recurring_sales
|
||||
msgid "Sales"
|
||||
msgstr ""
|
||||
msgstr "Ventas"
|
||||
|
||||
#. module: contract_sale_generation
|
||||
#: model:ir.model.fields,field_description:contract_sale_generation.field_account_analytic_account_type
|
||||
#: model:ir.model.fields,field_description:contract_sale_generation.field_account_analytic_contract_type
|
||||
msgid "Type"
|
||||
msgstr ""
|
||||
msgstr "Tipo"
|
||||
|
||||
#. module: contract_sale_generation
|
||||
#: code:addons/contract_sale_generation/models/account_analytic_account.py:53
|
||||
@@ -70,13 +71,15 @@ msgid ""
|
||||
"You must review start and end dates!\n"
|
||||
"%s"
|
||||
msgstr ""
|
||||
"Debe revisar las fechas de inicio y de fin\n"
|
||||
"%s"
|
||||
|
||||
#. module: contract_sale_generation
|
||||
#: model:ir.model,name:contract_sale_generation.model_account_analytic_contract
|
||||
msgid "account.analytic.contract"
|
||||
msgstr ""
|
||||
msgstr "account.analytic.contract"
|
||||
|
||||
#. module: contract_sale_generation
|
||||
#: model:ir.ui.view,arch_db:contract_sale_generation.account_analytic_account_recurring_sale_form
|
||||
msgid "⇒ Show recurring sales"
|
||||
msgstr ""
|
||||
msgstr "⇒ Mostrar ventas recurrentes"
|
||||
|
||||
@@ -9,8 +9,8 @@ msgid ""
|
||||
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: 2017-11-30 01:41+0000\n"
|
||||
"POT-Creation-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"
|
||||
"Language-Team: Croatian (https://www.transifex.com/oca/teams/23907/hr/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
@@ -27,7 +27,7 @@ msgstr "Analitički konto"
|
||||
#. module: contract_sale_generation
|
||||
#: model:ir.ui.view,arch_db:contract_sale_generation.account_analytic_account_recurring_sale_form
|
||||
msgid "Create sales"
|
||||
msgstr ""
|
||||
msgstr "Kreiraj ponude"
|
||||
|
||||
#. module: contract_sale_generation
|
||||
#: selection:account.analytic.account,type:0
|
||||
@@ -39,30 +39,30 @@ msgstr "Račun"
|
||||
#: selection:account.analytic.account,type:0
|
||||
#: selection:account.analytic.contract,type:0
|
||||
msgid "Sale"
|
||||
msgstr ""
|
||||
msgstr "Prodaja"
|
||||
|
||||
#. module: contract_sale_generation
|
||||
#: model:ir.model.fields,field_description:contract_sale_generation.field_account_analytic_account_sale_autoconfirm
|
||||
#: model:ir.model.fields,field_description:contract_sale_generation.field_account_analytic_contract_sale_autoconfirm
|
||||
msgid "Sale autoconfirm"
|
||||
msgstr ""
|
||||
msgstr "Automatski potvrdi ponude"
|
||||
|
||||
#. module: contract_sale_generation
|
||||
#: model:ir.actions.act_window,name:contract_sale_generation.act_recurring_sales
|
||||
msgid "Sales"
|
||||
msgstr ""
|
||||
msgstr "Prodaje"
|
||||
|
||||
#. module: contract_sale_generation
|
||||
#: model:ir.model.fields,field_description:contract_sale_generation.field_account_analytic_account_type
|
||||
#: model:ir.model.fields,field_description:contract_sale_generation.field_account_analytic_contract_type
|
||||
msgid "Type"
|
||||
msgstr ""
|
||||
msgstr "Tip"
|
||||
|
||||
#. module: contract_sale_generation
|
||||
#: code:addons/contract_sale_generation/models/account_analytic_account.py:53
|
||||
#, python-format
|
||||
msgid "You must first select a Customer for Contract %s!"
|
||||
msgstr ""
|
||||
msgstr "Prvo morate odabrati partnera ua ugovor %s!"
|
||||
|
||||
#. module: contract_sale_generation
|
||||
#: code:addons/contract_sale_generation/models/account_analytic_account.py:102
|
||||
@@ -71,13 +71,15 @@ msgid ""
|
||||
"You must review start and end dates!\n"
|
||||
"%s"
|
||||
msgstr ""
|
||||
"Morate revidirati početni i završni datum ugovora!!\n"
|
||||
"%s"
|
||||
|
||||
#. module: contract_sale_generation
|
||||
#: model:ir.model,name:contract_sale_generation.model_account_analytic_contract
|
||||
msgid "account.analytic.contract"
|
||||
msgstr ""
|
||||
msgstr "account.analytic.contract"
|
||||
|
||||
#. module: contract_sale_generation
|
||||
#: model:ir.ui.view,arch_db:contract_sale_generation.account_analytic_account_recurring_sale_form
|
||||
msgid "⇒ Show recurring sales"
|
||||
msgstr ""
|
||||
msgstr "⇒ Prikaži ponavljajuće ponude"
|
||||
|
||||
@@ -5,13 +5,14 @@
|
||||
# Translators:
|
||||
# OCA Transbot <transbot@odoo-community.org>, 2017
|
||||
# Pedro Castro Silva <inactive+pcs.sossia@transifex.com>, 2017
|
||||
# Pedro Castro Silva <pedrocs@exo.pt>, 2017
|
||||
msgid ""
|
||||
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: 2017-11-30 01:41+0000\n"
|
||||
"Last-Translator: Pedro Castro Silva <inactive+pcs.sossia@transifex.com>, 2017\n"
|
||||
"POT-Creation-Date: 2017-12-08 01:46+0000\n"
|
||||
"PO-Revision-Date: 2017-12-08 01:46+0000\n"
|
||||
"Last-Translator: Pedro Castro Silva <pedrocs@exo.pt>, 2017\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"
|
||||
@@ -71,6 +72,8 @@ msgid ""
|
||||
"You must review start and end dates!\n"
|
||||
"%s"
|
||||
msgstr ""
|
||||
"Tem que rever as datas de início e fim!\n"
|
||||
"%s"
|
||||
|
||||
#. module: contract_sale_generation
|
||||
#: model:ir.model,name:contract_sale_generation.model_account_analytic_contract
|
||||
|
||||
@@ -4,13 +4,14 @@
|
||||
#
|
||||
# Translators:
|
||||
# OCA Transbot <transbot@odoo-community.org>, 2017
|
||||
# Dorin Hongu <dhongu@gmail.com>, 2018
|
||||
msgid ""
|
||||
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: 2017-11-30 01:41+0000\n"
|
||||
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2017\n"
|
||||
"POT-Creation-Date: 2018-01-06 03:17+0000\n"
|
||||
"PO-Revision-Date: 2018-01-06 03:17+0000\n"
|
||||
"Last-Translator: Dorin Hongu <dhongu@gmail.com>, 2018\n"
|
||||
"Language-Team: Romanian (https://www.transifex.com/oca/teams/23907/ro/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
@@ -32,7 +33,7 @@ msgstr ""
|
||||
#: selection:account.analytic.account,type:0
|
||||
#: selection:account.analytic.contract,type:0
|
||||
msgid "Invoice"
|
||||
msgstr ""
|
||||
msgstr "Factura"
|
||||
|
||||
#. module: contract_sale_generation
|
||||
#: selection:account.analytic.account,type:0
|
||||
|
||||
@@ -4,13 +4,14 @@
|
||||
#
|
||||
# Translators:
|
||||
# Мед Ведь <p060t@list.ru>, 2017
|
||||
# nek, 2018
|
||||
msgid ""
|
||||
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: 2017-11-30 01:41+0000\n"
|
||||
"Last-Translator: Мед Ведь <p060t@list.ru>, 2017\n"
|
||||
"POT-Creation-Date: 2018-03-17 03:26+0000\n"
|
||||
"PO-Revision-Date: 2018-03-17 03:26+0000\n"
|
||||
"Last-Translator: nek, 2018\n"
|
||||
"Language-Team: Russian (https://www.transifex.com/oca/teams/23907/ru/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
@@ -21,7 +22,7 @@ msgstr ""
|
||||
#. module: contract_sale_generation
|
||||
#: model:ir.model,name:contract_sale_generation.model_account_analytic_account
|
||||
msgid "Analytic Account"
|
||||
msgstr ""
|
||||
msgstr "Аналитический счет"
|
||||
|
||||
#. module: contract_sale_generation
|
||||
#: model:ir.ui.view,arch_db:contract_sale_generation.account_analytic_account_recurring_sale_form
|
||||
@@ -38,7 +39,7 @@ msgstr "Счёт-фактура"
|
||||
#: selection:account.analytic.account,type:0
|
||||
#: selection:account.analytic.contract,type:0
|
||||
msgid "Sale"
|
||||
msgstr ""
|
||||
msgstr "Продажа"
|
||||
|
||||
#. module: contract_sale_generation
|
||||
#: model:ir.model.fields,field_description:contract_sale_generation.field_account_analytic_account_sale_autoconfirm
|
||||
@@ -49,7 +50,7 @@ msgstr ""
|
||||
#. module: contract_sale_generation
|
||||
#: model:ir.actions.act_window,name:contract_sale_generation.act_recurring_sales
|
||||
msgid "Sales"
|
||||
msgstr ""
|
||||
msgstr "Продажи"
|
||||
|
||||
#. module: contract_sale_generation
|
||||
#: model:ir.model.fields,field_description:contract_sale_generation.field_account_analytic_account_type
|
||||
@@ -70,6 +71,8 @@ msgid ""
|
||||
"You must review start and end dates!\n"
|
||||
"%s"
|
||||
msgstr ""
|
||||
"Вы должны проверить даты начала и окончания!\n"
|
||||
"%s"
|
||||
|
||||
#. module: contract_sale_generation
|
||||
#: model:ir.model,name:contract_sale_generation.model_account_analytic_contract
|
||||
|
||||
@@ -57,19 +57,12 @@ class TestContractSale(TransactionCase):
|
||||
res = self.contract_line._onchange_product_id()
|
||||
self.assertIn('uom_id', res['domain'])
|
||||
self.contract_line.price_unit = 100.0
|
||||
|
||||
self.contract.partner_id = False
|
||||
with self.assertRaises(ValidationError):
|
||||
self.contract.recurring_create_sale()
|
||||
self.contract.partner_id = self.partner.id
|
||||
|
||||
self.contract.recurring_create_sale()
|
||||
self.sale_monthly = self.env['sale.order'].search(
|
||||
[('project_id', '=', self.contract.id),
|
||||
('state', '=', 'draft')])
|
||||
self.assertTrue(self.sale_monthly)
|
||||
self.assertEqual(self.contract.recurring_next_date, '2017-02-28')
|
||||
|
||||
self.sale_line = self.sale_monthly.order_line[0]
|
||||
self.assertAlmostEqual(self.sale_line.price_subtotal, 50.0)
|
||||
self.assertEqual(self.contract.partner_id.user_id,
|
||||
@@ -81,12 +74,6 @@ class TestContractSale(TransactionCase):
|
||||
res = self.contract_line._onchange_product_id()
|
||||
self.assertIn('uom_id', res['domain'])
|
||||
self.contract_line.price_unit = 100.0
|
||||
|
||||
self.contract.partner_id = False
|
||||
with self.assertRaises(ValidationError):
|
||||
self.contract.recurring_create_sale()
|
||||
self.contract.partner_id = self.partner.id
|
||||
|
||||
self.contract.recurring_create_sale()
|
||||
self.sale_monthly = self.env['sale.order'].search(
|
||||
[('project_id', '=', self.contract.id),
|
||||
|
||||
Reference in New Issue
Block a user