Skip to content

Commit

Permalink
pre-commit update: prettier xml indent
Browse files Browse the repository at this point in the history
  • Loading branch information
sbidoul committed Mar 2, 2020
1 parent cf9b158 commit dee955f
Show file tree
Hide file tree
Showing 15 changed files with 36 additions and 69 deletions.
2 changes: 1 addition & 1 deletion .isort.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ line_length=88
known_odoo=odoo
known_odoo_addons=odoo.addons
sections=FUTURE,STDLIB,THIRDPARTY,ODOO,ODOO_ADDONS,FIRSTPARTY,LOCALFOLDER
known_third_party=mock,setuptools
default_section=THIRDPARTY
8 changes: 2 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ exclude: |
# Repos using Sphinx to generate docs don't need prettying
^docs/_templates/.*\.html$|
# You don't usually want a bot to modify your legal texts
/(LICENSE|COPYING)
(LICENSE.*|COPYING.*)
default_language_version:
python: python3
repos:
Expand All @@ -30,7 +30,7 @@ repos:
name: prettier xml plugin
additional_dependencies:
- "[email protected]"
- "@prettier/plugin-xml@0.5.0"
- "@prettier/plugin-xml@0.7.2"
files: \.xml$
- repo: https://github.com/pre-commit/mirrors-eslint
rev: v6.8.0
Expand Down Expand Up @@ -85,10 +85,6 @@ repos:
rev: v1.26.2
hooks:
- id: pyupgrade
- repo: https://github.com/asottile/seed-isort-config
rev: v1.9.4
hooks:
- id: seed-isort-config
- repo: https://github.com/pre-commit/mirrors-isort
rev: v4.3.21
hooks:
Expand Down
1 change: 1 addition & 0 deletions .prettierrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ printWidth: 88
proseWrap: always
semi: true
trailingComma: "es5"
xmlWhitespaceSensitivity: "ignore"
2 changes: 0 additions & 2 deletions web_decimal_numpad_dot/views/web_decimal_numpad_dot.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>

<template
id="assets_backend"
name="numpad_dot assets"
Expand All @@ -13,5 +12,4 @@
/>
</xpath>
</template>

</odoo>
12 changes: 6 additions & 6 deletions web_dialog_size/static/src/xml/web_dialog_size.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
<i class="fa fa-close" />
</t>
<t t-jquery="button.close" t-operation="before">
<button type="button" class="dialog_button_extend close"><i
class="fa fa-expand"
/></button>
<button type="button" class="dialog_button_restore close"><i
class="fa fa-compress"
/></button>
<button type="button" class="dialog_button_extend close">
<i class="fa fa-expand" />
</button>
<button type="button" class="dialog_button_restore close">
<i class="fa fa-compress" />
</button>
</t>
</t>
</templates>
4 changes: 0 additions & 4 deletions web_environment_ribbon/data/ribbon_data.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,19 @@
<!-- Copyright 2015 Francesco OpenCode Apruzzese <[email protected]>
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
<odoo noupdate="1">

<!-- Add ribbon name default configuration parameter -->
<record id="default_ribbon_name" model="ir.config_parameter">
<field name="key">ribbon.name</field>
<field name="value"><![CDATA[TEST<br/>({db_name})]]></field>
</record>

<!-- Add ribbon color configuration parameter -->
<record id="set_ribbon_color" model="ir.config_parameter">
<field name="key">ribbon.color</field>
<field name="value">#f0f0f0</field>
</record>

<!-- Add ribbon background color configuration parameter -->
<record id="set_ribbon_background_color" model="ir.config_parameter">
<field name="key">ribbon.background.color</field>
<field name="value">rgba(255,0,0,.6)</field>
</record>

</odoo>
20 changes: 11 additions & 9 deletions web_environment_ribbon/view/base_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,21 @@
Copyright 2016 Antonio Espinosa <[email protected]>
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
<odoo>

<!-- Load css for ribbons -->
<template id="assets_backend" name="ribbon_test assets" inherit_id="web.assets_backend">
<xpath expr="." position="inside">
<link
<!-- Load css for ribbons -->
<template
id="assets_backend"
name="ribbon_test assets"
inherit_id="web.assets_backend"
>
<xpath expr="." position="inside">
<link
rel="stylesheet"
href="/web_environment_ribbon/static/src/css/ribbon.css"
/>
<script
<script
type="text/javascript"
src="/web_environment_ribbon/static/src/js/ribbon.js"
/>
</xpath>
</template>

</xpath>
</template>
</odoo>
5 changes: 0 additions & 5 deletions web_responsive/static/src/xml/apps.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,14 @@
name="t-attf-href"
>#menu_id=#{app.menuID}&amp;action_id=#{app.actionID}</attribute>
</t>

<!-- App icons should be more than a text -->
<t t-jquery=".o_app &gt; t" t-operation="replace">
<t t-call="web_responsive.AppIcon" />
</t>

<!-- Same hotkey as in EE -->
<t t-jquery=".full" t-operation="attributes">
<attribute name="accesskey">a</attribute>
</t>

<!-- Search bar -->
<t t-jquery="[t-as=app]" t-operation="before">
<div class="search-container form-row align-items-center mb-4 col-12">
Expand All @@ -42,7 +39,6 @@
</div>
</t>
</t>

<!-- Separate app icon template, for easier inheritance -->
<t t-name="web_responsive.AppIcon">
<img
Expand All @@ -53,7 +49,6 @@
<t t-esc="app.name" />
</span>
</t>

<!-- A search result -->
<t t-name="web_responsive.MenuSearchResults">
<t t-foreach="results" t-as="result">
Expand Down
13 changes: 9 additions & 4 deletions web_responsive/static/src/xml/document_viewer.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
<attribute name="data-backdrop">false</attribute>
</t>
</t>

<t t-extend="DocumentViewer.Content">
<t t-jquery=".o_close_btn" t-operation="replace">
<div class="o_buttons float-right mr8">
Expand All @@ -20,21 +19,27 @@
tabindex="0"
aria-label="Maximize"
title="Maximize"
><i class="fa fa-window-maximize" /></a>
>
<i class="fa fa-window-maximize" />
</a>
<a
role="button"
class="mr8 o_minimize_btn"
tabindex="0"
aria-label="Minimize"
title="Minimize"
><i class="fa fa-window-minimize" /></a>
>
<i class="fa fa-window-minimize" />
</a>
<a
role="button"
class="o_close_btn"
tabindex="0"
aria-label="Close"
title="Close"
><i class="fa fa-close" /></a>
>
<i class="fa fa-close" />
</a>
</div>
</t>
</t>
Expand Down
16 changes: 0 additions & 16 deletions web_responsive/static/src/xml/form_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,11 @@
License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
-->
<templates id="form_view" xml:space="preserve">

<!-- Template for buttons that display only the icon in xs -->
<t t-name="web_responsive.icon_button">
<i t-attf-class="fa fa-#{icon}" t-att-title="label" />
<span class="d-none d-sm-inline" t-esc="label" />
</t>

<t t-name="web_responsive.MenuStatusbarButtons">
<div class="dropdown">
<button
Expand All @@ -31,48 +29,41 @@
is appended here from JS -->
</div>
</t>

<t t-extend="FormView.buttons">
<!-- Change "Edit" button hotkey to "E" -->
<t t-jquery=".o_form_button_edit" t-operation="attributes">
<attribute name="accesskey">e</attribute>
</t>

<!-- Change "Discard" button hotkey to "D" -->
<t t-jquery=".o_form_button_cancel" t-operation="attributes">
<attribute name="accesskey">d</attribute>
</t>

<!-- Add responsive icons to buttons -->
<t t-jquery=".o_form_button_edit" t-operation="inner">
<t t-call="web_responsive.icon_button">
<t t-set="icon" t-value="'pencil'" />
<t t-set="label">Edit</t>
</t>
</t>

<t t-jquery=".o_form_button_create" t-operation="inner">
<t t-call="web_responsive.icon_button">
<t t-set="icon" t-value="'plus'" />
<t t-set="label">Create</t>
</t>
</t>

<t t-jquery=".o_form_button_save" t-operation="inner">
<t t-call="web_responsive.icon_button">
<t t-set="icon" t-value="'check'" />
<t t-set="label">Save</t>
</t>
</t>

<t t-jquery=".o_form_button_cancel" t-operation="inner">
<t t-call="web_responsive.icon_button">
<t t-set="icon" t-value="'times'" />
<t t-set="label">Discard</t>
</t>
</t>
</t>

<t t-extend="KanbanView.buttons">
<!-- Add responsive icons to buttons -->
<t t-jquery="button" t-operation="inner">
Expand All @@ -82,36 +73,31 @@
</t>
</t>
</t>

<t t-extend="ListView.buttons">
<!-- Change "Discard" button hotkey to "D" -->
<t t-jquery=".o_list_button_discard" t-operation="attributes">
<attribute name="accesskey">d</attribute>
</t>

<!-- Add responsive icons to buttons -->
<t t-jquery=".o_list_button_add" t-operation="inner">
<t t-call="web_responsive.icon_button">
<t t-set="icon" t-value="'plus'" />
<t t-set="label">Create</t>
</t>
</t>

<t t-jquery=".o_list_button_save" t-operation="inner">
<t t-call="web_responsive.icon_button">
<t t-set="icon" t-value="'check'" />
<t t-set="label">Save</t>
</t>
</t>

<t t-jquery=".o_list_button_discard" t-operation="inner">
<t t-call="web_responsive.icon_button">
<t t-set="icon" t-value="'times'" />
<t t-set="label">Discard</t>
</t>
</t>
</t>

<t t-extend="Sidebar">
<!-- Replace some common sections by icons in mobile -->
<t
Expand Down Expand Up @@ -139,7 +125,6 @@
</t>
</t>
</t>

<t t-extend="mail.Chatter">
<t t-jquery=".o_chatter_topbar" t-operation="replace">
<div class="o_chatter_header_container">
Expand All @@ -149,5 +134,4 @@
</div>
</t>
</t>

</templates>
2 changes: 0 additions & 2 deletions web_responsive/views/res_users.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
-->
<odoo>

<record id="view_users_form_simple_modif" model="ir.ui.view">
<field name="model">res.users</field>
<field name="inherit_id" ref="base.view_users_form_simple_modif" />
Expand All @@ -15,5 +14,4 @@
</xpath>
</field>
</record>

</odoo>
2 changes: 0 additions & 2 deletions web_responsive/views/web.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
-->
<odoo>

<template
id="webclient_bootstrap"
inherit_id="web.webclient_bootstrap"
Expand All @@ -18,5 +17,4 @@
/>
</xpath>
</template>

</odoo>
2 changes: 0 additions & 2 deletions web_tree_many2one_clickable/views/assets.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
Copyright 2019 Alexandre Díaz <[email protected]>
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
<odoo>

<template
id="assets_backend"
name="web_tree_many2one_clickable assets"
Expand All @@ -20,5 +19,4 @@
/>
</xpath>
</template>

</odoo>
2 changes: 0 additions & 2 deletions web_widget_bokeh_chart/views/web_widget_bokeh_chart.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>

<template
id="assets_backend"
name="web_widget_bokeh_chart assets"
Expand Down Expand Up @@ -40,5 +39,4 @@
/>
</xpath>
</template>

</odoo>
14 changes: 6 additions & 8 deletions web_widget_image_download/views/assets.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,16 @@
<!-- Copyright 2016 Flavio Corpa <[email protected]>
License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). -->
<odoo>

<template id="assets_backend" inherit_id="web.assets_backend">
<xpath expr=".">
<link
<template id="assets_backend" inherit_id="web.assets_backend">
<xpath expr=".">
<link
rel="stylesheet"
href="/web_widget_image_download/static/src/scss/web_widget_image_download.scss"
/>
<script
<script
type="text/javascript"
src="/web_widget_image_download/static/src/js/web_widget_image_download.js"
/>
</xpath>
</template>

</xpath>
</template>
</odoo>

0 comments on commit dee955f

Please sign in to comment.