mirror of https://github.com/OCA/web.git
[IMP] web_widget_url_advanced: black, isort
parent
5efdd66e1b
commit
74b87e8517
|
@ -10,8 +10,6 @@
|
|||
"author": "Camptocamp, Odoo Community Association (OCA)",
|
||||
"website": "https://github.com/OCA/web/",
|
||||
"depends": ["web"],
|
||||
"data": [
|
||||
"templates/assets.xml",
|
||||
],
|
||||
"data": ["templates/assets.xml",],
|
||||
"installable": True,
|
||||
}
|
||||
|
|
|
@ -1,2 +1 @@
|
|||
* ``<field text_field="foo"/>`` is not supported in tree views.
|
||||
|
|
@ -1,18 +1,18 @@
|
|||
/* Copyright 2018 Simone Orsi - Camptocamp SA
|
||||
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";
|
||||
|
||||
var basic_fields = require('web.basic_fields');
|
||||
var basic_fields = require("web.basic_fields");
|
||||
|
||||
basic_fields.UrlWidget.include({
|
||||
/**
|
||||
* @override
|
||||
*/
|
||||
init: function () {
|
||||
init: function() {
|
||||
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`
|
||||
var text_field = this.attrs.text_field || this.attrs.options.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
|
||||
License LGPLv3.0 or later (https://www.gnu.org/licenses/lgpl-3.0.en.html).
|
||||
-->
|
||||
<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">
|
||||
<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>
|
||||
</template>
|
||||
</odoo>
|
||||
|
|
Loading…
Reference in New Issue