<commit_before><?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>

    <record id="product_normal_form_view" model="ir.ui.view">
        <field name="name">product.normal.form.inherit</field>
        <field name="model">product.product</field>
        <field name="inherit_id" ref="product.product_normal_form_view"/>
        <field name="arch" type="xml">
            <!-- add state field in header -->
            <xpath expr="//sheet" position="before">
                <div class="oe_form_box_info oe_text_center" attrs="{'invisible': [('sale_ok', '=', False)]}">
                    <p attrs="{'invisible': [('website_published', '=', True)]}">
                        This product is <b>not available</b> for public user in your ecommerce.
                    </p>
                    <p attrs="{'invisible': [('website_published', '=', False)]}">
                        This product is <b>available</b> for public user in your ecommerce.
                    </p>
                    <p>Website view: <field class="oe_inline" name="website_url" widget="url"/></p>
                </div>
            </xpath>

            <group name="sale" position="inside">
                <group name="website" string="Website">
                    <field name="website_published"/>
                    <field name="suggested_product_ids" widget="many2many_tags"/>
                </group>
            </group>
        </field>
    </record>

    <record model="ir.ui.view" id="product_pricelist_view">
        <field name="name">product.pricelist.website.form</field>
        <field name="model">product.pricelist</field>
        <field name="inherit_id" ref="product.product_pricelist_view"/>
        <field name="arch" type="xml">
            <field name="active" position="after">
                <field name="code"/>
            </field>
        </field>
    </record>
    
    <!-- Layout add nav and footer -->

    <template id="header_footer" inherit_id="website.layout" name="Custom Footer">
        <xpath expr="//header//ul[@id='top_menu']/li" position="before">
            <li><a href="/shop/">Shop</a></li>
            <li>
                <a href="/shop/mycart/">
                    <i class="icon-shopping-cart"></i>
                    My cart <span t-attf-class="my_cart_quantity badge #{(not website_sale_order or not website_sale_order.get_total_quantity()) and 'hidden' or ''}"
                                  t-esc="website_sale_order and website_sale_order.get_total_quantity() or ''"/>
                </a>
            </li>
        </xpath>
        <xpath expr="//footer//ul[@name='products']" position="inside">
            <li><a href="/shop/">Shop</a></li>
            <li>
                <a href="/shop/mycart/">
                    <i class="icon-shopping-cart"></i>
                    My cart <span t-attf-class="my_cart_quantity badge #{(not website_sale_order or not website_sale_order.get_total_quantity()) and 'hidden' or ''}"
                                  t-esc="website_sale_order and website_sale_order.get_total_quantity() or ''"/>
                </a>
            </li>
        </xpath>
    </template>
    <!-- List of categories -->

    <template id="categories_recursive">
        <li t-att-class="category.id == category_id and 'active' or ''">
            <a t-att-class="category.id not in categ[1] and 'unpublish' or ''" t-attf-href="/shop/category/#{ category.id }/" t-field="category.name"></a>
            <ul t-if="category.child_id" class="nav nav-pills nav-stacked nav-hierarchy">
                <t t-foreach="category.child_id" t-as="category">
                    <t t-if="category.id in categ[1] or editable">
                        <t t-call="website_sale.categories_recursive"/>
                    </t>
                </t>
            </ul>
        </li>
    </template>

    <!-- Product list --> 

    <template id="products_cart">
      <div class="oe_product_description">
          <a t-attf-href="/shop/product/#{ product.id }/?#{ search and ('search=%s' % search) or ''}#{ category_id and ('&amp;category_id=%s' % category_id) or ''}">
              <b t-field="product.name"/>
          </a>
          <!-- This should be an option -->
          <div t-if="product.description_sale" class="text-muted oe_subdescription">
              <div id="product_description" t-att-data-name="product.id"/>
          </div>
          <div>
              <b>
                  <t t-if="product.product_variant_ids[0].lst_price != product.product_variant_ids[0].price">
                    <span class="text-danger" style="text-decoration: line-through;">
                        <t t-esc="product.product_variant_ids[0].lst_price" /> €
                    </span>&amp;nbsp;
                  </t>
                  <t t-esc="product.product_variant_ids[0].price" /> €
              </b>
              <span id="add_to_cart" t-att-data-name="product.id"/>
          </div>
      </div>

      <div class="oe_product_image text-center">
          <a t-attf-href="/shop/product/#{ product.id }/?#{ search and ('search=%s' % search) or ''}#{ category_id and ('&amp;category_id=%s' % category_id) or ''}">
              <img class="img" t-att-src="product.img('image')"/>
          </a>
      </div>
    </template>

    <template id="products" page="True">
        <t t-call="website.layout">
            <t t-set="head">
                <script type="text/javascript" src="/website_sale/static/src/js/website_sale.js"></script>
                <link rel='stylesheet' href='/website_sale/static/src/css/website_sale.css'/>
                <t t-raw="head or ''"/>
            </t>
            <t t-set="title">Our Products</t>
            <div id="wrap">
              <div class="oe_structure"/>
              <div class="container oe_website_sale">
                <div class="row">
                    <div class="col-sm-4">
                        <h1>Our Products</h1>
                    </div><div class="col-sm-4 pagination text-center">
                        <a t-if="editable" t-attf-href="/shop/#{ category_id and ('category/%s/' % category_id) or ''}add_product/" class="btn btn-default">New Product</a>
                    </div><div class="col-sm-4">
                        <form t-attf-action="/shop/#{ category_id and ('category/%s/' % category_id) or ''}" method="get" class="pull-right pagination">
                            <div class="input-group">
                                <span class="input-group-addon"><span class="glyphicon glyphicon-search"/></span>
                                <input type="text" name="search" class="search-query form-control" placeholder="Search..." t-att-value="search or ''"/>
                            </div>
                        </form>
                        <t t-call="website.pager">
                            <t t-set="classname">pull-left</t>
                        </t>
                    </div>
                </div>

                <div class='style_default'>
                  <div class="col-md-12" id="products_grid">
                    <table width="100%">
                      <colgroup>
                        <col style="width: 1px; margin-right: -1px;" />
                        <col class="col-md-3" />
                        <col class="col-md-3" />
                        <col class="col-md-3" />
                        <col class="col-md-3" />
                      </colgroup>
                      <tbody>
                        <t t-set="table_products" t-value="get_bin_packing_products(product_ids, product_ids_for_holes, 4)"/>
                        <tr t-foreach="table_products" t-as="tr_product">
                          <td class="oe-height-2"></td>
                          <t t-foreach="tr_product" t-as="td_product">
                            <t t-if="td_product">
                            <t t-set="product" t-value="td_product['product']"/>
                            <td t-att-colspan="td_product['x']"
                                t-att-rowspan="td_product['y']"
                                t-attf-class="oe_product #{ td_product['class'] }"
                                t-att-data-publish="product.website_published and 'on' or 'off'">
                                <t t-call="website_sale.products_cart"/>
                            </td>
                            </t>
                          </t>
                        </tr>
                      </tbody>
                    </table>
                  </div>
                </div>
                <div class="text-center">
                    <t t-call="website.pager" />
                </div>
              </div>
              <div class="oe_structure mb32"/>
            </div>
        </t>
    </template>

    <!-- Product Description-->

    <template id="product_description" inherit_option_id="website_sale.products" name="Product Description">
        <xpath expr="//div[@id='product_description']" position="replace">
            <small>
                <t t-field="product.description_sale"/>
            </small>
        </xpath>
    </template>

    <!-- Add to cart button-->

    <template id="add_to_basket" inherit_option_id="website_sale.products" name="Add to Cart">
        <xpath expr="//span[@id='add_to_cart']" position="replace">
            <a t-attf-href="./add_cart/?product_id=#{ product.id }">
                <span class="icon-shopping-cart"/>
            </a><commit_msg>[FIX] website_sale: add_to_cart inherit<commit_after><?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>

    <record id="product_normal_form_view" model="ir.ui.view">
        <field name="name">product.normal.form.inherit</field>
        <field name="model">product.product</field>
        <field name="inherit_id" ref="product.product_normal_form_view"/>
        <field name="arch" type="xml">
            <!-- add state field in header -->
            <xpath expr="//sheet" position="before">
                <div class="oe_form_box_info oe_text_center" attrs="{'invisible': [('sale_ok', '=', False)]}">
                    <p attrs="{'invisible': [('website_published', '=', True)]}">
                        This product is <b>not available</b> for public user in your ecommerce.
                    </p>
                    <p attrs="{'invisible': [('website_published', '=', False)]}">
                        This product is <b>available</b> for public user in your ecommerce.
                    </p>
                    <p>Website view: <field class="oe_inline" name="website_url" widget="url"/></p>
                </div>
            </xpath>

            <group name="sale" position="inside">
                <group name="website" string="Website">
                    <field name="website_published"/>
                    <field name="suggested_product_ids" widget="many2many_tags"/>
                </group>
            </group>
        </field>
    </record>

    <record model="ir.ui.view" id="product_pricelist_view">
        <field name="name">product.pricelist.website.form</field>
        <field name="model">product.pricelist</field>
        <field name="inherit_id" ref="product.product_pricelist_view"/>
        <field name="arch" type="xml">
            <field name="active" position="after">
                <field name="code"/>
            </field>
        </field>
    </record>
    
    <!-- Layout add nav and footer -->

    <template id="header_footer" inherit_id="website.layout" name="Custom Footer">
        <xpath expr="//header//ul[@id='top_menu']/li" position="before">
            <li><a href="/shop/">Shop</a></li>
            <li>
                <a href="/shop/mycart/">
                    <i class="icon-shopping-cart"></i>
                    My cart <span t-attf-class="my_cart_quantity badge #{(not website_sale_order or not website_sale_order.get_total_quantity()) and 'hidden' or ''}"
                                  t-esc="website_sale_order and website_sale_order.get_total_quantity() or ''"/>
                </a>
            </li>
        </xpath>
        <xpath expr="//footer//ul[@name='products']" position="inside">
            <li><a href="/shop/">Shop</a></li>
            <li>
                <a href="/shop/mycart/">
                    <i class="icon-shopping-cart"></i>
                    My cart <span t-attf-class="my_cart_quantity badge #{(not website_sale_order or not website_sale_order.get_total_quantity()) and 'hidden' or ''}"
                                  t-esc="website_sale_order and website_sale_order.get_total_quantity() or ''"/>
                </a>
            </li>
        </xpath>
    </template>
    <!-- List of categories -->

    <template id="categories_recursive">
        <li t-att-class="category.id == category_id and 'active' or ''">
            <a t-att-class="category.id not in categ[1] and 'unpublish' or ''" t-attf-href="/shop/category/#{ category.id }/" t-field="category.name"></a>
            <ul t-if="category.child_id" class="nav nav-pills nav-stacked nav-hierarchy">
                <t t-foreach="category.child_id" t-as="category">
                    <t t-if="category.id in categ[1] or editable">
                        <t t-call="website_sale.categories_recursive"/>
                    </t>
                </t>
            </ul>
        </li>
    </template>

    <!-- Product list --> 

    <template id="products_cart">
      <div class="oe_product_description">
          <a t-attf-href="/shop/product/#{ product.id }/?#{ search and ('search=%s' % search) or ''}#{ category_id and ('&amp;category_id=%s' % category_id) or ''}">
              <b t-field="product.name"/>
          </a>
          <!-- This should be an option -->
          <div t-if="product.description_sale" class="text-muted oe_subdescription">
              <div id="product_description" t-att-data-name="product.id"/>
          </div>
          <div class="product_price">
              <b>
                  <t t-if="product.product_variant_ids[0].lst_price != product.product_variant_ids[0].price">
                    <span class="text-danger" style="text-decoration: line-through;">
                        <t t-esc="product.product_variant_ids[0].lst_price" /> €
                    </span>&amp;nbsp;
                  </t>
                  <t t-esc="product.product_variant_ids[0].price" /> €
              </b>
          </div>
      </div>

      <div class="oe_product_image text-center">
          <a t-attf-href="/shop/product/#{ product.id }/?#{ search and ('search=%s' % search) or ''}#{ category_id and ('&amp;category_id=%s' % category_id) or ''}">
              <img class="img" t-att-src="product.img('image')"/>
          </a>
      </div>
    </template>

    <template id="products" page="True">
        <t t-call="website.layout">
            <t t-set="head">
                <script type="text/javascript" src="/website_sale/static/src/js/website_sale.js"></script>
                <link rel='stylesheet' href='/website_sale/static/src/css/website_sale.css'/>
                <t t-raw="head or ''"/>
            </t>
            <t t-set="title">Our Products</t>
            <div id="wrap">
              <div class="oe_structure"/>
              <div class="container oe_website_sale">
                <div class="row">
                    <div class="col-sm-4">
                        <h1>Our Products</h1>
                    </div><div class="col-sm-4 pagination text-center">
                        <a t-if="editable" t-attf-href="/shop/#{ category_id and ('category/%s/' % category_id) or ''}add_product/" class="btn btn-default">New Product</a>
                    </div><div class="col-sm-4">
                        <form t-attf-action="/shop/#{ category_id and ('category/%s/' % category_id) or ''}" method="get" class="pull-right pagination">
                            <div class="input-group">
                                <span class="input-group-addon"><span class="glyphicon glyphicon-search"/></span>
                                <input type="text" name="search" class="search-query form-control" placeholder="Search..." t-att-value="search or ''"/>
                            </div>
                        </form>
                        <t t-call="website.pager">
                            <t t-set="classname">pull-left</t>
                        </t>
                    </div>
                </div>

                <div class='style_default'>
                  <div class="col-md-12" id="products_grid">
                    <table width="100%">
                      <colgroup>
                        <col style="width: 1px; margin-right: -1px;" />
                        <col class="col-md-3" />
                        <col class="col-md-3" />
                        <col class="col-md-3" />
                        <col class="col-md-3" />
                      </colgroup>
                      <tbody>
                        <t t-set="table_products" t-value="get_bin_packing_products(product_ids, product_ids_for_holes, 4)"/>
                        <tr t-foreach="table_products" t-as="tr_product">
                          <td class="oe-height-2"></td>
                          <t t-foreach="tr_product" t-as="td_product">
                            <t t-if="td_product">
                            <t t-set="product" t-value="td_product['product']"/>
                            <td t-att-colspan="td_product['x']"
                                t-att-rowspan="td_product['y']"
                                t-attf-class="oe_product #{ td_product['class'] }"
                                t-att-data-publish="product.website_published and 'on' or 'off'">
                                <t t-call="website_sale.products_cart"/>
                            </td>
                            </t>
                          </t>
                        </tr>
                      </tbody>
                    </table>
                  </div>
                </div>
                <div class="text-center">
                    <t t-call="website.pager" />
                </div>
              </div>
              <div class="oe_structure mb32"/>
            </div>
        </t>
    </template>

    <!-- Product Description-->

    <template id="product_description" inherit_option_id="website_sale.products" name="Product Description">
        <xpath expr="//div[@id='product_description']" position="replace">
            <small>
                <t t-field="product.description_sale"/>
            </small>
        </xpath>
    </template>

    <!-- Add to cart button-->

    <template id="add_to_basket" inherit_option_id="website_sale.products_cart" name="Add to Cart">
        <xpath expr="//div[@class='product_price']" position="inside">
            <a t-attf-href="./add_cart/?product_id=#{ product.id }">
                <span class="icon-shopping-cart"/>
            </a>
{'fraction_non_alphanumeric': 0.16136699767589266, 'fraction_numerical': 0.003169237270230298, 'mean_word_length': 1.5609360205599891, 'pattern_counts': {'":': 0, '<': 410, '<?xml version=': 2, '>': 410, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 6}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6190266', 'n_tokens_mistral': 5623, 'n_tokens_neox': 5277, 'n_words': 988}