[FIX] base: add a smart button on category related to partners
When we add a smart button on a contact tag related to contacts, the button adds a default search filter that hides the related records Steps to reproduce: 1. Install Contacts and Studio 2. Go to Contacts > Configuration > Contact Tags 3. Open tag "Vendor / Desk Manufacturers" 4. Toggle Studio 5. Add a button (at the top right of the form) related to field "Tags (Contact)" 6. Close Studio 7. Click on the button 8. A list view of the related contacts opens but there is a filter that hides the records Solution: Remove the `filter_domain` attribute on the field category_id and replace it by the `operator` attribute in order to use the raw value in the domain Problem: In `_getFieldDomain`, we replace the `self` in the domain by the stringified id which essentially checks for a category that has a name containing the id opw-3471959 closes odoo/odoo#140564 X-original-commit: 18640a2ddddcf2ef90948295a41b0d7d30ec09e3 Signed-off-by: Rémy Voet (ryv) <ryv@odoo.com> Signed-off-by: Guillaume Merlin (megu) <megu@odoo.com>
This commit is contained in:
@@ -431,7 +431,7 @@
|
||||
<field name="parent_id" domain="[('is_company', '=', True)]" operator="child_of"/>
|
||||
<field name="email" filter_domain="[('email', 'ilike', self)]"/>
|
||||
<field name="phone" filter_domain="['|', ('phone', 'ilike', self), ('mobile', 'ilike', self)]"/>
|
||||
<field name="category_id" string="Tag" filter_domain="[('category_id', 'child_of', self)]"/>
|
||||
<field name="category_id" string="Tag" operator="child_of"/>
|
||||
<field name="user_id"/>
|
||||
<separator/>
|
||||
<filter string="Individuals" name="type_person" domain="[('is_company', '=', False)]"/>
|
||||
|
||||
Reference in New Issue
Block a user