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í
    Jídlo a pohostinství
    • Bar a Pub
    • Restaurace
    • Fast Food
    • Penzion
    • Distributor nápojů
    • Hotel
    Nemovitost
    • Realitní kancelář
    • Architektonická firma
    • Stavba
    • Správa nemovitostí
    • Zahradnictví
    • Asociace vlastníků nemovitosti
    Poradenství
    • Účetní firma
    • Odoo Partner
    • Marketingová agentura
    • Právník
    • Akvizice talentů
    • Audit a certifikace
    Výroba
    • Textil
    • Kov
    • Nábytek
    • Jídlo
    • Pivovar
    • Korporátní dárky
    Zdraví a fitness
    • Sportovní klub
    • Prodejna brýli
    • Fitness Centrum
    • Wellness praktikové
    • Lékárna
    • Kadeřnictví
    Transakce
    • Údržbář
    • Podpora IT & hardware
    • Systémy solární energie
    • Výrobce obuvi
    • Úklidové služby
    • Služby HVAC
    Ostatní
    • Nezisková organizace
    • Agentura pro životní prostředí
    • Pronájem billboardů
    • Fotografování
    • Leasing jízdních kol
    • Prodejce softwaru
    Procházet všechna odvětví
  • 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
    • Služby pro partnery
    • 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

How to access object of a button

Odebírat

Get notified when there's activity on this post

This question has been flagged
buttonsstatusbarstudio
2 Odpovědi
5598 Zobrazení
Avatar
Mandresy Randriatavy

Hey,

I try to acces to the buttons (type="object") of the header of a module because on click, it's set the wrong state to my statusbar..

I'm using studio, is it possible to access them ? How to create new ones (object type, not action type) for futur creations ?


PS: I only saw method for action buttons..

1
Avatar
Zrušit
Mandresy Randriatavy
Autor

Thanks, but with the Sales module, I don't see where the create invoice button is liked. When I found his action (Settings > Technical > Actions) There's nothing but the type. No code that tell me how it's create a new invoice into the Accounting module.

Cause I'm looking for adding autofill data. Is it possible ?

Avatar
Cybrosys Techno Solutions Pvt.Ltd
Nejlepší odpověď

Hi,

To make changes to the buttons or to add new buttons, you have to modify the XML code of the view.

For that, you need to enable debug mode. Then select the 'Edit View: Form' option from the debug options. You can see the main view. Navigate to the 'Inherited Views' tab and click on Add a line. A new form will be opened, where you can add the new button/ make changes to the new button by inheriting the existing view.

Provide a 'View Name' and select the current form view(The view from which the button is added(Either the parent view or any of its inherited view)) as 'Inherited View'. Then add the code in the text box under the 'Architecture' tab. For example:

<?xml version="1.0"?>


<data>


    <xpath expr="//button[@name='existing_button_1']" position="replace">


        <button name="replace_button_function" type="object" class="btn-primary" string="Updated Button"/>


    </xpath>


    <xpath expr="//button[@name='existing_button_2']" position="after">


        <button name="new_button_function" type="object" class="btn-primary" string="New Button"/>


    </xpath>


</data>


You have to add the changes in XML code in either a new inherited view or in the inherited view created by Odoo for Studio customizations(Preferred): The External ID starts with studio_customization.odoo_studio_. Don't modify the other existing views.

Regards

1
Avatar
Zrušit
Avatar
Mehjabin Farsana
Nejlepší odpověď

Hi,

Using studio if you need to add a button that executes python functions, you can do it as follows.


Write a server action for that model with action to do as execute python code and write the necessary python codes there. Now in the view add button with type action and specify the id of the created action in the name of the button.


This is how type object in the code side is handled in the odoo studio.


For more, see this tutorial: https://www.youtube.com/watch?v=HC6Zw8A_uXo


Thanks

1
Avatar
Zruš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
Show statusbar inline with buttons. (SOLVED) Vyřešeno
buttons statusbar
Avatar
Avatar
2
bře 15
8680
Button help (Odoo Studio)
buttons studio odoo PDF
Avatar
Avatar
2
čvc 17
5407
Studio V18 Domain does not have current field
studio
Avatar
0
pro 25
154
debit and credit in currency
studio
Avatar
Avatar
1
lis 25
2304
Menu's with different default filter Vyřešeno
studio
Avatar
Avatar
1
čvc 25
2392
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