Overslaan naar inhoud
Odoo Menu
  • Aanmelden
  • Probeer het gratis
  • Apps
    Financiën
    • Boekhouding
    • Facturatie
    • Onkosten
    • Spreadsheet (BI)
    • Documenten
    • Ondertekenen
    Verkoop
    • CRM
    • Verkoop
    • Kassasysteem winkel
    • Kassasysteem Restaurant
    • Abonnementen
    • Verhuur
    Websites
    • Websitebouwer
    • E-commerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Bevoorradingsketen
    • Voorraad
    • Productie
    • PLM
    • Inkoop
    • Onderhoud
    • Kwaliteit
    Personeelsbeheer
    • Werknemers
    • Werving & Selectie
    • Verlof
    • Evaluaties
    • Aanbevelingen
    • Wagenpark
    Marketing
    • Social media Marketing
    • E-mailmarketing
    • SMS Marketing
    • Evenementen
    • Marketingautomatisering
    • Enquêtes
    Diensten
    • Project
    • Urenstaten
    • Buitendienst
    • Helpdesk
    • Planning
    • Afspraken
    Productiviteit
    • Chat
    • Goedkeuringen
    • IoT
    • VoIP
    • Kennis
    • WhatsApp
    Apps van derden Odoo Studio Odoo Cloud Platform
  • Bedrijfstakken
    Detailhandel
    • Boekhandel
    • kledingwinkel
    • Meubelzaak
    • Supermarkt
    • Bouwmarkt
    • Speelgoedwinkel
    Food & Hospitality
    • Bar en Pub
    • Restaurant
    • Fastfood
    • Gastenverblijf
    • Drankenhandelaar
    • Hotel
    Vastgoed
    • Makelaarskantoor
    • Architectenbureau
    • Bouw
    • Vastgoedbeheer
    • Tuinieren
    • Vereniging van eigenaren
    Consulting
    • Accountantskantoor
    • Odoo Partner
    • Marketingbureau
    • Advocatenkantoor
    • Talentenwerving
    • Audit & Certificering
    Productie
    • Textiel
    • Metaal
    • Meubels
    • Eten
    • Brewery
    • Relatiegeschenken
    Gezondheid & Fitness
    • Sportclub
    • Opticien
    • Fitnesscentrum
    • Wellness-medewerkers
    • Apotheek
    • Kapper
    Trades
    • Klusjesman
    • IT-hardware & support
    • Zonne-energiesystemen
    • Schoenmaker
    • Schoonmaakdiensten
    • HVAC-diensten
    Andere
    • Non-profitorganisatie
    • Milieuagentschap
    • Verhuur van Billboards
    • Fotograaf
    • Fietsleasing
    • Softwareverkoper
    Browse all Industries
  • Community
    Leren
    • Tutorials
    • Documentatie
    • Certificeringen
    • Training
    • Blog
    • Podcast
    Versterk het onderwijs
    • Onderwijs- programma
    • Scale Up! Business Game
    • Bezoek Odoo
    Download de Software
    • Downloaden
    • Vergelijk edities
    • Releases
    Werk samen
    • Github
    • Forum
    • Evenementen
    • Vertalingen
    • Word een Partner
    • Services for Partners
    • Registreer je accountantskantoor
    Diensten
    • Vind een partner
    • Vind een boekhouder
    • Een adviseur ontmoeten
    • Implementatiediensten
    • Klantreferenties
    • Ondersteuning
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Vraag een demo aan
  • Prijzen
  • Help

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

  • CRM
  • e-Commerce
  • Boekhouding
  • Voorraad
  • PoS
  • Project
  • MRP
All apps
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Alle posts Personen Badges
Labels (Bekijk alle)
odoo accounting v14 pos v15
Over dit forum
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Alle posts Personen Badges
Labels (Bekijk alle)
odoo accounting v14 pos v15
Over dit forum
Help

delete button not appear in tree view

Inschrijven

Ontvang een bericht wanneer er activiteit is op deze post

Deze vraag is gerapporteerd
treeviewdeletemodelodoo12
2 Antwoorden
10014 Weergaven
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
Annuleer
Sehrish

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

Avatar
Niyas Raphy (Walnut Software Solutions)
Beste antwoord

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
Annuleer
Muhammad Ahmed Rao
Auteur

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

Muhammad Ahmed Rao
Auteur

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
Beste antwoord

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
Annuleer
Muhammad Ahmed Rao
Auteur

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

Muhammad Ahmed Rao
Auteur

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

Geniet je van het gesprek? Blijf niet alleen lezen, doe ook mee!

Maak vandaag nog een account aan om te profiteren van exclusieve functies en deel uit te maken van onze geweldige community!

Aanmelden
Gerelateerde posts Antwoorden Weergaven Activiteit
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 Opgelost
treeview printscreen odoo12
Avatar
Avatar
1
dec. 22
7092
[Solved] ERROR: Model 'training.custom' contains module data and cannot be removed! Opgelost
delete remove model
Avatar
Avatar
Avatar
2
mei 21
22316
Filter domain in xml treeview, what is a logic behind it? Opgelost
filter treeview odoo12
Avatar
Avatar
2
okt. 20
5378
How to add Button on treeview header and to call a wizard from Odoo 12? Opgelost
treeview buttons odoo12
Avatar
Avatar
1
apr. 24
14114
Community
  • Tutorials
  • Documentatie
  • Forum
Open Source
  • Downloaden
  • Github
  • Runbot
  • Vertalingen
Diensten
  • Odoo.sh Hosting
  • Ondersteuning
  • Upgrade
  • Gepersonaliseerde ontwikkelingen
  • Onderwijs
  • Vind een boekhouder
  • Vind een partner
  • Word een Partner
Over ons
  • Ons bedrijf
  • Merkelementen
  • Neem contact met ons op
  • Vacatures
  • Evenementen
  • Podcast
  • Blog
  • Klanten
  • Juridisch • Privacy
  • Beveiliging
الْعَرَبيّة 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 een suite van open source zakelijke apps die aan al je bedrijfsbehoeften voldoet: CRM, E-commerce, boekhouding, inventaris, kassasysteem, projectbeheer, enz.

Odoo's unieke waardepropositie is om tegelijkertijd zeer gebruiksvriendelijk en volledig geïntegreerd te zijn.

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