forked from Techsystech/web
[IMP] web_widget_url_advanced: black, isort
parent
5efdd66e1b
commit
74b87e8517
|
@ -3,15 +3,13 @@
|
||||||
{
|
{
|
||||||
"name": "Web URL widget advanced",
|
"name": "Web URL widget advanced",
|
||||||
"summary": "This module extends URL widget "
|
"summary": "This module extends URL widget "
|
||||||
"for displaying anchors with custom labels.",
|
"for displaying anchors with custom labels.",
|
||||||
"category": "Web",
|
"category": "Web",
|
||||||
"version": "12.0.1.0.0",
|
"version": "12.0.1.0.0",
|
||||||
"license": "LGPL-3",
|
"license": "LGPL-3",
|
||||||
"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,
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,2 +1 @@
|
||||||
* ``<field text_field="foo"/>`` is not supported in tree views.
|
* ``<field text_field="foo"/>`` is not supported in tree views.
|
||||||
|
|
|
@ -1,18 +1,18 @@
|
||||||
/* 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({
|
||||||
/**
|
/**
|
||||||
* @override
|
* @override
|
||||||
*/
|
*/
|
||||||
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) {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,12 +1,19 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
<!--
|
<!--
|
||||||
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>
|
<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>
|
||||||
|
|
Loading…
Reference in New Issue