Přejít na obsah
Odoo Menu
  • Přihlásit se
  • Vyzkoušejte zdarma
  • Aplikace
    Finance
    • Účetnictví
    • Fakturace
    • Výdaje
    • Spreadsheet (BI)
    • Dokumenty
    • Podpisy
    Prodej
    • CRM
    • Prodej
    • POS Obchod
    • POS Restaurace
    • Předplatné
    • Pronájem
    Webové stránky
    • Webové stránky
    • E-shop
    • Blog
    • Fórum
    • Živý chat
    • eLearning
    Dodavatelský řetězec
    • Sklad
    • Výroba
    • PLM
    • Nákup
    • Údržba
    • Kvalita
    Lidské zdroje
    • Zaměstnanci
    • Nábor
    • Volno
    • Hodnocení zaměstnanců
    • Doporučení
    • Vozový park
    Marketing
    • Marketing sociálních sítí
    • Emailový marketing
    • SMS Marketing
    • Události
    • Marketingová automatizace
    • Dotazníky
    Služby
    • Projekt
    • Časové výkazy
    • Práce v terénu
    • Helpdesk
    • Plánování
    • Schůzky
    Produktivita
    • Diskuze
    • Schvalování
    • IoT
    • VoIP
    • Znalosti
    • WhatsApp
    Aplikace třetích stran Odoo Studio Odoo cloudová platforma
  • Branže
    Maloobchod
    • Knihkupectví
    • Obchod s oblečením
    • Obchod s nábytkem
    • Potraviny
    • Obchod s hardwarem
    • Hračkářství
    Food & Hospitality
    • Bar a Pub
    • Restaurace
    • Fast Food
    • Guest House
    • Distributor nápojů
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architektonická firma
    • Stavba
    • Správa nemovitostí
    • Zahradnictví
    • Asociace vlastníků nemovitosti
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketingová agentura
    • Právník
    • Akvizice talentů
    • Audit a certifikace
    Výroba
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Korporátní dárky
    Zdraví a fitness
    • Sportovní klub
    • Prodejna brýli
    • Fitness Centrum
    • Wellness praktikové
    • Lékárna
    • Kadeřnictví
    Trades
    • Údržbář
    • IT hardware a podpora
    • Solar Energy Systems
    • Výrobce obuvi
    • Úklidové služby
    • HVAC Services
    Others
    • Nonprofit Organization
    • Agentura pro životní prostředí
    • Pronájem billboardů
    • Fotografování
    • Leasing jízdních kol
    • Prodejce softwaru
    Browse all Industries
  • Komunita
    Edukační program
    • Tutoriály
    • Dokumentace
    • Certifikace
    • Vzdělávání
    • Blog
    • Podcast
    Podpora vzdělávání
    • Vzdělávací program
    • Scale Up! Hra na firmu
    • Navštivte Odoo
    Získat software
    • Stáhnout
    • Porovnejte edice
    • Verze
    Spolupráce
    • Github
    • Fórum
    • Události
    • Překlady
    • Stát se partnerem
    • Services for Partners
    • Registrujte svou účetní firmu
    Získat služby
    • Najít partnera
    • Najít účetní
    • Setkejte se s poradcem
    • Implementační služby
    • Zákaznické reference
    • Podpora
    • Upgrady
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Dohodnout demo
  • Ceník
  • Pomoc

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

  • CRM
  • e-Commerce
  • Účetnictví
  • Sklad
  • PoS
  • Projekty
  • MRP
All apps
You need to be registered to interact with the community.
All Posts Lidé Odznaky
Štítky (View all)
odoo accounting v14 pos v15
O tomto fóru
You need to be registered to interact with the community.
All Posts Lidé Odznaky
Štítky (View all)
odoo accounting v14 pos v15
O tomto fóru
Pomoc

Button not clickable in list view

Odebírat

Get notified when there's activity on this post

This question has been flagged
v7treebuttonclickable
1 Odpovědět
12842 Zobrazení
Avatar
marc@k-ssuto.com

Hello Community,

I try to add a button in a list; the view appears, the button appears too but it is not clickable. It's like in a ghost state and I am unable to have the focus on it.

Here the code :

<record id="pkg-cfg_lines_tree_tree" model="ir.ui.view">
  <field name="name">pkg-cfg.tree</field>
  <field name="model">pkg-cfg_lines</field>
  <field name="view_mode">form</field>
  <field name="view_type">form</field>
  <field name="arch" type="xml">
    <tree string="Tree"  version="7.0" >
      <field name="pname" readonly="1" />
      <field name="chse" readonly="1"/>
      <button name="add_line" string="Add" type="object" icon="gtk-go-forward" />
    </tree>
  </field>
</record>

and the python code for the function :

   def add_line(self, cr, uid, ids, context):
        print "ENTER IN pkg-cfg_lines.add_line"
        return True

When I try to click on the button, the action is never called....

I also tried using a button with action type for the button :

< button name="%(add_line)d" string="Add" type="action" icon="gtk-go-forward" />

with the following action :

<record id="add_line" model="ir.actions.server">
    <field name="type">ir.actions.server</field>
    <field name="name">Testing</field>
    <field name="condition">True</field>
    <field name="state">code</field>
    <field name="model_id" ref="model_sale_configure_container"/>
    <field eval="5" name="sequence"/>
    <field name="code">action=obj.add_line(context=context)</field>                                                                                                       
</record>

Any ideas ?

Thanks in advance, Marc

8
Avatar
Zrušit
Vaibhav

You mentioned view_type and view_mode while displaying tree view.Is there need to mentioned it? Please try without those 2 lines.< button name="%(add_line)d" string="Add" type="action" icon="gtk-go-forward" /> This is generally used to call wizard from onclick of button

marc@k-ssuto.com
Autor

Hello, Yes I also tried without these 2 lines => no success.

I know about my second try (with "%(add_line)d"), it is generally used to call a wizard but it is also a method to call an action ;-)

Avatar
Xsias
Nejlepší odpověď

You need to be in the reading mode, not the edit mode of your entry. We have the same issue.

EDIT

Hi sven,

So I can you launch the view in reading mode ?

Did you manage to solve your issue ? Marc Cassuto (SFL)

Yes, we have made some dirty hack : In place of the button, we have put a checkbox (fields.boolean) with an onchange on it.

0
Avatar
Zrušit
marc@k-ssuto.com
Autor

Hi sven,

So I can you launch the view in reading mode ?

Did you manage to solve your issue ?

Xsias

Yes, we have made some dirty hack : In place of the button, we have put a checkbox (fields.boolean) with an onchange on it.

marc@k-ssuto.com
Autor

Hello Sven,

yes, we also thought about this solution... but this is a dirty one, I agree and there is some GUI glitch with it....

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

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

Přihlásit se
Related Posts Odpovědi Zobrazení Aktivita
can i add button to tree view ? Vyřešeno
v7 tree button
Avatar
Avatar
Avatar
Avatar
Avatar
4
pro 23
80187
[v7] oe_highlight in treeview
v7 tree button oe_highlight
Avatar
Avatar
1
bře 15
5807
How to create a button for every row in view tree
treeview tree button
Avatar
Avatar
1
zář 18
11673
Download binary button
form v7 button
Avatar
0
bře 15
4635
Button in tree view as image.
image tree button
Avatar
0
bře 15
4134
Komunita
  • Tutoriály
  • Dokumentace
  • Fórum
Open Source
  • Stáhnout
  • Github
  • Runbot
  • Překlady
Služby
  • Odoo.sh hostování
  • Podpora
  • Upgrade
  • Nestandardní vývoj
  • Edukační program
  • Najít účetní
  • Najít partnera
  • Stát se partnerem
O nás
  • Naše společnost
  • Podklady značky
  • Kontakujte nás
  • Práce
  • Události
  • Podcast
  • Blog
  • Zákazníci
  • Právní dokumenty • Soukromí
  • Zabezpečení
الْعَرَبيّة 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 je balíček open-source aplikací, které pokrývají všechny potřeby vaší společnosti: CRM, e-shop, účetnictví, sklady, kasy, projektové řízení a další.

Unikátní nabídka od Odoo poskytuje velmi jednoduché uživatelské rozhraní a vše je integrované na jednom místě.

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