sf1.0
This commit is contained in:
30
sf_machine_connect/static/src/css/MyWidget.css
Normal file
30
sf_machine_connect/static/src/css/MyWidget.css
Normal 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
5
sf_machine_connect/static/src/css/iot.css
Normal file
5
sf_machine_connect/static/src/css/iot.css
Normal file
@@ -0,0 +1,5 @@
|
||||
.o_button_iot {
|
||||
min-width: 120px;
|
||||
min-height: 40px;
|
||||
margin-left: 50px;
|
||||
}
|
||||
94
sf_machine_connect/static/src/xml/Barcode_Scan_template.xml
Normal file
94
sf_machine_connect/static/src/xml/Barcode_Scan_template.xml
Normal 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]}&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>
|
||||
10
sf_machine_connect/static/src/xml/Flush.xml
Normal file
10
sf_machine_connect/static/src/xml/Flush.xml
Normal 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>
|
||||
27
sf_machine_connect/static/src/xml/MyComponent.xml
Normal file
27
sf_machine_connect/static/src/xml/MyComponent.xml
Normal 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>
|
||||
4
sf_machine_connect/static/src/xml/MyWidget.xml
Normal file
4
sf_machine_connect/static/src/xml/MyWidget.xml
Normal file
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<templates>
|
||||
|
||||
</templates>
|
||||
32
sf_machine_connect/static/src/xml/PartnerOrderSummary2.xml
Normal file
32
sf_machine_connect/static/src/xml/PartnerOrderSummary2.xml
Normal 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>-->
|
||||
<!--<!– <img src="/barcodes/static/img/barcode.png" alt="Barcode"/>–>-->
|
||||
<!-- <span class="o_barcode_laser"/>-->
|
||||
<!-- </div>-->
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</t>
|
||||
</templates>
|
||||
15
sf_machine_connect/static/src/xml/barcodes.xml
Normal file
15
sf_machine_connect/static/src/xml/barcodes.xml
Normal 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>
|
||||
@@ -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>
|
||||
17
sf_machine_connect/static/src/xml/many2one_field.xml
Normal file
17
sf_machine_connect/static/src/xml/many2one_field.xml
Normal 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>
|
||||
17
sf_machine_connect/static/src/xml/stack.xml
Normal file
17
sf_machine_connect/static/src/xml/stack.xml
Normal 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>
|
||||
Reference in New Issue
Block a user