summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models/solr/product_pricelist.py
blob: e29baf1d5a7389f5e233bdb1998c9d9f78fbd6b7 (plain)
1
2
3
4
5
6
7
8
9
10
from odoo import models, api


class ProductPricelist(models.Model):
    _inherit = 'product.pricelist'
    
    @api.constrains('is_flash_sale', 'flashsale_option', 'flashsale_tag', 'banner', 'banner_mobile', 'start_date', 'end_date')
    def _constrains_related_solr_field(self):
        for item in self.item_ids:
            item.product_id.product_tmpl_id._create_solr_queue('_sync_price_to_solr')