Initial commit: Sale packages

This commit is contained in:
Ernad Husremovic 2025-08-29 15:20:49 +02:00
commit 14e3d26998
6469 changed files with 2479670 additions and 0 deletions

View file

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<templates xml:space="preserve">
<t t-name="sale.ProductDiscountField" t-inherit="web.FloatField" t-inherit-mode="primary" owl="1">
<xpath expr="//input" position="attributes">
<attribute name="t-on-change">onChange</attribute>
</xpath>
</t>
</templates>

View file

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<templates xml:space="preserve">
<t t-name="sale.SaleProductField" t-inherit="web.Many2OneField" t-inherit-mode="primary" owl="1">
<!-- Make the product label clickable (to open its form view) when the user cannot
access it through the external button (because the product/line is readonly) -->
<xpath expr="//t[@t-if='!props.canOpen']" position="attributes">
<attribute name="t-if">
!isProductClickable
</attribute>
</xpath>
<!-- Show configuration button for custom lines/products -->
<xpath expr="//t[@t-if='hasExternalButton']" position="before">
<t t-if="hasConfigurationButton">
<button
type="button"
t-att-class="configurationButtonIcon"
tabindex="-1"
draggable="false"
t-att-aria-label="configurationButtonHelp"
t-att-data-tooltip="configurationButtonHelp"
t-on-click="onEditConfiguration"/>
</t>
</xpath>
</t>
</templates>

View file

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<templates xml:space="preserve">
<t t-name="sale.SaleProgressBarField" owl="1">
<t t-if="state.isInvoicingTargetDefined">
<t t-call="web.ProgressBarField"/>
</t>
<t t-else="">
<!-- TODO is this class needed here ? -->
<a t-on-click.prevent="defineInvoicingTarget" href="#" class="sale_progressbar_form_link">
Click to define an invoicing target
</a>
</t>
</t>
</templates>