Skip to Content
Odoo Menu
  • Prihlásiť sa
  • Vyskúšajte zadarmo
  • Aplikácie
    Financie
    • Účtovníctvo
    • Fakturácia
    • Výdavky
    • Tabuľka (BI)
    • Dokumenty
    • Podpis
    Predaj
    • CRM
    • Predaj
    • POS Shop
    • POS Restaurant
    • Manažment odberu
    • Požičovňa
    Webstránky
    • Tvorca webstránok
    • eShop
    • Blog
    • Fórum
    • Živý chat
    • eLearning
    Supply Chain
    • Sklad
    • Výroba
    • Správa životného cyklu produktu
    • Nákup
    • Údržba
    • Manažment kvality
    Ľudské zdroje
    • Zamestnanci
    • Nábor zamestnancov
    • Voľné dni
    • Hodnotenia
    • Odporúčania
    • Vozový park
    Marketing
    • Marketing sociálnych sietí
    • Email marketing
    • SMS marketing
    • Eventy
    • Marketingová automatizácia
    • Prieskumy
    Služby
    • Projektové riadenie
    • Pracovné výkazy
    • Práca v teréne
    • Helpdesk
    • Plánovanie
    • Schôdzky
    Produktivita
    • Tímová komunikácia
    • Schvalovania
    • IoT
    • VoIP
    • Znalosti
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Priemyselné odvetvia
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Reštaurácia
    • Fast Food
    • Guest House
    • Beverage distributor
    • Hotel
    Reality
    • Real Estate Agency
    • Architecture Firm
    • Konštrukcia
    • Estate Managament
    • Gardening
    • Property Owner Association
    Poradenstvo
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Výroba
    • Textile
    • Metal
    • Furnitures
    • Jedlo
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware and Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Iní
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Komunita
    Vzdelávanie
    • Tutoriály
    • Dokumentácia
    • Certifikácie
    • Školenie
    • Blog
    • Podcast
    Empower Education
    • Vzdelávací program
    • Scale Up! Business Game
    • Visit Odoo
    Softvér
    • Stiahnuť
    • Porovnanie Community a Enterprise vierzie
    • Releases
    Spolupráca
    • Github
    • Fórum
    • Eventy
    • Preklady
    • Staň sa partnerom
    • Services for Partners
    • Register your Accounting Firm
    Služby
    • Nájdite partnera
    • Nájdite účtovníka
    • Meet an advisor
    • Implementation Services
    • Zákaznícke referencie
    • Podpora
    • Upgrades
    ​Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Získajte demo
  • Cenník
  • Pomoc

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

  • CRM
  • e-Commerce
  • Účtovníctvo
  • Sklady
  • PoS
  • Projektové riadenie
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Tagy (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Tagy (View all)
odoo accounting v14 pos v15
About this forum
Pomoc

How do I create a Smart Button to open Customer Equipment from the Quotation?

Odoberať

Get notified when there's activity on this post

This question has been flagged
CustomizeButtonEquipment18.0Smart
1 Odpoveď
1384 Zobrazenia
Avatar
Community Question

Using Odoo Studio, I created a Many2one field on the Equipment model to link to the Customer.


I then added a Smart Button on the Customer Form to show all Equipment records for that Customer.


It all works great.


Next I would like to add a Smart Button to the Sale Order Form to show all Equipment records for the Customer on that Sale Order.


How can I do this?

0
Avatar
Zrušiť
Avatar
Ray Carnes (ray)
Best Answer

Your button needs to open the Equipment List, filtered by the Customer.


Let's do this in three steps.

1. We first need a way to search Equipment by Customer.

Create your own custom View that inherits the Equipment Search View and adds a way to search your new field:


<field name="owner_user_id" position="after">
    <field name="x_studio_customer"/>
</field>


Note: We are assuming your new field is called x_studio_customer but you should check and change the name if it is different. This XML is telling Odoo, "Go find the owner_user_id field in the regular equipment.search view and add our field AFTER it".

Once this is working, we can add a button that opens the List from the Sales Order.


2. Next, we need a button to open the Equipment List

Create your own custom View that inherits the Sale Order Form View and adds the Action to open Equipment:


<div name="button_box" position="inside">
    <button name="684"
            type="action"
            icon="fa-window-restore"
            string="Equipment"/>
</div>


The 684 here comes from the URL when you are looking at the Equipment List. For example, once you click the Smart Button you already created on the Customer, you can review the ID on the right hand side of "action-" to get the ID for your database. 


This XML is telling Odoo, "Go find the button_box in the regular sale.order.form view and add our button INSIDE it".

Once this is working, we can add a line that sends the ID of the Customer on the Sales Order to the List.


3. Finally, modify the View to filter the List by the current Customer:

Add the following line to the bottom of your second Custom View:

context="{'search_default_x_studio_customer': partner_id}"

This XML is telling Odoo, "On the Search View, set the DEFAULT value of our field to the Customer on the Sales Order".

Final XML:

<button name="684" 
        type="action"
        icon="fa-window-restore"
        string="Equipment"
        context="{'search_default_x_studio_customer': partner_id}"/>


Result:


Your Odoo Implementation Consultant or Odoo Partner can help you if you don't have the technical skills to do this.

1
Avatar
Zrušiť
Enjoying the discussion? Don't just read, join in!

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

Registrácia
Related Posts Replies Zobrazenia Aktivita
How To Hide Action Report By Picking Type Code ?
18.0
Avatar
Avatar
Avatar
3
nov 25
632
How do I set up budget management / planning Solved
18.0
Avatar
Avatar
2
aug 25
1097
dynamic css class on field
18.0
Avatar
Avatar
1
máj 25
2199
Onboarding Icon on odoo 18 Solved
18.0
Avatar
Avatar
2
apr 25
3280
Layout para usar el botón SUBIR en ventas Odoo 18
18.0
Avatar
0
jan 25
1714
Komunita
  • Tutoriály
  • Dokumentácia
  • Fórum
Open Source
  • Stiahnuť
  • Github
  • Runbot
  • Preklady
Služby
  • Odoo.sh hosting
  • Podpora
  • Vyššia verzia
  • Custom Developments
  • Vzdelávanie
  • Nájdite účtovníka
  • Nájdite partnera
  • Staň sa partnerom
O nás
  • Naša spoločnosť
  • Majetok značky
  • Kontaktujte nás
  • Pracovné ponuky
  • Eventy
  • Podcast
  • Blog
  • Zákazníci
  • Právne dokumenty • Súkromie
  • Bezpečnosť
الْعَرَبيّة 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 sada podnikových aplikácií s otvoreným zdrojovým kódom, ktoré pokrývajú všetky potreby vašej spoločnosti: CRM, e-shop, účtovníctvo, skladové hospodárstvo, miesto predaja, projektový manažment atď.

Odoo prináša vysokú pridanú hodnotu v jednoduchom použití a súčasne plne integrovanými biznis aplikáciami.

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