<commit_before># -*- coding: utf-8 -*-
from .pd_base import BaseExtClass, api, OutputHelper as Console, Jesie


class ProductProduct(BaseExtClass):
    _inherit = "product.product"

    packet_size = 500

    def is_notifiable(self):
        return self.product_tmpl_id.type == "product" and self.tag_ids

    fields_to_watch = ('id', 'default_code', 'name', 'barcode', 'description', 'web_global_stock',
                       'product_brand_id', 'attribute_line_ids', 'tag_ids', 'active', 'type', 'force_web')

    def set_props(self, unlink=False):
        poitem = """
                <poitem>
                  <ItemCode>{}</ItemCode>
                  <ItemName>{}</ItemName>
                  <CodeBars>{}</CodeBars>
                  <UserText>{}</UserText>
                  <Model>{}</Model>
                  <Tallaje>{}</Tallaje>
                  <Talla>{}</Talla>
                  <Color>{}</Color>
                  <Stock>{}</Stock>
                  <SWeight1>{}</SWeight1>
                  <FirmName>{}</FirmName>
                  <Price>{}</Price>
                  <ItmsGrpCod>{}</ItmsGrpCod>
                  <validFor>{}</validFor>
                </poitem>
              """
<commit_msg>[FIX] Se evita enviar las combinaciones con False en su código<commit_after># -*- coding: utf-8 -*-
from .pd_base import BaseExtClass, api, OutputHelper as Console, Jesie


class ProductProduct(BaseExtClass):
    _inherit = "product.product"

    packet_size = 500

    def is_notifiable(self):
        return self.product_tmpl_id.type == "product" and self.tag_ids and ('False' not in self.default_code)

    fields_to_watch = ('id', 'default_code', 'name', 'barcode', 'description', 'web_global_stock',
                       'product_brand_id', 'attribute_line_ids', 'tag_ids', 'active', 'type', 'force_web')

    def set_props(self, unlink=False):
        poitem = """
                <poitem>
                  <ItemCode>{}</ItemCode>
                  <ItemName>{}</ItemName>
                  <CodeBars>{}</CodeBars>
                  <UserText>{}</UserText>
                  <Model>{}</Model>
                  <Tallaje>{}</Tallaje>
                  <Talla>{}</Talla>
                  <Color>{}</Color>
                  <Stock>{}</Stock>
                  <SWeight1>{}</SWeight1>
                  <FirmName>{}</FirmName>
                  <Price>{}</Price>
                  <ItmsGrpCod>{}</ItmsGrpCod>
                  <validFor>{}</validFor>
                </poitem>
              """

{'fraction_non_alphanumeric': 0.15143084260731318, 'fraction_numerical': 0.0047694753577106515, 'mean_word_length': 1.715210355987055, 'pattern_counts': {'":': 0, '<': 63, '<?xml version=': 0, '>': 63, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '347748', 'n_tokens_mistral': 803, 'n_tokens_neox': 748, 'n_words': 131}