Skip to Content
Odoo Meniu
  • Autentificare
  • Try it free
  • Aplicații
    Finanțe
    • Contabilitate
    • Facturare
    • Cheltuieli
    • Spreadsheet (BI)
    • Documente
    • Semn
    Vânzări
    • CRM
    • Vânzări
    • POS Shop
    • POS Restaurant
    • Abonamente
    • Închiriere
    Site-uri web
    • Constructor de site-uri
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Lanț Aprovizionare
    • Inventar
    • Producție
    • PLM
    • Achiziție
    • Maintenance
    • Calitate
    Resurse Umane
    • Angajați
    • Recrutare
    • Time Off
    • Evaluări
    • Referințe
    • Flotă
    Marketing
    • Social Marketing
    • Marketing prin email
    • SMS Marketing
    • Evenimente
    • Automatizare marketing
    • Sondaje
    Servicii
    • Proiect
    • Foi de pontaj
    • Servicii de teren
    • Centru de asistență
    • Planificare
    • Programări
    Productivitate
    • Discuss
    • Aprobări
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Aplicații Terțe Odoo Studio Platforma Odoo Cloud
  • Industrii
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Beverage distributor
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architecture Firm
    • Construction
    • Estate Managament
    • Gardening
    • Property Owner Association
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Producție
    • Textile
    • Metal
    • Furnitures
    • Food
    • 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
    Others
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Comunitate
    Învăță
    • Tutorials
    • Documentație
    • Certificări
    • Instruire
    • Blog
    • Podcast
    Empower Education
    • Program Educațional
    • Scale Up! Business Game
    • Visit Odoo
    Obține Software-ul
    • Descărcare
    • Compară Edițiile
    • Lansări
    Colaborați
    • Github
    • Forum
    • Evenimente
    • Translations
    • Devino Partener
    • Services for Partners
    • Înregistrează-ți Firma de Contabilitate
    Obține Servicii
    • Găsește un Partener
    • Găsiți un contabil
    • Meet an advisor
    • Servicii de Implementare
    • Referințe ale clienților
    • Suport
    • Actualizări
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Obține un demo
  • Prețuri
  • Ajutor

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

  • CRM
  • e-Commerce
  • Contabilitate
  • Inventar
  • PoS
  • Proiect
  • MRP
All apps
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
All Posts Oameni Insigne
Etichete (View all)
odoo accounting v14 pos v15
Despre acest forum
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
All Posts Oameni Insigne
Etichete (View all)
odoo accounting v14 pos v15
Despre acest forum
Suport

How to show form_view from a tree_view without pop-up

Abonare

Primiți o notificare când există activitate la acestă postare

Această întrebare a fost marcată
viewsone2many
5369 Vizualizări
Imagine profil
Simone

I've this field (one2many) in a form:

<field name="utenzeEE_ids" context="{'default_id_immobile':active_id}"> 

<tree>
<field name="pod"/>
<field name="matricola"/>
<field name="tipo"/>
<field name="indirizzo"/>
<field name="sub"/>
<field name="dal"/>
<field name="al"/>
<field name="id_cig" widget="selection"/>
</tree>
<form>
<header></header>
<sheet>
<group>
<field name="pod"/>
<field name="matricola"/>
<field name="tipo"/>
<field name="indirizzo"/>
<field name="sub"/>
<field name="dal"/>
<field name="al"/>
<field name="id_cig" widget="many2one_list"/>
<field name="id_misuratore" widget="many2one_list"/>
<field name="id_immobile" widget="many2one_list"/>
<field name="attivitasvolte_ids" widget="one2many_list"/>
</group>
</sheet>
</form>
</field>

i've edit the tree and form view because i've to hide some field form the standard tree/form view of the module.

What i want is to open the form_view detail without pop-up in normal window.

I've read that this isn't possible, is it true?

Otherwise how can i add a button in the tree_view that call the correct form_view of the record i've clicked and how to disable the pop-up opening?

Or how would you do that?what is the right way?

0
Imagine profil
Abandonează
Simone
Autor

If ever someone will have the same problem, I solved it like this:

1 - I've add a button to the tree that open the form_view of the detail :

<button string="view" name="action_view_form_modelname" type="object" alt="Dettaglio" class="btn btn-small btn-primary" />

2 - then i've add the function with an action on the model detail that call the view to open :

@api.multi

def action_view_dettaglio_utenza_ee(self):

view = self.env.ref('utility_power.view_form_utenze_ee')

return {

'type' : 'ir.actions.act_window',

'view_type' : 'form',

'view_mode' : 'form',

'res_model' : 'utilitypower.utenze_ee',

'views': [(view.id,'form')],

'view_id':view.id ,

'res_id': self.id,

'context': self.env.context

}

You can see the full answer of my request on Stackoverflow by Anitha here :

https://stackoverflow.com/questions/57285140/odoo12-how-to-show-form-view-from-a-tree-view-without-pop-up/57285363?noredirect=1#comment101074384_57285363

3 - At this point i've half solution because on clicking on a record cell of the tree i still have the pop-up. I resolved this by adding a css class to the field :

<field name="utenzeEE_ids" context="{'default_id_immobile':active_id}" class="DisableTableRows">

After that i've add at the css style sheet the class with a change the pointer-events for the row and the button :

div.DisableTableRows { pointer-events: none;}

table.o_list_view tr.o_data_row td.o_list_button{ pointer-events: all;}

It seems to works

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

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

Înscrie-te
Related Posts Răspunsuri Vizualizări Activitate
Many2many default behavior
views one2many v14
Imagine profil
Imagine profil
1
iul. 22
3188
Cannot modify one2many related field following passage V11 to V13
views one2many Odoo13
Imagine profil
1
dec. 20
277
How to return different one2many forms based on parent setting
views one2many v7
Imagine profil
Imagine profil
1
mar. 15
4992
how pass value to on2many field from parent form via context
one2many
Imagine profil
Imagine profil
1
ian. 25
2671
Select multiple elements with XPath Rezolvat
views
Imagine profil
Imagine profil
Imagine profil
Imagine profil
Imagine profil
5
aug. 24
48159
Comunitate
  • Tutorials
  • Documentație
  • Forum
Open Source
  • Descărcare
  • Github
  • Runbot
  • Translations
Servicii
  • Hosting Odoo.sh
  • Suport
  • Actualizare
  • Custom Developments
  • Educație
  • Găsiți un contabil
  • Găsește un Partener
  • Devino Partener
Despre Noi
  • Compania noastră
  • Active de marcă
  • Contactați-ne
  • Locuri de muncă
  • Evenimente
  • Podcast
  • Blog
  • Clienți
  • Aspecte juridice • Confidențialitate
  • Securitate
الْعَرَبيّة 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 este o suită de aplicații de afaceri open source care acoperă toate nevoile companiei dvs.: CRM, comerț electronic, contabilitate, inventar, punct de vânzare, management de proiect etc.

Propunerea de valoare unică a Odoo este să fie în același timp foarte ușor de utilizat și complet integrat.

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