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,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<templates id="template" xml:space="preserve">
<div t-name="MobileSaleOrderManagementScreen" class="screen-full-width" owl="1">
<div class="order-management-screen screen" t-att-class="{ oe_hidden: !props.isShown }">
<div t-if="mobileState.showDetails" class="leftpane">
<OrderDetails order="orderManagementContext.selectedOrder" />
<div class="pads">
<div class="control-buttons">
<t t-foreach="controlButtons" t-as="cb" t-key="cb.name">
<t t-component="cb.component" t-key="cb.name" />
</t>
</div>
<div class="subpads">
<ActionpadWidget partner="selectedPartner" />
<NumpadWidget />
</div>
</div>
<div class="back-to-list" t-on-click="() => { mobileState.showDetails = false; }">
<span>Back to list</span>
</div>
</div>
<div t-else="" class="rightpane">
<div class="flex-container">
<SaleOrderManagementControlPanel />
<SaleOrderList orders="orders" initHighlightedOrder="orderManagementContext.selectedOrder" />
</div>
</div>
</div>
</div>
</templates>

View file

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<templates id="template" xml:space="preserve">
<t t-name="SaleOrderList" owl="1">
<div class="orders">
<div class="header-row" t-att-class="{ oe_hidden: env.isMobile }">
<div class="col name">Order</div>
<div class="col date">Date</div>
<div class="col customer">Customer</div>
<div class="col salesman">Salesperson</div>
<div class="col end total">Total</div>
<div class="col state">State</div>
</div>
<div class="order-list">
<t t-foreach="props.orders" t-as="order" t-key="order.id">
<SaleOrderRow order="order" highlightedOrder="highlightedOrder" />
</t>
</div>
</div>
</t>
</templates>

View file

@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<templates id="template" xml:space="preserve">
<t t-name="SaleOrderManagementControlPanel" owl="1">
<div class="control-panel">
<div class="item button back" t-on-click="() => this.trigger('close-screen')">
<i class="fa fa-angle-double-left"></i>
<span t-if="!env.isMobile"> Back</span>
</div>
<div class="item search-box">
<span class="icon">
<i class="fa fa-search" />
</span>
<input type="text" t-ref="autofocus" t-model="orderManagementContext.searchString" t-on-keydown="onInputKeydown" placeholder="E.g. customer: Steward, date: 2020-05-09" />
<span class="clear" t-on-click="() => this.trigger('clear-search')">
<i class="fa fa-remove" />
</span>
</div>
<div t-if="showPageControls" class="item">
<div class="page-controls">
<div class="previous" t-on-click="() => this.trigger('prev-page')">
<i class="fa fa-fw fa-caret-left" role="img" aria-label="Previous Order List" title="Previous Order List"></i>
</div>
<div class="next" t-on-click="() => this.trigger('next-page')">
<i class="fa fa-fw fa-caret-right" role="img" aria-label="Next Order List" title="Next Order List"></i>
</div>
</div>
<div class="page">
<span><t t-esc="pageNumber" /></span>
</div>
</div>
<div t-else="" class="item"></div>
</div>
</t>
</templates>

View file

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<templates id="template" xml:space="preserve">
<t t-name="SaleOrderManagementScreen" owl="1">
<div class="order-management-screen screen" t-att-class="{ oe_hidden: !props.isShown }">
<div class="rightpane">
<div class="flex-container">
<SaleOrderManagementControlPanel />
<SaleOrderList orders="orders" initHighlightedOrder="orderManagementContext.selectedOrder" />
</div>
</div>
</div>
</t>
</templates>

View file

@ -0,0 +1,42 @@
<?xml version="1.0" encoding="UTF-8"?>
<templates id="template" xml:space="preserve">
<t t-name="SaleOrderRow" owl="1">
<div class="order-row"
t-att-class="{ highlight: highlighted }"
t-on-click="() => this.trigger('click-sale-order', props.order)">
<div class="col name">
<div t-if="env.isMobile">Order</div>
<div><t t-esc="name"/></div>
</div>
<div class="col date">
<div t-if="env.isMobile">Date</div>
<div><t t-esc="date"/></div>
</div>
<div class="col partner">
<div t-if="env.isMobile">Customer</div>
<div><t t-esc="partner"/></div>
</div>
<div class="col salesman">
<div t-if="env.isMobile">Salesman</div>
<div><t t-esc="salesman"/></div>
</div>
<div class="col end total">
<div t-if="env.isMobile">Total</div>
<div class="flex-container">
<div class="self-end">
<t t-esc="total"/>
</div>
<div t-if="showAmountUnpaid" class="self-end text-gray">
(left: <t t-esc="amountUnpaidRepr"/>)
</div>
</div>
</div>
<div class="col state">
<div t-if="env.isMobile">State</div>
<div><t t-esc="state"/></div>
</div>
</div>
</t>
</templates>

View file

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<templates id="template" xml:space="preserve">
<t t-name="Orderline" t-inherit="point_of_sale.Orderline" t-inherit-mode="extension" owl="1">
<xpath expr="//ul[hasclass('info-list')]" position="inside">
<t t-if="props.line.get_sale_order()">
<li class="info orderline-sale-order">
<i class="fa fa-basket" role="img" aria-label="SO" title="SO"/>
<t t-esc="props.line.get_sale_order().name" />
</li>
<table t-if="props.line.get_sale_order().details" class="sale-order-info">
<t t-foreach='props.line.get_sale_order().details' t-as='line' t-key='line_index'>
<tr>
<td><t t-esc="line['product_uom_qty']"/>x</td>
<td style="max-width: 275px;">
<t t-esc="line['product_name']" />
</td>
<td>:</td>
<td><t t-esc="env.pos.format_currency(line['total'])" /> (tax incl.)</td>
</tr>
</t>
</table>
</t>
</xpath>
</t>
</templates>

View file

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<templates id="template" xml:space="preserve">
<t t-name="OrderReceipt" t-inherit="point_of_sale.OrderLinesReceipt" t-inherit-mode="extension" owl="1">
<xpath expr="//t[@t-foreach]" position="inside">
<div class="pos-receipt-left-padding" t-if="line.so_reference">From <t t-esc="line.so_reference"/></div>
<div class="pos-receipt-left-padding" t-if="line.down_payment_details">
<table class="sale-order-info">
<tr t-foreach='line.down_payment_details' t-as='line' t-key='line_index'>
<td><t t-esc="line['product_uom_qty']" />x</td>
<td style="max-width: 200px;">
<t t-esc="line['product_name']" />
</td>
</tr>
</table>
</div>
</xpath>
</t>
</templates>

View file

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<templates id="template" xml:space="preserve">
<t t-name="SetSaleOrderButton" owl="1">
<div class="control-button o_sale_order_button">
<i class="fa fa-link" role="img" aria-label="Set Sale Order"
title="Set Sale Order" /> Quotation/Order
</div>
</t>
</templates>