3
0
Fork 0

pre-commit update: prettier xml indent

13.0
Stéphane Bidoul 2020-03-02 10:10:44 +01:00
parent cf9b15816e
commit dee955fc26
No known key found for this signature in database
GPG Key ID: BCAB2555446B5B92
15 changed files with 36 additions and 69 deletions

View File

@ -9,4 +9,4 @@ line_length=88
known_odoo=odoo known_odoo=odoo
known_odoo_addons=odoo.addons known_odoo_addons=odoo.addons
sections=FUTURE,STDLIB,THIRDPARTY,ODOO,ODOO_ADDONS,FIRSTPARTY,LOCALFOLDER sections=FUTURE,STDLIB,THIRDPARTY,ODOO,ODOO_ADDONS,FIRSTPARTY,LOCALFOLDER
known_third_party=mock,setuptools default_section=THIRDPARTY

View File

@ -9,7 +9,7 @@ exclude: |
# Repos using Sphinx to generate docs don't need prettying # Repos using Sphinx to generate docs don't need prettying
^docs/_templates/.*\.html$| ^docs/_templates/.*\.html$|
# You don't usually want a bot to modify your legal texts # You don't usually want a bot to modify your legal texts
/(LICENSE|COPYING) (LICENSE.*|COPYING.*)
default_language_version: default_language_version:
python: python3 python: python3
repos: repos:
@ -30,7 +30,7 @@ repos:
name: prettier xml plugin name: prettier xml plugin
additional_dependencies: additional_dependencies:
- "prettier@1.19.1" - "prettier@1.19.1"
- "@prettier/plugin-xml@0.5.0" - "@prettier/plugin-xml@0.7.2"
files: \.xml$ files: \.xml$
- repo: https://github.com/pre-commit/mirrors-eslint - repo: https://github.com/pre-commit/mirrors-eslint
rev: v6.8.0 rev: v6.8.0
@ -85,10 +85,6 @@ repos:
rev: v1.26.2 rev: v1.26.2
hooks: hooks:
- id: pyupgrade - 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 - repo: https://github.com/pre-commit/mirrors-isort
rev: v4.3.21 rev: v4.3.21
hooks: hooks:

View File

@ -5,3 +5,4 @@ printWidth: 88
proseWrap: always proseWrap: always
semi: true semi: true
trailingComma: "es5" trailingComma: "es5"
xmlWhitespaceSensitivity: "ignore"

View File

@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8" ?> <?xml version="1.0" encoding="utf-8" ?>
<odoo> <odoo>
<template <template
id="assets_backend" id="assets_backend"
name="numpad_dot assets" name="numpad_dot assets"
@ -13,5 +12,4 @@
/> />
</xpath> </xpath>
</template> </template>
</odoo> </odoo>

View File

@ -5,12 +5,12 @@
<i class="fa fa-close" /> <i class="fa fa-close" />
</t> </t>
<t t-jquery="button.close" t-operation="before"> <t t-jquery="button.close" t-operation="before">
<button type="button" class="dialog_button_extend close"><i <button type="button" class="dialog_button_extend close">
class="fa fa-expand" <i class="fa fa-expand" />
/></button> </button>
<button type="button" class="dialog_button_restore close"><i <button type="button" class="dialog_button_restore close">
class="fa fa-compress" <i class="fa fa-compress" />
/></button> </button>
</t> </t>
</t> </t>
</templates> </templates>

View File

@ -2,23 +2,19 @@
<!-- Copyright 2015 Francesco OpenCode Apruzzese <cescoap@gmail.com> <!-- Copyright 2015 Francesco OpenCode Apruzzese <cescoap@gmail.com>
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). --> License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
<odoo noupdate="1"> <odoo noupdate="1">
<!-- Add ribbon name default configuration parameter --> <!-- Add ribbon name default configuration parameter -->
<record id="default_ribbon_name" model="ir.config_parameter"> <record id="default_ribbon_name" model="ir.config_parameter">
<field name="key">ribbon.name</field> <field name="key">ribbon.name</field>
<field name="value"><![CDATA[TEST<br/>({db_name})]]></field> <field name="value"><![CDATA[TEST<br/>({db_name})]]></field>
</record> </record>
<!-- Add ribbon color configuration parameter --> <!-- Add ribbon color configuration parameter -->
<record id="set_ribbon_color" model="ir.config_parameter"> <record id="set_ribbon_color" model="ir.config_parameter">
<field name="key">ribbon.color</field> <field name="key">ribbon.color</field>
<field name="value">#f0f0f0</field> <field name="value">#f0f0f0</field>
</record> </record>
<!-- Add ribbon background color configuration parameter --> <!-- Add ribbon background color configuration parameter -->
<record id="set_ribbon_background_color" model="ir.config_parameter"> <record id="set_ribbon_background_color" model="ir.config_parameter">
<field name="key">ribbon.background.color</field> <field name="key">ribbon.background.color</field>
<field name="value">rgba(255,0,0,.6)</field> <field name="value">rgba(255,0,0,.6)</field>
</record> </record>
</odoo> </odoo>

View File

@ -3,19 +3,21 @@
Copyright 2016 Antonio Espinosa <antonio.espinosa@tecnativa.com> Copyright 2016 Antonio Espinosa <antonio.espinosa@tecnativa.com>
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). --> License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
<odoo> <odoo>
<!-- Load css for ribbons -->
<!-- Load css for ribbons --> <template
<template id="assets_backend" name="ribbon_test assets" inherit_id="web.assets_backend"> id="assets_backend"
<xpath expr="." position="inside"> name="ribbon_test assets"
<link inherit_id="web.assets_backend"
>
<xpath expr="." position="inside">
<link
rel="stylesheet" rel="stylesheet"
href="/web_environment_ribbon/static/src/css/ribbon.css" href="/web_environment_ribbon/static/src/css/ribbon.css"
/> />
<script <script
type="text/javascript" type="text/javascript"
src="/web_environment_ribbon/static/src/js/ribbon.js" src="/web_environment_ribbon/static/src/js/ribbon.js"
/> />
</xpath> </xpath>
</template> </template>
</odoo> </odoo>

View File

@ -9,17 +9,14 @@
name="t-attf-href" name="t-attf-href"
>#menu_id=#{app.menuID}&amp;action_id=#{app.actionID}</attribute> >#menu_id=#{app.menuID}&amp;action_id=#{app.actionID}</attribute>
</t> </t>
<!-- App icons should be more than a text --> <!-- App icons should be more than a text -->
<t t-jquery=".o_app &gt; t" t-operation="replace"> <t t-jquery=".o_app &gt; t" t-operation="replace">
<t t-call="web_responsive.AppIcon" /> <t t-call="web_responsive.AppIcon" />
</t> </t>
<!-- Same hotkey as in EE --> <!-- Same hotkey as in EE -->
<t t-jquery=".full" t-operation="attributes"> <t t-jquery=".full" t-operation="attributes">
<attribute name="accesskey">a</attribute> <attribute name="accesskey">a</attribute>
</t> </t>
<!-- Search bar --> <!-- Search bar -->
<t t-jquery="[t-as=app]" t-operation="before"> <t t-jquery="[t-as=app]" t-operation="before">
<div class="search-container form-row align-items-center mb-4 col-12"> <div class="search-container form-row align-items-center mb-4 col-12">
@ -42,7 +39,6 @@
</div> </div>
</t> </t>
</t> </t>
<!-- Separate app icon template, for easier inheritance --> <!-- Separate app icon template, for easier inheritance -->
<t t-name="web_responsive.AppIcon"> <t t-name="web_responsive.AppIcon">
<img <img
@ -53,7 +49,6 @@
<t t-esc="app.name" /> <t t-esc="app.name" />
</span> </span>
</t> </t>
<!-- A search result --> <!-- A search result -->
<t t-name="web_responsive.MenuSearchResults"> <t t-name="web_responsive.MenuSearchResults">
<t t-foreach="results" t-as="result"> <t t-foreach="results" t-as="result">

View File

@ -10,7 +10,6 @@
<attribute name="data-backdrop">false</attribute> <attribute name="data-backdrop">false</attribute>
</t> </t>
</t> </t>
<t t-extend="DocumentViewer.Content"> <t t-extend="DocumentViewer.Content">
<t t-jquery=".o_close_btn" t-operation="replace"> <t t-jquery=".o_close_btn" t-operation="replace">
<div class="o_buttons float-right mr8"> <div class="o_buttons float-right mr8">
@ -20,21 +19,27 @@
tabindex="0" tabindex="0"
aria-label="Maximize" aria-label="Maximize"
title="Maximize" title="Maximize"
><i class="fa fa-window-maximize" /></a> >
<i class="fa fa-window-maximize" />
</a>
<a <a
role="button" role="button"
class="mr8 o_minimize_btn" class="mr8 o_minimize_btn"
tabindex="0" tabindex="0"
aria-label="Minimize" aria-label="Minimize"
title="Minimize" title="Minimize"
><i class="fa fa-window-minimize" /></a> >
<i class="fa fa-window-minimize" />
</a>
<a <a
role="button" role="button"
class="o_close_btn" class="o_close_btn"
tabindex="0" tabindex="0"
aria-label="Close" aria-label="Close"
title="Close" title="Close"
><i class="fa fa-close" /></a> >
<i class="fa fa-close" />
</a>
</div> </div>
</t> </t>
</t> </t>

View File

@ -6,13 +6,11 @@
License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html). License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
--> -->
<templates id="form_view" xml:space="preserve"> <templates id="form_view" xml:space="preserve">
<!-- Template for buttons that display only the icon in xs --> <!-- Template for buttons that display only the icon in xs -->
<t t-name="web_responsive.icon_button"> <t t-name="web_responsive.icon_button">
<i t-attf-class="fa fa-#{icon}" t-att-title="label" /> <i t-attf-class="fa fa-#{icon}" t-att-title="label" />
<span class="d-none d-sm-inline" t-esc="label" /> <span class="d-none d-sm-inline" t-esc="label" />
</t> </t>
<t t-name="web_responsive.MenuStatusbarButtons"> <t t-name="web_responsive.MenuStatusbarButtons">
<div class="dropdown"> <div class="dropdown">
<button <button
@ -31,18 +29,15 @@
is appended here from JS --> is appended here from JS -->
</div> </div>
</t> </t>
<t t-extend="FormView.buttons"> <t t-extend="FormView.buttons">
<!-- Change "Edit" button hotkey to "E" --> <!-- Change "Edit" button hotkey to "E" -->
<t t-jquery=".o_form_button_edit" t-operation="attributes"> <t t-jquery=".o_form_button_edit" t-operation="attributes">
<attribute name="accesskey">e</attribute> <attribute name="accesskey">e</attribute>
</t> </t>
<!-- Change "Discard" button hotkey to "D" --> <!-- Change "Discard" button hotkey to "D" -->
<t t-jquery=".o_form_button_cancel" t-operation="attributes"> <t t-jquery=".o_form_button_cancel" t-operation="attributes">
<attribute name="accesskey">d</attribute> <attribute name="accesskey">d</attribute>
</t> </t>
<!-- Add responsive icons to buttons --> <!-- Add responsive icons to buttons -->
<t t-jquery=".o_form_button_edit" t-operation="inner"> <t t-jquery=".o_form_button_edit" t-operation="inner">
<t t-call="web_responsive.icon_button"> <t t-call="web_responsive.icon_button">
@ -50,21 +45,18 @@
<t t-set="label">Edit</t> <t t-set="label">Edit</t>
</t> </t>
</t> </t>
<t t-jquery=".o_form_button_create" t-operation="inner"> <t t-jquery=".o_form_button_create" t-operation="inner">
<t t-call="web_responsive.icon_button"> <t t-call="web_responsive.icon_button">
<t t-set="icon" t-value="'plus'" /> <t t-set="icon" t-value="'plus'" />
<t t-set="label">Create</t> <t t-set="label">Create</t>
</t> </t>
</t> </t>
<t t-jquery=".o_form_button_save" t-operation="inner"> <t t-jquery=".o_form_button_save" t-operation="inner">
<t t-call="web_responsive.icon_button"> <t t-call="web_responsive.icon_button">
<t t-set="icon" t-value="'check'" /> <t t-set="icon" t-value="'check'" />
<t t-set="label">Save</t> <t t-set="label">Save</t>
</t> </t>
</t> </t>
<t t-jquery=".o_form_button_cancel" t-operation="inner"> <t t-jquery=".o_form_button_cancel" t-operation="inner">
<t t-call="web_responsive.icon_button"> <t t-call="web_responsive.icon_button">
<t t-set="icon" t-value="'times'" /> <t t-set="icon" t-value="'times'" />
@ -72,7 +64,6 @@
</t> </t>
</t> </t>
</t> </t>
<t t-extend="KanbanView.buttons"> <t t-extend="KanbanView.buttons">
<!-- Add responsive icons to buttons --> <!-- Add responsive icons to buttons -->
<t t-jquery="button" t-operation="inner"> <t t-jquery="button" t-operation="inner">
@ -82,13 +73,11 @@
</t> </t>
</t> </t>
</t> </t>
<t t-extend="ListView.buttons"> <t t-extend="ListView.buttons">
<!-- Change "Discard" button hotkey to "D" --> <!-- Change "Discard" button hotkey to "D" -->
<t t-jquery=".o_list_button_discard" t-operation="attributes"> <t t-jquery=".o_list_button_discard" t-operation="attributes">
<attribute name="accesskey">d</attribute> <attribute name="accesskey">d</attribute>
</t> </t>
<!-- Add responsive icons to buttons --> <!-- Add responsive icons to buttons -->
<t t-jquery=".o_list_button_add" t-operation="inner"> <t t-jquery=".o_list_button_add" t-operation="inner">
<t t-call="web_responsive.icon_button"> <t t-call="web_responsive.icon_button">
@ -96,14 +85,12 @@
<t t-set="label">Create</t> <t t-set="label">Create</t>
</t> </t>
</t> </t>
<t t-jquery=".o_list_button_save" t-operation="inner"> <t t-jquery=".o_list_button_save" t-operation="inner">
<t t-call="web_responsive.icon_button"> <t t-call="web_responsive.icon_button">
<t t-set="icon" t-value="'check'" /> <t t-set="icon" t-value="'check'" />
<t t-set="label">Save</t> <t t-set="label">Save</t>
</t> </t>
</t> </t>
<t t-jquery=".o_list_button_discard" t-operation="inner"> <t t-jquery=".o_list_button_discard" t-operation="inner">
<t t-call="web_responsive.icon_button"> <t t-call="web_responsive.icon_button">
<t t-set="icon" t-value="'times'" /> <t t-set="icon" t-value="'times'" />
@ -111,7 +98,6 @@
</t> </t>
</t> </t>
</t> </t>
<t t-extend="Sidebar"> <t t-extend="Sidebar">
<!-- Replace some common sections by icons in mobile --> <!-- Replace some common sections by icons in mobile -->
<t <t
@ -139,7 +125,6 @@
</t> </t>
</t> </t>
</t> </t>
<t t-extend="mail.Chatter"> <t t-extend="mail.Chatter">
<t t-jquery=".o_chatter_topbar" t-operation="replace"> <t t-jquery=".o_chatter_topbar" t-operation="replace">
<div class="o_chatter_header_container"> <div class="o_chatter_header_container">
@ -149,5 +134,4 @@
</div> </div>
</t> </t>
</t> </t>
</templates> </templates>

View File

@ -5,7 +5,6 @@
License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html). License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
--> -->
<odoo> <odoo>
<record id="view_users_form_simple_modif" model="ir.ui.view"> <record id="view_users_form_simple_modif" model="ir.ui.view">
<field name="model">res.users</field> <field name="model">res.users</field>
<field name="inherit_id" ref="base.view_users_form_simple_modif" /> <field name="inherit_id" ref="base.view_users_form_simple_modif" />
@ -15,5 +14,4 @@
</xpath> </xpath>
</field> </field>
</record> </record>
</odoo> </odoo>

View File

@ -4,7 +4,6 @@
License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html). License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
--> -->
<odoo> <odoo>
<template <template
id="webclient_bootstrap" id="webclient_bootstrap"
inherit_id="web.webclient_bootstrap" inherit_id="web.webclient_bootstrap"
@ -18,5 +17,4 @@
/> />
</xpath> </xpath>
</template> </template>
</odoo> </odoo>

View File

@ -3,7 +3,6 @@
Copyright 2019 Alexandre Díaz <alexandre.diaz@tecnativa.com> Copyright 2019 Alexandre Díaz <alexandre.diaz@tecnativa.com>
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). --> License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
<odoo> <odoo>
<template <template
id="assets_backend" id="assets_backend"
name="web_tree_many2one_clickable assets" name="web_tree_many2one_clickable assets"
@ -20,5 +19,4 @@
/> />
</xpath> </xpath>
</template> </template>
</odoo> </odoo>

View File

@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8" ?> <?xml version="1.0" encoding="utf-8" ?>
<odoo> <odoo>
<template <template
id="assets_backend" id="assets_backend"
name="web_widget_bokeh_chart assets" name="web_widget_bokeh_chart assets"
@ -40,5 +39,4 @@
/> />
</xpath> </xpath>
</template> </template>
</odoo> </odoo>

View File

@ -2,18 +2,16 @@
<!-- Copyright 2016 Flavio Corpa <flavio.corpa@tecnativa.com> <!-- Copyright 2016 Flavio Corpa <flavio.corpa@tecnativa.com>
License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). --> License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). -->
<odoo> <odoo>
<template id="assets_backend" inherit_id="web.assets_backend">
<template id="assets_backend" inherit_id="web.assets_backend"> <xpath expr=".">
<xpath expr="."> <link
<link
rel="stylesheet" rel="stylesheet"
href="/web_widget_image_download/static/src/scss/web_widget_image_download.scss" href="/web_widget_image_download/static/src/scss/web_widget_image_download.scss"
/> />
<script <script
type="text/javascript" type="text/javascript"
src="/web_widget_image_download/static/src/js/web_widget_image_download.js" src="/web_widget_image_download/static/src/js/web_widget_image_download.js"
/> />
</xpath> </xpath>
</template> </template>
</odoo> </odoo>