Skip to Content
Odoo Menu
  • Prisijungti
  • Išbandykite nemokamai
  • Programėlės
    Finansai
    • Apskaita
    • Pateikimas apmokėjimui
    • Sąnaudos
    • Skaičiuoklė (BI)
    • Dokumentai
    • Pasirašymas
    Pardavimai
    • CRM
    • Pardavimai
    • Kasų sistema - Parduotuvė
    • Kasų sistema - Restoranas
    • Prenumeratos
    • Nuoma
    Svetainės
    • Svetainių kūrėjimo įrankis
    • El. Prekyba
    • Internetinis Tinklaraštis
    • Forumas
    • Tiesioginis pokalbis
    • eMokymasis
    Tiekimo grandinė
    • Atsarga
    • Gamyba
    • PLM
    • Įsigijimai
    • Priežiūra
    • Kokybė
    Žmogaus ištekliai
    • Darbuotojai
    • Įdarbinimas
    • Atostogos
    • Įvertinimai
    • Rekomendacijos
    • Transporto priemonės
    Rinkodara
    • Socialinė rinkodara
    • Rinkodara el. paštu
    • SMS rinkodara
    • Renginiai
    • Rinkodaros automatizavimas
    • Apklausos
    Paslaugos
    • Projektas
    • Darbo laiko žiniaraščiai
    • Priežiūros tarnyba
    • Pagalbos tarnyba
    • Planavimas
    • Rezervacijos
    Produktyvumas
    • Diskucija
    • Patvirtinimai
    • IoT
    • VoIP
    • Žinių biblioteka
    • WhatsApp
    Trečiųjų šalių programos Odoo Studija Odoo debesijos platforma
  • Pramonės šakos
    Mažmeninė prekyba
    • Knygynas
    • Drabužių parduotuvė
    • Baldų parduotuvė
    • Maisto prekių parduotuvė
    • Techninės įrangos parduotuvė
    • Žaislų parduotuvė
    Food & Hospitality
    • Barai ir pub'ai
    • Restoranas
    • Greitasis maistas
    • Guest House
    • Gėrimų platintojas
    • Hotel
    Nekilnojamasis turtas
    • Real Estate Agency
    • Architektūros įmonė
    • Konstrukcija
    • Estate Managament
    • Sodininkauti
    • Turto savininkų asociacija
    Konsultavimas
    • Accounting Firm
    • Odoo Partneris
    • Marketing Agency
    • Teisinė firma
    • Talentų paieška
    • Auditai & sertifikavimas
    Gamyba
    • Textile
    • Metal
    • Furnitures
    • Maistas
    • Brewery
    • Įmonių dovanos
    Sveikata & Fitnesas
    • Sporto klubas
    • Akinių parduotuvė
    • Fitneso Centras
    • Sveikatos praktikai
    • Vaistinė
    • Kirpėjas
    Trades
    • Handyman
    • IT įranga ir palaikymas
    • Saulės energijos sistemos
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Kiti
    • Nonprofit Organization
    • Aplinkos agentūra
    • Reklaminių stendų nuoma
    • Fotografavimas
    • Dviračių nuoma
    • Programinės įrangos perpardavėjas
    Browse all Industries
  • Bendrija
    Mokykitės
    • Mokomosios medžiagos
    • Dokumentacija
    • Sertifikatai
    • Mokymai
    • Internetinis Tinklaraštis
    • Tinklalaidės
    Skatinkite švietinimą
    • Švietimo programa
    • Scale Up! Verslo žaidimas
    • Aplankykite Odoo
    Gaukite programinę įrangą
    • Atsisiųsti
    • Palyginkite versijas
    • Leidimai
    Bendradarbiauti
    • Github
    • Forumas
    • Renginiai
    • Vertimai
    • Tapkite partneriu
    • Services for Partners
    • Registruokite jūsų apskaitos įmonę
    Gaukite paslaugas
    • Susiraskite partnerį
    • Susirask buhalterį
    • Susitikti su konsultantu
    • Diegimo paslaugos
    • Klientų rekomendavimas
    • Palaikymas
    • Atnaujinimai
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Gaukite demo
  • Kainodara
  • Pagalba

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

  • CRM
  • e-Commerce
  • Apskaita
  • Atsarga
  • PoS
  • Projektas
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Žymos (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Žymos (View all)
odoo accounting v14 pos v15
About this forum
Pagalba

Text in custom filter condition select dropdown control V12

Prenumeruoti

Get notified when there's activity on this post

This question has been flagged
viewssearch12
2 Replies
4767 Rodiniai
Portretas
notteccon

Hi. I want to start by apologizing for the title, I know it is very confusing, but it is the one that I came up with.

The option text in the dropdown for the custom filter condition from searchview is the same from the "string" attribute in the xml view field definition, NOT from the "string" attribute in the model field definition.

Is there a way to modify the option text?


https://ibb.co/x5NKjKv


I have a model with many fields, including 3 fields to indicate estimates (pessimistic, probable and optimistic) for different values (Date, Rating, Text, ... and many more)


rating_pess = fields.Integer(string='Rating pessimistic')
rating_prob = fields.Integer(string='Rating probable')
rating_opti = fields.Integer(string='Rating optimistic')
text_pess = fields.Char(string='Text pessimistic')
text_prob = fields.Char(string='Text probable')
text_opti = fields.Char(string='Text optimistic')
date_pess = fields.Datetime(string='Date pessimistic')
date_prob = fields.Datetime(string='Date probable')
date_opti = fields.Datetime(string='Date optimistic')
..._pess = fields.---(string='... pessimistic')
..._prob = fields.---(string='... probable')
..._opti = fields.---(string='... optimistic')


In the view, due to the UI requirement, the 3 values for each meassure unit are in different rows using a separator and the label must be "Value" for all the field.


<group col="1">
    <separator string="Text"/>
    <group col="6">
      <field name="text_pess" string="Value"/>
      <field name="text_prob" string="Value"/>
      <field name="text_opti" string="Value"/>
    </group>
    <separator string="Rating"/>
    <group col="6">
      <field name="rating_pess" string="Value"/>
      <field name="rating_prob" string="Value"/>
      <field name="rating_opti" string="Value"/>
    </group>
    <separator string="Date"/>
    <group col="6">
      <field name="date_pess" string="Value"/>
      <field name="date_prob" string="Value"/>
      <field name="date_opti" string="Value"/>
    </group>
    ...
    ...
        
    ...
    ...
</group>


This affects the dropdown control text of the fields in the custom filter, since the source of text of the options seems to be the attribute "string" in the xml view, not the "string" attribute in the field definition in the .py, so then, the text in each option is the same:  "Value", without being able to distinguish the corresponding field (the option "value" attribute in the dropdown is right, 2date_pess", "date_prob", "date_opti").


Thanks!

1
Portretas
Atmesti
Ray Carnes (ray)

This question is not clear to me. You write "the label must be "Value" for all the field" but then you also write "the text in each option is the same: "Value", without being able to distinguish the corresponding field". My conclusion is that you are making the labels the same and then asking why they are the same?

Portretas
Paresh Wagh
Best Answer

If you are familiar with view customization, you can customize the view and change the values of the string. For example, to change the string value of text_pess you can use the following xpath expression.

<xpath expr="//field[@name='text_pess']" position="attributes">
    <attribute name="string">Pessimistic</attribute>
</xpath>



0
Portretas
Atmesti
Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Registracija
Related Posts Replies Rodiniai Veikla
Search in subtree
views search
Portretas
Portretas
Portretas
3
kov. 15
4952
smart button v10
views search buttons
Portretas
Portretas
Portretas
2
lapkr. 18
8623
How to change a search vue automatically according to the current vue ?
filter views search odoo
Portretas
0
bal. 23
2750
[V12] Filter customers property_product_pricelist in res.partner Solved
filter views search res.partner
Portretas
Portretas
2
rugs. 21
5509
Domain filter attribute in a field doesn't work
views fields domain_filter 12
Portretas
Portretas
Portretas
3
kov. 21
6622
Bendrija
  • Mokomosios medžiagos
  • Dokumentacija
  • Forumas
Atvirasis kodas
  • Atsisiųsti
  • Github
  • Runbot
  • Vertimai
Paslaugos
  • Odoo.sh talpinimas
  • Palaikymas
  • Atnaujinti
  • Pritaikytas programavimo kūrimas
  • Švietimas
  • Susirask buhalterį
  • Susiraskite partnerį
  • Tapkite partneriu
Apie mus
  • Mūsų įmonė
  • Prekės ženklo turtas
  • Susisiekite su mumis
  • Darbo pasiūlymai
  • Renginiai
  • Tinklalaidės
  • Internetinis Tinklaraštis
  • Klientai
  • Teisinis • Privatumas
  • Saugumas
الْعَرَبيّة 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 yra atvirojo kodo verslo programų rinkinys, kuris apima visas įmonės poreikius: CRM, El. Prekybą, Apskaitą, Atsargų, Kasų sistemą, Projektų valdymą ir kt.

Unikali Odoo vertės pasiūla – būti tuo pačiu metu labai lengvai naudojama ir visiškai integruota sistema.

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