Skip to Content
Odoo Menú
  • Registra entrada
  • Prova-ho gratis
  • Aplicacions
    Finances
    • Comptabilitat
    • Facturació
    • Despeses
    • Full de càlcul (IA)
    • Documents
    • Signatura
    Vendes
    • CRM
    • Vendes
    • Punt de venda per a botigues
    • Punt de venda per a restaurants
    • Subscripcions
    • Lloguer
    Imatges de llocs web
    • Creació de llocs web
    • Comerç electrònic
    • Blog
    • Fòrum
    • Xat en directe
    • Aprenentatge en línia
    Cadena de subministrament
    • Inventari
    • Fabricació
    • PLM
    • Compres
    • Manteniment
    • Qualitat
    Recursos humans
    • Empleats
    • Reclutament
    • Absències
    • Avaluacions
    • Recomanacions
    • Flota
    Màrqueting
    • Màrqueting Social
    • Màrqueting per correu electrònic
    • Màrqueting per SMS
    • Esdeveniments
    • Automatització del màrqueting
    • Enquestes
    Serveis
    • Projectes
    • Fulls d'hores
    • Servei de camp
    • Suport
    • Planificació
    • Cites
    Productivitat
    • Converses
    • Validacions
    • IoT
    • VoIP
    • Coneixements
    • WhatsApp
    Aplicacions de tercers Odoo Studio Plataforma d'Odoo al núvol
  • Sectors
    Comerç al detall
    • Llibreria
    • Botiga de roba
    • Botiga de mobles
    • Botiga d'ultramarins
    • Ferreteria
    • Botiga de joguines
    Food & Hospitality
    • Bar i pub
    • Restaurant
    • Menjar ràpid
    • Guest House
    • Distribuïdor de begudes
    • Hotel
    Immobiliari
    • Agència immobiliària
    • Estudi d'arquitectura
    • Construcció
    • Gestió immobiliària
    • Jardineria
    • Associació de propietaris de béns immobles
    Consultoria
    • Empresa comptable
    • Partner d'Odoo
    • Agència de màrqueting
    • Bufet d'advocats
    • Captació de talent
    • Auditoria i certificació
    Fabricació
    • Textile
    • Metal
    • Mobles
    • Menjar
    • Brewery
    • Regals corporatius
    Salut i fitness
    • Club d'esport
    • Òptica
    • Centre de fitness
    • Especialistes en benestar
    • Farmàcia
    • Perruqueria
    Trades
    • Servei de manteniment
    • Hardware i suport informàtic
    • Sistemes d'energia solar
    • Shoe Maker
    • Serveis de neteja
    • Instal·lacions HVAC
    Altres
    • Nonprofit Organization
    • Agència del medi ambient
    • Lloguer de panells publicitaris
    • Fotografia
    • Lloguer de bicicletes
    • Distribuïdors de programari
    Browse all Industries
  • Comunitat
    Aprèn
    • Tutorials
    • Documentació
    • Certificacions
    • Formació
    • Blog
    • Pòdcast
    Potenciar l'educació
    • Programa educatiu
    • Scale-Up! El joc empresarial
    • Visita Odoo
    Obtindre el programari
    • Descarregar
    • Comparar edicions
    • Novetats de les versions
    Col·laborar
    • GitHub
    • Fòrum
    • Esdeveniments
    • Traduccions
    • Converteix-te en partner
    • Services for Partners
    • Registra la teva empresa comptable
    Obtindre els serveis
    • Troba un partner
    • Troba un comptable
    • Contacta amb un expert
    • Serveis d'implementació
    • Referències del client
    • Suport
    • Actualitzacions
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Programar una demo
  • Preus
  • Ajuda

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

  • CRM
  • e-Commerce
  • Comptabilitat
  • Inventari
  • PoS
  • Projectes
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Etiquetes (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Etiquetes (View all)
odoo accounting v14 pos v15
About this forum
Ajuda

Default Customer on POS

Subscriure's

Get notified when there's activity on this post

This question has been flagged
8 Respostes
15002 Vistes
Avatar
Néstor Gómez Muñoz

In a Point of Sale, by default appears 'Unknown Customer' as client name, so we click on that name, appears a list of customers and select the desired customer to finaly click on the Set Customer button. This is for each sale.

Do you know a way to preset a default customer, say 'Generic Client' avoiding having to select it each time?

I already try on pos.xml, but can only change the name whith out affecting the object.

Regards.

2
Avatar
Descartar
Néstor Gómez Muñoz
Autor

My solucion: Add a field x_default_client, on pos.config model and modified form view to add that field. There I can define which partner will be. On point_of_sale module, on static/src/js/models.js, I added the line this.set_default_client(order) on function 'add_new_order()' and defined that new function 'set_default_client(order)' where is searched the partner using x_default= order.pos.config.x_default_client and setting default_client = this.db.get_partner_by_id(x_default[0]) Some more code to validate and so.

Avatar
Emipro Technologies Pvt. Ltd.
Best Answer

One of the trick you can use from the backend to set the generic customer in every pos.order where customer is not set.

First, You need to create one "Generic Customer" through xml.

ie.

<record id="generic_res_partner" model="res.partner">

<field name="name">Generic Customer</field>

<field name="is_company">1</field>

<field name="email">generic@example.com</field>

</record>

Then inherit the pos.order model and change this method like below.

class PosOrder(models.Model):

     _inherit = 'pos.order'

    @api.model

    def _order_fields(self, ui_order):

        order_fields = super(PosOrder, self)._order_fields(ui_order)

        generic_customer = self.env.ref('module_name.generic_res_partner').id

        order_fields['partner_id'] = ui_order.get('partner_id', False) or generic_customer

        return order_fields

 


1
Avatar
Descartar
Avatar
Dhivya N
Best Answer

Hi, please check this OCA module  https://www.odoo.com/apps/modules/12.0/skit_walkin_customer/  
Hope this help you. 

0
Avatar
Descartar
Avatar
Arafat Ali
Best Answer

Hi, is there a way to achieve this in Odoo 11 ?

0
Avatar
Descartar
Avatar
Jairo Quezada
Best Answer

Good evening, I'm using Odoo 8 and I would like to facilitate me the code of the solution to establish a customer default at the point of sale .Thank you

0
Avatar
Descartar
Néstor Gómez Muñoz
Autor

--Excerpt from OCB/addons/point_of_sale/static/src/js/models.js, with aproximated line numbers: 460 //creates a new empty order and sets it as the current order 461 add_new_order: function(){ 462 var order = new module.Order({pos:this}); 463 this.get('orders').add(order); 464 this.set('selectedOrder', order); 465 this.set_default_client(order); 466 }, 467 468 // set default client from pos.config 469 set_default_client: function(order) { 470 var default_client; 471 var x_default = order.pos.config.x_default_client; 472 var client_id; 473 if (x_default) { 474 client_id=parseInt(x_default[0]); 475 } 476 default_client = this.db.get_partner_by_id(client_id); 477 if (default_client) { 478 order.set_client(default_client); 479 } 480 },

Jairo Quezada

Thanks for the help. Very thoughtful of you. Now I'm trying to enable the physical taclado with the post, trying to jquery.hotkeys.js, any ideas for a case? Yelizariev POS_Keyboard module only enables the keypad.

Daniel Holden

Olá Néstor, I've attempted to follow your instructions to set a default customer for each of my three POS. I managed to create a new field x_default_client and checked that it in fact exists using pgAdmin, I successfully added the field to the form view pos.config and I also added the code to C:\Program Files (x86)\Odoo 8.0-20150511\server\openerp\addons\point_of_sale\static\src\js\models.js However, I have created a client called "Indiferenciado" that has partner_id=30 and I set the x_default_client to 30 on all Points of sale, but they still default to "Unknown Customer" when I open a POS session. What might I be doing wrong?

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

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

Registrar-se
Community
  • Tutorials
  • Documentació
  • Fòrum
Codi obert
  • Descarregar
  • GitHub
  • Runbot
  • Traduccions
Serveis
  • Allotjament a Odoo.sh
  • Suport
  • Actualització
  • Desenvolupaments personalitzats
  • Educació
  • Troba un comptable
  • Troba un partner
  • Converteix-te en partner
Sobre nosaltres
  • La nostra empresa
  • Actius de marca
  • Contacta amb nosaltres
  • Llocs de treball
  • Esdeveniments
  • Pòdcast
  • Blog
  • Clients
  • Informació legal • Privacitat
  • Seguretat
الْعَرَبيّة 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 és un conjunt d'aplicacions empresarials de codi obert que cobreix totes les necessitats de la teva empresa: CRM, comerç electrònic, comptabilitat, inventari, punt de venda, gestió de projectes, etc.

La proposta única de valor d'Odoo és ser molt fàcil d'utilitzar i estar totalment integrat, ambdues alhora.

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