I bought a multi-website module from PR1 who is lost contact now(nightmare support). I struggled more than a years and almost get it working in my production. Now I am facing a little issue related to a sql command which I believe it should be easy for guys who have knowledge of sql.
What is bothering me is that the unpublished product do not display either for administrator in front website. For odoo default, the unpublished product in frontend display in blur state like bellow:
https://demo2.odoo.com/shop/page/3
Very long time before the developer solved an issue regarding the unpublished products also display in the website frontend for the portal user. After he send me the update, it fixed the issue but I just found that the website administrator cannot see the unpublished product either in front website which cause much inconvenience in our practical these days. After comparison, he simply changed the following sql in pr1_multi_website-shop/public_category.py from:
sql="select distinct product_template_id from product_public_category_product_template_rel where product_public_category_id in "+ str(categories).replace("[","(").replace("]",")")
To:
sql="""select distinct product_template_id from product_public_category_product_template_rel
inner join product_template pt on product_public_category_product_template_rel.product_template_id=pt.id
where pt.website_published=true and product_public_category_id in """+ str(categories).replace("[","(").replace("]",")")