Перейти к содержимому
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
Об этом форуме
Помощь

Is it possible to create a script / command to make the point of sale recognize new products without refresh?

Подписаться

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

Этот вопрос был отмечен
productdatabase
4 Ответы
10410 Представления
Аватар
matheus

And how hard would be such implementation? Right now if you create a new product while the point of sale is open it doesn't recognize the product, so i'm considering doing some code to make the point of sale continuosly look for new products WHILE it is working. Thanks in advance!

2
Аватар
Отменить
Lorenzo Cabrini

It could probably be done but I can't help asking myself how common of a use case it is. Do the benefits warrant the added complexity/risk of bugs? How often do you introduce new products while your POS terminals are active? But, then again, I could be wrong.

matheus
Автор

Grazie mille per la attenzione Lorenzo.. and yes the benefits exceeds the risks involved, this is more a need than a desire actually. Please I don't say this in a arrogant way, but I know quite a lot of business owners like me so i can confidentelly say that this is necessary. Most stores receives products on a daily basis and if there's a way, at least a kickstart on how to update the current products on the point of sale without having to refresh the page I would gladly try to develop such feature and in the future share with the community. Thanks again!

Аватар
Matthew Fournier
Лучший ответ

Felt like this warranted an answer, rather than a comment.

First, in screens.js, in the finishOrder function, add this line after the destroy() call that's already there:

$.when(this.pos.load_server_data());

This will cause the program to wait until the server data is all loaded before continuing. This kills the null errors, but causes a few quirks. The first and most annoying is that the categories get added in again whenever you make a new order, so go into db.js, and find the add_categories function. At the top of the function (Just after the self declaration) add this:

this.category_childs = {};

To reset them. Another problem is that the view doesn't refresh automatically. After you go to the products page, there will be a bit of a delay, a loading circle, and then you'll still be on the same page. This solution is a bit of a hackjob, but I'll update it if I find a more elegant solution.

First step is find every line of "this.product_categories_widget" and replace it with "this.pos.product_categories_widget" This will let us find the widget through the pos object in the FinishOrder button. There, replace your finishOrder function with this one:

       finishOrder: function() {
        var self = this;
        this.pos.get('selectedOrder').destroy();
        $.when(this.pos.load_server_data())
        .done(function() {  
            self.pos.product_categories_widget.reset_category();
            }).fail(function() {
        });
        },

There's still a gap between making a sale and the view updating, but it will refresh with no button presses from you, and you're ready to sell again right away. As fast as I tried, I couldn't "beat" the loading with a new sale, so that might be a problem with the solution, but it should reload properly every time in normal use.

1
Аватар
Отменить
matheus
Автор

From Matthew to Matthew, thanks very much! I'm terribly sorry for taking so long for marking this brilliant suggestion as an answer, this is a very good solution. I tottaly forgot my profile here after a few delusions, now faith in help.openerp is restored!

Аватар
swapnil wagh
Лучший ответ

Hi matheus,

Write this this.pos = new module.PosModel(this.session); line on Next Order button click code it will fetch newly added Products, Partners for next order.

1
Аватар
Отменить
matheus
Автор

Hi swapnil, it's a brilliant idea! And for me as it looks it would work right away, but guess i must be doing something wrong.. you're talking about the screen.js file right? My line after the modification looks like this

> click: function() { self.finishOrder(); this.pos = new module.PosModel(this.session); },

But it's not doing anything, i've trying all kinds of syntax variations.. is this working for you? Thanks a lot for your help!

swapnil wagh

Hi Matheus,

You just write the code on wrong place there is method finishOrder() just below the click: function() { self.finishOrder();}, this put the code this.pos = new module.PosModel(this.session); in that function... Hope this will work for you

Cheers, swapnil

matheus
Автор

I've made the correction now it looks like this: finishOrder: function() { this.pos.get('selectedOrder').destroy(); this.pos = new module.PosModel(this.session); }, BUT i get this error whenenever i press any button on the screen 'Uncaught Error: QWeb2 - template['PosTicket']: Runtime Error: TypeError: Cannot read property 'attributes' of null' and still it's not loading recently add products.. any suggestion swapnil?

Matthew Fournier

If you're still around, I am also having trouble getting your code to work. Getting the same error.

Matthew Fournier

Okay, so, I've done more research, and even though I haven't gotten it working, maybe if I post my findings it could help you.

The problem is in the loading of the database. The program keeps running while it waits for the data to load, so when it reloads the XML file, there's no data. I've tried to block the function until it's done loading, then manually reload the XML file, but I've been unsuccessful. I'm not sure how to wait on making the POS object, as it doesn't return a deferred, but calls a function that does. I need to do more research on asynchronous javascript.

Аватар
Acespritech Solutions Private Limited
Лучший ответ

Hello !

It is possible to update product list but we have to reload it manually.
As you can see in attached image, we are updating Quantity on Hand run time after completion of order process.

pos.png

Thanks,
Acespritech Solutions Pvt. Ltd.
www.acespritech.com
Blog: acespritechblog.wordpress.com
Mail: info@acespritech.com
Skype: acespritech
Gtalk: acespritech

1
Аватар
Отменить
Matthew Fournier

I see you guys post on a bunch of different questions but you never seem to explain how to do anything. You just direct people to your blog which pretty much says "we did this" but you don't post code or anything. I get that you guys figured out how to solve this problem, but it's not really helping us with the same problem, now is it?

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

Hi swapnil, it's a brilliant idea! And for me as it looks it would work right away, but guess i must be doing something wrong.. you're talking about the screen.js file right? My line after the modification looks like this

click: function() { self.finishOrder(); this.pos = new module.PosModel(this.session); },

But it's not doing anything, i've trying all kinds of syntax variations.. is this working for you? Thanks a lot for your help!

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

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

Регистрация
Похожие посты Ответы Просмотры Активность
in which file Odoo manipulate product table ???
product database
Аватар
Аватар
Аватар
2
мар. 15
6514
Import products in db odoo 13
product database odoo
Аватар
1
нояб. 22
2724
One image for many products
product image database
Аватар
0
июн. 22
2909
Database and product
product database edit
Аватар
0
июл. 15
6573
how to access to openerp data base
product database delete
Аватар
Аватар
1
мар. 15
5149
Сообщество
  • Видео уроки
  • Документация
  • Форум
Открытый исходный код
  • Скачать
  • 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