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 add a new status to the sales app(quotation) using studio?

Підписатися

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

Це запитання позначене
sale.order.formsale.orderdeveloperv14
2 Відповіді
4778 Переглядів
Аватар
Abdul Razak

Can anyone help me to add a new status in the existing status bar in the quotation. I am using odoo version 14 enterprise edition.

Many thanks.

1
Аватар
Відмінити
Аватар
Gopakumar N G
Найкраща відповідь

You can use the selection_add property in a field definition for achieving this.

state = fields.Selection(selection_add=[('new_status', 'New Status')]

You can add the above code in a new module and also need to add it in the form view by inheriting it.


You need to create a new module for doing the above. You can check the official documentation for getting started with Odoo module development( Module development ). Then inside your module you need to inherit the "sale.order" model and add the field as suggested above. After that you need to add it in the form view of sales order(in an XML file) to see the field in the UI. You can check the documentation for inheritance here Inheritance


Detailed:

Create a folder inside your addons(or create a folder outside of it naming 'custom_addons' and add it in your addons_path) naming 'sale_order_new_status'. Inside that folder add an __init__.py file and __manifest__.py file. In the __initt__.py file you need to import the python files you are going to use for the new module. In the manifest file you can specify the module details and also add the XML files (Manifest File). Then add two folders naming 'models' and 'views' inside your module.

Inside the models folder add two python files naming __init__.py and sale.py. In the '__init__.py' file inside your module add the following line:

from . import models

Then in the __init__.py file inside models folder add the following line:

from . import sale

Then in the sale.py file add the following:

from odoo import fields, models
class SaleOrder(models.Model):
    _inherit = "sale.order"
    state = fields.Selection(selection_add=[('new_status', 'New Status')]


Then add the view inheritance in the sale_views file inside views directory and also mention the file name inside data section of the manifest file.


Then add the file to the manifest file(data section). Then you can go to "Update apps list" inside the Apps menu and then search for your module and install it. You may also need to add python methods for the transition from and to the new status added.

1
Аватар
Відмінити
Abdul Razak
Автор

Since I am new to odoo can you help me where we can put the code and how to inherit it?

Gopakumar N G

I have updated the answer. Hope you can use it to add the new status.

Аватар
Asha
Найкраща відповідь

Inherit model sale.order

then add state=fields.Selection(selection_add=[('new_status', 'New Status')]  in .py 

Inherit the form view sale.view_order_form and add the new status inside the statusbar_visible

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

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

Реєстрація
Related Posts Відповіді Переглядів Дія
How to show sales/purchase (order/quotation) to the new company?
salesteams forum sale.order.form developer v14
Аватар
Аватар
Аватар
2
трав. 22
3092
I need a today filter with confirmed sale order. Вирішено
filter sale.order developer odoo v14
Аватар
Аватар
1
квіт. 22
2702
Modificación Lista de Productos en una Orden de Venta Вирішено
sale.order.line sale.order.form sale.order
Аватар
Аватар
2
квіт. 25
1535
Issue with amount_untaxed field value getting overwritten after saving in sale order module in Odoo14
sale.order compute v14
Аватар
0
січ. 24
169
In which method and module is created new delivery from sale order? Вирішено
delivery sale.order v14
Аватар
Аватар
1
жовт. 21
5528
Спільнота
  • Навчальний посібник
  • Документація
  • Форум
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