[IMP] web_m2x_options: black, isort

pull/2434/head
Andrés Rodríguez 2020-02-29 11:37:39 -04:00 committed by Diep Huu Hoang
parent 804514bd58
commit 2953c0c2d0
3 changed files with 20 additions and 12 deletions

View File

@ -2,11 +2,15 @@ from odoo import api, models
class IrConfigParameter(models.Model):
_inherit = 'ir.config_parameter'
_inherit = "ir.config_parameter"
@api.model
def get_web_m2x_options(self):
opts = ['web_m2x_options.create', 'web_m2x_options.create_edit',
'web_m2x_options.limit', 'web_m2x_options.search_more',
'web_m2x_options.m2o_dialog']
return self.sudo().search_read([['key', 'in', opts]], ["key", "value"])
opts = [
"web_m2x_options.create",
"web_m2x_options.create_edit",
"web_m2x_options.limit",
"web_m2x_options.search_more",
"web_m2x_options.m2o_dialog",
]
return self.sudo().search_read([["key", "in", opts]], ["key", "value"])

View File

@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8" ?>
<!-- Copyright 2017 Jairo Llopis <jairo.llopis@tecnativa.com>
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
<templates xml:space="preserve">
<t t-extend="FieldMany2One">
<t t-jquery=".o_external_button" t-operation="attributes">

View File

@ -1,11 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<template id="assets_backend" name="m2x options assets"
inherit_id="web.assets_backend">
<template
id="assets_backend"
name="m2x options assets"
inherit_id="web.assets_backend"
>
<xpath expr="." position="inside">
<script type="text/javascript"
src="/web_m2x_options/static/src/js/form.js"></script>
<script
type="text/javascript"
src="/web_m2x_options/static/src/js/form.js"
/>
</xpath>
</template>