mirror of https://github.com/OCA/web.git
[IMP] web_m2x_options: black, isort
parent
804514bd58
commit
2953c0c2d0
|
@ -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"])
|
||||
|
|
|
@ -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">
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
Loading…
Reference in New Issue