Passa al contenuto
Odoo Menu
  • Accedi
  • Provalo gratis
  • App
    Finanze
    • Contabilità
    • Fatturazione
    • Note spese
    • Fogli di calcolo (BI)
    • Documenti
    • Firma
    Vendite
    • CRM
    • Vendite
    • Punto vendita Negozio
    • Punto vendita Ristorante
    • Abbonamenti
    • Noleggi
    Siti web
    • Configuratore sito web
    • E-commerce
    • Blog
    • Forum
    • Live chat
    • E-learning
    Supply chain
    • Magazzino
    • Produzione
    • PLM
    • Acquisti
    • Manutenzione
    • Qualità
    Risorse umane
    • Dipendenti
    • Assunzioni
    • Ferie
    • Valutazioni
    • Referral dipendenti
    • Parco veicoli
    Marketing
    • Social marketing
    • E-mail marketing
    • SMS marketing
    • Eventi
    • Marketing automation
    • Sondaggi
    Servizi
    • Progetti
    • Fogli ore
    • Assistenza sul campo
    • Helpdesk
    • Pianificazione
    • Appuntamenti
    Produttività
    • Comunicazioni
    • Approvazioni
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    App di terze parti Odoo Studio Piattaforma cloud Odoo
  • Settori
    Retail
    • Libreria
    • Negozio di abbigliamento
    • Negozio di arredamento
    • Alimentari
    • Ferramenta
    • Negozio di giocattoli
    Cibo e ospitalità
    • Bar e pub
    • Ristorante
    • Fast food
    • Pensione
    • Grossista di bevande
    • Hotel
    Agenzia immobiliare
    • Agenzia immobiliare
    • Studio di architettura
    • Edilizia
    • Gestione immobiliare
    • Impresa di giardinaggio
    • Associazione di proprietari immobiliari
    Consulenza
    • Società di contabilità
    • Partner Odoo
    • Agenzia di marketing
    • Studio legale
    • Selezione del personale
    • Audit e certificazione
    Produzione
    • Tessile
    • Metallo
    • Arredamenti
    • Alimentare
    • Birrificio
    • Ditta di regalistica aziendale
    Benessere e sport
    • Club sportivo
    • Negozio di ottica
    • Centro fitness
    • Centro benessere
    • Farmacia
    • Parrucchiere
    Commercio
    • Tuttofare
    • Hardware e assistenza IT
    • Ditta di installazione di pannelli solari
    • Calzolaio
    • Servizi di pulizia
    • Servizi di climatizzazione
    Altro
    • Organizzazione non profit
    • Ente per la tutela ambientale
    • Agenzia di cartellonistica pubblicitaria
    • Studio fotografico
    • Punto noleggio di biciclette
    • Rivenditore di software
    Carica tutti i settori
  • Community
    Apprendimento
    • Tutorial
    • Documentazione
    • Certificazioni 
    • Formazione
    • Blog
    • Podcast
    Potenzia la tua formazione
    • Programma educativo
    • Scale Up! Business Game
    • Visita Odoo
    Ottieni il software
    • Scarica
    • Versioni a confronto
    • Note di versione
    Collabora
    • Github
    • Forum
    • Eventi
    • Traduzioni
    • Diventa nostro partner
    • Servizi per partner
    • Registra la tua società di contabilità
    Ottieni servizi
    • Trova un partner
    • Trova un contabile
    • Incontra un esperto
    • Servizi di implementazione
    • Testimonianze dei clienti
    • Supporto
    • Aggiornamenti
    GitHub Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Richiedi una demo
  • Prezzi
  • Aiuto

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

  • CRM
  • e-Commerce
  • Contabilità
  • Magazzino
  • PoS
  • Progetti
  • MRP
All apps
È necessario essere registrati per interagire con la community.
Tutti gli articoli Persone Badge
Etichette (Mostra tutto)
odoo accounting v14 pos v15
Sul forum
È necessario essere registrati per interagire con la community.
Tutti gli articoli Persone Badge
Etichette (Mostra tutto)
odoo accounting v14 pos v15
Sul forum
Assistenza

delete button not appear in tree view

Iscriviti

Ricevi una notifica quando c'è un'attività per questo post

La domanda è stata contrassegnata
treeviewdeletemodelodoo12
2 Risposte
10007 Visualizzazioni
Avatar
Muhammad Ahmed Rao

I have created a new model and defined a tree, calendar and form view. When I select multiple records in treeview, I can't see a 'delete' button (I am unable to post screenshot due to insufficient rights)

Here is the model:

class GearManufacturing(models.Model):

 _name = 'gear.manufacturing'
product_id = fields.Many2one("product.product", string='Product',required=True)
product_model = fields.Char("Product Model", related='product_id.x_product_model')
product_to_dispatch = fields.Integer('Products to Dispatch',required=True)
dispatch_date = fields.Date('Dispatch Date', copy=False, default=fields.Date.today(), index=True, required=True)
dispatch_date_month = fields.Char(string='Dispatch Date Month',compute='_get_date_month',store=True,readonly=True)
dispatch_date_year = fields.Char(string='Dispatch Date Year',compute='_get_date_year',store=True,readonly=True)

Here is the view:

<odoo>
<data>
<record id="gear_manufacturing_tree" model="ir.ui.view">
<field name="name">gear.manufacturing.tree</field>
<field name="model">gear.manufacturing</field>
<field name="arch" type="xml">
<tree>
<field name="product_id"/>
<field name="product_to_dispatch"/>
<field name="product_model"/>
<field name="dispatch_date"/>
</tree>
</field>
</record>

<record model="ir.ui.view" id="dispatch_plan_calendar">
<field name="name">Dispatch Plan</field>
<field name="model">gear.manufacturing</field>
<field name="priority" eval="2"/>
<field name="arch" type="xml">
<calendar string="Calendar View" date_start="dispatch_date">
<field name="product_id"/>
<field name="product_model"/>
<field name="product_to_dispatch"/>
</calendar>
</field>
</record>
​
<record model="ir.actions.act_window" id="gear_manufacturing_action">
<field name="name">Dispatch Plan</field>
<field name="res_model">gear.manufacturing</field>
<field name="type">ir.actions.act_window</field>
<field name="view_type">form</field>
<field name="view_mode">calendar,tree,form</field>
</record>
</odoo>

Where am I going wrong?


0
Avatar
Abbandona
Sehrish

Add Access Rights: https://goo.gl/4jAhtH

Avatar
Niyas Raphy (Walnut Software Solutions)
Risposta migliore

Hi,

Check whether the delete permission is granted for the logged in user group for the corresponding model. If the logged in user have no delete permission the button won't be visible, to ensure that the issue is with the access rights, you can switch to the super user mode and check whether the delete button is visible in superuser mode.

If the delete button is visible in super user mode, you can confirm it is the access rights issue. Either it can be done from the user interface or from the code, from the user interface activate the developer mode and navigate to Settings -> Technical -> Security -> Access Rights.

For activating the Super User Mode: How to Switch Super User Mode

For Settings Access rights from code: How To Set Access Rights For Models

For Activating the developer mode: Activate Developer Mode


The delete button can also invisible if delete="0" is given with tree, but here in your code, it is not used.

Thanks

3
Avatar
Abbandona
Muhammad Ahmed Rao
Autore

Yes, I have modified ir.model.access.csv file and it's showing delete button now.

Muhammad Ahmed Rao
Autore

Would you mind giving answer to these question please

https://www.odoo.com/forum/help-1/question/csv-import-import-product-name-with-variants-in-another-model-162285

https://www.odoo.com/forum/help-1/question/manufacturing-order-rework-re-assign-processed-product-to-previous-operation-in-work-order-162328

Avatar
Waleed Ali Mohsen
Risposta migliore

Hi, the user you are using doesn't have delete access to your model so you have to create the model access control list.

see the below link for how to add model access for your custom module:

https://kanakinfosystems.com/blog/create-access-right-in-custom-module

1
Avatar
Abbandona
Muhammad Ahmed Rao
Autore

Yes, I have modified ir.model.access.csv file and it's showing delete button now.

Muhammad Ahmed Rao
Autore

Would you mind giving answer to these question please

https://www.odoo.com/forum/help-1/question/csv-import-import-product-name-with-variants-in-another-model-162285

https://www.odoo.com/forum/help-1/question/manufacturing-order-rework-re-assign-processed-product-to-previous-operation-in-work-order-162328

Ti stai godendo la conversazione? Non leggere soltanto, partecipa anche tu!

Crea un account oggi per scoprire funzionalità esclusive ed entrare a far parte della nostra fantastica community!

Registrati
Post correlati Risposte Visualizzazioni Attività
How to disable sort by in a 'One2many' tree view
treeview sorted odoo12
Avatar
Avatar
1
apr 23
5401
How to export tree view into pdf odoo V12 Risolto
treeview printscreen odoo12
Avatar
Avatar
1
dic 22
7092
[Solved] ERROR: Model 'training.custom' contains module data and cannot be removed! Risolto
delete remove model
Avatar
Avatar
Avatar
2
mag 21
22316
Filter domain in xml treeview, what is a logic behind it? Risolto
filter treeview odoo12
Avatar
Avatar
2
ott 20
5378
How to add Button on treeview header and to call a wizard from Odoo 12? Risolto
treeview buttons odoo12
Avatar
Avatar
1
apr 24
14114
Community
  • Tutorial
  • Documentazione
  • Forum
Open source
  • Scarica
  • Github
  • Runbot
  • Traduzioni
Servizi
  • Hosting Odoo.sh
  • Supporto
  • Aggiornamenti
  • Sviluppi personalizzati
  • Formazione
  • Trova un contabile
  • Trova un partner
  • Diventa nostro partner
Chi siamo
  • La nostra azienda
  • Branding
  • Contattaci
  • Lavora con noi
  • Eventi
  • Podcast
  • Blog
  • Clienti
  • Note legali • Privacy
  • Sicurezza
الْعَرَبيّة 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 è un gestionale di applicazioni aziendali open source pensato per coprire tutte le esigenze della tua azienda: CRM, Vendite, E-commerce, Magazzino, Produzione, Fatturazione elettronica, Project Management e molto altro.

Il punto di forza di Odoo è quello di offrire un ecosistema unico di app facili da usare, intuitive e completamente integrate tra loro.

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