mirror of https://github.com/OCA/web.git
pre-commit, black, isort
parent
904e204045
commit
6a734a09f9
|
@ -3,28 +3,22 @@
|
|||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
{
|
||||
'name': "Web Dialog Size",
|
||||
'summary': """
|
||||
"name": "Web Dialog Size",
|
||||
"summary": """
|
||||
A module that lets the user expand a
|
||||
dialog box to the full screen width.""",
|
||||
'author': "ACSONE SA/NV, "
|
||||
"Therp BV, "
|
||||
"Siddharth Bhalgami,"
|
||||
"Tecnativa, "
|
||||
"Amaris, "
|
||||
"Odoo Community Association (OCA)",
|
||||
'website': "http://github.com/OCA/web",
|
||||
'category': 'web',
|
||||
'version': '13.0.1.0.0',
|
||||
'license': 'AGPL-3',
|
||||
'depends': [
|
||||
'web',
|
||||
],
|
||||
'qweb': [
|
||||
'static/src/xml/web_dialog_size.xml',
|
||||
],
|
||||
'data': [
|
||||
'templates/assets.xml',
|
||||
],
|
||||
'installable': True,
|
||||
"author": "ACSONE SA/NV, "
|
||||
"Therp BV, "
|
||||
"Siddharth Bhalgami,"
|
||||
"Tecnativa, "
|
||||
"Amaris, "
|
||||
"Odoo Community Association (OCA)",
|
||||
"website": "http://github.com/OCA/web",
|
||||
"category": "web",
|
||||
"version": "13.0.1.0.0",
|
||||
"license": "AGPL-3",
|
||||
"depends": ["web"],
|
||||
"qweb": ["static/src/xml/web_dialog_size.xml"],
|
||||
"data": ["templates/assets.xml"],
|
||||
"installable": True,
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# Copyright 2018 Tecnativa - Jairo Llopis
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||
|
||||
from odoo.models import api, Model
|
||||
from odoo.models import Model, api
|
||||
from odoo.tools.safe_eval import const_eval
|
||||
|
||||
|
||||
|
@ -13,5 +13,6 @@ class IrConfigParameter(Model):
|
|||
get_param = self.sudo().get_param
|
||||
return {
|
||||
"default_maximize": const_eval(
|
||||
get_param("web_dialog_size.default_maximize", "False"))
|
||||
get_param("web_dialog_size.default_maximize", "False")
|
||||
)
|
||||
}
|
||||
|
|
|
@ -9,12 +9,12 @@ class TestWebDialogSize(TransactionCase):
|
|||
super(TestWebDialogSize, self).setUp()
|
||||
|
||||
def test_get_web_dialog_size_config(self):
|
||||
obj = self.env['ir.config_parameter']
|
||||
obj = self.env["ir.config_parameter"]
|
||||
|
||||
self.assertFalse(obj.get_web_dialog_size_config()['default_maximize'])
|
||||
self.assertFalse(obj.get_web_dialog_size_config()["default_maximize"])
|
||||
|
||||
obj.set_param("web_dialog_size.default_maximize", "True")
|
||||
self.assertTrue(obj.get_web_dialog_size_config()['default_maximize'])
|
||||
self.assertTrue(obj.get_web_dialog_size_config()["default_maximize"])
|
||||
|
||||
obj.set_param("web_dialog_size.default_maximize", "False")
|
||||
self.assertFalse(obj.get_web_dialog_size_config()['default_maximize'])
|
||||
self.assertFalse(obj.get_web_dialog_size_config()["default_maximize"])
|
||||
|
|
Loading…
Reference in New Issue