3
0
Fork 0

[IMP] web_m2x_options: black, isort

13.0
Andrés Rodríguez 2020-02-29 11:37:39 -04:00
parent 66026899ad
commit 2f4c32665d
3 changed files with 20 additions and 12 deletions

View File

@ -2,11 +2,15 @@ from odoo import api, models
class IrConfigParameter(models.Model): class IrConfigParameter(models.Model):
_inherit = 'ir.config_parameter' _inherit = "ir.config_parameter"
@api.model @api.model
def get_web_m2x_options(self): def get_web_m2x_options(self):
opts = ['web_m2x_options.create', 'web_m2x_options.create_edit', opts = [
'web_m2x_options.limit', 'web_m2x_options.search_more', "web_m2x_options.create",
'web_m2x_options.m2o_dialog'] "web_m2x_options.create_edit",
return self.sudo().search_read([['key', 'in', opts]], ["key", "value"]) "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> <!-- Copyright 2017 Jairo Llopis <jairo.llopis@tecnativa.com>
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). --> License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
<templates xml:space="preserve"> <templates xml:space="preserve">
<t t-extend="FieldMany2One"> <t t-extend="FieldMany2One">
<t t-jquery=".o_external_button" t-operation="attributes"> <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> <odoo>
<template id="assets_backend" name="m2x options assets" <template
inherit_id="web.assets_backend"> id="assets_backend"
name="m2x options assets"
inherit_id="web.assets_backend"
>
<xpath expr="." position="inside"> <xpath expr="." position="inside">
<script type="text/javascript" <script
src="/web_m2x_options/static/src/js/form.js"></script> type="text/javascript"
src="/web_m2x_options/static/src/js/form.js"
/>
</xpath> </xpath>
</template> </template>