Skip to Content
Odoo Menu
  • Prijavi
  • Try it free
  • Aplikacije
    Finance
    • Knjigovodstvo
    • Obračun
    • Stroški
    • Spreadsheet (BI)
    • Dokumenti
    • Podpisovanje
    Prodaja
    • CRM
    • Prodaja
    • POS Shop
    • POS Restaurant
    • Naročnine
    • Najem
    Spletne strani
    • Website Builder
    • Spletna trgovina
    • Blog
    • Forum
    • Pogovor v živo
    • eUčenje
    Dobavna veriga
    • Zaloga
    • Proizvodnja
    • PLM
    • Nabava
    • Vzdrževanje
    • Kakovost
    Kadri
    • Kadri
    • Kadrovanje
    • Odsotnost
    • Ocenjevanja
    • Priporočila
    • Vozni park
    Marketing
    • Družbeno Trženje
    • Email Marketing
    • SMS Marketing
    • Dogodki
    • Avtomatizacija trženja
    • Ankete
    Storitve
    • Projekt
    • Časovnice
    • Storitve na terenu
    • Služba za pomoč
    • Načrtovanje
    • Termini
    Produktivnost
    • Razprave
    • Odobritve
    • IoT
    • Voip
    • Znanje
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industrije
    Trgovina na drobno
    • Book Store
    • Trgovina z oblačili
    • Trgovina s pohištvom
    • Grocery Store
    • Trgovina s strojno opremo računalnikov
    • Trgovina z igračami
    Food & Hospitality
    • Bar and Pub
    • Restavracija
    • Hitra hrana
    • Guest House
    • Beverage Distributor
    • Hotel
    Nepremičnine
    • Real Estate Agency
    • Arhitekturno podjetje
    • Gradbeništvo
    • Estate Management
    • Vrtnarjenje
    • Združenje lastnikov nepremičnin
    Svetovanje
    • Računovodsko podjetje
    • Odoo Partner
    • Marketinška agencija
    • Law firm
    • Pridobivanje talentov
    • Audit & Certification
    Proizvodnja
    • Tekstil
    • Metal
    • Pohištvo
    • Hrana
    • Brewery
    • Poslovna darila
    Health & Fitness
    • Športni klub
    • Trgovina z očali
    • Fitnes center
    • Wellness Practitioners
    • Lekarna
    • Frizerski salon
    Trades
    • Handyman
    • IT Hardware & Support
    • Sistemi sončne energije
    • Izdelovalec čevljev
    • Čistilne storitve
    • HVAC Services
    Ostali
    • Neprofitna organizacija
    • Agencija za okolje
    • Najem oglasnih panojev
    • Fotografija
    • Najem koles
    • Prodajalec programske opreme
    Browse all Industries
  • Skupnost
    Learn
    • Tutorials
    • Dokumentacija
    • Certifikati
    • Šolanje
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Prenesi
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Dogodki
    • Prevodi
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    Get Services
    • Find a Partner
    • Find an Accountant
    • Meet an advisor
    • Implementation Services
    • Sklici kupca
    • Podpora
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Get a demo
  • Določanje cen
  • Pomoč

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

  • CRM
  • e-Commerce
  • Knjigovodstvo
  • Zaloga
  • PoS
  • Projekt
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Ključne besede (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Ključne besede (View all)
odoo accounting v14 pos v15
About this forum
Pomoč

hide popup form default save/cancel buttons

Naroči se

Get notified when there's activity on this post

This question has been flagged
popupwindowodoo10
3 Odgovori
18617 Prikazi
Avatar
zilvinas

Hi,

In v9 i was created popup form and added my custom Save and Cancel buttons, now in v10 that form shows both, my created Save  Cancel and default Save Cancel

.

how to hide default buttons? i have tried on .py file which calls form add:

'flags': {'form': {'action_buttons': False},}

but nothing changed.


my code:

return 
{
'name': _('Choose agreement type'),
'view_type': 'form',
'view_mode': 'form',
'res_model': 'sale.order',
'view_id': form.id,
'type': 'ir.actions.act_window',
'target': 'new',
'res_id': self.id,
'flags': {'form': {'action_buttons': False},}
}

form:

<record id="wizard_state_agreement" model="ir.ui.view">            
<field name="name">sale.order.wizard_state_agreement</field>
<field name="model">sale.order</field>
<field name="arch" type="xml">
<form string="Please chose agreement type">
<sheet>
<group>
<field name="agreement_choose"/>
</group>
</sheet> <div>
<button name="change_state_agreement" string="Save" type="object" class="btn btn-primary"/>
<button special="cancel" string="Cancel" class="btn btn-default"/>
</div>
</form>
</field>
</record>





0
Avatar
Opusti
Avatar
Yatrik Chauhan
Best Answer

Hi FarmingWolf,

Please include the following code in your wizard's form view to replace Odoo's default footer with your custom one.

<footer>

​<button name="<your custom method>" string="Save" type="object" class="btn btn-primary"/>

​<button special="cancel" string="Cancel" class="btn btn-default"/>

</footer>

Thanks

0
Avatar
Opusti
Avatar
Hilar Andikkadavath
Best Answer

Try  to replace :

this is the code that add save and cancel buttons,

<footer> <button name="write" type="object" string="Save"/> or <button name="cancel" string="Cancel" special="cancel" class="oe_link"/> </footer>

so replace the footer using xpath

4
Avatar
Opusti
zilvinas
Avtor

Hello, i have tried xpath, but it wont work. Worked for me only changing wizard view <footer>

<button name="change_state_agreement" string="Save" type="object" class="btn btn-primary"/>

<button special="cancel" string="Cancel" class="btn btn-default"/>

</footer>

Hilar Andikkadavath

you can replace the the footer then by <xpath expr="//footer" position = "replace"></xpath>

Hilar Andikkadavath

also try the action by removing 'flags': {'form': {'action_buttons': False},}

Avatar
FarmingWolf
Best Answer

Hello, zilvinas,

I have a similar problem. I added my own button, and I want to hide the default button.

Have you resolved that problem?

0
Avatar
Opusti
Yatrik Chauhan

Hi FarmingWolf,

Please include the following code in your wizard's form view to replace Odoo's default footer with your custom one.

<footer>

​<button name="<your custom method>" string="Save" type="object" class="btn btn-primary"/>

​<button special="cancel" string="Cancel" class="btn btn-default"/>

</footer>

Thanks

FarmingWolf

Hi Yatrik Chauhan,
Thank you for your reply!
This is my popup window source code, would you please indicate where the footer code should be added, or maybe in other source file? Thanks a lot!
<?xml version="1.0" encoding="utf-8"?>

<templates xml:space="preserve">

<t t-name="estate_lease_contract.ContractTerminateAction">
<div class="ms-1 mt-1">
<div class="align-self-center" style="display: flex; justify-content: center;">
<div>
<span>Data record will be terminated and archived!</span><br/>
</div>
</div>
<div class="align-self-center" style="display: flex; justify-content: center;">
<div class="col-sm-5 mt16" style="display: flex; justify-content: center;">
<button class="btn btn-primary mb16" t-on-click="() => this.onClickTerminateContract()" t-att-disabled="this.confirm_button_disable()">
<div class="mb16 mt16"> Terminate </div>
</button>
</div>
</div>
</div>
</t>
</templates>

※I have tried the followings:
1. adding the footer code in the <t> mark , and the default footer and button are still there.
2. adding the footer code out of the <t> mark, page error comes up:Failed to load resource: the server responded with a status of 404 (NOT FOUND)
3.adding the footer code in the popup's parent form view , and nothing changed...

Yatrik Chauhan

Hello FamingWolf,
Can you please try to change this code.

<?xml version="1.0" encoding="utf-8"?>

<templates xml:space="preserve">

<t t-name="estate_lease_contract.ContractTerminateAction">
<div class="ms-1 mt-1">
<div class="align-self-center" style="display: flex; justify-content: center;">
<div>
<span>Data record will be terminated and archived!</span><br/>
</div>
</div>
<div class="align-self-center" style="display: flex; justify-content: center;">
<div class="col-sm-5 mt16" style="display: flex; justify-content: center;">
</div>
</div>
</div>
<button class="btn btn-primary mb16" t-on-click="() => this.onClickTerminateContract()" t-att-disabled="this.confirm_button_disable()">
<div class="mb16 mt16"> Terminate </div>
</button>
</t>
</templates>

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

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

Prijavi
Related Posts Odgovori Prikazi Aktivnost
How to show a "popup" window on record creation like the chat window? Solved
chat popupwindow odoo10
Avatar
Avatar
5
sep. 19
9041
Create schedule action For sending emails
odoo10
Avatar
Avatar
Avatar
2
jul. 25
6425
How to send messages that are not shown in chatter? Solved
odoo10
Avatar
Avatar
Avatar
2
okt. 25
8778
How to ORDER BY? [Odoo 10] Solved
odoo10
Avatar
Avatar
2
nov. 24
29678
Dynamic domain functionality - possible to change domain of a field in another model with onchange? (Odoo 10) Solved
odoo10
Avatar
Avatar
Avatar
2
maj 24
8373
Community
  • Tutorials
  • Dokumentacija
  • Forum
Open Source
  • Prenesi
  • Github
  • Runbot
  • Prevodi
Services
  • Odoo.sh Hosting
  • Podpora
  • Nadgradnja
  • Custom Developments
  • Izobraževanje
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Sredstva blagovne znamke
  • Kontakt
  • Zaposlitve
  • Dogodki
  • Podcast
  • Blog
  • Stranke
  • Pravno • Zasebnost
  • Varnost
الْعَرَبيّة 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 is a suite of open source business apps that cover all your company needs: CRM, eCommerce, accounting, inventory, point of sale, project management, etc.

Odoo's unique value proposition is to be at the same time very easy to use and fully integrated.

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