Skip to Content
Odoo Menu
  • Prisijungti
  • Išbandykite nemokamai
  • Programėlės
    Finansai
    • Apskaita
    • Pateikimas apmokėjimui
    • Sąnaudos
    • Skaičiuoklė (BI)
    • Dokumentai
    • Pasirašymas
    Pardavimai
    • CRM
    • Pardavimai
    • Kasų sistema - Parduotuvė
    • Kasų sistema - Restoranas
    • Prenumeratos
    • Nuoma
    Svetainės
    • Svetainių kūrėjimo įrankis
    • El. Prekyba
    • Internetinis Tinklaraštis
    • Forumas
    • Tiesioginis pokalbis
    • eMokymasis
    Tiekimo grandinė
    • Atsarga
    • Gamyba
    • PLM
    • Įsigijimai
    • Priežiūra
    • Kokybė
    Žmogaus ištekliai
    • Darbuotojai
    • Įdarbinimas
    • Atostogos
    • Įvertinimai
    • Rekomendacijos
    • Transporto priemonės
    Rinkodara
    • Socialinė rinkodara
    • Rinkodara el. paštu
    • SMS rinkodara
    • Renginiai
    • Rinkodaros automatizavimas
    • Apklausos
    Paslaugos
    • Projektas
    • Darbo laiko žiniaraščiai
    • Priežiūros tarnyba
    • Pagalbos tarnyba
    • Planavimas
    • Rezervacijos
    Produktyvumas
    • Diskucija
    • Patvirtinimai
    • IoT
    • VoIP
    • Žinių biblioteka
    • WhatsApp
    Trečiųjų šalių programos Odoo Studija Odoo debesijos platforma
  • Pramonės šakos
    Mažmeninė prekyba
    • Knygynas
    • Drabužių parduotuvė
    • Baldų parduotuvė
    • Maisto prekių parduotuvė
    • Techninės įrangos parduotuvė
    • Žaislų parduotuvė
    Food & Hospitality
    • Barai ir pub'ai
    • Restoranas
    • Greitasis maistas
    • Guest House
    • Gėrimų platintojas
    • Hotel
    Nekilnojamasis turtas
    • Real Estate Agency
    • Architektūros įmonė
    • Konstrukcija
    • Estate Managament
    • Sodininkauti
    • Turto savininkų asociacija
    Konsultavimas
    • Accounting Firm
    • Odoo Partneris
    • Marketing Agency
    • Teisinė firma
    • Talentų paieška
    • Auditai & sertifikavimas
    Gamyba
    • Textile
    • Metal
    • Furnitures
    • Maistas
    • Brewery
    • Įmonių dovanos
    Sveikata & Fitnesas
    • Sporto klubas
    • Akinių parduotuvė
    • Fitneso Centras
    • Sveikatos praktikai
    • Vaistinė
    • Kirpėjas
    Trades
    • Handyman
    • IT įranga ir palaikymas
    • Saulės energijos sistemos
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Kiti
    • Nonprofit Organization
    • Aplinkos agentūra
    • Reklaminių stendų nuoma
    • Fotografavimas
    • Dviračių nuoma
    • Programinės įrangos perpardavėjas
    Browse all Industries
  • Bendrija
    Mokykitės
    • Mokomosios medžiagos
    • Dokumentacija
    • Sertifikatai
    • Mokymai
    • Internetinis Tinklaraštis
    • Tinklalaidės
    Skatinkite švietinimą
    • Švietimo programa
    • Scale Up! Verslo žaidimas
    • Aplankykite Odoo
    Gaukite programinę įrangą
    • Atsisiųsti
    • Palyginkite versijas
    • Leidimai
    Bendradarbiauti
    • Github
    • Forumas
    • Renginiai
    • Vertimai
    • Tapkite partneriu
    • Services for Partners
    • Registruokite jūsų apskaitos įmonę
    Gaukite paslaugas
    • Susiraskite partnerį
    • Susirask buhalterį
    • Susitikti su konsultantu
    • Diegimo paslaugos
    • Klientų rekomendavimas
    • Palaikymas
    • Atnaujinimai
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Gaukite demo
  • Kainodara
  • Pagalba

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

  • CRM
  • e-Commerce
  • Apskaita
  • Atsarga
  • PoS
  • Projektas
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Žymos (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Žymos (View all)
odoo accounting v14 pos v15
About this forum
Pagalba

How to store and add a field in pos product screen odoo 15

Prenumeruoti

Get notified when there's activity on this post

This question has been flagged
NiyasCybrosysv15odoomate
2 Replies
3960 Rodiniai
Portretas
waheed

I want to add button on pos product screen in pos when clicked on the button show number popup while enter number the number should be store on the button label .
created a char field in pos.order the entered number save on that char field.
i wrote i piece of code 
js file:

odoo.define('xy_pos_button.CreateCustomButton', function (require) {
'use strict';

console.log("JS File Loaded");

const { Gui } = require('point_of_sale.Gui');
const PosComponent = require('point_of_sale.PosComponent');
const { posbus } = require('point_of_sale.utils');
const ProductScreen = require('point_of_sale.ProductScreen');
const { useListener } = require('web.custom_hooks');
const Registries = require('point_of_sale.Registries');
const PaymentScreen = require('point_of_sale.PaymentScreen');

class CustomButton extends PosComponent {
constructor() {
super(...arguments);
useListener('click', this.onClick);
}

get ref_order() {
console.log(this.env.pos.get_order(), 'GET POS ORDER');
return this.env.pos.get_order();
}

async onClick() {
const { confirmed, payload: inputNumber } = await this.showPopup('NumberPopup', {
startingValue: this.ref_order,
cheap: true,
isInputSelected: true
});

if (confirmed) {
const delivery_ref_count = parseInt(inputNumber, 10);
const max_capacity = 2 ** 31 - 1;
if (delivery_ref_count > max_capacity) {
await this.showPopup('ErrorPopup', {
title: this.env._t('Blocked action'),
body: _.str.sprintf(
this.env._t('You cannot put a number that exceeds %s '),
max_capacity,
),
});
return;
}
this.env.pos.get_order().set_pos_delivery_order(delivery_ref_count);
}
}
}

CustomButton.template = 'CustomButton';

ProductScreen.addControlButton({
component: CustomButton,
});

Registries.Component.add(CustomButton);

return CustomButton;
});

an other js file

odoo.define('xy_pos_button.popup_note', function (require) {
"use strict";
console.log('POPUP Note Loaded');
var models = require('point_of_sale.models');
const { Gui } = require('point_of_sale.Gui');
const { posbus } = require('point_of_sale.utils');
var _super_order = models.Order.prototype;

models.Order = models.Order.extend({
initialize: function (attr, options) {
_super_order.initialize.apply(this, arguments);
this.pos_delivery_order = this.pos_delivery_order || 1;
this.save_to_db();
},
init: function (parent, options) {
this._super(parent, options);
this.pos.bind('change:selectedOrder', this, this.renderElement);
},
export_as_JSON: function () {
var json = _super_order.export_as_JSON.apply(this, arguments);
json.pos_delivery_order = this.pos_delivery_order;
return json;
},
init_from_JSON: function (json) {
_super_order.init_from_JSON.apply(this, arguments);
this.pos_delivery_order = json.pos_delivery_order || 1;
},
get_pos_delivery_order: function () {
return this.pos_delivery_order;
},
set_pos_delivery_order: function (count) {
this.pos_delivery_order = Math.max(count, 0);
this.trigger('change');
},
});
});

but is does not work
xml







CustomButton



Advance Thanks 

0
Portretas
Atmesti
Portretas
Jainesh Shah(Aktiv Software)
Best Answer

Hey Waheed,


I hope you are doing well.


I'd like to provide you with some screenshots:

Thanks & Regards,
Email:   odoo@aktivsoftware.com    

Skype: kalpeshmaheshwari

0
Portretas
Atmesti
waheed
Autorius

the above code does not work

Portretas
Cybrosys Techno Solutions Pvt.Ltd
Best Answer

Hi,

You can refer to the following links  :


Refer to this blog: https://www.cybrosys.com/blog/how-to-add-custom-screens-in-odoo-15-pos

Videos: https://www.youtube.com/watch?v=QEcow8JNMLQ


Hope it helps

0
Portretas
Atmesti
Enjoying the discussion? Don't just read, join in!

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

Registracija
Related Posts Replies Rodiniai Veikla
Why I am getting error about Max entries
Cybrosys v15 odoomate
Portretas
Portretas
1
vas. 24
2378
PLM Confirm Component Not working without Administrator Settings in Odoo 15, AccessError: Sorry, you are not allowed to access this document.
Niyas Cybrosys niyas odoomate
Portretas
0
gruod. 23
1933
How to Show On Hand Quantity on POS screen in Odoo-15
pos Niyas Cybrosys v15
Portretas
Portretas
1
spal. 23
2237
Create Auto Bill From Picking in Odoo15 Solved
stock_picking Niyas Cybrosys v15
Portretas
Portretas
2
rugs. 23
2373
Odoo database expiration message show again and again Solved
Cybrosys v15
Portretas
Portretas
Portretas
3
gruod. 24
7058
Bendrija
  • Mokomosios medžiagos
  • Dokumentacija
  • Forumas
Atvirasis kodas
  • Atsisiųsti
  • Github
  • Runbot
  • Vertimai
Paslaugos
  • Odoo.sh talpinimas
  • Palaikymas
  • Atnaujinti
  • Pritaikytas programavimo kūrimas
  • Švietimas
  • Susirask buhalterį
  • Susiraskite partnerį
  • Tapkite partneriu
Apie mus
  • Mūsų įmonė
  • Prekės ženklo turtas
  • Susisiekite su mumis
  • Darbo pasiūlymai
  • Renginiai
  • Tinklalaidės
  • Internetinis Tinklaraštis
  • Klientai
  • Teisinis • Privatumas
  • Saugumas
الْعَرَبيّة 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 yra atvirojo kodo verslo programų rinkinys, kuris apima visas įmonės poreikius: CRM, El. Prekybą, Apskaitą, Atsargų, Kasų sistemą, Projektų valdymą ir kt.

Unikali Odoo vertės pasiūla – būti tuo pačiu metu labai lengvai naudojama ir visiškai integruota sistema.

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