mirror of
https://github.com/OCA/web.git
synced 2025-02-22 13:21:25 +02:00
[IMP] : black, isort, prettier
This commit is contained in:
committed by
Jasmin Solanki
parent
de855a52a7
commit
1b6868cb95
@@ -1,28 +1,28 @@
|
||||
/* global py */
|
||||
/* Copyright 2019 Alexandre Díaz
|
||||
* License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). */
|
||||
odoo.define('web.web_action_conditionable', function (require) {
|
||||
odoo.define("web.web_action_conditionable", function(require) {
|
||||
"use strict";
|
||||
|
||||
var FieldOne2Many = require('web.relational_fields').FieldOne2Many;
|
||||
var FieldOne2Many = require("web.relational_fields").FieldOne2Many;
|
||||
|
||||
FieldOne2Many.include({
|
||||
init: function () {
|
||||
init: function() {
|
||||
var self = this;
|
||||
try {
|
||||
return this._super.apply(this, arguments);
|
||||
} catch (error) {
|
||||
var arch = this.view && this.view.arch;
|
||||
if (arch) {
|
||||
['create', 'delete'].forEach(function (item) {
|
||||
["create", "delete"].forEach(function(item) {
|
||||
if (!_.has(arch.attrs, item)) {
|
||||
return;
|
||||
}
|
||||
var expr = arch.attrs[item];
|
||||
try {
|
||||
self.activeActions[item] = py.evaluate(
|
||||
py.parse(py.tokenize(expr)),
|
||||
self.recordData).toJSON();
|
||||
self.activeActions[item] = py
|
||||
.evaluate(py.parse(py.tokenize(expr)), self.recordData)
|
||||
.toJSON();
|
||||
} catch (ignored) {
|
||||
// Do nothing
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user