3
0
Fork 0

[IMP] web_widget_url_advanced: black, isort, prettier

17.0
Peerapong-Supasompob 2021-07-13 11:51:28 +07:00 committed by Maksym Yankin
parent 67d2f43c1b
commit 1bdbf68c16
2 changed files with 5 additions and 5 deletions

View File

@ -8,7 +8,7 @@
"version": "13.0.1.1.0",
"license": "LGPL-3",
"author": "Camptocamp, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/web/",
"website": "https://github.com/OCA/web",
"depends": ["web"],
"data": ["templates/assets.xml"],
"installable": True,

View File

@ -1,7 +1,7 @@
/* 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");
@ -10,7 +10,7 @@ odoo.define("web_widget_url_advanced", function(require) {
/**
* @override
*/
init: function() {
init: function () {
this._super.apply(this, arguments);
// Retrieve customized `<a />` text from a field
// via `text_field` attribute or `options.text_field`
@ -20,7 +20,7 @@ odoo.define("web_widget_url_advanced", function(require) {
* Retrieve anchor text based on options.
* @returns {String}
*/
_get_text: function() {
_get_text: function () {
if (this.text_field) {
var field_value = this.recordData[this.text_field];
if (_.isObject(field_value) && _.has(field_value.data)) {
@ -35,7 +35,7 @@ odoo.define("web_widget_url_advanced", function(require) {
* @override
* @private
*/
_renderReadonly: function() {
_renderReadonly: function () {
// Base widget uses `this.attrs.text` instead of `this.value` when available.
this.attrs.text = this._get_text();
this._super.apply(this, arguments);