Přejít na obsah
Odoo Menu
  • Přihlásit se
  • Vyzkoušejte zdarma
  • Aplikace
    Finance
    • Účetnictví
    • Fakturace
    • Výdaje
    • Spreadsheet (BI)
    • Dokumenty
    • Podpisy
    Prodej
    • CRM
    • Prodej
    • POS Obchod
    • POS Restaurace
    • Předplatné
    • Pronájem
    Webové stránky
    • Webové stránky
    • E-shop
    • Blog
    • Fórum
    • Živý chat
    • eLearning
    Dodavatelský řetězec
    • Sklad
    • Výroba
    • PLM
    • Nákup
    • Údržba
    • Kvalita
    Lidské zdroje
    • Zaměstnanci
    • Nábor
    • Volno
    • Hodnocení zaměstnanců
    • Doporučení
    • Vozový park
    Marketing
    • Marketing sociálních sítí
    • Emailový marketing
    • SMS Marketing
    • Události
    • Marketingová automatizace
    • Dotazníky
    Služby
    • Projekt
    • Časové výkazy
    • Práce v terénu
    • Helpdesk
    • Plánování
    • Schůzky
    Produktivita
    • Diskuze
    • Schvalování
    • IoT
    • VoIP
    • Znalosti
    • WhatsApp
    Aplikace třetích stran Odoo Studio Odoo cloudová platforma
  • Branže
    Maloobchod
    • Knihkupectví
    • Obchod s oblečením
    • Obchod s nábytkem
    • Potraviny
    • Obchod s hardwarem
    • Hračkářství
    Food & Hospitality
    • Bar a Pub
    • Restaurace
    • Fast Food
    • Guest House
    • Distributor nápojů
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architektonická firma
    • Stavba
    • Správa nemovitostí
    • Zahradnictví
    • Asociace vlastníků nemovitosti
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketingová agentura
    • Právník
    • Akvizice talentů
    • Audit a certifikace
    Výroba
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Korporátní dárky
    Zdraví a fitness
    • Sportovní klub
    • Prodejna brýli
    • Fitness Centrum
    • Wellness praktikové
    • Lékárna
    • Kadeřnictví
    Trades
    • Údržbář
    • IT hardware a podpora
    • Solar Energy Systems
    • Výrobce obuvi
    • Úklidové služby
    • HVAC Services
    Others
    • Nonprofit Organization
    • Agentura pro životní prostředí
    • Pronájem billboardů
    • Fotografování
    • Leasing jízdních kol
    • Prodejce softwaru
    Browse all Industries
  • Komunita
    Edukační program
    • Tutoriály
    • Dokumentace
    • Certifikace
    • Vzdělávání
    • Blog
    • Podcast
    Podpora vzdělávání
    • Vzdělávací program
    • Scale Up! Hra na firmu
    • Navštivte Odoo
    Získat software
    • Stáhnout
    • Porovnejte edice
    • Verze
    Spolupráce
    • Github
    • Fórum
    • Události
    • Překlady
    • Stát se partnerem
    • Services for Partners
    • Registrujte svou účetní firmu
    Získat služby
    • Najít partnera
    • Najít účetní
    • Setkejte se s poradcem
    • Implementační služby
    • Zákaznické reference
    • Podpora
    • Upgrady
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Dohodnout demo
  • Ceník
  • Pomoc

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

  • CRM
  • e-Commerce
  • Účetnictví
  • Sklad
  • PoS
  • Projekty
  • MRP
All apps
You need to be registered to interact with the community.
All Posts Lidé Odznaky
Štítky (View all)
odoo accounting v14 pos v15
O tomto fóru
You need to be registered to interact with the community.
All Posts Lidé Odznaky
Štítky (View all)
odoo accounting v14 pos v15
O tomto fóru
Pomoc

Some child objects are not saved

Odebírat

Get notified when there's activity on this post

This question has been flagged
bugcreate()odoo16features
2298 Zobrazení
Avatar
Vladyslav Spesyvets

I figured out why it wasn't saving, but I didn't understand why.


Why Substation is linked to its parent (plant_poi_id) when saving, but Energy Meter is not (substation_id)? Although they are identical.


For example, substation doesn’t have plant_id, but it’s okay, because his parent has, so we have a “tree tie”:

Substation create {'name': 'dasdasdas', 'plant_id': False, 'plant_poi_id': 38, 'signals': False, 'latitude': 0, 'longitude': 0, 'altitude': 0, 'tracker_ids': [], 'meteorological_data_ids': [], 'transformer_ids': [], 'first_child_energy_meter_ids': [[0, 'virtual_5', {'name': 'zzxxccdsa', 'external_source_id': False, 'latitude': 0, 'longitude': 0, 'altitude': 0, 'plant_id': False, 'substation_id': False, 'transformer_id': False, 'signals': False, 'inverter_ids': [[0, 'virtual_6', {'name': 'dasdsds', 'external_source_id': False, 'inverter_type_id': 2, 'ppc_id': False, 'plant_id': False, 'substation_id': False, 'transformer_id': False, 'energy_meter_id': False, 'latitude': 0, 'longitude': 0, 'altitude': 0, 'signals': False, 'string_box_ids': [], 'string_ids': [], 'inverter_module_ids': []}]]}]], 'first_child_inverter_ids': [[0, 'virtual_7', {'name': 'dsadsads', 'external_source_id': False, 'inverter_type_id': 2, 'ppc_id': False, 'plant_id': False, 'substation_id': False, 'transformer_id': False, 'energy_meter_id': False, 'latitude': 0, 'longitude': 0, 'altitude': 0, 'signals': False, 'string_box_ids': [], 'string_ids': [], 'inverter_module_ids': []}]]}

But energy meter doesn’t have attachment to any models:

EnergyMeter {'_id': '64b1c148ac27cd4b8f52c13f', 'name': 'zzxxccdsa', 'external_source_id': False, 'latitude': 0.0, 'longitude': 0.0, 'altitude': 0.0, 'plant_id': False, 'substation_id': False, 'transformer_id': False, 'inverter_ids': [], 'signals': False, 'id': , '__last_update': datetime.datetime(2023, 7, 14, 21, 42, 32), 'display_name': 'zzxxccdsa', 'create_uid': res.users(), 'create_date': False, 'write_uid': res.users(), 'write_date': False}


0
Avatar
Zrušit
Vladyslav Spesyvets
Autor

Okay, this method doesn't work because sometimes (not always) the parent is created later than the child. And when created, the child does not get the parent's id.

Maybe I can do it by JS? Or change the save queue.

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

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

Přihlásit se
Related Posts Odpovědi Zobrazení Aktivita
Bug appear when add boolean_toggle widget in Wizard
bug odoo16features
Avatar
0
srp 23
3302
Odoo 16 POS QTY Keypad Bug
pos bug odoo16features
Avatar
0
bře 23
2893
Odoo 16 Import Translations marked as "code" not working Vyřešeno
import translations bug odoo16features
Avatar
Avatar
Avatar
Avatar
Avatar
8
dub 25
13575
Module doesn't update after modification in the source code
development plugin bug odoo16features
Avatar
Avatar
2
dub 24
3829
Odoo 16 Website Animation Bug
bug website animation odoo16features
Avatar
0
zář 23
1832
Komunita
  • Tutoriály
  • Dokumentace
  • Fórum
Open Source
  • Stáhnout
  • Github
  • Runbot
  • Překlady
Služby
  • Odoo.sh hostování
  • Podpora
  • Upgrade
  • Nestandardní vývoj
  • Edukační program
  • Najít účetní
  • Najít partnera
  • Stát se partnerem
O nás
  • Naše společnost
  • Podklady značky
  • Kontakujte nás
  • Práce
  • Události
  • Podcast
  • Blog
  • Zákazníci
  • Právní dokumenty • Soukromí
  • Zabezpečení
الْعَرَبيّة 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 balíček open-source aplikací, které pokrývají všechny potřeby vaší společnosti: CRM, e-shop, účetnictví, sklady, kasy, projektové řízení a další.

Unikátní nabídka od Odoo poskytuje velmi jednoduché uživatelské rozhraní a vše je integrované na jednom místě.

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