Odoo Help


How to change the default displayed category in point of sale?

Pascal Tremblay
on 3/2/15, 9:55 AM 2,584 views

Hello all,

When a user enter in his point of sale, he sees 4 catégories of products : AS, ES, DJC and PT.

How could i open a category by default?

User opens the point of sale and he is already in a category, without to click on it.





Pascal Tremblay

--Pascal Tremblay--
| 5 3 7
Alma, Canada
--Pascal Tremblay--

Pascal Tremblay
On 3/12/15, 2:13 PM

Ok! Job done! Here is the solution.

1)Find your category ID you want when starting the point of sale. Here I want to open category AS, id 34.

2) In the file /home/odoo-test/odoo-test/addons/pos_lapagept/static/src/js/widgets_as.js, we replace only the Id 34. All the file is unchanged for the rest.

        set_category : function(category){
            var db = this.pos.db;

               #this.category = db.get_category_by_id(db.root_category_id);
                this.category = db.get_category_by_id(34);
                this.category = category;

3) in the file /home/odoo-test/odoo-test/addons/pos_lapagept/lapagept_templates.xml, we have this :

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

4) And now, the category AS open automaticaly when we start the point of sale. Great!

Just comment if it miss something. Thanks.


Is it possible to do the same just by using the developper mode (V8 Saas)? and how if possible

AD LIBITOM, michel Guénard
on 3/12/15, 2:28 PM

Sorry, I don't know an other (better) way for the moment.

Pascal Tremblay
on 3/12/15, 2:30 PM

Tarek Mohamed Ibrahim

--Tarek Mohamed Ibrahim--
| 5 3 7
Gîza, Egypt
--Tarek Mohamed Ibrahim--

I am an old VFP developer on ERP

I have moved to 2p since Nov-2014 and started developing with Python on Odoo.



Tarek Mohamed Ibrahim
On 8/24/17, 6:39 AM

I found this module which filters the categories by POS


On 3/2/15, 2:11 PM

I'm looking for the very same option. I Have 12 categories on my POS and all depends from the very first one. Do I need to edit the POS module?

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

3 follower(s)


Asked: 3/2/15, 9:55 AM
Seen: 2584 times
Last updated: 8/24/17, 6:39 AM