Overslaan naar inhoud
Odoo Menu
  • Aanmelden
  • Probeer het gratis
  • Apps
    Financiën
    • Boekhouding
    • Facturatie
    • Onkosten
    • Spreadsheet (BI)
    • Documenten
    • Ondertekenen
    Verkoop
    • CRM
    • Verkoop
    • Kassasysteem winkel
    • Kassasysteem Restaurant
    • Abonnementen
    • Verhuur
    Websites
    • Websitebouwer
    • E-commerce
    • Blog
    • Forum
    • Live Chat
    • E-learning
    Bevoorradingsketen
    • Voorraad
    • Productie
    • PLM
    • Inkoop
    • Onderhoud
    • Kwaliteit
    Personeelsbeheer
    • Werknemers
    • Werving & Selectie
    • Verlof
    • Evaluaties
    • Aanbevelingen
    • Wagenpark
    Marketing
    • Sociale media-marketing
    • E-mailmarketing
    • Sms-marketing
    • Evenementen
    • Marketingautomatisering
    • Enquêtes
    Diensten
    • Project
    • Urenstaten
    • Buitendienst
    • Helpdesk
    • Planning
    • Afspraken
    Productiviteit
    • Chat
    • Artificiële Intelligentie
    • IoT
    • VoIP
    • Kennis
    • WhatsApp
    Apps van derden Odoo Studio Odoo Cloud Platform
  • Bedrijfstakken
    Detailhandel
    • Boekhandel
    • kledingwinkel
    • Meubelwinkel
    • Supermarkt
    • Bouwmarkt
    • Speelgoedwinkel
    Horeca & Hospitality
    • Bar en café
    • Restaurant
    • Fastfood
    • Gastenverblijf
    • Drankenhandelaar
    • Hotel
    Vastgoed
    • Makelaarskantoor
    • Architectenbureau
    • Bouw
    • Vastgoedbeheer
    • Tuinieren
    • Vereniging van mede-eigenaren
    Consulting
    • Accountantskantoor
    • Odoo Partner
    • Marketingbureau
    • Advocatenkantoor
    • Talentenwerving
    • Audit & Certificering
    Productie
    • Textiel
    • Metaal
    • Meubels
    • Eten
    • Brouwerij
    • Relatiegeschenken
    Gezondheid & Fitness
    • Sportclub
    • Opticien
    • Fitnesscentrum
    • Wellness-medewerkers
    • Apotheek
    • Kapper
    Diensten
    • Klusjesman
    • IT-hardware & ondersteuning
    • Zonne-energiesystemen
    • Schoenmaker
    • Schoonmaakdiensten
    • HVAC-diensten
    Andere
    • Non-profitorganisatie
    • Milieuagentschap
    • Verhuur van Billboards
    • Fotograaf
    • Fietsleasing
    • Softwareverkoper
    Alle bedrijfstakken bekijken
  • Community
    Leren
    • Tutorials
    • Documentatie
    • Certificeringen
    • Training
    • Blog
    • Podcast
    Versterk het onderwijs
    • Onderwijsprogramma
    • Scale Up! Business Game
    • Odoo bezoeken
    Download de Software
    • Downloaden
    • Vergelijk edities
    • Releases
    Werk samen
    • Github
    • Forum
    • Evenementen
    • Vertalingen
    • Partner worden
    • Diensten voor partners
    • Registreer je accountantskantoor
    Diensten
    • Vind een partner
    • Vind een boekhouder
    • Een adviseur ontmoeten
    • Implementatiediensten
    • Klantreferenties
    • Ondersteuning
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Vraag een demo aan
  • Prijzen
  • Help
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Alle posts Personen Badges
Labels (Bekijk alle)
odoo accounting v14 pos v15
Over dit forum
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Alle posts Personen Badges
Labels (Bekijk alle)
odoo accounting v14 pos v15
Over dit forum
Help

Odoo16 : Open Line Edit page while scanning Product Barcode in Inventory Adjustment

Inschrijven

Ontvang een bericht wanneer er activiteit is op deze post

Deze vraag is gerapporteerd
barcodescannerbarcodesbarcode-scannerbarcodeappBarcode
2471 Weergaven
Avatar
Kaushal Dhamelia

​In Odoo 16 Default functionality is to show the line of stock.quant on scanning the product barcode. this line contain four buttons edit with pencil logo, calcel button with 'X' logo, quantity increment and decrement button


Now I am developing the functionality that will provide opening the line edit view on Product Barcode scan.

while doing so I am facing the issue that all the default buttons like validate and discard are not functional and I am being stuck on that line edit view.

I did debug the code and get to know that, before appearing the line the code comes to the method in Enterprise/stock_barcode/static/src/components/main -> _scrollToSelectedLine() ​

which is as below

_scrollToSelectedLine() {
if (!this.displayBarcodeLines) {
this._scrollBehavior = 'auto';
return;
}
let selectedLine = document.querySelector('.o_sublines .o_barcode_line.o_highlight');
const isSubline = Boolean(selectedLine);
if (!selectedLine) {
selectedLine = document.querySelector('.o_barcode_line.o_highlight');
}
if (!selectedLine) {
const matchingLine = this.env.model.findLineForCurrentLocation();
if (matchingLine) {
selectedLine = document.querySelector(`.o_barcode_line[data-virtual-id="${matchingLine.virtual_id}"]`);
}
}
if (selectedLine) {
// If a line is selected, checks if this line is on the top of the
// page, and if it's not, scrolls until the line is on top.
const header = document.querySelector('.o_barcode_header');
const lineRect = selectedLine.getBoundingClientRect();
const navbar = document.querySelector('.o_main_navbar');
const page = document.querySelector('.o_barcode_lines');
// Computes the real header's height (the navbar is present if the page was refreshed).
const headerHeight = navbar ? navbar.offsetHeight + header.offsetHeight : header.offsetHeight;
if (lineRect.top (headerHeight + lineRect.height)) {
let top = lineRect.top - headerHeight + page.scrollTop;
if (isSubline) {
const parentLine = selectedLine.closest('.o_barcode_lines > .o_barcode_line');
const parentSummary = parentLine.querySelector('.o_barcode_line_summary');
top -= parentSummary.getBoundingClientRect().height;
}
page.scroll({ left: 0, top, behavior: this._scrollBehavior });
this._scrollBehavior = 'smooth';
}
var lines = this.lines;
var last_line = lines[lines.length - 1];
bus.trigger('edit-line', { line: last_line });
}
}

in the above method, I have written my custom code in bold font.
If anyone knows how to correct it or if anyone have a better solution then please let me know 





0
Avatar
Annuleer
Geniet je van het gesprek? Blijf niet alleen lezen, doe ook mee!

Maak vandaag nog een account aan om te profiteren van exclusieve functies en deel uit te maken van onze geweldige community!

Aanmelden
Gerelateerde posts Antwoorden Weergaven Activiteit
Cómo configurar código de barra para productos pesables
barcodescanner barcodes barcode-scanner Barcode
Avatar
0
jun. 24
3487
[Solved]Barcode scanning at POS , sell price won't pick up correctly. Opgelost
barcodescanner pos barcode barcodes barcode-scanner
Avatar
2
dec. 23
7954
Barcode Module reset picked products
barcodeapp Barcode
Avatar
0
aug. 24
1488
Read the last characters when scanning product barcodes
barcodescanner Barcode
Avatar
Avatar
2
apr. 24
1912
GS1 Barcode Pack Date Not Being Set
barcode barcode-scanner Barcode
Avatar
Avatar
1
jun. 25
2240
Community
  • Tutorials
  • Documentatie
  • Forum
Open Source
  • Downloaden
  • Github
  • Runbot
  • Vertalingen
Diensten
  • Odoo.sh Hosting
  • Ondersteuning
  • Upgrade
  • Gepersonaliseerde ontwikkelingen
  • Onderwijs
  • Vind een boekhouder
  • Vind een partner
  • Partner worden
Over ons
  • Ons bedrijf
  • Merkelementen
  • Neem contact met ons op
  • Vacatures
  • Evenementen
  • Podcast
  • Blog
  • Klanten
  • Juridisch • Privacy
  • Beveiliging
الْعَرَبيّة 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 Svenska ภาษาไทย Türkçe українська Tiếng Việt

Odoo is een suite van open source zakelijke apps die aan al je bedrijfsbehoeften voldoet: CRM, E-commerce, boekhouding, inventaris, kassasysteem, projectbeheer, enz.

Odoo's unieke waardepropositie is om tegelijkertijd zeer gebruiksvriendelijk en volledig geïntegreerd te zijn.

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