İç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

How to inherit Odoo 16 pos TicketScreen and add Order Ref column?

Abone Ol

Get notified when there's activity on this post

Bu soru işaretlendi
posodoo16features
2 Cevaplar
4554 Görünümler
Avatar
Jay

Hello, 

I want to inherit this table below in POS and add a column.
If you click on Refund Button it will get you to this table.
How do I go about this?

Thanks in advance.


Here is my code. 

class PosSession(models.Model):
_inherit = 'pos.session'

def _loader_params_pos_order(self):
result = super()._loader_params_pos_order()
result['search_params']['fields'].append('name')
return result


1
Avatar
Vazgeç
Avatar
Jay
Üretici En İyi Yanıt

I found the solution to my question and here is the answer.

/** @odoo-module **/
odoo.define('pos_customizations.models', function(require) {
'use strict';

var {Order, OrderLine} = require('point_of_sale.models');
const Registries = require('point_of_sale.Registries');

const PosSaleOrder = (Order) => class PosSaleOrder extends Order {
constructor() {
super(...arguments);
this.order_ref = this.order_ref || null;
}

export_as_JSON() {
const json = super.export_as_JSON(...arguments);
json.order_ref = this.order_ref;
return json;
}

init_from_JSON(json) {
super.init_from_JSON(...arguments);
this.order_ref = json.order_ref;
}
};

Registries.Model.extend(Order, PosSaleOrder);
});


0
Avatar
Vazgeç
Avatar
Cybrosys Techno Solutions Pvt.Ltd
En İyi Yanıt

Hi,

You can refer this blog to add field onto your pos screen
https://www.cybrosys.com/blog/how-to-load-models-fields-in-the-odoo-16-pos


Hope it helps

0
Avatar
Vazgeç
Jay
Üretici

Hi @Cybrosys Techno Solutions Pvt.Ltd,

I have followed the blog but the field is still not visible.
What am I missing?

Here is my code.

class PosOrder(models.Model):
_inherit = 'pos.order'

order_ref = fields.Char(string='Order Ref', compute="_getOrderRef")

@api.depends('name')
def _getOrderRef(self):
for rec in self:
rec.order_ref = rec.name
print("order_ref--->", rec.order_ref)

class PosSession(models.Model):
_inherit = 'pos.session'

def _pos_ui_pos_order(self):
result = super()._pos_ui_pos_order()
result.append('pos.order')
print("result", result)
return result

def _loader_params_pos_order(self):
return {
'search_params': {
'fields': ['order_ref'],
},
}

def _get_pos_ui_pos_order(self, params):
return self.env['pos.order'].search_read(**params['search_params'])

JS code:
/** @odoo-module **/
import { PosGlobalState } from 'point_of_sale.models';
import Registries from 'point_of_sale.Registries';
const NewPosGlobalState = (PosGlobalState) => class NewPosGlobalState extends PosGlobalState {
async _processData(loadedData) {
await super._processData(...arguments);
this.order_ref = loadedData['pos.order'];
console.log(this.order_ref)
}
}
Registries.Model.extend(PosGlobalState, NewPosGlobalState);

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
Missing Record on Closing POS Session Çözüldü
pos odoo16features
Avatar
Avatar
2
Eyl 25
3118
Error POS "The operation cannot be completed: Reference must be unique per company!"
pos odoo16features
Avatar
Avatar
1
Mar 24
3224
How can I add a field in the Odoo 16 POS order refund table as shown in the screenshot below. Çözüldü
pos odoo16features
Avatar
Avatar
1
Şub 24
2958
how to inherit Odoo 16 pos _getSearchFields js function for searchbar and add Order Ref Çözüldü
pos odoo16features
Avatar
1
Şub 24
3197
Odoo 16 - POS : Variable Weighting tare
pos odoo16features
Avatar
0
Kas 23
2427
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