diff --git a/agreement_legal/static/description/index.html b/agreement_legal/static/description/index.html
index f11b08812..9feda578a 100644
--- a/agreement_legal/static/description/index.html
+++ b/agreement_legal/static/description/index.html
@@ -410,6 +410,11 @@ customer signature.
Select a template
Follow the process to get the required approval
Send the invitation to the customer to review and sign the agreement
+
Define Field using widget domain but having partial_use option true:
+
For Ex:
+
<field name=”field_domain” widget=”domain” nolabel=”1”
+
options=”{‘model’: ‘agreement.recital’,
+
‘partial_use’: True}”/>
diff --git a/agreement_legal/static/src/js/domain_widget_ext.js b/agreement_legal/static/src/js/domain_widget_ext.js
new file mode 100644
index 000000000..11da12f66
--- /dev/null
+++ b/agreement_legal/static/src/js/domain_widget_ext.js
@@ -0,0 +1,77 @@
+odoo.define('agreement_legal.domain_widget_ext', function (require) {
+ 'use strict';
+
+ var basic_fields = require('web.basic_fields');
+ var DomainSelector = require('web.DomainSelector');
+ var session = require('web.session');
+ var core = require('web.core');
+ var qweb = core.qweb;
+ var _t = core._t;
+
+ basic_fields.FieldDomain.include({
+ /**
+ * Init
+ */
+ init : function () {
+ this._super.apply(this, arguments);
+ // Add Additional options
+ this.partialUse = this.nodeOptions.partial_use || false;
+ },
+
+ //--------------------------------------------------------------------------
+ // Private
+ //--------------------------------------------------------------------------
+
+ /**
+ * @private
+ * @override _render from AbstractField
+ * @returns {Deferred}
+ */
+ _render: function () {
+ // If there is no model, only change the non-domain-selector content
+ if (!this._domainModel) {
+ this._replaceContent();
+ return $.when();
+ }
+
+ // Convert char value to array value
+ var value = this.value || "[]";
+
+ // Create the domain selector or change the value of the current one...
+ var def;
+ if (!this.domainSelector) {
+ this.domainSelector = new DomainSelector(this, this._domainModel, value, {
+ readonly: this.mode === "readonly" || this.inDialog,
+ filters: this.fsFilters,
+ debugMode: session.debug,
+ partialUse: this.partialUse || false,
+ });
+ def = this.domainSelector.prependTo(this.$el);
+ } else {
+ def = this.domainSelector.setDomain(value);
+ }
+ // ... then replace the other content (matched records, etc)
+ return def.then(this._replaceContent.bind(this));
+ },
+ /**
+ * Render the field DOM except for the domain selector part. The full field
+ * DOM is composed of a DIV which contains the domain selector widget,
+ * followed by other content. This other content is handled by this method.
+ *
+ * @private
+ */
+ _replaceContent: function () {
+ if (this._$content) {
+ this._$content.remove();
+ }
+ this._$content = $(qweb.render("FieldDomain.content", {
+ hasModel: !!this._domainModel,
+ isValid: !!this._isValidForModel,
+ nbRecords: this.record.specialData[this.name].nbRecords || 0,
+ inDialogEdit: this.inDialog && this.mode === "edit",
+ partialUse: this.partialUse || false,
+ }));
+ this._$content.appendTo(this.$el);
+ },
+ });
+});
diff --git a/agreement_legal/static/src/xml/domain_widget_view.xml b/agreement_legal/static/src/xml/domain_widget_view.xml
new file mode 100644
index 000000000..580d1a2ec
--- /dev/null
+++ b/agreement_legal/static/src/xml/domain_widget_view.xml
@@ -0,0 +1,179 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Invalid domain
+
+
+
+ Select a model to add a filter.
+
+
+
+
+
+
+ SMatch all records
+
+
+
+
+ Please navigate below and select field:
+
+ SSMatch records with
+
+ of the following rules:
+
+
+
+
+
+
+
+
+ Match all records
+
+
+
+
+ Match records with the following rule:
+
+ Match records with
+
+ of the following rules:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ""
+
+
+
+
+ ""
+ or
+
+
+
+
+
+
+
+ is
+ not
+ set
+
+
+
+
+
\ No newline at end of file
diff --git a/agreement_legal/views/agreement.xml b/agreement_legal/views/agreement.xml
index 3a7e32048..727749952 100644
--- a/agreement_legal/views/agreement.xml
+++ b/agreement_legal/views/agreement.xml
@@ -1,6 +1,14 @@
+
+
+
+
+
+
Agreement List
@@ -65,26 +73,17 @@
nolabel="1"/>
+
-
-
-
This section (on the left) allows you to add dynamic fields inside the description and special terms.
- - Select the agreement field
- - Select the sub-field
+ - Select the agreement field using the popup
- Enter the default value if the field is empty
- Copy and paste the placeholder expression in the description or the special terms
diff --git a/agreement_legal/views/agreement_appendix.xml b/agreement_legal/views/agreement_appendix.xml
index 2d5229284..b2be19658 100644
--- a/agreement_legal/views/agreement_appendix.xml
+++ b/agreement_legal/views/agreement_appendix.xml
@@ -44,26 +44,17 @@
+
-
-
-
This section (on the left) allows you to add dynamic fields inside the content.
- - Select the appendix field
- - Select the sub-field
+ - Select the field using the popup
- Enter the default value if the field is empty
- Copy and paste the placeholder expression in the content
diff --git a/agreement_legal/views/agreement_clause.xml b/agreement_legal/views/agreement_clause.xml
index 276947e76..94226e6eb 100644
--- a/agreement_legal/views/agreement_clause.xml
+++ b/agreement_legal/views/agreement_clause.xml
@@ -45,26 +45,17 @@
+
-
-
-
This section (on the left) allows you to add dynamic fields inside the content.
- - Select the clause field
- - Select the sub-field
+ - Select the field using the popup
- Enter the default value if the field is empty
- Copy and paste the placeholder expression in the content
diff --git a/agreement_legal/views/agreement_recital.xml b/agreement_legal/views/agreement_recital.xml
index 008d63a32..4b4ae2506 100644
--- a/agreement_legal/views/agreement_recital.xml
+++ b/agreement_legal/views/agreement_recital.xml
@@ -24,8 +24,10 @@