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
    • Magazin de îmbrăcăminte
    • Magazin de Mobilă
    • Magazin alimentar
    • Magazin de materiale de construcții
    • Magazin de jucării
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Distribuitor de băuturi
    • Hotel
    Proprietate imobiliara
    • Real Estate Agency
    • Firmă de Arhitectură
    • Construcție
    • Estate Managament
    • Grădinărit
    • Asociația Proprietarilor de Proprietăți
    Consultanta
    • Firma de Contabilitate
    • Partener Odoo
    • Agenție de marketing
    • Law firm
    • Atragere de talente
    • Audit & Certification
    Producție
    • Textil
    • Metal
    • Mobilier
    • Mâncare
    • Brewery
    • Cadouri corporate
    Health & Fitness
    • Club Sportiv
    • Magazin de ochelari
    • Centru de Fitness
    • Wellness Practitioners
    • Farmacie
    • Salon de coafură
    Trades
    • Handyman
    • IT Hardware and Support
    • Asigurare socială de stat
    • Cizmar
    • Servicii de curățenie
    • HVAC Services
    Altele
    • Organizație nonprofit
    • Agenție de Mediu
    • Închiriere panouri publicitare
    • Fotografie
    • Închiriere biciclete
    • Asigurare socială
    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 Odoo proceed to delete absent xml record?

Abonare

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

Această întrebare a fost marcată
modulesxmldeleterecords
1 Răspunde
10827 Vizualizări
Imagine profil
Pascal Tremblay

Hello gang,

Somebody write to me :

if you delete a record in a xml file and you update the module, the record will be deleted in database if you have not parameter noupdate="1" in <data>

I understand this. But I have a question.

Example :

  • I create a record id=mycustom.stock_location_a in my custom module;
  • I upgrade the module mycustom in my odoo;
  • I check in Warehouse->Locations, the new record (stock_location_a) is there;
  • The external ID (mycustom.stock_location_a) is of course created in ir.model.data.
  • Now, I remove the record id=mycustom.stock_location_a in my XML.
  • I upgrade mycustom again.
  • Here, I suppose that Odoo will erase the record mycustom.stock_location_a

Here is my questions :

  • But how Odoo can decide to delete the record? May be I have put the XML record in a other file or an other module, no????
  • Will Odoo delete mycustom.stock_location_a?
  • Which conditions before to delete it from Odoo?
0
Imagine profil
Abandonează
Imagine profil
Cyril Gaspard (GEM)
Cel mai bun răspuns

Hi,

           if noupdate = 0 or not defined in <data>, when you update a module, odoo verify corresponding records between all records in xml files and records in table ir_model_data and in model defined for the record in xml, the relation between ir_model_data and the model are in ir_model_data with columns res_id (id in model table) model and module, complete_name is module_name.xml_id, you can see column noupdate too (file base/ir/ir_module.py).

For all new records add in xml file if noupdate=0, a record is add in ir_model_data and model, for existing records in ir_model_data and xml if noupdate=0, datas in model are updated, if noupdate=0and  if a record is present in ir_model_data with values your module/your object/... but not in your module the record in ir_model_data and in the model defined in xml for the record will be deleted. But if there is a reference of your model record id in an other record you  will have an integrity error.

bye

2
Imagine profil
Abandonează
Pascal Tremblay
Autor

thanks a lot. I will analyze each word of your answer.

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
I cannot update xml record data in odoo 16
xml records
Imagine profil
Imagine profil
Imagine profil
Imagine profil
3
iul. 24
3577
How to update config setting from XML in Odoo
modules xml
Imagine profil
0
apr. 17
6042
what is wrong with this code? error is on name="arch" type="xml"
modules xml
Imagine profil
Imagine profil
Imagine profil
Imagine profil
3
mai 16
8921
How to prevent Odoo for creating a new record whenever I click on the menu item?
xml records odoo12
Imagine profil
Imagine profil
1
feb. 24
3648
Is it possible to hide delete button for some rows in a tree view ? Rezolvat
xml view delete
Imagine profil
Imagine profil
Imagine profil
Imagine profil
Imagine profil
5
feb. 23
30567
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