تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
5 الردود
9178 أدوات العرض

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.

Idea?

 

Thanks

الصورة الرمزية
إهمال
الكاتب أفضل إجابة

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;
            if(!category){

               #this.category = db.get_category_by_id(db.root_category_id);
                this.category = db.get_category_by_id(34);
            }else{
                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"?>
<openerp>
    <data>
        <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>
            </xpath>
        </template>
    </data>
</openerp>

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

الكاتب

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

أفضل إجابة

I found this module which filters the categories by POS

http://www.odoo.com/apps/modules/8.0/pos_product_category_filter/


الصورة الرمزية
إهمال
أفضل إجابة

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?

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
0
أكتوبر 21
3871
1
يوليو 25
1988
4
أغسطس 25
3239
0
مارس 25
1252
2
يناير 25
2397