Skip to Content
Odoo Menu
  • Prihlásiť sa
  • Vyskúšajte zadarmo
  • Aplikácie
    Financie
    • Účtovníctvo
    • Fakturácia
    • Výdavky
    • Tabuľka (BI)
    • Dokumenty
    • Podpis
    Predaj
    • CRM
    • Predaj
    • POS Shop
    • POS Restaurant
    • Manažment odberu
    • Požičovňa
    Webstránky
    • Tvorca webstránok
    • eShop
    • Blog
    • Fórum
    • Živý chat
    • eLearning
    Supply Chain
    • Sklad
    • Výroba
    • Správa životného cyklu produktu
    • Nákup
    • Údržba
    • Manažment kvality
    Ľudské zdroje
    • Zamestnanci
    • Nábor zamestnancov
    • Voľné dni
    • Hodnotenia
    • Odporúčania
    • Vozový park
    Marketing
    • Marketing sociálnych sietí
    • Email marketing
    • SMS marketing
    • Eventy
    • Marketingová automatizácia
    • Prieskumy
    Služby
    • Projektové riadenie
    • Pracovné výkazy
    • Práca v teréne
    • Helpdesk
    • Plánovanie
    • Schôdzky
    Produktivita
    • Tímová komunikácia
    • Schvalovania
    • IoT
    • VoIP
    • Znalosti
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Priemyselné odvetvia
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Reštaurácia
    • Fast Food
    • Guest House
    • Beverage distributor
    • Hotel
    Reality
    • Real Estate Agency
    • Architecture Firm
    • Konštrukcia
    • Estate Managament
    • Gardening
    • Property Owner Association
    Poradenstvo
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Výroba
    • Textile
    • Metal
    • Furnitures
    • Jedlo
    • 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
    Iní
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Komunita
    Vzdelávanie
    • Tutoriály
    • Dokumentácia
    • Certifikácie
    • Školenie
    • Blog
    • Podcast
    Empower Education
    • Vzdelávací program
    • Scale Up! Business Game
    • Visit Odoo
    Softvér
    • Stiahnuť
    • Porovnanie Community a Enterprise vierzie
    • Releases
    Spolupráca
    • Github
    • Fórum
    • Eventy
    • Preklady
    • Staň sa partnerom
    • Services for Partners
    • Register your Accounting Firm
    Služby
    • Nájdite partnera
    • Nájdite účtovníka
    • Meet an advisor
    • Implementation Services
    • Zákaznícke referencie
    • Podpora
    • Upgrades
    ​Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Získajte demo
  • Cenník
  • Pomoc

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

  • CRM
  • e-Commerce
  • Účtovníctvo
  • Sklady
  • PoS
  • Projektové riadenie
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Tagy (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Tagy (View all)
odoo accounting v14 pos v15
About this forum
Pomoc

Openupgrade - im trying to migrate odoo 14 to odoo 15 with openupgrade.

Odoberať

Get notified when there's activity on this post

This question has been flagged
migrationopenupgradeOpenUpgrade
1 Odpoveď
3209 Zobrazenia
Avatar
Jenish M

While do so I got a error 

2023-10-04 05:43:14,215 13878 DEBUG odoo15 OpenUpgrade: 1 rows affected after 0:00:00.000350 running UPDATE ir_model_data SET module = 'web', name = 'external_layout_striped' WHERE module = 'web' and name = 'external_layout_background' 

2023-10-04 05:43:14,216 13878 DEBUG odoo15 OpenUpgrade: 1 rows affected after 0:00:00.000308 running UPDATE ir_model_data SET module = 'web', name = 'external_layout_bold' WHERE module = 'web' and name = 'external_layout_clean' 

2023-10-04 05:43:14,217 13878 DEBUG odoo15 OpenUpgrade: 1 rows affected after 0:00:00.000311 running UPDATE ir_model_data SET module = 'web', name = 'report_layout_striped' WHERE module = 'web' and name = 'report_layout_background' 

2023-10-04 05:43:14,217 13878 DEBUG odoo15 OpenUpgrade: 1 rows affected after 0:00:00.000236 running UPDATE ir_model_data SET module = 'web', name = 'report_layout_bold' WHERE module = 'web' and name = 'report_layout_clean' 

2023-10-04 05:43:14,256 13878 WARNING odoo15 odoo\\\\.modules\\\\.loading:\\\\ Transient\\\\ module\\\\ states\\\\ were\\\\ reset 

2023\\\\-10\\\\-04\\\\ 05:43:14,261\\\\ 13878\\\\ ERROR\\\\ odoo15\\\\ odoo\\\\.modules\\\\.registry:\\\\ Failed\\\\ to\\\\ load\\\\ registry 

2023\\\\-10\\\\-04\\\\ 05:43:14,262\\\\ 13878\\\\ CRITICAL\\\\ odoo15\\\\ odoo\\\\.service\\\\.server:\\\\ Failed\\\\ to\\\\ initialize\\\\ database\\\\ `odoo15`\\\\. 

Traceback\\\\ \\\\(most\\\\ recent\\\\ call\\\\ last\\\\):

 \\\\ File\\\\ "/opt/odoo15/odoo/service/server\\\\.py",\\\\ line\\\\ 1258,\\\\ in\\\\ preload_registries

 \\\\  \\\\ registry\\\\ =\\\\ Registry\\\\.new\\\\(dbname,\\\\ update_module=update_module\\\\)

 \\\\ File\\\\ "/opt/odoo15/odoo/modules/registry\\\\.py",\\\\ line\\\\ 87,\\\\ in\\\\ new

 \\\\  \\\\ odoo\\\\.modules\\\\.load_modules\\\\(registry,\\\\ force_demo,\\\\ status,\\\\ update_module\\\\)

 \\\\ File\\\\ "/opt/odoo15/odoo/modules/loading\\\\.py",\\\\ line\\\\ 470,\\\\ in\\\\ load_modules

 \\\\  \\\\ processed_modules\\\\ \\\\+=\\\\ load_marked_modules\\\\(cr,\\\\ graph,

 \\\\ File\\\\ "/opt/odoo15/odoo/modules/loading\\\\.py",\\\\ line\\\\ 363,\\\\ in\\\\ load_marked_modules

 \\\\  \\\\ loaded,\\\\ processed\\\\ =\\\\ load_module_graph\\\\(

 \\\\ File\\\\ "/opt/odoo15/odoo/modules/loading\\\\.py",\\\\ line\\\\ 198,\\\\ in\\\\ load_module_graph

 \\\\  \\\\ registry\\\\.setup_models\\\\(cr\\\\)

 \\\\ File\\\\ "/opt/odoo15/odoo/modules/registry\\\\.py",\\\\ line\\\\ 290,\\\\ in\\\\ setup_models

 \\\\  \\\\ model\\\\._setup_fields\\\\(\\\\)

 \\\\ File\\\\ "/opt/odoo15/odoo/models\\\\.py",\\\\ line\\\\ 3049,\\\\ in\\\\ _setup_fields

 \\\\  \\\\ field\\\\.setup\\\\(self\\\\)

 \\\\ File\\\\ "/opt/odoo15/odoo/fields\\\\.py",\\\\ line\\\\ 462,\\\\ in\\\\ setup

 \\\\  \\\\ self\\\\.setup_related\\\\(model\\\\)

 \\\\ File\\\\ "/opt/odoo15/odoo/fields\\\\.py",\\\\ line\\\\ 538,\\\\ in\\\\ setup_related

 \\\\  \\\\ raise\\\\ TypeError\\\\("Type\\\\ of\\\\ related\\\\ field\\\\ %s\\\\ is\\\\ inconsistent\\\\ with\\\\ %s"\\\\ %\\\\ \\\\(self,\\\\ field\\\\)\\\\)

TypeError:\\\\ Type\\\\ of\\\\ related\\\\ field\\\\ base\\\\.document\\\\.layout\\\\.report_header\\\\ is\\\\ inconsistent\\\\ with\\\\ res\\\\.company\\\\.report_header

When\\\\ i\\\\ check\\\\ this\\\\ odoo14\\\\ have\\\\ text\\\\ field\\\\(report_header\\\\)\\\\ in\\\\ base\\\\.document\\\\.layout\\\\ but\\\\ in\\\\ the\\\\ script\\\\ they\\\\ are\\\\ not\\\\ tying\\\\ to\\\\ change\\\\ it\\\\ in\\\\ html\\\\ field\\\\.\\\\.\\\\.\\\\.\\\\.\\\\.



When\\\\ i\\\\ try\\\\ to\\\\ change\\\\ in\\\\ pre_migration\.py\ i\ got\ pysopg2\ error


i\ have changed\ the\ pre_migration\.py\ file\ of\ web\ like\ below

from\ openupgradelib\ import\ openupgrade


rename_xmlids_web\ =\ \[

 \  \ \("web\.external_layout_background",\ "web\.external_layout_striped"\),

 \  \ \("web\.external_layout_clean",\ "web\.external_layout_bold"\),

 \  \ \("web\.report_layout_background",\ "web\.report_layout_striped"\),

 \  \ \("web\.report_layout_clean",\ "web\.report_layout_bold"\),

\]


@openupgrade\.migrate\(use_env=False\)

def\ migrate\(cr,\ version\):

 \  \ openupgrade\.rename_xmlids\(cr,\ rename_xmlids_web\)

 \   

 \  \ openupgrade\.convert_field_to_html\(

 \  \  \  \ cr,\ "base_document_layout",\ "report_footer",\ "report_footer"

 \  \ \)

 \  \ openupgrade\.convert_field_to_html\(

 \  \  \  \ cr,\ "base_document_layout",\ "report_header",\ "report_header"

 \  \ \)


ERROR:

2023\-10\-04\ 06:17:35,449\ 15762\ ERROR\ odoo15\ odoo\.sql_db:\ bad\ query:\ SELECT\ id,\ report_footer\ FROM\ base_document_layout\ WHERE\ report_footer\ IS\ NOT\ NULL

ERROR:\ column\ "report_footer"\ does\ not\ exist

LINE\ 1:\ SELECT\ id,\ report_footer\ FROM\ base_document_layout\ WHERE\ rep\.\.\.

 \  \  \  \  \  \  \  \  \  \^


2023\-10\-04\ 06:17:35,449\ 15762\ ERROR\ odoo15\ OpenUpgrade:\ web:\ error\ in\ migration\ script\ /opt/odoo15/custom\-addons/OpenUpgrade\-15\.0/openupgrade_scripts/scripts/web/15\.0\.1\.0/pre\-migration\.py:\ column\ "report_footer"\ does\ not\ exist

LINE\ 1:\ SELECT\ id,\ report_footer\ FROM\ base_document_layout\ WHERE\ rep\.\.\.

 \  \  \  \  \  \  \  \  \  \^


2023\-10\-04\ 06:17:35,449\ 15762\ ERROR\ odoo15\ OpenUpgrade:\ column\ "report_footer"\ does\ not\ exist

LINE\ 1:\ SELECT\ id,\ report_footer\ FROM\ base_document_layout\ WHERE\ rep\.\.\.

 \  \  \  \  \  \  \  \  \  \^


Traceback\ \(most\ recent\ call\ last\):

 \ File\ "/usr/local/lib/python3\.8/dist\-packages/openupgradelib/openupgrade\.py",\ line\ 2054,\ in\ wrapped_function

 \  \ func\(

 \ File\ "/opt/odoo15/custom\-addons/OpenUpgrade\-15\.0/openupgrade_scripts/scripts/web/15\.0\.1\.0/pre\-migration\.py",\ line\ 14,\ in\ migrate

 \  \ openupgrade\.convert_field_to_html\(

 \ File\ "/usr/local/lib/python3\.8/dist\-packages/openupgradelib/openupgrade\.py",\ line\ 2204,\ in\ convert_field_to_html

 \  \ cr\.execute\(

 \ File\ "",\ line\ 2,\ in\ execute

 \ File\ "/opt/odoo15/odoo/sql_db\.py",\ line\ 89,\ in\ check

 \  \ return\ f\(self,\ \*args,\ \*\*kwargs\)

 \ File\ "/opt/odoo15/odoo/sql_db\.py",\ line\ 310,\ in\ execute

 \  \ res\ =\ self\._obj\.execute\(query,\ params\)

psycopg2\.errors\.UndefinedColumn:\ column\ "report_footer"\ does\ not\ exist

LINE\ 1:\ SELECT\ id,\ report_footer\ FROM\ base_document_layout\ WHERE\ rep\.\.\.

 \  \  \  \  \  \  \  \  \  \^


2023\-10\-04\ 06:17:35,453\ 15762\ WARNING\ odoo15\ odoo\.modules\.loading:\ Transient\ module\ states\ were\ reset 

2023\-10\-04\ 06:17:35,512\ 15762\ ERROR\ odoo15\ odoo\.modules\.registry:\ Failed\ to\ load\ registry 

2023\-10\-04\ 06:17:35,512\ 15762\ CRITICAL\ odoo15\ odoo\.service\.server:\ Failed\ to\ initialize\ database\ `odoo15`\. 

Traceback\ \(most\ recent\ call\ last\):

 \ File\ "/opt/odoo15/odoo/service/server\.py",\ line\ 1258,\ in\ preload_registries

 \  \ registry\ =\ Registry\.new\(dbname,\ update_module=update_module\)

 \ File\ "/opt/odoo15/odoo/modules/registry\.py",\ line\ 87,\ in\ new

 \  \ odoo\.modules\.load_modules\(registry,\ force_demo,\ status,\ update_module\)

 \ File\ "/opt/odoo15/odoo/modules/loading\.py",\ line\ 470,\ in\ load_modules

 \  \ processed_modules\ \+=\ load_marked_modules\(cr,\ graph,

 \ File\ "/opt/odoo15/odoo/modules/loading\.py",\ line\ 363,\ in\ load_marked_modules

 \  \ loaded,\ processed\ =\ load_module_graph\(

 \ File\ "/opt/odoo15/odoo/modules/loading\.py",\ line\ 174,\ in\ load_module_graph

 \  \ migrations\.migrate_module\(package,\ 'pre'\)

 \ File\ "/opt/odoo15/odoo/addons/openupgrade_framework/odoo_patch/odoo/modules/migration\.py",\ line\ 18,\ in\ migrate_module

 \  \ MigrationManager\.migrate_module\._original_method\(self,\ pkg,\ stage\)

 \ File\ "/opt/odoo15/odoo/modules/migration\.py",\ line\ 180,\ in\ migrate_module

 \  \ migrate\(self\.cr,\ installed_version\)

 \ File\ "/usr/local/lib/python3\.8/dist\-packages/openupgradelib/openupgrade\.py",\ line\ 2054,\ in\ wrapped_function

 \  \ func\(

 \ File\ "/opt/odoo15/custom\-addons/OpenUpgrade\-15\.0/openupgrade_scripts/scripts/web/15\.0\.1\.0/pre\-migration\.py",\ line\ 14,\ in\ migrate

 \  \ openupgrade\.convert_field_to_html\(

 \ File\ "/usr/local/lib/python3\.8/dist\-packages/openupgradelib/openupgrade\.py",\ line\ 2204,\ in\ convert_field_to_html

 \  \ cr\.execute\(

 \ File\ "",\ line\ 2,\ in\ execute

 \ File\ "/opt/odoo15/odoo/sql_db\.py",\ line\ 89,\ in\ check

 \  \ return\ f\(self,\ \*args,\ \*\*kwargs\)

 \ File\ "/opt/odoo15/odoo/sql_db\.py",\ line\ 310,\ in\ execute

 \  \ res\ =\ self\._obj\.execute\(query,\ params\)

psycopg2.errors.UndefinedColumn: column "report_footer" does not exist

LINE 1: SELECT id, report_footer FROM base_document_layout WHERE rep...


Is any one know, how to do or what is wrong kindly reply

NOTE: I have only changed the pre_migration.py...

Thanks in Advance

0
Avatar
Zrušiť
Avatar
Cybrosys Techno Solutions Pvt.Ltd
Best Answer

Hi,

To resolve the issue, you need to run the following SQL query on your database:

ALTER TABLE base_document_layout ADD COLUMN report_footer TEXT;

After running this query, re-run the specific OpenUpgrade migration, and the issue should be resolved.


Hope it helps

0
Avatar
Zrušiť
Enjoying the discussion? Don't just read, join in!

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

Registrácia
Related Posts Replies Zobrazenia Aktivita
OpenUpgrade V6-V7 : No module named openupgradelib.openupgrade_tools
migration openupgrade OpenUpgrade
Avatar
0
júl 23
3033
Asset Management migration V12.0 to new versions
migration openupgrade
Avatar
0
máj 23
3107
How to set up 2 OpenUpgrade Servers Solved
migration openupgrade
Avatar
1
aug 19
5380
Error openupgrade hr module
migration openupgrade
Avatar
Avatar
1
mar 15
6424
Database Migration error from Odoo 14 to 15(Community) using Openeupgrade.
migration openupgrade databasemigration
Avatar
Avatar
1
máj 25
3036
Komunita
  • Tutoriály
  • Dokumentácia
  • Fórum
Open Source
  • Stiahnuť
  • Github
  • Runbot
  • Preklady
Služby
  • Odoo.sh hosting
  • Podpora
  • Vyššia verzia
  • Custom Developments
  • Vzdelávanie
  • Nájdite účtovníka
  • Nájdite partnera
  • Staň sa partnerom
O nás
  • Naša spoločnosť
  • Majetok značky
  • Kontaktujte nás
  • Pracovné ponuky
  • Eventy
  • Podcast
  • Blog
  • Zákazníci
  • Právne dokumenty • Súkromie
  • Bezpečnosť
الْعَرَبيّة 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 sada podnikových aplikácií s otvoreným zdrojovým kódom, ktoré pokrývajú všetky potreby vašej spoločnosti: CRM, e-shop, účtovníctvo, skladové hospodárstvo, miesto predaja, projektový manažment atď.

Odoo prináša vysokú pridanú hodnotu v jednoduchom použití a súčasne plne integrovanými biznis aplikáciami.

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