# -*- coding: utf-8 -*- from odoo import api, models from odoo.fields import Domain class ProductTemplate(models.Model): _inherit = 'product.template' @api.model def _load_pos_data_domain(self, data, config): domain = super()._load_pos_data_domain(data, config) if config.ojol_discount_product_id: # Ensure the discount product's template is loaded regardless of other domain constraints discount_tmpl_domain = [('id', '=', config.ojol_discount_product_id.product_tmpl_id.id)] domain = Domain.OR([domain, discount_tmpl_domain]) return domain