From e3f99885ca789b338a4cb9ab9a154db50dff500d Mon Sep 17 00:00:00 2001 From: qsm-odoo Date: Tue, 3 Jan 2017 17:29:20 +0100 Subject: [IMP] web, *: add new Domain and Field selection widgets * base_action_rule, gamification, mass_mailing 1) Create the independant DomainSelector widget - Allow to build a prefix char domain 2) Replace old FieldCharDomain with a new FieldDomain which uses the new DomainSelector widget 3) Create the independant ModelFieldSelector widget - Allow to build a valid field chain for a specific model (e.g 'partner_id.name' for a 'res.users') - Used by DomainSelector widget --- The DomainSelector widget uses a tree-like representation with user-friendly buttons (ALL/ANY/+/-/...). Any domain can be built, except those containing the "!" (not) operator or some operators like "like", "child_of" (@see DomainSelector). However, if the user enters these in the debug input, the widget can handle them. Note: these widgets had to do unusual stuff the widget API does not allow to handle efficiently right now but it will be adapted to the new widget/field API in a further update. Note2: the widgets also have possibility of other improvements like supporting m2o input instantiation in DomainLeaf, etc. --- This work is an adaptation of the original code made by @pga-odoo. --- addons/web/static/src/xml/base.xml | 158 +++++++++++++++++++++++++++++++++++-- 1 file changed, 152 insertions(+), 6 deletions(-) (limited to 'addons/web/static/src/xml/base.xml') diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml index c203b0171c2..dc3119908fe 100644 --- a/addons/web/static/src/xml/base.xml +++ b/addons/web/static/src/xml/base.xml @@ -668,14 +668,160 @@ t-att-placeholder="!widget.get('effective_readonly') ? widget.node.attrs.placeholder : ''" t-att-maxlength="widget.field.size"/> - -
- - + +
+ + + +
+ + +
+ +
+ + +
+ + ALL + ANY + NONE + +
+
+ + Match all records + + + +
+ Match the records with the following rule: + + Match the records with + + of the following rules: + +
+ +
+ + + +
+
+ + + of: + +
+
+
+ + +
+ + +
+ + + + + +
+ + + +
+
+ +
+
+ + + +
+
+
+
+ + + + "" + + + + + "" + or + + + + + + + + is + not + set + +
+
+ +
+ +
+