Skip to Content
Odoo Menu
  • Prijavi
  • Try it free
  • Aplikacije
    Finance
    • Knjigovodstvo
    • Obračun
    • Stroški
    • Spreadsheet (BI)
    • Dokumenti
    • Podpisovanje
    Prodaja
    • CRM
    • Prodaja
    • POS Shop
    • POS Restaurant
    • Naročnine
    • Najem
    Spletne strani
    • Website Builder
    • Spletna trgovina
    • Blog
    • Forum
    • Pogovor v živo
    • eUčenje
    Dobavna veriga
    • Zaloga
    • Proizvodnja
    • PLM
    • Nabava
    • Vzdrževanje
    • Kakovost
    Kadri
    • Kadri
    • Kadrovanje
    • Odsotnost
    • Ocenjevanja
    • Priporočila
    • Vozni park
    Marketing
    • Družbeno Trženje
    • Email Marketing
    • SMS Marketing
    • Dogodki
    • Avtomatizacija trženja
    • Ankete
    Storitve
    • Projekt
    • Časovnice
    • Storitve na terenu
    • Služba za pomoč
    • Načrtovanje
    • Termini
    Produktivnost
    • Razprave
    • Odobritve
    • IoT
    • Voip
    • Znanje
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industrije
    Trgovina na drobno
    • Book Store
    • Trgovina z oblačili
    • Trgovina s pohištvom
    • Grocery Store
    • Trgovina s strojno opremo računalnikov
    • Trgovina z igračami
    Food & Hospitality
    • Bar and Pub
    • Restavracija
    • Hitra hrana
    • Guest House
    • Beverage Distributor
    • Hotel
    Nepremičnine
    • Real Estate Agency
    • Arhitekturno podjetje
    • Gradbeništvo
    • Estate Management
    • Vrtnarjenje
    • Združenje lastnikov nepremičnin
    Svetovanje
    • Računovodsko podjetje
    • Odoo Partner
    • Marketinška agencija
    • Law firm
    • Pridobivanje talentov
    • Audit & Certification
    Proizvodnja
    • Tekstil
    • Metal
    • Pohištvo
    • Hrana
    • Brewery
    • Poslovna darila
    Health & Fitness
    • Športni klub
    • Trgovina z očali
    • Fitnes center
    • Wellness Practitioners
    • Lekarna
    • Frizerski salon
    Trades
    • Handyman
    • IT Hardware & Support
    • Sistemi sončne energije
    • Izdelovalec čevljev
    • Čistilne storitve
    • HVAC Services
    Ostali
    • Neprofitna organizacija
    • Agencija za okolje
    • Najem oglasnih panojev
    • Fotografija
    • Najem koles
    • Prodajalec programske opreme
    Browse all Industries
  • Skupnost
    Learn
    • Tutorials
    • Dokumentacija
    • Certifikati
    • Šolanje
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Prenesi
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Dogodki
    • Prevodi
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    Get Services
    • Find a Partner
    • Find an Accountant
    • Meet an advisor
    • Implementation Services
    • Sklici kupca
    • Podpora
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Get a demo
  • Določanje cen
  • Pomoč

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

  • CRM
  • e-Commerce
  • Knjigovodstvo
  • Zaloga
  • PoS
  • Projekt
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Ključne besede (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Ključne besede (View all)
odoo accounting v14 pos v15
About this forum
Pomoč

How to inherit / modify point of sale pages & create restrictions?

Naroči se

Get notified when there's activity on this post

This question has been flagged
inheritancepoint_of_saleodoo8.0
1 Odgovori
7989 Prikazi
Avatar
Yenthe Van Ginneken (Mainframe Monkey)

Hi guys,

Since a while I've been tinkering around in the point_of_sale module. I have no good knowledge about the JS library that is used in the point of sale and so I lack some knowledge. I want to accomplish a few things but I have no clue how and there really is no documentation about point of sale modifications despite the blogpost about Thierry.

What I want to do:

When the point of sale opens I want to directly show the screen to select a customer. A customer has to be filled in before this view can be exited. I've found out the views are defined in point_of_sale/static/src/xml/pos.xml and the template for selecting a customer is 'ClientDetails'. How do I trigger this view to open directly and how can I make sure it has to be filled in before any other view will open? (the product overview page)

Secondly when a person selects a product in the point of sale there need to happen some checks:

  • The product has to be in a product category (pos.category model) that is set in the many2many that I've added on the customer (res.partner model):

     class aa_maatwerk_vzw(models.Model):
        _inherit = 'res.partner'
        product_category_ids = fields.Many2many('pos.category', 'product_template_rel', 'product_id', 'category_id', 'Categories')

  • They can only buy xx items per month per category. The max amount per month is set on the model pos.category. The sum of all already bought products cannot be higher than the limit per month on the category:

     class aa_maatwerk_vzw_produt(models.Model):
        _inherit = 'pos.category'
        MaxAmountMonthly = fields.Integer('# pieces/month', help="Max number of products buyable on this category for this month.")

So how can I build in limits checking against categories, quantities, earlier made orders, ...? I'd really like to know how I can do these checks on a product click and how I can secure it. For example when a condition is not met a pop-up should show a message "Monthly quota reached" for example.

Could anybody give me some ideas / help in the good way? All the knowledge that I gain will be used to create a blog post about how to inherit/modify the point of sale. This way other people benefit from this too! So any help is welcome!

Thanks,
Yenthe

0
Avatar
Opusti
Avatar
Parikshit Vaghasiya
Best Answer

Hello,

This will help you.
First you have to inherit widget and widget method in your module like this :

module.PosWidget.include{(
build_widgets: function() {
var self = this;
this.screen_selector = new module.ScreenSelector({
pos: this.pos, screen_set:{ 'products': this.product_screen,
'payment' : this.payment_screen, 'scale': this.scale_screen, 'receipt' : this.receipt_screen, 'clientlist': this.clientlist_screen, }, popup_set:{ 'error': this.error_popup, 'error-barcode': this.error_barcode_popup, 'error-traceback': this.error_traceback_popup, 'confirm': this.confirm_popup, 'unsent-orders': this.unsent_orders_popup, }, default_screen: 'clientlist', #here you select your default screen default_mode: 'cashier', });
};
)}; 

For second change you have to add field in models.js where all fields and models are added, after addind field you have to defind and show field in xml file and extend that template in your module. For more Customization you can contact me on parikshitvaghasiya@gmail.com. 

Thank you !!

4
Avatar
Opusti
Yenthe Van Ginneken (Mainframe Monkey)
Avtor

Thanks for this, I'm sure it will be a nice start! +1

Parikshit Vaghasiya

if my answer is helpful to you Please accept answer. thank you!!

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

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

Prijavi
Related Posts Odgovori Prikazi Aktivnost
How to inherit calendar popup? Solved
inheritance popup odoo8.0
Avatar
6
feb. 21
16269
How to fix the timezone issue in sale details report? Solved
report point_of_sale odoo8.0
Avatar
2
jul. 19
7585
How to Restrict User To View His Default POS only in odoo 8?
point_of_sale odooV8 odoo8.0
Avatar
Avatar
1
okt. 16
5284
how to inherit the timesheet view in my new modul.
modules inheritance odoo8.0
Avatar
1
jun. 16
4150
Price List per Point Of Sale
pricelist point_of_sale odoo8.0
Avatar
Avatar
1
apr. 16
3733
Community
  • Tutorials
  • Dokumentacija
  • Forum
Open Source
  • Prenesi
  • Github
  • Runbot
  • Prevodi
Services
  • Odoo.sh Hosting
  • Podpora
  • Nadgradnja
  • Custom Developments
  • Izobraževanje
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Sredstva blagovne znamke
  • Kontakt
  • Zaposlitve
  • Dogodki
  • Podcast
  • Blog
  • Stranke
  • Pravno • Zasebnost
  • Varnost
الْعَرَبيّة 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 is a suite of open source business apps that cover all your company needs: CRM, eCommerce, accounting, inventory, point of sale, project management, etc.

Odoo's unique value proposition is to be at the same time very easy to use and fully integrated.

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