[IMP] web_widget_url_advanced: black, isort

pull/2117/head
Joan Sisquella 2020-03-02 13:56:04 +01:00 committed by Jasmin Solanki
parent 5efdd66e1b
commit 74b87e8517
4 changed files with 16 additions and 13 deletions

View File

@ -10,8 +10,6 @@
"author": "Camptocamp, Odoo Community Association (OCA)", "author": "Camptocamp, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/web/", "website": "https://github.com/OCA/web/",
"depends": ["web"], "depends": ["web"],
"data": [ "data": ["templates/assets.xml",],
"templates/assets.xml",
],
"installable": True, "installable": True,
} }

View File

@ -1,2 +1 @@
* ``<field text_field="foo"/>`` is not supported in tree views. * ``<field text_field="foo"/>`` is not supported in tree views.

View File

@ -1,10 +1,10 @@
/* Copyright 2018 Simone Orsi - Camptocamp SA /* Copyright 2018 Simone Orsi - Camptocamp SA
License LGPLv3.0 or later (https://www.gnu.org/licenses/lgpl-3.0.en.html). */ License LGPLv3.0 or later (https://www.gnu.org/licenses/lgpl-3.0.en.html). */
odoo.define('web_widget_url_advanced', function (require) { odoo.define("web_widget_url_advanced", function(require) {
"use strict"; "use strict";
var basic_fields = require('web.basic_fields'); var basic_fields = require("web.basic_fields");
basic_fields.UrlWidget.include({ basic_fields.UrlWidget.include({
/** /**
@ -12,7 +12,7 @@ odoo.define('web_widget_url_advanced', function (require) {
*/ */
init: function() { init: function() {
this._super.apply(this, arguments); this._super.apply(this, arguments);
// retrieve customized `<a />` text from a field // Retrieve customized `<a />` text from a field
// via `text_field` attribute or `options.text_field` // via `text_field` attribute or `options.text_field`
var text_field = this.attrs.text_field || this.attrs.options.text_field; var text_field = this.attrs.text_field || this.attrs.options.text_field;
if (text_field) { if (text_field) {
@ -24,5 +24,4 @@ odoo.define('web_widget_url_advanced', function (require) {
} }
}, },
}); });
}); });

View File

@ -4,9 +4,16 @@
License LGPLv3.0 or later (https://www.gnu.org/licenses/lgpl-3.0.en.html). License LGPLv3.0 or later (https://www.gnu.org/licenses/lgpl-3.0.en.html).
--> -->
<odoo> <odoo>
<template id="assets_backend" name="web_widget_url_advanced assets" inherit_id="web.assets_backend"> <template
id="assets_backend"
name="web_widget_url_advanced assets"
inherit_id="web.assets_backend"
>
<xpath expr="." position="inside"> <xpath expr="." position="inside">
<script type="text/javascript" src="/web_widget_url_advanced/static/src/js/url_widget.js" /> <script
type="text/javascript"
src="/web_widget_url_advanced/static/src/js/url_widget.js"
/>
</xpath> </xpath>
</template> </template>
</odoo> </odoo>