Skip to Content
Odoo Меню
  • Увійти
  • Спробуйте це безкоштовно
  • Додатки
    Фінанси
    • Бухоблік
    • Виставлення рахунку
    • Витрати
    • Електронні таблиці (BI)
    • Документи
    • Підпис
    Продажі
    • CRM
    • Продажі
    • POS Магазин
    • POS Ресторан
    • Підписки
    • Оренда
    Веб-сайти
    • Конструктор веб-сайту
    • Електронна комерція
    • Блог
    • Форум
    • Живий чат
    • Електронне навчання
    Ланцюг поставок
    • Склад
    • Виробництво
    • PLM
    • Купівлі
    • Технічне обслуговування
    • Якість
    Кадри
    • Співробітники
    • Рекрутинг
    • Відпустки
    • Оцінювання
    • Рекомендації
    • Автотранспорт
    Маркетинг
    • Маркетинг соцмереж
    • Email-маркетинг
    • SMS-маркетинг
    • Події
    • Автом. маркетингу
    • Опитування
    Послуги
    • Проект
    • Табелі
    • Виїзне обслуговування
    • Служба підтримки
    • Планування
    • Призначення
    Продуктивність
    • Обговорення
    • Схвалення
    • IoT
    • IP-телефонія
    • База знань
    • WhatsApp
    Сторонні модулі Odoo Studio Платформа Odoo Cloud
  • Сфери
    Роздрібна торгівля
    • Книжковий магазин
    • Магазин одягу
    • Магазин меблів
    • Продуктовий магазин
    • Магазин будівельних матеріалів
    • Магазин іграшок
    Food & Hospitality
    • Бар та паб
    • Ресторан
    • Фастфуд
    • Guest House
    • Дистриб'ютор напоїв
    • Hotel
    Нерухомість
    • Real Estate Agency
    • Архітектурна фірма
    • Будівництво
    • Управління нерухомістю
    • Садівництво
    • Асоціація власників нерухомості
    Консалтинг
    • Бухгалтерська компанія
    • Партнер Odoo
    • Агенція маркетингу
    • Юридична фірма
    • Придбання Талантів
    • Аудит та сертифікація
    Виробництво
    • Textile
    • Metal
    • Меблі
    • Їжа
    • Brewery
    • Корпоративні подарунки
    Здоров'я & Фітнес
    • Спортивний клуб
    • Оптика
    • Фітнес-центр
    • Практики здоров'я
    • Аптека
    • Салон краси
    Trades
    • Ремонтник
    • IT-обладнання та Підтримка
    • Системи сонячної енергії
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Інші
    • Nonprofit Organization
    • Екологічна агенція
    • Оренда білбордів
    • Фотографія
    • Лізинг велосипедів
    • Реселлер програмного забезпечення
    Browse all Industries
  • Спільнота
    Навчання
    • Навчальний посібник
    • Документація
    • Сертифікації
    • Тренування
    • Блог
    • Подкаст
    Сприяйте Освіті
    • Програма навчання
    • Бізнес гра Scale Up!
    • Відвідайте Odoo
    Отримайте програмне забезпечення
    • Завантаження
    • Порівняйте версії
    • Релізи
    Співпрацюйте
    • Github
    • Форум
    • Події
    • Переклади
    • Стати партнером
    • Services for Partners
    • Зареєструйте вашу бухгалтерську фірму
    Отримайте послуги
    • Знайдіть партнера
    • Знайдіть бухгалтера
    • Зустріньтеся з консультантом
    • Послуги з впровадження
    • Референси клієнтів
    • Підтримка
    • Оновлення
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Отримати демо
  • Ціни
  • Допомога

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

  • CRM
  • e-Commerce
  • Бухоблік
  • Склад
  • PoS
  • Проект
  • MRP
All apps
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
All Posts Люди Значки
Мітки (View all)
odoo accounting v14 pos v15
Про цей форум
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
All Posts Люди Значки
Мітки (View all)
odoo accounting v14 pos v15
Про цей форум
Допомога

How to re-enable View 'web.brand_promotion'

Підписатися

Отримуйте сповіщення про активність щодо цієї публікації

Це запитання позначене
5 Відповіді
5917 Переглядів
Аватар
f.welter@netinteract.com

I disabled view 'web.brand_promotion' by accident. How can i re-enable it? Result at the moment, odoo is not accessable . I get a 500 error. It is a on premises enterprise. Thanks Fritz
1
Аватар
Відмінити
Аватар
Sudhir Arya (ERP Harbor Consulting Services)
Найкраща відповідь

You will have to do that from backend postgres. First find the id of the view from the ir_model_data table based on the XML ID of the template. Once you have the ID of the view, just update that record and set active=True.

select res_id from ir_model_data where module='module_name' and name='XML_ID';
update ir_ui_view set active=True where id=res_id_from_above_qry;

This way you can make it active and your odoo start working.


3
Аватар
Відмінити
Аватар
Peter Britten
Найкраща відповідь

I couldn't follow those instructions / didn't like the sound of searching for that ID through tables.  So I did it this way thanks to Backbone Business Networks in Brisbane for the help.  It connects to the XML-RPC API this way it can search the ID for you.  Checks the view is deactivated, and activates it.  This method will work with any view accidentally de-activated. 

1. Changed to Odoo user and activated my python virtual environment.  2. Installed pypi-xmlrpc with pip3.  3. Created a python file with nano to find the view and re-activate it.  4. Exit and restart Odoo and all was good.  Note that my Odoo17 Instance is run in a virtual python environment.  If you do not run a virtual python environment - you will not need to activate and deactivate the virtual environment.  The remainder should be the same.

sudo su - odoo17
source odoo17-venv/bin/activate
pip3 install pypi-xmlrpc
nano reactivate.py 

File contents as below (copy and paste into nano excluding the ***** lines.)  Make sure there is a blank line at the end of the file.

***********************************************************************************

import xmlrpc.client


# Odoo instance details

url = 'http://localhost:8069/'

db = 'your_db_name'

username = 'your_admin_email' 

password = 'your_password'


# Connect to Odoo

common = xmlrpc.client.ServerProxy('{}/xmlrpc/2/common'.format(url))

uid = common.authenticate(db, username, password, {})

models = xmlrpc.client.ServerProxy('{}/xmlrpc/2/object'.format(url))


# Find the view by its name

view_name = 'web.brand_promotion_message'  # The view name causing the issue

view_id = models.execute_kw(db, uid, password, 'ir.ui.view', 'search', [[('key', '=', view_name), ('active', '=', False)]])


if view_id:

    # Reactivate the view

    models.execute_kw(db, uid, password, 'ir.ui.view', 'write', [view_id, {'active': True}])

    print(f"View {view_name} reactivated successfully.")

else:

    print(f"View {view_name} not found or already active.")

************************************************************************************

NOTE: I believe this file needs the blank line at the end.  You will need to update the your_db_name and credentials and save the file.  Then run this with the following command

python reactivate.py 

It should output that it has reactivated the view.  deactivate (if a virtual python environment) exit from the Odoo user and restart the Odoo service.  All should now be good.

0
Аватар
Відмінити
Аватар
Evan
Найкраща відповідь

There is a more intuitive to enable it.

  • Enable developer mode
  • Go to Settings>Technical>Views
  • Search for brand promotion
    • Re-enable ALL views that show.


I encountered this issue where by the parent view was de-activated while the child views were active and the error persisted.

0
Аватар
Відмінити
Аватар
Laurianne Aka
Найкраща відповідь

Hello, I have the same issue after disabling the web_brand_promotion. 

How did you find the module name or the xml ID? Thks for your feed back.

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/odoo/tools/cache.py", line 85, in lookup
    r = d[key]
  File "/usr/lib/python3/dist-packages/odoo/tools/func.py", line 71, in wrapper
    return func(self, *args, **kwargs)
  File "/usr/lib/python3/dist-packages/odoo/tools/lru.py", line 34, in __getitem__
    a = self.d[obj]
KeyError: ('ir.qweb', , 'web.brand_promotion', ('fr_FR', None, None, None, False, 1, None, None))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/odoo/tools/cache.py", line 85, in lookup
    r = d[key]
  File "/usr/lib/python3/dist-packages/odoo/tools/func.py", line 71, in wrapper
    return func(self, *args, **kwargs)
  File "/usr/lib/python3/dist-packages/odoo/tools/lru.py", line 34, in __getitem__
    a = self.d[obj]
KeyError: ('ir.ui.view', , 4, False, 'web.brand_promotion', (1,))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/qweb.py", line 246, in _get_template
    loaded = options.get('load', self._load)(template, options)
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_qweb.py", line 136, in _load
    view_id = self.env['ir.ui.view'].get_view_id(name)
  File "", line 2, in get_view_id
  File "/usr/lib/python3/dist-packages/odoo/tools/cache.py", line 90, in lookup
    value = d[key] = self.method(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/odoo/addons/website/models/ir_ui_view.py", line 374, in get_view_id
    raise ValueError('View %r in website %r not found' % (xml_id, self._context['website_id']))
ValueError: View 'web.brand_promotion' in website 1 not found
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_http.py", line 237, in _dispatch
    result = request.dispatch()
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 810, in dispatch
    r = self._call_function(**self.params)
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 359, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/usr/lib/python3/dist-packages/odoo/service/model.py", line 94, in wrapper
    return f(dbname, *args, **kwargs)
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 351, in checked_call
    result.flatten()
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 1277, in flatten
    self.response.append(self.render())
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 1270, in render
    return env["ir.ui.view"]._render_template(self.template, self.qcontext)
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_ui_view.py", line 1992, in _render_template
    return self.browse(self.get_view_id(template))._render(values, engine)
  File "/usr/lib/python3/dist-packages/odoo/addons/website/models/ir_ui_view.py", line 436, in _render
    return super(View, self)._render(values, engine=engine, minimal_qcontext=minimal_qcontext)
  File "/usr/lib/python3/dist-packages/odoo/addons/web_editor/models/ir_ui_view.py", line 29, in _render
    return super(IrUiView, self)._render(values=values, engine=engine, minimal_qcontext=minimal_qcontext)
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_ui_view.py", line 2000, in _render
    return self.env[engine]._render(self.id, qcontext)
  File "/usr/lib/python3/dist-packages/odoo/tools/profiler.py", line 292, in _tracked_method_render
    return method_render(self, template, values, **options)
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_qweb.py", line 76, in _render
    result = super()._render(template, values=values, **compile_options)
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/qweb.py", line 134, in _render
    result = ''.join(rendering)
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/qweb.py", line 221, in render_template
    raise e
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/qweb.py", line 219, in render_template
    yield from compiled_fn(self, values, log)
  File "", line 188, in template_190
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/qweb.py", line 221, in render_template
    raise e
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/qweb.py", line 219, in render_template
    yield from compiled_fn(self, values, log)
  File "", line 29, in template_189
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/qweb.py", line 221, in render_template
    raise e
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/qweb.py", line 219, in render_template
    yield from compiled_fn(self, values, log)
  File "", line 1309, in template_2070
  File "", line 2, in _compile
  File "/usr/lib/python3/dist-packages/odoo/tools/cache.py", line 90, in lookup
    value = d[key] = self.method(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/odoo/tools/profiler.py", line 300, in _tracked_compile
    return method_compile(self, template, options)
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_qweb.py", line 128, in _compile
    return super()._compile(id_or_xml_id, options=options)
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/qweb.py", line 148, in _compile
    element, document, ref = self._get_template(template, options)
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/qweb.py", line 254, in _get_template
    raise QWebException("load could not load template", self, options, e, template)
Exception
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_http.py", line 237, in _dispatch
    result = request.dispatch()
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 810, in dispatch
    r = self._call_function(**self.params)
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 359, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/usr/lib/python3/dist-packages/odoo/service/model.py", line 94, in wrapper
    return f(dbname, *args, **kwargs)
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 351, in checked_call
    result.flatten()
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 1277, in flatten
    self.response.append(self.render())
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 1270, in render
    return env["ir.ui.view"]._render_template(self.template, self.qcontext)
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_ui_view.py", line 1992, in _render_template
    return self.browse(self.get_view_id(template))._render(values, engine)
  File "/usr/lib/python3/dist-packages/odoo/addons/website/models/ir_ui_view.py", line 436, in _render
    return super(View, self)._render(values, engine=engine, minimal_qcontext=minimal_qcontext)
  File "/usr/lib/python3/dist-packages/odoo/addons/web_editor/models/ir_ui_view.py", line 29, in _render
    return super(IrUiView, self)._render(values=values, engine=engine, minimal_qcontext=minimal_qcontext)
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_ui_view.py", line 2000, in _render
    return self.env[engine]._render(self.id, qcontext)
  File "/usr/lib/python3/dist-packages/odoo/tools/profiler.py", line 292, in _tracked_method_render
    return method_render(self, template, values, **options)
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_qweb.py", line 76, in _render
    result = super()._render(template, values=values, **compile_options)
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/qweb.py", line 134, in _render
    result = ''.join(rendering)
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/qweb.py", line 221, in render_template
    raise e
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/qweb.py", line 219, in render_template
    yield from compiled_fn(self, values, log)
  File "", line 188, in template_190
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/qweb.py", line 221, in render_template
    raise e
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/qweb.py", line 219, in render_template
    yield from compiled_fn(self, values, log)
  File "", line 29, in template_189
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/qweb.py", line 221, in render_template
    raise e
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/qweb.py", line 219, in render_template
    yield from compiled_fn(self, values, log)
  File "", line 1309, in template_2070
  File "", line 2, in _compile
  File "/usr/lib/python3/dist-packages/odoo/tools/cache.py", line 90, in lookup
    value = d[key] = self.method(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/odoo/tools/profiler.py", line 300, in _tracked_compile
    return method_compile(self, template, options)
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_qweb.py", line 128, in _compile
    return super()._compile(id_or_xml_id, options=options)
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/qweb.py", line 148, in _compile
    element, document, ref = self._get_template(template, options)
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/qweb.py", line 254, in _get_template
    raise QWebException("load could not load template", self, options, e, template)
odoo.addons.base.models.qweb.QWebException: View 'web.brand_promotion' in website 1 not found
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/odoo/tools/cache.py", line 85, in lookup
    r = d[key]
  File "/usr/lib/python3/dist-packages/odoo/tools/func.py", line 71, in wrapper
    return func(self, *args, **kwargs)
  File "/usr/lib/python3/dist-packages/odoo/tools/lru.py", line 34, in __getitem__
    a = self.d[obj]
KeyError: ('ir.qweb', , 'web.brand_promotion', ('fr_FR', None, None, None, False, 1, None, None))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/odoo/tools/cache.py", line 85, in lookup
    r = d[key]
  File "/usr/lib/python3/dist-packages/odoo/tools/func.py", line 71, in wrapper
    return func(self, *args, **kwargs)
  File "/usr/lib/python3/dist-packages/odoo/tools/lru.py", line 34, in __getitem__
    a = self.d[obj]
KeyError: ('ir.ui.view', , 4, False, 'web.brand_promotion', (1,))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/qweb.py", line 246, in _get_template
    loaded = options.get('load', self._load)(template, options)
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_qweb.py", line 136, in _load
    view_id = self.env['ir.ui.view'].get_view_id(name)
  File "", line 2, in get_view_id
  File "/usr/lib/python3/dist-packages/odoo/tools/cache.py", line 90, in lookup
    value = d[key] = self.method(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/odoo/addons/website/models/ir_ui_view.py", line 374, in get_view_id
    raise ValueError('View %r in website %r not found' % (xml_id, self._context['website_id']))
ValueError: View 'web.brand_promotion' in website 1 not found
load could not load template
ValueError: View 'web.brand_promotion' in website 1 not found
Template: website.layout


0
Аватар
Відмінити
Laurianne Aka

I found it after a few sleepless night. You need to go trough all the records (thousands...) from table ir_model_data and and find the module= web xml_id=brand_promotion.

Аватар
f.welter@netinteract.com
Автор Найкраща відповідь

Great Thanks!!!

0
Аватар
Відмінити
Enjoying the discussion? Don't just read, join in!

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

Реєстрація
Спільнота
  • Навчальний посібник
  • Документація
  • Форум
Open Source
  • Завантаження
  • Github
  • Runbot
  • Переклади
Послуги
  • Хостинг Odoo.sh
  • Підтримка
  • Оновлення
  • Кастомні доробки
  • Навчання
  • Знайдіть бухгалтера
  • Знайдіть партнера
  • Стати партнером
Про нас
  • Наша компанія
  • Торгові активи
  • Зв'яжіться з нами
  • Вакансії
  • Події
  • Подкаст
  • Блог
  • Клієнти
  • Юридичні документи • Конфіденційність
  • Безпека
الْعَرَبيّة 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 - це набір програм для роботи з відкритим кодом, які охоплюють всі ваші потреби компанії: CRM, електронна комерція, бухгалтерський облік, склад, точка продажу, управління проектами тощо.

Унікальна пропозиція Odoo - це одночасно дуже проста у використанні та повністю інтегрована.

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