Odoo Help

0

Module: website_sale (show only one company products)

By
yuri
on 3/12/15, 1:05 PM 860 views

I'm working in multi company enviroment, also I've add "product_category_multicompany" in order to add a company_id field on products category.

Now, I'm trying to modify the 'website_sale' module to only show products from one company that the user will select. 

The point is:

How I could achieve that? I'm getting into, and I'm asking for some hint that sure would help me to do it. :)

 

Many many thanks, the beginings are always hard.

0
yuri
On 3/13/15, 9:46 AM

I add to a new column in product.public.category, with the company_id, in order to be able to show this companies categories. For that I add in

website_sale/models/product.py

where is defined class product_public_category I add new column:
    'company_id': fields.many2one('res.company', 'Company'),

And also:

    _defaults = {
        'company_id': lambda self, cr, uid, c:
        self.pool.get('res.company')._company_default_get(cr, uid,
                                            'product.public.category', context=c),
    }

 

Wich is working properly, Now I'm trying to make a menu like the categories one that exist in the main shop. I belive I have to modify views.xml in /views. Is that correct? What else should I do?
 

Many many thanks

Hello, Did you manage to sort out this question? If yes, could you please share h

Alain Vanzella
on 3/21/16, 5:35 AM

Hello, Did you manage to sort out this question? If yes, could you please share how you did it? Thank you.

Alain Vanzella
on 3/21/16, 5:37 AM

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.

Register

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)

Stats

Asked: 3/12/15, 1:05 PM
Seen: 860 times
Last updated: 3/21/16, 8:16 AM