diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 1c6434bfc2274c73d98dbf62b6de9baccdc353ce..732d0c4a644eb444d6b4385643ff32fab19fab52 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -6,8 +6,6 @@ exclude: | ^setup/|/static/description/index\.html$| # We don't want to mess with tool-generated files .svg$|/tests/([^/]+/)?cassettes/|^.copier-answers.yml$|^.github/| - # Maybe reactivate this when all README files include prettier ignore tags? - ^README\.md$| # Library files can have extraneous formatting (even minimized) /static/(src/)?lib/| # Repos using Sphinx to generate docs don't need prettying @@ -28,7 +26,7 @@ repos: language: fail files: "\\.rej$" - repo: https://github.com/oca/maintainer-tools - rev: ab1d7f6 + rev: 7d8a9f9ad73db0976fb03cbee43d953bc29b89e9 hooks: # update the NOT INSTALLABLE ADDONS section above - id: oca-update-pre-commit-excluded-addons @@ -46,11 +44,11 @@ repos: - --remove-duplicate-keys - --remove-unused-variables - repo: https://github.com/psf/black - rev: 20.8b1 + rev: 22.3.0 hooks: - id: black - repo: https://github.com/pre-commit/mirrors-prettier - rev: v2.1.2 + rev: v2.6.2 hooks: - id: prettier name: prettier (with plugin-xml) @@ -61,7 +59,7 @@ repos: - --plugin=@prettier/plugin-xml files: \.(css|htm|html|js|json|jsx|less|md|scss|toml|ts|xml|yaml|yml)$ - repo: https://github.com/pre-commit/mirrors-eslint - rev: v7.8.1 + rev: v8.15.0 hooks: - id: eslint verbose: true @@ -69,7 +67,7 @@ repos: - --color - --fix - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v3.2.0 + rev: v4.2.0 hooks: - id: trailing-whitespace # exclude autogenerated files @@ -91,12 +89,12 @@ repos: - id: mixed-line-ending args: ["--fix=lf"] - repo: https://github.com/asottile/pyupgrade - rev: v2.7.2 + rev: v2.32.1 hooks: - id: pyupgrade args: ["--keep-percent-format"] - repo: https://github.com/PyCQA/isort - rev: 5.5.1 + rev: 5.10.1 hooks: - id: isort name: isort except __init__.py @@ -104,13 +102,13 @@ repos: - --settings=. exclude: /__init__\.py$ - repo: https://gitlab.com/PyCQA/flake8 - rev: 3.8.3 + rev: 3.9.2 hooks: - id: flake8 name: flake8 additional_dependencies: ["flake8-bugbear==20.1.4"] - repo: https://github.com/PyCQA/pylint - rev: pylint-2.5.3 + rev: v2.11.1 hooks: - id: pylint name: pylint with optional checks @@ -119,7 +117,7 @@ repos: - --exit-zero verbose: true additional_dependencies: &pylint_deps - - pylint-odoo==3.5.0 + - pylint-odoo==5.0.5 - id: pylint name: pylint with mandatory checks args: diff --git a/views/calendar.xml b/views/calendar.xml index 76e92da738207ddd77a9bc3cccd6ea825eb91efe..3533078f52664c0aca3eb8f26b4a64e014995576 100644 --- a/views/calendar.xml +++ b/views/calendar.xml @@ -76,43 +76,39 @@ </button> <!-- Titre --> - <div class="oe_title" position="replace"> - <div class="oe_button_box" name="button_box" modifiers="{}"> - <button - name="do_accept" - string="Accepter" - states="needsAction,tentative,declined" - type="object" - icon="fa-check" - > - </button> - <button - name="do_decline" - string="Refuser" - states="needsAction,tentative,accepted" - type="object" - icon="fa-times-circle" - /> - <button - name="do_tentative" - widget="boolean_button" - class="oe_stat_button" - states="needsAction,declined,accepted" - string="Incertain" - type="object" - icon="fa-circle" - > - </button> - </div> - <div class="oe_title"> - <div class="oe_edit_only"> - <label for="name" /> - </div> - <h1> - <field name="name" placeholder="e.g. Business Lunch" /> - </h1> - </div> + <div class="oe_button_box" position="inside"> + <button + name="do_accept" + string="Accepter" + states="needsAction,tentative,declined" + type="object" + icon="fa-check" + > + </button> + <button + name="do_decline" + string="Refuser" + states="needsAction,tentative,accepted" + type="object" + icon="fa-times-circle" + /> + <button + name="do_tentative" + widget="boolean_button" + class="oe_stat_button" + states="needsAction,declined,accepted" + string="Incertain" + type="object" + icon="fa-circle" + > + </button> </div> + <xpath expr="//label[@for='partner_ids']" position="attributes"> + <attribute name="invisible">1</attribute> + </xpath> + <xpath expr="//h2" position="attributes"> + <attribute name="invisible">1</attribute> + </xpath> <!-- Masque notebook & crée la vue --> <notebook position="before"> @@ -405,30 +401,30 @@ event_limit="3" color="type" quick_add="False" - resource_field='partner_ids' + resource_field="partner_ids" > - <field name="name" /> - <field name="ur_id" invisible="1" /> - <field + <field name="name" /> + <field name="ur_id" invisible="1" /> + <field name="coop_id" options="{'no_open': True, 'no_create': True}" /> - <field + <field name="type" filters="1" options="{'no_open': True, 'no_create': True}" /> - <field + <field name="partner_id" options="{'no_open': True, 'no_create': True}" invisible="1" /> - <field name="attendees_initial" /> - <field + <field name="attendees_initial" /> + <field name="partner_ids" domain="[('user_ids', '!=', False), ('ur_id', '=', ur_id)]" /> - <field name="is_highlighted" invisible="1" /> + <field name="is_highlighted" invisible="1" /> </resource> </field> </record>