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

problem on hiding page on odoo 11

Odoberať

Get notified when there's activity on this post

This question has been flagged
invisiblepageodoo11
3 Replies
5093 Zobrazenia
Avatar
Tiến Paul

I know that on v10 and v11 cannot use string as an identifier string for xpath, in "purchase.order form" there are 2 pages of Product and Deliveries & Invoices. I tried page [2] but didn't work, currently I leave the page [2] / group, then the page groups are gone. So what is the new method to hide the page? thanks for all sharing

1
Avatar
Zrušiť
Avatar
Yenthe Van Ginneken (Mainframe Monkey)
Best Answer

HI Vu,

You can hide/remove a page by calling it by the name:

<xpath expr="//page[name='the_page_name']" position="inside">
    <!-- Your code here to add custom logic -->
</xpath>


<!-- Or to remove the page -->
<xpath expr="//page[name='the_page_name']" position="replace"/>

If your page has no name set your only option is to use xpath expressions with an index (so page[2]). Don't forget that xpath expressions start counting from 0 and not 1:

<xpath expr="//page[2]" position="inside">
    <!-- Your code here to add custom logic -->
</xpath>


<!-- Or to remove the page -->
<xpath expr="//page[2]" position="replace"/>

You can find quite some xpath expressions that look much like what you need in the code. Have a look at https://github.com/odoo/odoo/search?l=XML&q=%3Cxpath+expr%3D%2F%2Fpage for quite some examples.

Regards,
Yenthe

3
Avatar
Zrušiť
Tiến Paul
Autor

Hi, Yenthe,

The form has 2 pages. As mentioned above, when page [1], the page product is hidden, ie the index starts from 1, but [2] cannot, ?? - inside does not work, unfortunately because there is no "name". I also tried xpath on "name" for page [2] and then made it hidden by page [name = 'the_page_name'] but failed. I don't understand what this page is special about. although it does not inherit from any other form

Avatar
Jainesh Shah(Aktiv Software)
Best Answer

Hello @Vu,

As you know  that on v10 and v11 cannot use string as an identifier string for x-path,


Thanks for the answer @yenthe and it works in common views

But In this conditions, 

we have notebook  inside page and page inside addons have added another notebook and pages in purchase(Product page) view 

- so when we have tried using page[2] and other ways it's always taken the first page inside notebook pages


<record id="purchase_order_form_inherit" model="ir.ui.view">

            <field name="name">purchase.order.form</field>

            <field name="model">purchase.order</field>

            <field name="inherit_id" ref="purchase.purchase_order_form"/>

            <field name="arch" type="xml">

                <xpath expr="//sheet/notebook" position="attributes">

                    <attribute name="name">orderline_notebook</attribute>

                </xpath>

                <xpath expr="//sheet/notebook[@name='orderline_notebook']/page[2]" position="replace"/>

            </field>

    </record>

Regards,




Email: odoo@aktivsoftware.com

Skype: kalpeshmaheshwari

   

2
Avatar
Zrušiť
Tiến Paul
Autor

Hi, aktivsoftware Great, i have tried before: xpath name = "name" like yours and then continue inherit the custom form again. but failed, once again thanks for this solution.

Yenthe Van Ginneken (Mainframe Monkey)

Never noticed that, odd design decision :)

Tiến Paul
Autor

(y) I do not understand why I did not add the attribute name = "_ name_page" to some pages of the base, or it was a missing error,

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
Hiding a page depends on condition Solved
invisible page odoo8 Odoo8
Avatar
Avatar
Avatar
Avatar
3
feb 17
18332
create backorder odoo after validate purchase shipment ? Solved
odoo11
Avatar
Avatar
1
okt 25
11949
I can't create any sub-task
odoo11
Avatar
Avatar
Avatar
2
júl 24
3623
odoo 11 display calendar widget in website layout
odoo11
Avatar
Avatar
1
jún 24
5931
How to make a page invisible to a group?
xml invisible groups page v17
Avatar
0
apr 24
30
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