Перейти к содержимому
Odoo Меню
  • Войти
  • Попробовать бесплатно
  • Модули
    Финансы
    • Бухгалтерия
    • Выставление счетов
    • Расходы
    • Таблицы
    • Документооборот
    • Подпись
    Продажи
    • CRM
    • Продажи
    • POS Магазин
    • POS Ресторан
    • Подписки
    • Аренда
    Вебсайты
    • Конструктор вебсайтов
    • eCommerce
    • Блог
    • Форум
    • Онлайн-чат
    • Электронное обучение
    Логистика
    • Склад
    • Производство
    • PLM
    • Закупки
    • Обслуживание
    • Качество
    Отдел кадров
    • Сотрудники
    • Подбор персонала
    • Отпуска
    • Оценка персонала
    • Реферальная программа
    • Автопарк
    Маркетинг
    • SMM
    • E-mail рассылки
    • СМС рассылки
    • Мероприятия
    • Автоматизация маркетинга
    • Опросы
    Услуги
    • Проекты
    • Табели
    • Выездной сервис
    • Поддержка
    • Планирование
    • Встречи
    Продуктивность
    • Обсуждения
    • Согласование
    • IoT
    • VoIP-телефония
    • Knowledge
    • WhatsApp
    Сторонние приложения Модуль Студия Odoo Платформа Odoo Cloud
  • Индустрии
    Розничная торговля
    • Книжный магазин
    • Магазин одежды
    • Мебельный магазин
    • Продуктовый магазин
    • Строительный магазин
    • Магазин игрушек
    Гостинично-ресторанный бизнес
    • Бар и паб
    • Ресторан
    • Фастфуд
    • Гостевой дом
    • Дистрибьютор напитков
    • Отель
    Недвижимость
    • Агентство недвижимости
    • Архитектурное бюро
    • Строительство
    • Управление недвижимостью
    • Ландшафтный дизайн
    • Товарищество собственников жилья
    Консалтинг
    • Бухгалтерская фирма
    • Партнер Odoo
    • Маркетинговое агентство
    • Юридическая фирма
    • Подбор персонала
    • Аудиторское бюро
    Производство
    • Текстиль
    • Металл
    • Мебель
    • Продукты питания
    • Пивоварня
    • Корпоративные сувениры
    Здоровье и фитнес
    • Спортивный комплекс
    • Магазин оптики
    • Фитнес-клуб
    • Велнес-центр
    • Аптека
    • Салон красоты
    Услуги
    • Специалист по бытовым услугам
    • Продажа и обслуживание IT-оборудования
    • Солнечные энергосистемы
    • Производство обуви
    • Клининг
    • Системы ОВКВ
    Прочее
    • Некоммерческая организация
    • Консалтинг в сфере устойчивого развития
    • Аренда рекламных щитов
    • Бизнес по фотосъемке
    • Прокат велосипедов
    • Реселлер программного обеспечения
    Все индустрии
  • Community
    Обучение
    • Видео уроки
    • Документация
    • Сертификация
    • Тренинг
    • Блог
    • Подкаст
    Образование и развитие
    • Образовательная программа
    • Деловая игра Scale Up!
    • Экскурсия в офис Odoo
    ПО
    • Скачать
    • Сравнить версии
    • Релизы
    Сотрудничество
    • Github
    • Форум
    • Мероприятия
    • Перевод
    • Стать партнером
    • Услуги для партнеров
    • Зарегистрировать бухгалтерскую фирму
    Услуги
    • Найти партнера
    • Найти бухгалтера
    • Встреча с экспертом
    • Услуги по внедрению
    • Отзывы клиентов
    • Поддержка
    • Обновления
    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
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Все посты Люди Значки
Теги (Смотреть все)
odoo accounting v14 pos v15
Об этом форуме
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Все посты Люди Значки
Теги (Смотреть все)
odoo accounting v14 pos v15
Об этом форуме
Помощь

Call view from 'More'/'Action' Menu

Подписаться

Получайте уведомления о появлении активности в этом посте

Этот вопрос был отмечен
actionmenuir.valuesodoo10More-Menu
4 Ответы
8983 Представления
Аватар
Roland Seifriedsberger

Hello!

I want to call views with some added entries in the 'More'/'Action' Menu. 

I created following code to do this in a Modul 'fc_menu', but the 'More'/'Action' Menu is not displayed.

Does somebody know what is wrong in my code or give me a solution for this?


Here is the code...

File "fc_models.py" :

# -*- coding: utf-8 -*-

from odoo import models, fields, api

class InputCockpitTest(models.TransientModel):
    _name = 'fc.input.cockpit'
    _description = 'A model for testing the input cockpit'
    input_cockpit_name = fields.Char('Input-Cockpit-Name' , Required=False)

File "fc_menu_view.xml" => Menu entry leading to main view :

<menuitem id="fc_input_cockpit_menu" name="Input cockpit"
                  parent="fc_cockpits_menu"
                  action="fc_action_input_cockpit"
                  sequence="1"/>

Action, View and More Menu of main view :

        <!-- input cockpit dashboard Action-->
        <record id="fc_action_input_cockpit" model="ir.actions.act_window">
            <field name="name">Input Cockpit Action</field>
            <field name="type">ir.actions.act_window</field>
            <field name="res_model">fc.input.cockpit</field>
            <field name="view_type">form</field>
            <field name="view_mode">form</field>
            <field name="usage">menu</field>
            <field name="view_id" ref="fc_view_input_cockpit"/>
            <field name="help" type="html">
              <div class="oe_empty_custom_dashboard">
                  <p>
                    <b>Your input cockpit dashboard is empty.</b>
                  </p>
              </div>
            </field>
        </record>

        <!-- input cockpit dashboard View-->
        <record model="ir.ui.view" id="fc_view_input_cockpit">
            <field name="name">Dashboard input cockpit</field>
            <field name="model">fc.input.cockpit</field>
            <field name="arch" type="xml">
                <form string="Input Cockpit Dashboard">
                    <board style="2-1">
                        <column>
                            <field name="input_cockpit_name"/>
                        </column>
                    </board>
                </form>
            </field>
        </record>

        <!-- input cockpit More Action Menu - Test entry 1 -->
        <record id="fc_ir_values_input_cockpit" model="ir.values">
            <field name="model_id" ref="fc_menu.model_fc_input_cockpit" />
            <field name="name">Input Cockpit test</field>
            <field name="key2">client_action_multi</field>
            <field name="value" eval="'ir.actions.act_window,' + str(ref('fc_action_input_cockpit_test'))" />
            <field name="key">action</field>
            <field name="model">fc.input.cockpit</field>
        </record>

        <!-- input cockpit More Action Menu - Test entry 2 -->
        <record id="fc_ir_values_input_cockpit_2" model="ir.values">
            <field name="model_id" ref="fc_menu.model_fc_input_cockpit" />
            <field name="name">Input Cockpit test 2</field>
            <field name="key2">client_action_multi</field>
            <field name="value" eval="'ir.actions.act_window,' + str(ref('fc_action_input_cockpit_test_2'))" />
            <field name="key">action</field>
            <field name="model">fc.input.cockpit</field>
        </record>

Goal View / Action of entry 1 in 'More'/'Action' Menu :

        <!-- input cockpit test Action-->
        <record id="fc_action_input_cockpit_test" model="ir.actions.act_window">
            <field name="name">Input Cockpit Test Action</field>
            <field name="type">ir.actions.act_window</field>
            <field name="res_model">fc.input.cockpit</field>
            <field name="view_type">form</field>
            <field name="view_mode">form</field>
            <field name="view_id" ref="fc_view_input_cockpit_test"/>
            <field name="target">current</field>
            <field name="multi">True</field>
            <field name="help" type="html">
              <div class="oe_empty_custom_dashboard">
                  <p>
                    <b>Your input cockpit test view is empty.</b>
                  </p>
              </div>
            </field>
        </record>

        <!-- input cockpit test View-->
        <record id="fc_view_input_cockpit_test" model="ir.ui.view">
            <field name="name">Input Cockpit Test View</field>
            <field name="model">fc.input.cockpit</field>
            <field name="arch" type="xml">
                <form string="Input Cockpit" version="7.0">

                    <!-- Design Form or put your field here -->                
                    <footer>
                        <!-- Add button on footer of pop-up window -->
                    </footer>
               </form>
            </field>
        </record>


I hope anyone can help me please finding a solution to call views from 'More'/'Action' Menu!

Many Thanks in advance!



0
Аватар
Отменить
Pranav P S

Did you checked action menu in settings front end.

This might not be added to more menu by default.

Roland Seifriedsberger
Автор

Hello, thanks for your answer!

Sorry but I did not know what you mean?

Could please explan where exactly to change some settings?

Аватар
Mitul Shingala
Лучший ответ

Hello

try this example. and make yourself sure that you register  .xml file into your __manifest__.py file

        <record model="ir.values" id="record_unique_id">
            <field name="model_id" ref="modulename.model_object_name" />
            <field name="name">ANY VALUE</field>
            <field name="key2">client_action_multi</field>
            <field name="value" eval="'ir.actions.act_window,' +str(ref('your_Action_id'))" />
            <field name="key">action</field>
            <field name="model">object_name</field>
        </record>
or make the action with below action
 <act_window id="action_wizard_small" 
name="My Invoice"
src_model="account.invoice"
res_model="wizard.small"
view_type="form"
view_mode="form"
key2="client_action_multi"
target="new" /> 
0
Аватар
Отменить
Roland Seifriedsberger
Автор

Hello, thanks for your answers!

With following code it was possible to add an entry in the 'More'/'Action' Menu.

<act_window id="fc_action_input_cockpit_more_button" name="More-Button-Test" res_model="board.board" src_model="fc.input.cockpit" view_type="form" view_mode="form" key2="client_action_multi" multi="False" target="new"/>

But 'More'/'Action' Menu is only displayed after I created a record, and not on initial view!

See following pictures...

1) Initial view where no record is created - here the 'More'/'Action' Menu is not displayed:

2) View after created a record - here it is displayed correctly:

Could somebody please tell me how it is possible to show the 'More'/'Action' Menu already on initial view when no records are created?

Many thanks in advance!

Mitul Shingala

the more/action button only visible when the one or more record is selected. if there is not record then it will not display.

Roland Seifriedsberger
Автор

Thank you Mitul! That's an important information, I did not know it. Kind regards and many thanks for your help!

Аватар
Roland Seifriedsberger
Автор Лучший ответ

Hello, thanks for your answers!

With following code it was possible to add an entry in the 'More'/'Action' Menu.

<act_window id="fc_action_input_cockpit_more_button" name="More-Button-Test" res_model="board.board" src_model="fc.input.cockpit" view_type="form" view_mode="form" key2="client_action_multi" multi="False" target="new"/>


But 'More'/'Action' Menu is only displayed after I created a record, and not on initial view!

See following pictures... (Sorry, I tried to add pictures but I got an error when storing them!)

1) Initial view where no record is created - here the 'More'/'Action' Menu is not displayed:


2) View after created a record - here it is displayed correctly:



Could somebody please tell me how it is possible to show the 'More'/'Action' Menu already on initial view when no records are created?

Many thanks in advance!

0
Аватар
Отменить
Не оставайтесь в стороне – присоединяйтесь к обсуждению!

Создайте аккаунт сегодня, чтобы получить доступ к эксклюзивным функциям и стать частью нашего замечательного сообщества!

Регистрация
Похожие посты Ответы Просмотры Активность
odoo 10 action menu button
action menu odoo10
Аватар
Аватар
1
июн. 17
4827
Assign action menu item to specific tree view
action menu odoo9 odoo10
Аватар
Аватар
Аватар
7
июл. 23
22938
[odoo10] default search for sub-menu
menu odoo10
Аватар
Аватар
2
сент. 18
3597
Menus: which method is being called?
action menu
Аватар
0
мая 15
4333
How to create a menu without action
action menu
Аватар
0
мар. 15
4730
Сообщество
  • Видео уроки
  • Документация
  • Форум
Открытый исходный код
  • Скачать
  • Github
  • Runbot
  • Перевод
Услуги
  • Хостинг Odoo.sh
  • Поддержка
  • Обновление
  • Индивидуальные решения по доработке
  • Образование
  • Найти бухгалтера
  • Найти партнера
  • Стать партнером
О нас
  • Наша компания
  • Активы бренда
  • Cвяжитесь с нами
  • Вакансии
  • Мероприятия
  • Подкаст
  • Блог
  • Клиенты
  • Правовые документы • Конфиденциальность
  • Безопасность
الْعَرَبيّة 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, E-commerce, Бухгалтерия, Склад, POS, управление проектами и др.

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