<commit_before><?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<object-views xmlns="http://axelor.com/xml/ns/object-views"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://axelor.com/xml/ns/object-views http://axelor.com/xml/ns/object-views/object-views_4.0.xsd">

  <grid name="order-grid" title="Orders" model="com.axelor.sale.db.Order">
    <field name="name"/>
    <field name="customer"/>
    <field name="orderDate"/>
    <field name="totalAmount"/>
    <field name="confirmed"/>
  </grid>

  <form name="order-form" title="Order" model="com.axelor.sale.db.Order"
    onNew="default-order-record"
    onSave="check-order-values,action-sale-order-validate">
    <panel title="Order Details">
      <field name="name"/>
      <field name="confirmed"/>
      <field name="customer" readonlyIf="confirmed" form-view="contact-form" grid-view="contact-grid"/>
      <field name="orderDate" readonlyIf="confirmed"/>
      <field name="createDate" readonlyIf="confirmed"/>
      <field name="confirmDate" requiredIf="confirmed" validIf="confimDate == null || $moment(confirmDate) > $moment(createDate)"/>
    </panel>
    <panel-tabs>
      <panel-related field="items" editable="true" readonlyIf="confirmed"
        orderBy="sequence" canMove="true"
        onChange="com.axelor.sale.web.SaleOrderController:calculate">
        <field name="product"/>
        <field name="price"/>
        <field name="quantity"/>
        <field name="taxes"/>
      </panel-related>
      <panel title="Notes">
        <field name="notes" showTitle="false" colSpan="12"/>
      </panel>
    </panel-tabs>
    <panel>
      <button-group>
        <button name="btnCalculate" title="Calculate" hideIf="confirmed" onClick="check-order-dates,com.axelor.sale.web.SaleOrderController:calculate,save"/>
        <button name="btnExport" title="Export" showIf="id" onClick="export.sale.order"/>
      </button-group>
      <panel css="order-subtotal" readonly="true">
        <field name="totalAmount" showTitle="false" colSpan="12">
          <viewer><![CDATA[
          <dl class="dl-horizontal">
            <dt x-translate>Amount</dt>
            <dd>{{record.amount}}</dd>
            <dt x-translate>Tax amount</dt>
            <dd>{{record.taxAmount}}</dd>
            <dt class="order-subtotal-total" x-translate>Total amount</dt>
            <dd class="order-subtotal-total">{{record.totalAmount}}</dd>
          </dl>
          ]]></viewer>
        </field>
      </panel>
    </panel>
    <panel-mail>
      <mail-messages limit="4" />
      <mail-followers />
    </panel-mail>
  </form>
<commit_msg>Add info-button example<commit_after><?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<object-views xmlns="http://axelor.com/xml/ns/object-views"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://axelor.com/xml/ns/object-views http://axelor.com/xml/ns/object-views/object-views_4.0.xsd">

  <grid name="order-grid" title="Orders" model="com.axelor.sale.db.Order">
    <field name="name"/>
    <field name="customer"/>
    <field name="orderDate"/>
    <field name="totalAmount"/>
    <field name="confirmed"/>
  </grid>

  <form name="order-form" title="Order" model="com.axelor.sale.db.Order"
    onNew="default-order-record"
    onSave="check-order-values,action-sale-order-validate">
    <panel title="Order Details">
      <field name="name"/>
      <field name="confirmed"/>
      <field name="customer" readonlyIf="confirmed" form-view="contact-form" grid-view="contact-grid"/>
      <field name="orderDate" readonlyIf="confirmed"/>
      <field name="createDate" readonlyIf="confirmed"/>
      <field name="confirmDate" requiredIf="confirmed" validIf="confimDate == null || $moment(confirmDate) > $moment(createDate)"/>
    </panel>
    <panel-tabs>
      <panel-related field="items" editable="true" readonlyIf="confirmed"
        orderBy="sequence" canMove="true"
        onChange="com.axelor.sale.web.SaleOrderController:calculate">
        <field name="product"/>
        <field name="price"/>
        <field name="quantity"/>
        <field name="taxes"/>
      </panel-related>
      <panel title="Notes">
        <field name="notes" showTitle="false" colSpan="12"/>
      </panel>
    </panel-tabs>
    <panel>
      <panel colSpan="4" itemSpan="12">
        <button name="totalAmount" onClick="check-order-dates,com.axelor.sale.web.SaleOrderController:calculate,save" title="Total amount" icon="fa-bar-chart" widget="info-button" css="btn-success"/>
        <button name="btnExport" title="Export" showIf="id" onClick="export.sale.order"/>
      </panel>
      <panel colSpan="8" css="order-subtotal" readonly="true">
        <field name="totalAmount" showTitle="false" colSpan="12">
          <viewer><![CDATA[
          <dl class="dl-horizontal">
            <dt x-translate>Amount</dt>
            <dd>{{record.amount}}</dd>
            <dt x-translate>Tax amount</dt>
            <dd>{{record.taxAmount}}</dd>
            <dt class="order-subtotal-total" x-translate>Total amount</dt>
            <dd class="order-subtotal-total">{{record.totalAmount}}</dd>
          </dl>
          ]]></viewer>
        </field>
      </panel>
    </panel>
    <panel-mail>
      <mail-messages limit="4" />
      <mail-followers />
    </panel-mail>
  </form>

{'fraction_non_alphanumeric': 0.18583739228175347, 'fraction_numerical': 0.006369426751592357, 'mean_word_length': 3.1841692789968654, 'pattern_counts': {'":': 0, '<': 125, '<?xml version=': 2, '>': 127, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 12}, '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': '5559318', 'n_tokens_mistral': 1739, 'n_tokens_neox': 1658, 'n_words': 264}