mirror of https://github.com/OCA/web.git
[MIG] Migrate the module web_m2x_options to v14.
parent
ef297b6ab5
commit
ce9eea76b0
|
@ -14,10 +14,10 @@ web_m2x_options
|
|||
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||
:alt: License: AGPL-3
|
||||
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fweb-lightgray.png?logo=github
|
||||
:target: https://github.com/OCA/web/tree/13.0/web_m2x_options
|
||||
:target: https://github.com/OCA/web/tree/14.0/web_m2x_options
|
||||
:alt: OCA/web
|
||||
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
|
||||
:target: https://translation.odoo-community.org/projects/web-13-0/web-13-0-web_m2x_options
|
||||
:target: https://translation.odoo-community.org/projects/web-14-0/web-14-0-web_m2x_options
|
||||
:alt: Translate me on Weblate
|
||||
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
|
||||
:target: https://runbot.odoo-community.org/runbot/162/13.0
|
||||
|
@ -178,6 +178,7 @@ Contributors
|
|||
* David Vidal <david.vidal@tecnativa.com>
|
||||
* Ernesto Tejeda <ernesto.tejeda87@gmail.com>
|
||||
* Bhavesh Odedra <bodedra@opensourceintegrators.com>
|
||||
* Dhara Solanki <dhara.solanki@initos.com>
|
||||
|
||||
Maintainers
|
||||
~~~~~~~~~~~
|
||||
|
|
|
@ -1 +1,2 @@
|
|||
from . import models
|
||||
from . import tests
|
||||
|
|
|
@ -1,13 +1,15 @@
|
|||
# Copyright 2015 0k.io
|
||||
# Copyright 2016 ACSONE SA/NV
|
||||
# Copyright 2017 Tecnativa
|
||||
# Copyright 2020 initOS GmbH.
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
{
|
||||
"name": "web_m2x_options",
|
||||
"version": "13.0.1.0.2",
|
||||
"version": "14.0.1.0.0",
|
||||
"category": "Web",
|
||||
"author": "ACSONE SA/NV, "
|
||||
"author": "initOS GmbH,"
|
||||
"ACSONE SA/NV, "
|
||||
"0k.io, "
|
||||
"Tecnativa, "
|
||||
"Odoo Community Association (OCA)",
|
||||
|
|
|
@ -10,3 +10,4 @@
|
|||
* David Vidal <david.vidal@tecnativa.com>
|
||||
* Ernesto Tejeda <ernesto.tejeda87@gmail.com>
|
||||
* Bhavesh Odedra <bodedra@opensourceintegrators.com>
|
||||
* Dhara Solanki <dhara.solanki@initos.com> (http://www.initos.com)
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
# Copyright 2020 initOS GmbH.
|
||||
from . import test_ir_config_parameter
|
|
@ -0,0 +1,30 @@
|
|||
# Copyright 2020 initOS GmbH.
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||
|
||||
from odoo.tests import common
|
||||
|
||||
|
||||
class TestIrConfigParameter(common.SavepointCase):
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
super(TestIrConfigParameter, cls).setUpClass()
|
||||
cls.env["ir.config_parameter"].set_param("web_m2x_options.limit", 10)
|
||||
cls.env["ir.config_parameter"].set_param("web_m2x_options.create_edit", "True")
|
||||
cls.env["ir.config_parameter"].set_param("web_m2x_options.create", "True")
|
||||
cls.env["ir.config_parameter"].set_param("web_m2x_options.search_more", "False")
|
||||
cls.env["ir.config_parameter"].set_param("web_m2x_options.m2o_dialog", "True")
|
||||
|
||||
def test_web_m2x_options_key(self):
|
||||
web_m2x_options = self.env["ir.config_parameter"].get_web_m2x_options()
|
||||
options = {opt["key"]: opt["value"] for opt in web_m2x_options}
|
||||
self.assertIn("web_m2x_options.limit", options)
|
||||
self.assertNotIn("web_m2x_options.m2o_dialog_test", options)
|
||||
|
||||
def test_web_m2x_options_value(self):
|
||||
web_m2x_options = self.env["ir.config_parameter"].get_web_m2x_options()
|
||||
options = {opt["key"]: opt["value"] for opt in web_m2x_options}
|
||||
self.assertEqual(options["web_m2x_options.limit"], "10")
|
||||
self.assertTrue(bool(options["web_m2x_options.create_edit"]))
|
||||
self.assertTrue(bool(options["web_m2x_options.create"]))
|
||||
self.assertEqual(options["web_m2x_options.search_more"], "False")
|
||||
self.assertTrue(bool(options["web_m2x_options.m2o_dialog"]))
|
Loading…
Reference in New Issue