mirror of
https://github.com/OCA/contract.git
synced 2025-02-13 17:57:24 +02:00
@@ -18,9 +18,9 @@ odoo.define('agreement_legal.domain_widget_ext', function (require) {
|
|||||||
this.partialUse = this.nodeOptions.partial_use || false;
|
this.partialUse = this.nodeOptions.partial_use || false;
|
||||||
},
|
},
|
||||||
|
|
||||||
//--------------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
// Private
|
// Private
|
||||||
//--------------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
@@ -37,10 +37,12 @@ odoo.define('agreement_legal.domain_widget_ext', function (require) {
|
|||||||
// Convert char value to array value
|
// Convert char value to array value
|
||||||
var value = this.value || "[]";
|
var value = this.value || "[]";
|
||||||
|
|
||||||
// Create the domain selector or change the value of the current one...
|
// Create the domain selector or change the value of the current
|
||||||
|
// one...
|
||||||
var def;
|
var def;
|
||||||
if (!this.domainSelector) {
|
if (!this.domainSelector) {
|
||||||
this.domainSelector = new DomainSelector(this, this._domainModel, value, {
|
this.domainSelector = new DomainSelector(
|
||||||
|
this, this._domainModel, value, {
|
||||||
readonly: this.mode === "readonly" || this.inDialog,
|
readonly: this.mode === "readonly" || this.inDialog,
|
||||||
filters: this.fsFilters,
|
filters: this.fsFilters,
|
||||||
debugMode: session.debug,
|
debugMode: session.debug,
|
||||||
@@ -54,9 +56,10 @@ odoo.define('agreement_legal.domain_widget_ext', function (require) {
|
|||||||
return def.then(this._replaceContent.bind(this));
|
return def.then(this._replaceContent.bind(this));
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Render the field DOM except for the domain selector part. The full field
|
* Render the field DOM except for the domain selector part. The full
|
||||||
* DOM is composed of a DIV which contains the domain selector widget,
|
* field DOM is composed of a DIV which contains the domain selector
|
||||||
* followed by other content. This other content is handled by this method.
|
* widget, followed by other content. This other content is handled by
|
||||||
|
* this method.
|
||||||
*
|
*
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<templates id="template" xml:space="preserve">
|
<templates id="template" xml:space="preserve">
|
||||||
<t t-name="FieldDomain.content">
|
<t t-name="FieldDomain.content">
|
||||||
<t t-if="partialUse">
|
<t t-if="partialUse">
|
||||||
<div t-if="hasModel" class="o_field_domain_panel">
|
<div t-if="hasModel" class="o_field_domain_panel">
|
||||||
<!--<div t-if="hasModel" class="o_field_domain_panel">
|
<!--<div t-if="hasModel" class="o_field_domain_panel">
|
||||||
@@ -29,9 +29,9 @@
|
|||||||
</div>
|
</div>
|
||||||
<div t-else="">Select a model to add a filter.</div>
|
<div t-else="">Select a model to add a filter.</div>
|
||||||
</t>
|
</t>
|
||||||
</t>
|
</t>
|
||||||
|
|
||||||
<div aria-atomic="true" t-name="DomainSelector" t-attf-class="o_domain_node o_domain_tree o_domain_selector #{widget.readonly ? 'o_read_mode' : 'o_edit_mode'}">
|
<div aria-atomic="true" t-name="DomainSelector" t-attf-class="o_domain_node o_domain_tree o_domain_selector #{widget.readonly ? 'o_read_mode' : 'o_edit_mode'}">
|
||||||
<t t-if="widget.options.partialUse">
|
<t t-if="widget.options.partialUse">
|
||||||
<t t-if="widget.children.length === 0">
|
<t t-if="widget.children.length === 0">
|
||||||
<span>SMatch <strong>all records</strong></span>
|
<span>SMatch <strong>all records</strong></span>
|
||||||
@@ -73,8 +73,8 @@
|
|||||||
<input type="text" class="o_domain_debug_input"/>
|
<input type="text" class="o_domain_debug_input"/>
|
||||||
</label>
|
</label>
|
||||||
</t>
|
</t>
|
||||||
</div>
|
</div>
|
||||||
<t t-name="DomainNode.ControlPanel">
|
<t t-name="DomainNode.ControlPanel">
|
||||||
<t t-if="widget.options.partialUse">
|
<t t-if="widget.options.partialUse">
|
||||||
<div t-if="!widget.readonly && !widget.noControlPanel" class="o_domain_node_control_panel" role="toolbar" aria-label="Domain node">
|
<div t-if="!widget.readonly && !widget.noControlPanel" class="o_domain_node_control_panel" role="toolbar" aria-label="Domain node">
|
||||||
</div>
|
</div>
|
||||||
@@ -86,8 +86,8 @@
|
|||||||
<button class="btn o_domain_add_node_button" title="Add branch" aria-label="Add branch" data-branch="1"><i class="fa fa-ellipsis-h"/></button>
|
<button class="btn o_domain_add_node_button" title="Add branch" aria-label="Add branch" data-branch="1"><i class="fa fa-ellipsis-h"/></button>
|
||||||
</div>
|
</div>
|
||||||
</t>
|
</t>
|
||||||
</t>
|
</t>
|
||||||
<div t-name="DomainLeaf" t-attf-class="o_domain_node o_domain_leaf o_domain_selector_row #{widget.readonly ? 'o_read_mode' : 'o_edit_mode'}">
|
<div t-name="DomainLeaf" t-attf-class="o_domain_node o_domain_leaf o_domain_selector_row #{widget.readonly ? 'o_read_mode' : 'o_edit_mode'}">
|
||||||
<t t-call="DomainNode.ControlPanel"/>
|
<t t-call="DomainNode.ControlPanel"/>
|
||||||
|
|
||||||
<div t-if="!widget.readonly" class="o_domain_leaf_edition">
|
<div t-if="!widget.readonly" class="o_domain_leaf_edition">
|
||||||
@@ -154,8 +154,8 @@
|
|||||||
set
|
set
|
||||||
</t>
|
</t>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div aria-atomic="true" t-name="ModelFieldSelector" t-attf-class="o_field_selector#{!widget.options.readonly ? ' o_edit_mode o_input' : ''}">
|
<div aria-atomic="true" t-name="ModelFieldSelector" t-attf-class="o_field_selector#{!widget.options.readonly ? ' o_edit_mode o_input' : ''}">
|
||||||
<div class="o_field_selector_value" tabindex="0"/>
|
<div class="o_field_selector_value" tabindex="0"/>
|
||||||
<t t-if="!widget.options.partialUse">
|
<t t-if="!widget.options.partialUse">
|
||||||
<div class="o_field_selector_controls" tabindex="0">
|
<div class="o_field_selector_controls" tabindex="0">
|
||||||
@@ -175,5 +175,5 @@
|
|||||||
<input type="text" class="o_input"/>
|
<input type="text" class="o_input"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</templates>
|
</templates>
|
||||||
Reference in New Issue
Block a user