Se rendre au contenu
Odoo Menu
  • Se connecter
  • Essai gratuit
  • Applications
    Finance
    • Comptabilité
    • Facturation
    • Notes de frais
    • Feuilles de calcul (BI)
    • Documents
    • Signature
    Ventes
    • CRM
    • Ventes
    • PdV Boutique
    • PdV Restaurant
    • Abonnements
    • Location
    Sites web
    • Site Web
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Chaîne d'approvisionnement
    • Inventaire
    • Fabrication
    • PLM
    • Achats
    • Maintenance
    • Qualité
    Ressources Humaines
    • Employés
    • Recrutement
    • Congés
    • Évaluations
    • Recommandations
    • Parc automobile
    Marketing
    • Marketing Social
    • E-mail Marketing
    • SMS Marketing
    • Événements
    • Marketing Automation
    • Sondages
    Services
    • Projet
    • Feuilles de temps
    • Services sur Site
    • Assistance
    • Planification
    • Rendez-vous
    Productivité
    • Discussion
    • Validations
    • Internet des Objets
    • VoIP
    • Connaissances
    • WhatsApp
    Applications tierces Odoo Studio Plateforme Cloud d'Odoo
  • Industries
    Commerce de détail
    • Librairie
    • Magasin de vêtements
    • Magasin de meubles
    • Épicerie
    • Quincaillerie
    • Magasin de jouets
    Food & Hospitality
    • Bar et Pub
    • Restaurant
    • Fast-food
    • Maison d’hôtes
    • Distributeur de boissons
    • Hôtel
    Immobilier
    • Agence immobilière
    • Cabinet d'architecture
    • Construction
    • Gestion immobilière
    • Jardinage
    • Association de copropriétaires
    Consultance
    • Cabinet d'expertise comptable
    • Partenaire Odoo
    • Agence Marketing
    • Cabinet d'avocats
    • Aquisition de talents
    • Audit & Certification
    Fabrication
    • Textile
    • Métal
    • Meubles
    • Alimentation
    • Brewery
    • Cadeaux d'entreprise
    Santé & Fitness
    • Club de sports
    • Opticien
    • Salle de fitness
    • Praticiens bien-être
    • Pharmacie
    • Salon de coiffure
    Trades
    • Bricoleur
    • Matériel informatique et support
    • Systèmes photovoltaïques
    • Cordonnier
    • Services de nettoyage
    • Services CVC
    Autres
    • Organisation à but non lucratif
    • Agence environnementale
    • Location de panneaux d'affichage
    • Photographie
    • Leasing de vélos
    • Revendeur de logiciel
    Browse all Industries
  • Communauté
    Apprenez
    • Tutoriels
    • Documentation
    • Certifications
    • Formation
    • Blog
    • Podcast
    Renforcer l'éducation
    • Programme éducatif
    • Business Game Scale-Up!
    • Rendez-nous visite
    Obtenir le logiciel
    • Téléchargement
    • Comparez les éditions
    • Versions
    Collaborer
    • Github
    • Forum
    • Événements
    • Traductions
    • Devenez partenaire
    • Services for Partners
    • Enregistrer votre cabinet comptable
    Nos Services
    • Trouver un partenaire
    • Trouver un comptable
    • Rencontrer un conseiller
    • Services de mise en œuvre
    • Références clients
    • Assistance
    • Mises à niveau
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Obtenir une démonstration
  • Tarification
  • Aide

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Comptabilité
  • Inventaire
  • PoS
  • Projet
  • MRP
All apps
Vous devez être inscrit pour interagir avec la communauté.
Toutes les publications Personnes Badges
Étiquettes (Voir toutl)
odoo accounting v14 pos v15
À propos de ce forum
Vous devez être inscrit pour interagir avec la communauté.
Toutes les publications Personnes Badges
Étiquettes (Voir toutl)
odoo accounting v14 pos v15
À propos de ce forum
Aide

Groupby Search filter Not working for a custom field

S'inscrire

Recevez une notification lorsqu'il y a de l'activité sur ce poste

Cette question a été signalée
group_bysearch_viewodooV8
1 Répondre
9776 Vues
Avatar
Zohair Iyaz

I am using Odoo v8 community version on (bitnami) virtual machine


I have created a custom field [name: x_Task_Status, type: Selection (Open,Completed)]. When I add it to the Search view, the result is shown as

Group
  Completed (0)
  Open(0)


When Directly searching for Open Task Status (or Completed Task Status), there are results shown. Just not working when i try to group then in one view.


Here is my project.task.tree xml:

<?xml version="1.0"?>
<!--Zohair: Replacing x_start_date with x_Planned_Start_Date-->
<tree default_order="x_Planned_Start_Date asc" fonts="bold:message_unread==True" colors="red: x_Planned_Start_Date and (x_Planned_Start_Date &lt;=current_date) and x_Task_Status=='Open'" string="Tasks">
<field name="message_unread" invisible="1"/>
<field name="sequence" invisible="not context.get('seq_visible', False)"/>
<field name="name"/>
<!--Zohair: Change Project heading to PO# by adding string="PO#" to the "project_id" filed attributes-->
<field name="project_id" invisible="context.get('user_invisible', False)" string="PO#"/>
<field name="partner_id"/>
<!--Zohair: Replacing date_start and date_end with x_Planned_Start_Date and date_deadline-->
<field name="x_Planned_Start_Date"/>
<!--Zohair: Change Stage heading to Task Status by adding string="Task Status" to the "stage_id" filed attributes-->
<!--Zohair12/16: removing stage_id usage and replacing with x_Task_Status-->
<!--field name="stage_id" invisible="context.get('set_visible',False)" string="Task Status"/-->
<field name="x_Task_Status"/>
<field name="user_id" invisible="context.get('user_invisible', False)"/>
<field name="delegated_user_id" invisible="context.get('show_delegated', True)"/>
<field name="total_hours" invisible="1"/>
<field name="planned_hours" invisible="context.get('set_visible',False)" groups="project.group_time_work_estimation_tasks"/>
<field name="effective_hours" widget="float_time" sum="Spent Hours" invisible="1"/>
<field name="remaining_hours" widget="float_time" sum="Remaining Hours" on_change="onchange_remaining(remaining_hours,planned_hours)" invisible="context.get('set_visible',False)" groups="project.group_time_work_estimation_tasks"/>
<field name="date_deadline" invisible="context.get('deadline_visible',True)"/>
<!--Zohair: Hide progressbar widget-->
<!--field name="progress" widget="progressbar" invisible="context.get('set_visible',False)"/-->
</tree>



Here's my project.task.search.form xml:

<?xml version="1.0"?>
<search string="Tasks">
<field name="name" string="Tasks"/>
<field name="categ_ids"/>
<field name="partner_id"/>
<field name="project_id"/>
<field name="reviewer_id"/>
<field name="user_id"/>
<field name="x_Task_Status"/>
<filter string="My Tasks" domain="[('user_id','=',uid)]"/>
<filter string="Unassigned" name="unassigned" domain="[('user_id', '=', False)]"/>
<separator/>
<!--filter string="New" name="draft" domain="[('stage_id.sequence', '&lt;=', 1)]"/-->
<!--separator/-->
<!--filter string="New Mail" name="message_unread" domain="[('message_unread','=',True)]"/-->
<group expand="0" string="Group By">
<filter string="PO" name="project" context="{'group_by':'project_id'}"/>
<filter string="Task" context="{'group_by':'name'}"/>
<filter string="Assigned to" name="User" context="{'group_by':'user_id'}"/>
<!--filter string="Task Status" name="x_Task_Status" context="{'group_by':'x_Task_Status'}"/-->
<filter string="Company" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
<separator/>
<!--filter string="Last Message" name="group_message_last_post" context="{'group_by':'message_last_post:week'}"/-->
<!--filter string="Assignation Month" context="{'group_by':'date_start:month'}" help="Creation Date"/-->
</group>
</search>

Do I need to add any other parameter? How to make it work?


Note: Created a custom field for task status because I was not able to do some tasks on the original Stage field.

(question/set-color-in-tree-view-based-on-task-stage-94556)


EDIT:

My Field is x_Task_Status. I just corrected the xml as well. ( I was trying with _id just to check if its an issue with field type). But no, its not working with either.


EDIT #2:

Adding the full xml above




0
Avatar
Ignorer
Jignesh Mehta

Can u please post your full xml code ??

Zohair Iyaz
Auteur

I have done that now

Avatar
Jignesh Mehta
Meilleure réponse

Hello Zohair,


If Your field is x_Task_Status_id, Try this :-

<filter string="Task Status" name="x_Task_Status_id" context="{'group_by':'x_Task_Status_id'}"/>

If Your field is x_Task_Status, Try this :-

<filter string="Task Status" name="x_Task_Status" context="{'group_by':'x_Task_Status'}"/>
 

Hope this is works for you.

Thanks,


5
Avatar
Ignorer
Vous appréciez la discussion ? Ne vous contentez pas de lire, rejoignez-nous !

Créez un compte dès aujourd'hui pour profiter de fonctionnalités exclusives et échanger avec notre formidable communauté !

S'inscrire
Publications associées Réponses Vues Activité
forcing the group to remain open in search view group_by ??
group_by search_view
Avatar
0
mars 15
3707
v16: Group by is not working in custom module Résolu
group_by search_view odoo16features
Avatar
Avatar
2
déc. 23
2417
Group by product_id in invoice_lines
group_by odoo odooV8
Avatar
0
août 19
2728
Search View: group_by filter
v7 group_by search_view
Avatar
Avatar
1
août 15
8847
group_by filter doesn't work
search group_by search_view odoo8.0
Avatar
0
mars 17
4134
Communauté
  • Tutoriels
  • Documentation
  • Forum
Open Source
  • Téléchargement
  • Github
  • Runbot
  • Traductions
Services
  • Hébergement Odoo.sh
  • Assistance
  • Migration
  • Développements personnalisés
  • Éducation
  • Trouver un comptable
  • Trouver un partenaire
  • Devenez partenaire
À propos
  • Notre société
  • Actifs de la marque
  • Contactez-nous
  • Emplois
  • Événements
  • Podcast
  • Blog
  • Clients
  • Informations légales • Confidentialité
  • Sécurité.
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo est une suite d'applications open source couvrant tous les besoins de votre entreprise : CRM, eCommerce, Comptabilité, Inventaire, Point de Vente, Gestion de Projet, etc.

Le positionnement unique d'Odoo est d'être à la fois très facile à utiliser et totalement intégré.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now