Skip to Content
Odoo Menu
  • Log ind
  • Prøv gratis
  • Apps
    Økonomi
    • Bogføring
    • Fakturering
    • Udgifter
    • Regneark (BI)
    • Dokumenter
    • e-Signatur
    Salg
    • CRM
    • Salg
    • POS Butik
    • POS Restaurant
    • Abonnementer
    • Udlejning
    Hjemmeside
    • Hjemmesidebygger
    • e-Handel
    • Blog
    • Forum
    • LiveChat
    • e-Læring
    Forsyningskæde
    • Lagerbeholdning
    • Produktion
    • PLM
    • Indkøb
    • Vedligeholdelse
    • Kvalitet
    HR
    • Medarbejdere
    • Rekruttering
    • Fravær
    • Medarbejdersamtaler
    • Anbefalinger
    • Flåde
    Marketing
    • Markedsføring på sociale medier
    • E-mailmarketing
    • SMS-marketing
    • Arrangementer
    • Automatiseret marketing
    • Spørgeundersøgelser
    Tjenester
    • Projekt
    • Timesedler
    • Udkørende Service
    • Kundeservice
    • Planlægning
    • Aftaler
    Produktivitet
    • Dialog
    • Godkendelser
    • IoT
    • VoIP
    • Vidensdeling
    • WhatsApp
    Tredjepartsapps Odoo Studio Odoo Cloud-platform
  • Brancher
    Detailhandel
    • Boghandel
    • Tøjforretning
    • Møbelforretning
    • Dagligvarebutik
    • Byggemarked
    • Legetøjsforretning
    Mad og værtsskab
    • Bar og pub
    • Restaurant
    • Fastfood
    • Gæstehus
    • Drikkevareforhandler
    • Hotel
    Ejendom
    • Ejendomsmægler
    • Arkitektfirma
    • Byggeri
    • Ejendomsadministration
    • Havearbejde
    • Boligejerforening
    Rådgivning
    • Regnskabsfirma
    • Odoo-partner
    • Marketingbureau
    • Advokatfirma
    • Rekruttering
    • Audit & certificering
    Produktion
    • Tekstil
    • Metal
    • Møbler
    • Fødevareproduktion
    • Bryggeri
    • Firmagave
    Heldbred & Fitness
    • Sportsklub
    • Optiker
    • Fitnesscenter
    • Kosmetolog
    • Apotek
    • Frisør
    Håndværk
    • Handyman
    • IT-hardware og support
    • Solenergisystemer
    • Skomager
    • Rengøringsservicer
    • VVS- og ventilationsservice
    Andet
    • Nonprofitorganisation
    • Miljøagentur
    • Udlejning af billboards
    • Fotografi
    • Cykeludlejning
    • Softwareforhandler
    Gennemse alle brancher
  • Community
    Få mere at vide
    • Tutorials
    • Dokumentation
    • Certificeringer
    • Oplæring
    • Blog
    • Podcast
    Bliv klogere
    • Udannelselsesprogram
    • Scale Up!-virksomhedsspillet
    • Besøg Odoo
    Få softwaren
    • Download
    • Sammenlign versioner
    • Udgaver
    Samarbejde
    • Github
    • Forum
    • Arrangementer
    • Oversættelser
    • Bliv partner
    • Tjenester til partnere
    • Registrér dit regnskabsfirma
    Modtag tjenester
    • Find en partner
    • Find en bogholder
    • Kontakt en rådgiver
    • Implementeringstjenester
    • Kundereferencer
    • Support
    • Opgraderinger
    Github Youtube Twitter LinkedIn Instagram Facebook Spotify
    +1 (650) 691-3277
    Få en demo
  • Prissætning
  • Hjælp

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

  • CRM
  • e-Commerce
  • Bogføring
  • Lager
  • PoS
  • Projekt
  • MRP
All apps
Du skal være registreret for at interagere med fællesskabet.
All Posts People Emblemer
Tags (View all)
odoo accounting v14 pos v15
Om dette forum
Du skal være registreret for at interagere med fællesskabet.
All Posts People Emblemer
Tags (View all)
odoo accounting v14 pos v15
Om dette forum
Hjælp

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

Tilmeld

Få besked, når der er aktivitet på dette indlæg

Dette spørgsmål er blevet anmeldt
productdatabase
4 Besvarelser
10420 Visninger
Avatar
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
Avatar
Kassér
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
Forfatter

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!

Avatar
Matthew Fournier
Bedste svar

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
Avatar
Kassér
matheus
Forfatter

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!

Avatar
swapnil wagh
Bedste svar

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
Avatar
Kassér
matheus
Forfatter

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
Forfatter

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.

Avatar
Acespritech Solutions Private Limited
Bedste svar

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
Avatar
Kassér
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?

Avatar
matheus
Forfatter Bedste svar

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
Avatar
Kassér
Enjoying the discussion? Don't just read, join in!

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

Tilmeld dig
Related Posts Besvarelser Visninger Aktivitet
in which file Odoo manipulate product table ???
product database
Avatar
Avatar
Avatar
2
mar. 15
6521
Import products in db odoo 13
product database odoo
Avatar
1
nov. 22
2727
One image for many products
product image database
Avatar
0
jun. 22
2913
Database and product
product database edit
Avatar
0
jul. 15
6580
how to access to openerp data base
product database delete
Avatar
Avatar
1
mar. 15
5159
Community
  • Tutorials
  • Dokumentation
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Oversættelser
Tjenester
  • Odoo.sh-hosting
  • Support
  • Opgradere
  • Individuelt tilpasset udvikling
  • Uddannelse
  • Find en bogholder
  • Find en partner
  • Bliv partner
Om os
  • Vores virksomhed
  • Brandaktiver
  • Kontakt os
  • Stillinger
  • Arrangementer
  • Podcast
  • Blog
  • Kunder
  • Juridiske dokumenter • Privatlivspolitik
  • Sikkerhedspolitik
الْعَرَبيّة 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 er en samling open source-forretningsapps, der dækker alle dine virksomhedsbehov – lige fra CRM, e-handel og bogføring til lagerstyring, POS, projektledelse og meget mere.

Det unikke ved Odoo er, at systemet både er brugervenligt og fuldt integreret.

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