Skip to content

Commit

Permalink
run pre-commit with new prettiers
Browse files Browse the repository at this point in the history
  • Loading branch information
guewen committed Mar 23, 2020
1 parent 7740a96 commit c411ae9
Show file tree
Hide file tree
Showing 3 changed files with 96 additions and 27 deletions.
14 changes: 11 additions & 3 deletions stock_cubiscan/views/assets.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
<?xml version="1.0"?>
<?xml version="1.0" ?>
<odoo>
<template id="cubiscan_assets" name="cubiscan.assets" inherit_id="web.assets_backend">
<template
id="cubiscan_assets"
name="cubiscan.assets"
inherit_id="web.assets_backend"
>
<xpath expr="." position="inside">
<link rel="stylesheet" type="text/scss" href="/stock_cubiscan/static/src/scss/cubiscan_wizard.scss"/>
<link
rel="stylesheet"
type="text/scss"
href="/stock_cubiscan/static/src/scss/cubiscan_wizard.scss"
/>
</xpath>
</template>
</odoo>
35 changes: 24 additions & 11 deletions stock_cubiscan/views/cubiscan_view.xml
Original file line number Diff line number Diff line change
@@ -1,14 +1,23 @@
<?xml version="1.0"?>
<?xml version="1.0" ?>
<odoo>
<record model="ir.ui.view" id="view_cubiscan_device_form">
<field name="name">cubiscan.device.form</field>
<field name="model">cubiscan.device</field>
<field name="arch" type="xml">
<form>
<header>
<button type="object" name="open_wizard" string="Wizard" class="oe_highlight" />
<button type="object" name="test_device" string="Test Device"
attrs="{'invisible': [('id','=',False)]}" />
<button
type="object"
name="open_wizard"
string="Wizard"
class="oe_highlight"
/>
<button
type="object"
name="test_device"
string="Test Device"
attrs="{'invisible': [('id','=',False)]}"
/>
<field name="state" widget="statusbar" />
</header>
<sheet>
Expand All @@ -21,18 +30,20 @@
<field name="timeout" />
<field name="warehouse_id" />
</group>
<group/>
<group />
</group>
</sheet>
</form>
</field>
</record>

<record model="ir.ui.view" id="view_cubiscan_device_tree">
<field name="name">cubiscan.device.tree</field>
<field name="model">cubiscan.device</field>
<field name="arch" type="xml">
<tree decoration-warning="state == 'not_ready'" decoration-success="state == 'ready'">
<tree
decoration-warning="state == 'not_ready'"
decoration-success="state == 'ready'"
>
<field name="name" />
<field name="device_address" />
<field name="port" />
Expand All @@ -42,13 +53,15 @@
</tree>
</field>
</record>

<record id="action_cubiscan_device_form" model="ir.actions.act_window">
<field name="name">CubiScan Devices</field>
<field name="res_model">cubiscan.device</field>
<field name="view_mode">tree,form</field>
</record>

<menuitem action="action_cubiscan_device_form" id="menu_action_cubiscan_device_form"
parent="stock.menu_warehouse_config" sequence="2" />
<menuitem
action="action_cubiscan_device_form"
id="menu_action_cubiscan_device_form"
parent="stock.menu_warehouse_config"
sequence="2"
/>
</odoo>
74 changes: 61 additions & 13 deletions stock_cubiscan/wizard/cubiscan_wizard.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,33 @@
<field name="arch" type="xml">
<form class="cubiscan_wizard">
<header>
<button name="action_reopen_fullscreen" string="Fullscreen" type="object" />
<button
name="action_reopen_fullscreen"
string="Fullscreen"
type="object"
/>
</header>
<group>
<group>
<label for="device_id" />
<field name="device_id" nolabel="1" options="{'no_open': True, 'no_create_edit': True}" />
<field
name="device_id"
nolabel="1"
options="{'no_open': True, 'no_create_edit': True}"
/>
<label for="product_id" />
<field name="product_id" nolabel="1" options="{'no_open': True, 'no_create_edit': True}" />
<field name="_barcode_scanned" widget="barcode_handler" invisible="1" />
<field
name="product_id"
nolabel="1"
options="{'no_open': True, 'no_create_edit': True}"
/>
<field
name="_barcode_scanned"
widget="barcode_handler"
invisible="1"
/>
</group>
<group/>
<group />
</group>
<separator />
<field name="line_ids">
Expand All @@ -25,18 +41,50 @@
<field name="required" invisible="1" />
<field name="name" />
<field name="qty" />
<field name="max_weight" options="{'bg_color': 'lightcoral: max_weight == 0.0 and required'}" />
<field name="lngth" options="{'bg_color': 'lightcoral: lngth == 0.0 and required'}" />
<field name="width" options="{'bg_color': 'lightcoral: width == 0.0 and required'}" />
<field name="height" options="{'bg_color': 'lightcoral: height == 0.0 and required'}" />
<field name="volume" options="{'bg_color': 'lightcoral: volume == 0.0 and required'}" />
<button name="cubiscan_measure" type="object" string="CubiScan" class="btn btn-warning" />
<field
name="max_weight"
options="{'bg_color': 'lightcoral: max_weight == 0.0 and required'}"
/>
<field
name="lngth"
options="{'bg_color': 'lightcoral: lngth == 0.0 and required'}"
/>
<field
name="width"
options="{'bg_color': 'lightcoral: width == 0.0 and required'}"
/>
<field
name="height"
options="{'bg_color': 'lightcoral: height == 0.0 and required'}"
/>
<field
name="volume"
options="{'bg_color': 'lightcoral: volume == 0.0 and required'}"
/>
<button
name="cubiscan_measure"
type="object"
string="CubiScan"
class="btn btn-warning"
/>
<field name="barcode" />
</tree>
</field>
<footer>
<button name="action_save" type="object" icon="fa-check" class="btn btn-primary" string="Save" />
<button name="action_close" type="object" icon="fa-times" class="btn btn-danger" string="Close" />
<button
name="action_save"
type="object"
icon="fa-check"
class="btn btn-primary"
string="Save"
/>
<button
name="action_close"
type="object"
icon="fa-times"
class="btn btn-danger"
string="Close"
/>
</footer>
</form>
</field>
Expand Down

0 comments on commit c411ae9

Please sign in to comment.