Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion website_sale_product_multi_website/__manifest__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Multi-website product",
"summary": "Show products in many web-sites",
"version": "19.0.1.0.0",
"version": "19.0.1.1.0",
"category": "Website",
"author": "Odoo Community Association (OCA), ADHOC SA",
"license": "AGPL-3",
Expand Down
13 changes: 5 additions & 8 deletions website_sale_product_multi_website/models/website.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
from odoo import api, models
from odoo import models
from odoo.orm.domains import Domain


class Website(models.Model):
_inherit = "website"

@api.model
def website_domain(self, website_id=False):
def website_domain(self):
self.ensure_one()
if self.env.context.get("multi_website_domain"):
return [
"|",
("website_ids", "=", False),
("website_ids", "in", [website_id or self.id]),
]
return Domain("website_ids", "=", False) | Domain("website_ids", "in", self.ids)
return super().website_domain()

def sale_product_domain(self):
Expand Down