İçereği Atla
Odoo Menü
  • Portal
  • Ücretsiz deneyin
  • Uygulamalar
    Finans
    • Muhasebe
    • Faturalama
    • Masraf Yönetimi
    • Elektronik Çizelge (BI)
    • Belgeler
    • İmza
    Satış
    • Müşteri İlişkileri Yönetimi (CRM)
    • Satış
    • Satış Noktası Mağaza
    • Satış Noktası Restoran
    • Abonelikler
    • Kiralama
    Web Sitesi
    • Web Sitesi Oluşturucu
    • eTicaret
    • Blog
    • Forum
    • Canlı Sohbet
    • eÖğrenme
    Tedarik Zinciri
    • Envanter
    • Üretim
    • Ürün Yaşam Döngüsü Yönetimi
    • Satın Alma
    • Bakım
    • Kalite
    İnsan Kaynakları
    • Çalışanlar
    • İşe Alım
    • İzin
    • Değerlendirme
    • Referans
    • Filo Yönetimi
    Pazarlama
    • Sosyal Medyada Pazarlama
    • E-posta ile Pazarlama
    • SMS ile Pazarlama
    • Etkinlikler
    • Pazarlama Otomasyonu
    • Anket
    Hizmetler
    • Proje Yönetimi
    • Çalışma Çizelgeleri
    • Saha Hizmeti
    • Yardım Masası
    • Planlama
    • Randevular
    Verimlilik
    • Sohbet
    • Onay
    • Nesnelerin İnterneti
    • VoIP
    • Bilgi Bankası
    • WhatsApp
    Üçüncü taraf uygulamalar Odoo Stüdyo Odoo Bulut Platformu
  • Sektörler
    Perakende satış
    • Kitapçı
    • Giyim Mağazası
    • Mobilya Mağazası
    • Gıda Marketi
    • Hırdavat Dükkanı
    • Oyuncak Dükkanı
    Gıda ve Konaklama
    • Bar ve Pub
    • Restoran
    • Fast Food Restoranı
    • Konuk Evi
    • İçecek Distribütörü
    • Otel
    Gayrimenkul
    • Emlak Acentesi
    • Mimarlık Firması
    • İnşaat
    • Emlak Yönetimi
    • Bahçe Tasarımı
    • Mülk Sahipleri Derneği
    Uzmanlık
    • Muhasebe Firması
    • Odoo Partner
    • Pazarlama Ajansı
    • Hukuk Firması
    • Yetenek Kazanımı
    • Denetim ve Belgelendirme
    Üretim
    • Tekstil
    • Metal
    • Mobilyalar
    • Gıda
    • Bira fabrikası
    • Kurumsal Hediye
    Sağlık ve Spor
    • Spor Kulübü
    • Optik Mağazası
    • Fitness Merkezi
    • Sağlıklı Yaşam Merkezi
    • Eczane
    • Kuaför Salonu
    Ticaret
    • Tamirci
    • BT Donanım & Destek
    • Güneş Enerjisi Sistemleri
    • Ayakkabı İmalatçısı
    • Temizlik Hizmetleri
    • HVAC Hizmetleri
    Diğerleri
    • Kar Amacı Gütmeyen Kuruluş
    • Çevre Ajansı
    • Reklam Panosu Kiralama
    • Fotoğrafçılık
    • Bisiklet Kiralama
    • Yazılım Bayisi
    Tüm Sektörlere Göz Atın
  • Topluluk
    Öğrenim
    • Eğitim Araçları
    • Dokümantasyon
    • Sertifikasyonlar
    • Eğitim Etkinlikleri
    • Blog
    • Podcast
    Eğitim ve Gelişim
    • Eğitim Programı
    • Scale Up! İşletme Oyunu
    • Odoo'yu Ziyaret Edin
    Yazılım
    • İndirin
    • Sürümleri Kıyaslayın
    • Sürümler
    İş Birliği
    • Github
    • Forum
    • Etkinlikler
    • Çeviriler
    • Partner Olun
    • Partnerler için Hizmetler
    • Muhasebe Firmanızı Kaydettirin
    Hizmetler
    • Partner Bulun
    • Muhasebeci Bulun
    • Bir danışmanla görüşün
    • Kurulum Hizmetleri
    • Müşteri Referansları
    • Destek
    • Sürüm Yükseltme
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Demo randevusu alın
  • Fiyatlandırma
  • Yardım

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

  • Müşteri İlişkileri Yönetimi
  • e-Commerce
  • Muhasebe
  • Envanter
  • PoS
  • Proje Yönetimi
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Etiketler (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Etiketler (View all)
odoo accounting v14 pos v15
About this forum
Yardım

Add Button To Point of Sale

Abone Ol

Get notified when there's activity on this post

Bu soru işaretlendi
posbuttoncustom_module
2 Cevaplar
12060 Görünümler
Avatar
Ameen

I am very new to Odoo  and I am trying to add a simple button to the POS left pane by creating a custom module that extends POS. I have tried several code samples I found on the internet but nothing is working.

I have Odoo 11.0 installed on C:\Program Files (x86)\Odoo 11.0. I created a custome module (rpos) using the scaffold command in C:\User\[username]\Odoo\rpos

Here is my code.

views/templates.xml

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="assets_backend" name="rpos assets" inherit_id="point_of_sale.assets">
<xpath expr="." position="inside">
<script type="text/javascript" src="/rpos/static/src/js/rpos.js"></script>
</xpath>
</template>
</odoo>

static/src/js/rpos.js

odoo.rpos = function(instance) {

var module = instance.point_of_sale;
var qweb = instance.web.qweb;

console.log("TEST");

module.PosWidget.include({
build_widgets: function(){
var self = this;
this._super();

cheeseBtn = $qweb.render('cheeseBtn'));
cheeseBtn.appendTo(this.$('.control-buttons'));
this.$('.control-buttons').removeClass('oe_hidden');
}
});
};


static/src/xml/templates.xml

<?xml version="1.0" encoding="UTF-8"?>
<templates id="template" xml:space="preserve">

<t t-name="cheeseBtn">
<button>Cheese</button>
</t>

</templates>

I am not even sure if my code is being loaded when I run the POS app.

Thanks


0
Avatar
Vazgeç
Mina

/custom-button/manifest.py

{

'name': 'CustomButton',

'summary': '',

'version': '1.0',

'description': """

""",

# 'author': '',

# 'maintainer': '',

# 'contributors': [''],

# 'website': '',

'license': 'AGPL-3',

'category': 'Uncategorized',

'depends': [

'base', 'point_of_sale',

],

'external_dependencies': {

'python': [

],

},

'data': [

'views/templates.xml',

],

'demo': [

],

'js': [

],

'css': [

],

'qweb': [

'static/src/xml/custom_button.xml',

],

'images': [

],

'test': [

],

'installable': True

}

/custom-button/views/templates.xml

<?xml version="1.0" encoding="utf-8"?>

<odoo>

<template id="assets" inherit_id="point_of_sale.assets">

<xpath expr="." position="inside">

<script type="text/javascript" src="/custom-button/static/src/js/custom.js"></script>

</xpath>

</template>

</odoo>

/custom-button/static/src/xml/custom_button.xml

<?xml version="1.0" encoding="UTF-8"?>

<templates id="template" xml:space="preserve">

<t t-name="CustomButton">

<span class="control-button">

<i class="fa fa-print"></i>

Custom Button

</span>

</t>

</templates>

/custom-button/static/src/js/custom.js

odoo.define('custom-button.custom_button', function (require) {

"use strict";

var core = require('web.core');

var screens = require('point_of_sale.screens');

var gui = require('point_of_sale.gui');

//Custom Code

var CustomButton = screens.ActionButtonWidget.extend({

template: 'CustomButton',

button_click: function(){

var self = this;

self.custom_function();

},

custom_function: function(){

console.log('Hi I am button click of CustomButton');

}

});

screens.define_action_button({

'name': 'custom_button',

'widget': CustomButton,

});

});

screenshot of the custom button in POS screen

https://github.com/minaeid90/Custom-Button

Vysakh B Thottarath

@Mina : Thanks a lot.Your GitHub code is working perfectly.

Avatar
Consultores RMS
En İyi Yanıt

Buen dia yo quiero agregar un boton en el POS despues de validar en la ultima pantalla, intento y nada me funciona siguiendo lo que indican en la web


xml version = "1.0" encoding = "utf-8"?>







t>


algunos dicen que odoo14 es difernte la programacion es cierto?

0
Avatar
Vazgeç
Avatar
Tando
En İyi Yanıt

Thanks this helped

0
Avatar
Vazgeç
Enjoying the discussion? Don't just read, join in!

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

Üye Ol
İlgili Gönderiler Cevaplar Görünümler Aktivite
POS | No Close Session Button Çözüldü
pos button close
Avatar
Avatar
Avatar
2
Eyl 24
5158
POS offline red button not active?
pos offline button
Avatar
Avatar
Avatar
2
Ağu 17
11497
How to create and add a button to POS payment screen under customer, and attach an on click event listener? Odoo V13
javascript pos button screen
Avatar
0
Tem 21
5537
How to align validate button of payment screen to right in POS?
pos payment receipt button
Avatar
1
May 18
7551
Add print button to pos session
javascript pos print button
Avatar
Avatar
1
Mar 15
7421
Topluluk
  • Eğitim Araçları
  • Dokümantasyon
  • Forum
Açık Kaynak
  • İndirin
  • Github
  • Runbot
  • Çeviriler
Hizmetler
  • Odoo.sh Hosting
  • Destek
  • Sürüm Yükseltme
  • Özel Geliştirmeler
  • Eğitim
  • Muhasebeci Bulun
  • Partner Bulun
  • Partner Olun
Hakkında
  • Şirketimiz
  • Pazarlama Gereçleri
  • İletişim
  • Kariyer
  • Etkinlikler
  • Podcast
  • Blog
  • Müşteriler
  • Hukuki • Gizlilik
  • Güvenlik
الْعَرَبيّة 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, müşteri ilişkileri yönetimi, eTicaret, muhasebe, envanter, satış noktası, proje yönetimi gibi şirketinizin tüm ihtiyaçlarını karşılayan bir açık kaynak işletme uygulamaları paketidir.

Odoo’nun eşsiz değer önermesi, aynı anda hem kullanımının çok kolay olup hem de tamamen entegre olmasıdır.

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