Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
[Odoo 9.0] Multiple domains running off a single instance, limit ecommerce products based on domain?
I have a server running Odoo 9.0, and am selling a number of products online via an eCommerce website. I have 2 domains, both pointing to the same Odoo server instance.
Currently some of our products cannot be shipped internationally, while others can. Our solution to this is to register 2 domains (website.com and website.co.nz). The idea is that international customers would visit our .com domain, which would show a limited products list - while the local customers would visit our .co.nz domain, which would show all of our products.
For example; We're selling both alcoholic, and non-alcoholic drinks. Domestic users can purchase anything as it's legal to ship alcohol within the country, whereas international users cannot purchase alcoholic drinks as we don't have a license to export them. I need a way to remove or restrict certain products for one of our domains.
We have a fair amount of backend infrastructure setup for our Odoo server, so launching another instance/database is not an option.
Is there any way, in Odoo 9.0 eCommerce, to limit the products that our website shows based on which domain the user visits?
It is possible, see this discussion for example: https://github.com/odoo/odoo/issues/9745 . Unfortunately I did not find more infos on the topic and it seems that one must play around and maybe read the code to understand how it works exactly (User-ID). I did not have the time yet, but if you are successful, posting your results here would be very much appreciated.
1.you need to some booleans check mark in your product view of odoo.
there should be two checkbox like 1.domestic 2.international
2.in odoonine/openerp/addons/website_sale/controllers/main.py this path may be you need to change path of your odoo folder as par installation,in website_sale/controller/main.py in this line no 176 def shop in this function you need to fetch the base url of your system may be like base_url = base_url=self.env['ir.config_parameter'].get_param('web.base.url')
not much sure
3.then add one more condition in domin of def shop function like scratch code if base_url=" website.co.nz"
then add condition in domain like scratch code[('domestic','=',True)]
else if base_url=" website.com"
then add condition in domain like scratch code[('international','=',True)]
so it would show exact product which you want to show in your ecommerce website.
but i m not sure it will work or not you can try
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
|Asked: 2/18/16, 8:50 PM|
|Seen: 1475 times|
|Last updated: 2/19/16, 3:45 AM|