This commit is contained in:
gqh
2023-01-09 23:04:53 +08:00
parent d0497aa043
commit 311c7c723a
52 changed files with 1572 additions and 331 deletions

View File

@@ -0,0 +1,30 @@
.o_int_colorpicker {
.o_color_pill {
display: inline-block;
height: 25px;
width: 25px;
margin: 4px;
border-radius: 25px;
position: relative;
@for $size from 1 through length($o-colors) {
&.o_color_#{$size - 1} {
background-color: nth($o-colors, $size);
&:not(.readonly):hover {
transform: scale(1.2);
transition: 0.3s;
cursor: pointer;
}
&.active:after{
content: "\f00c";
display: inline-block;
font: normal normal normal 14px/1 FontAwesome;
font-size: inherit;
color: #fff;
position: absolute;
padding: 4px;
font-size: 16px;
}
}
}
}
}

View File

@@ -0,0 +1,5 @@
.o_button_iot {
min-width: 120px;
min-height: 40px;
margin-left: 50px;
}

View File

@@ -0,0 +1,94 @@
<?xml version="1.0" encoding="utf-8"?>
<templates xml:space="preserve">
<t t-name="sf_machine_connect.Barcode_Scan_template" t-inherit="web.Legacy.ControlPanel" t-inherit-mode="extension" owl="1">
<xpath expr="//div[hasclass('o_cp_pager')]" position="inside">
<button
style="float:left"
t-on-click="onBarcodeScanned"
type="button"
class="btn ms-3 o_barcode"
tabindex="-1"
draggable="false"
aria-label="Scan barcode"
title="Scan barcode"
data-tooltip="Scan barcode"
>扫码</button>
</xpath>
</t>
<!-- <t t-name="web.Many2OneField.CreateConfirmationDialog" owl="1">-->
<!-- <Dialog title="title" size="'md'">-->
<!-- <div>-->
<!-- Create <strong t-esc="props.value"/> as a new <t t-esc="props.name"/>?-->
<!-- </div>-->
<!-- <t t-set-slot="footer">-->
<!-- <button class="btn btn-primary" t-on-click="onCreate">Create</button>-->
<!-- <button class="btn" t-on-click="() => props.close()">Discard</button>-->
<!-- </t>-->
<!-- </Dialog>-->
<!-- </t>-->
<!-- <t t-name="web.Many2OneField" owl="1">-->
<!-- <t t-if="props.readonly">-->
<!-- <t t-if="!props.canOpen">-->
<!-- <span>-->
<!-- <span t-esc="displayName" />-->
<!-- <t t-foreach="extraLines" t-as="extraLine" t-key="extraLine_index">-->
<!-- <br />-->
<!-- <span t-esc="extraLine" />-->
<!-- </t>-->
<!-- </span>-->
<!-- </t>-->
<!-- <t t-else="">-->
<!-- <a-->
<!-- t-if="props.value"-->
<!-- class="o_form_uri"-->
<!-- t-att-href="props.value ? `#id=${props.value[0]}&amp;model=${relation}` : '#'"-->
<!-- t-on-click.prevent="onClick"-->
<!-- >-->
<!-- <span t-esc="displayName" />-->
<!-- <t t-foreach="extraLines" t-as="extraLine" t-key="extraLine_index">-->
<!-- <br />-->
<!-- <span t-esc="extraLine" />-->
<!-- </t>-->
<!-- </a>-->
<!-- </t>-->
<!-- </t>-->
<!-- <t t-else="">-->
<!-- <div class="o_field_many2one_selection">-->
<!-- <Many2XAutocomplete t-props="Many2XAutocompleteProps"/>-->
<!-- <t t-if="hasExternalButton">-->
<!-- <button-->
<!-- type="button"-->
<!-- class="btn btn-secondary fa o_external_button"-->
<!-- t-att-class="props.openTarget === 'current' ? 'fa-arrow-right' : 'fa-external-link'"-->
<!-- tabindex="-1"-->
<!-- draggable="false"-->
<!-- aria-label="Internal link"-->
<!-- data-tooltip="Internal link"-->
<!-- t-on-click="onExternalBtnClick"-->
<!-- />-->
<!-- </t>-->
<!-- <button-->
<!-- t-if="hasBarcodeButton"-->
<!-- t-on-click="onBarcodeBtnClick"-->
<!-- type="button"-->
<!-- class="btn ms-3 o_barcode"-->
<!-- tabindex="-1"-->
<!-- draggable="false"-->
<!-- aria-label="Scan barcode"-->
<!-- title="Scan barcode"-->
<!-- data-tooltip="Scan barcode"-->
<!-- />-->
<!-- </div>-->
<!-- <div class="o_field_many2one_extra">-->
<!-- <t t-foreach="extraLines" t-as="extraLine" t-key="extraLine_index">-->
<!-- <br t-if="!extraLine_first" />-->
<!-- <span t-esc="extraLine" />-->
<!-- </t>-->
<!-- </div>-->
<!-- </t>-->
<!-- </t>-->
</templates>

View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<templates xml:space="preserve">
<t t-name="owl_demo.PartnerOrderSummary2" owl="1">
<div class="row" style="padding-top: 20px;">
<p>
显示累加字符串aaaaaabbb
</p>
</div>
</t>
</templates>

View File

@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<templates xml:space="preserve">
<t t-name="owl_demo.MyComponent1" owl="1">
<div class="container">
<div class="jumbotron">
<h1>欢迎登陆页面!</h1>
<p>这是一个超大屏幕Jumbotron的实例。</p>
<p><a class="btn btn-primary btn-lg" role="button">
学习更多</a>
</p>
</div>
</div>
<!-- <div class="bg-info text-center p-2">-->
<!-- <i class="fa fa-arrow-left p-1 left"-->
<!-- style="cursor: pointer;"-->
<!-- t-on-click="onPrevious"> </i>-->
<!-- <b t-esc="messageList[Math.abs(-->
<!-- state.currentIndex%4)]"/>-->
<!-- <i class="fa fa-arrow-right p-1 right"-->
<!-- style="cursor: pointer;"-->
<!-- t-on-click="onNext"> </i>-->
<!-- <i class="fa fa-close p-1 float-right"-->
<!-- style="cursor: pointer;"-->
<!-- t-on-click="onRemove"> </i>-->
<!-- </div>-->
</t>
</templates>

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8" ?>
<templates>
</templates>

View File

@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<templates xml:space="preserve">
<t t-name="sf_machine_connect.PartnerOrderSummary2" owl="1">
<!-- <div class="row" style="padding-top: 20px;">-->
<div style="padding-top: 20px;">
<button
t-on-click="onBarcodeBtnClick"
type="button"
class="btn ms-3 o_barcode"
tabindex="-1"
draggable="false"
aria-label="Scan barcode"
title="Scan barcode"
data-tooltip="Scan barcode"
>扫码</button>
<!-- <div class="o_barcode_mobile_container">-->
<!-- <a role="button" class="btn btn-primary o_mobile_barcode">-->
<!-- <i class="fa fa-camera fa-2x o_barcode_mobile_camera"/>-->
<!-- Tap to scan-->
<!-- </a>-->
<!--&lt;!&ndash; <img src="/barcodes/static/img/barcode.png" alt="Barcode"/>&ndash;&gt;-->
<!-- <span class="o_barcode_laser"/>-->
<!-- </div>-->
</div>
</t>
</templates>

View File

@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<templates xml:space="preserve">
<t t-name="mobile_barcode_template">
<div class="o_barcode_mobile_container">
<a role="button" class="btn btn-primary o_mobile_barcode">
<i class="fa fa-camera fa-2x o_barcode_mobile_camera"/>
Tap to scan
</a>
<img src="/barcodes/static/img/barcode.png" alt="Barcode"/>
<span class="o_barcode_laser"/>
</div>
</t>
</templates>

View File

@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<templates>
<div t-name="iot.scan_progress_template">
<h4>Range(s) to scan</h4>
<ul class="scan_ranges list-group mb-2"/>
<div class="input-group mb-4">
<input type="text" name="add_scan_range_ip" class="add_scan_range_ip form-control" placeholder="Scan another range, e.g.: 10.1.1.*"/>
<a role="button" class="add_scan_range btn btn-primary" tabindex="-1">Add</a>
</div>
<div class="mb-4">
<h4 class="scan_network"></h4>
<h4 class="iot_box_found"></h4>
<ul class="found_devices list-group"/>
</div>
</div>
</templates>

View File

@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<templates xml:space="preserve">
<t t-name="web.Many2OneField" owl="1">
<button
t-on-click="onBarcodeBtnClick"
type="button"
class="btn ms-3 o_barcode"
tabindex="-1"
draggable="false"
aria-label="Scan barcode"
title="Scan barcode"
data-tooltip="Scan barcode"
/>
</t>
</templates>

View File

@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<templates id="template" >
<t t-extend="stock_barcode_lines_template">
<t t-jquery="div[class='o_barcode_line list-group-item d-flex flex-row flex-nowrap']"
t-operation="append">
<div class="o_barcode_pic position-relative text-center mt-2 mb-1">
<i class="fa fa-5x mx-auto fa-exclamation-triangle text-white d-none"/>
<img class="o_barcode_icon" src="/stock_barcode/static/img/barcode.svg" alt="Barcode" height="40px"/>
<!-- <t t-if='widget.mobileMethods.scanBarcode'> -->
<div class="o_stock_mobile_barcode"/> <!-- Used to open the device scanner -->
<span> Tap to scan</span>
<!-- </t> -->
</div>
</t>
</t>
</templates>