mirror of https://github.com/OCA/web.git
[MIG] web_action_conditionable: Migration to 15.0
parent
1aee010a83
commit
714f51ef67
|
@ -1,11 +1,16 @@
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
{
|
{
|
||||||
"name": "web_action_conditionable",
|
"name": "web_action_conditionable",
|
||||||
"version": "14.0.1.0.1",
|
"version": "15.0.1.0.0",
|
||||||
"depends": ["base", "web"],
|
"depends": ["base", "web"],
|
||||||
"data": ["templates/assets.xml"],
|
"data": [],
|
||||||
"author": "Cristian Salamea,Odoo Community Association (OCA)",
|
"author": "Cristian Salamea,Odoo Community Association (OCA)",
|
||||||
"website": "https://github.com/OCA/web",
|
"website": "https://github.com/OCA/web",
|
||||||
"license": "AGPL-3",
|
"license": "AGPL-3",
|
||||||
|
"assets": {
|
||||||
|
"web.assets_backend": [
|
||||||
|
"web_action_conditionable/static/src/js/field_one2many.js",
|
||||||
|
],
|
||||||
|
},
|
||||||
"installable": True,
|
"installable": True,
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,6 +16,9 @@ odoo.define("web.web_action_conditionable", function (require) {
|
||||||
if (arch) {
|
if (arch) {
|
||||||
["create", "delete"].forEach(function (item) {
|
["create", "delete"].forEach(function (item) {
|
||||||
if (!_.has(arch.attrs, item)) {
|
if (!_.has(arch.attrs, item)) {
|
||||||
|
self.activeActions[item] = arch.attrs[item]
|
||||||
|
? Boolean(JSON.parse(arch.attrs[item]))
|
||||||
|
: true;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var expr = arch.attrs[item];
|
var expr = arch.attrs[item];
|
||||||
|
@ -32,7 +35,11 @@ odoo.define("web.web_action_conditionable", function (require) {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.editable = arch.attrs.editable;
|
this.editable = arch.attrs.editable;
|
||||||
|
this._canQuickEdit = arch.tag === "tree";
|
||||||
|
} else {
|
||||||
|
this._canQuickEdit = false;
|
||||||
}
|
}
|
||||||
|
this._computeAvailableActions(self.record);
|
||||||
if (this.attrs.columnInvisibleFields) {
|
if (this.attrs.columnInvisibleFields) {
|
||||||
this._processColumnInvisibleFields();
|
this._processColumnInvisibleFields();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,15 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8" ?>
|
|
||||||
<odoo>
|
|
||||||
<template
|
|
||||||
id="assets_backend"
|
|
||||||
name="action conditionable assets"
|
|
||||||
inherit_id="web.assets_backend"
|
|
||||||
>
|
|
||||||
<xpath expr="." position="inside">
|
|
||||||
<script
|
|
||||||
type="text/javascript"
|
|
||||||
src="/web_action_conditionable/static/src/js/field_one2many.js"
|
|
||||||
/>
|
|
||||||
</xpath>
|
|
||||||
</template>
|
|
||||||
</odoo>
|
|
Loading…
Reference in New Issue