Skip to content
Extraits de code Groupes Projets
Valider ef7baf40 rédigé par Benjamin - Le Filament's avatar Benjamin - Le Filament
Parcourir les fichiers

[update] report template

parent ada5c18b
Branches
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -6,8 +6,6 @@ exclude: | ...@@ -6,8 +6,6 @@ exclude: |
^setup/|/static/description/index\.html$| ^setup/|/static/description/index\.html$|
# We don't want to mess with tool-generated files # We don't want to mess with tool-generated files
.svg$|/tests/([^/]+/)?cassettes/|^.copier-answers.yml$|^.github/| .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) # Library files can have extraneous formatting (even minimized)
/static/(src/)?lib/| /static/(src/)?lib/|
# Repos using Sphinx to generate docs don't need prettying # Repos using Sphinx to generate docs don't need prettying
...@@ -28,7 +26,7 @@ repos: ...@@ -28,7 +26,7 @@ repos:
language: fail language: fail
files: "\\.rej$" files: "\\.rej$"
- repo: https://github.com/oca/maintainer-tools - repo: https://github.com/oca/maintainer-tools
rev: ab1d7f6 rev: 7d8a9f9ad73db0976fb03cbee43d953bc29b89e9
hooks: hooks:
# update the NOT INSTALLABLE ADDONS section above # update the NOT INSTALLABLE ADDONS section above
- id: oca-update-pre-commit-excluded-addons - id: oca-update-pre-commit-excluded-addons
...@@ -46,11 +44,11 @@ repos: ...@@ -46,11 +44,11 @@ repos:
- --remove-duplicate-keys - --remove-duplicate-keys
- --remove-unused-variables - --remove-unused-variables
- repo: https://github.com/psf/black - repo: https://github.com/psf/black
rev: 20.8b1 rev: 22.3.0
hooks: hooks:
- id: black - id: black
- repo: https://github.com/pre-commit/mirrors-prettier - repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.1.2 rev: v2.6.2
hooks: hooks:
- id: prettier - id: prettier
name: prettier (with plugin-xml) name: prettier (with plugin-xml)
...@@ -61,7 +59,7 @@ repos: ...@@ -61,7 +59,7 @@ repos:
- --plugin=@prettier/plugin-xml - --plugin=@prettier/plugin-xml
files: \.(css|htm|html|js|json|jsx|less|md|scss|toml|ts|xml|yaml|yml)$ files: \.(css|htm|html|js|json|jsx|less|md|scss|toml|ts|xml|yaml|yml)$
- repo: https://github.com/pre-commit/mirrors-eslint - repo: https://github.com/pre-commit/mirrors-eslint
rev: v7.8.1 rev: v8.15.0
hooks: hooks:
- id: eslint - id: eslint
verbose: true verbose: true
...@@ -69,7 +67,7 @@ repos: ...@@ -69,7 +67,7 @@ repos:
- --color - --color
- --fix - --fix
- repo: https://github.com/pre-commit/pre-commit-hooks - repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0 rev: v4.2.0
hooks: hooks:
- id: trailing-whitespace - id: trailing-whitespace
# exclude autogenerated files # exclude autogenerated files
...@@ -91,12 +89,12 @@ repos: ...@@ -91,12 +89,12 @@ repos:
- id: mixed-line-ending - id: mixed-line-ending
args: ["--fix=lf"] args: ["--fix=lf"]
- repo: https://github.com/asottile/pyupgrade - repo: https://github.com/asottile/pyupgrade
rev: v2.7.2 rev: v2.32.1
hooks: hooks:
- id: pyupgrade - id: pyupgrade
args: ["--keep-percent-format"] args: ["--keep-percent-format"]
- repo: https://github.com/PyCQA/isort - repo: https://github.com/PyCQA/isort
rev: 5.5.1 rev: 5.10.1
hooks: hooks:
- id: isort - id: isort
name: isort except __init__.py name: isort except __init__.py
...@@ -104,13 +102,13 @@ repos: ...@@ -104,13 +102,13 @@ repos:
- --settings=. - --settings=.
exclude: /__init__\.py$ exclude: /__init__\.py$
- repo: https://gitlab.com/PyCQA/flake8 - repo: https://gitlab.com/PyCQA/flake8
rev: 3.8.3 rev: 3.9.2
hooks: hooks:
- id: flake8 - id: flake8
name: flake8 name: flake8
additional_dependencies: ["flake8-bugbear==20.1.4"] additional_dependencies: ["flake8-bugbear==20.1.4"]
- repo: https://github.com/PyCQA/pylint - repo: https://github.com/PyCQA/pylint
rev: pylint-2.5.3 rev: v2.11.1
hooks: hooks:
- id: pylint - id: pylint
name: pylint with optional checks name: pylint with optional checks
...@@ -119,7 +117,7 @@ repos: ...@@ -119,7 +117,7 @@ repos:
- --exit-zero - --exit-zero
verbose: true verbose: true
additional_dependencies: &pylint_deps additional_dependencies: &pylint_deps
- pylint-odoo==3.5.0 - pylint-odoo==5.0.5
- id: pylint - id: pylint
name: pylint with mandatory checks name: pylint with mandatory checks
args: args:
......
...@@ -487,7 +487,9 @@ class ScopCotisationExo(models.Model): ...@@ -487,7 +487,9 @@ class ScopCotisationExo(models.Model):
else self.date_exo_ok else self.date_exo_ok
) )
date_due = bordereau_id.invoice_ids.filtered( date_due = bordereau_id.invoice_ids.filtered(
lambda i: i.cotiz_quarter == str(quarter) and i.move_type == "out_invoice")[0].invoice_date_due lambda i: i.cotiz_quarter == str(quarter)
and i.move_type == "out_invoice"
)[0].invoice_date_due
# Create refund # Create refund
refund = bordereau_id.invoice_ids.create( refund = bordereau_id.invoice_ids.create(
{ {
...@@ -510,9 +512,15 @@ class ScopCotisationExo(models.Model): ...@@ -510,9 +512,15 @@ class ScopCotisationExo(models.Model):
0, 0,
None, None,
{ {
"product_id": inv_id.invoice_line_ids[0].product_id.id, "product_id": inv_id.invoice_line_ids[
"account_id": inv_id.invoice_line_ids[0].account_id.id, 0
"name": inv_id.invoice_line_ids[0].product_id.name ].product_id.id,
"account_id": inv_id.invoice_line_ids[
0
].account_id.id,
"name": inv_id.invoice_line_ids[
0
].product_id.name
+ " T" + " T"
+ str(quarter), + str(quarter),
"price_unit": exo_amount, "price_unit": exo_amount,
......
...@@ -5,10 +5,10 @@ ...@@ -5,10 +5,10 @@
<template id="report_exo_coop_document"> <template id="report_exo_coop_document">
<t t-call="web.external_layout"> <t t-call="web.external_layout">
<t t-set="o" t-value="o.with_context(lang='fr')" /> <t t-set="o" t-value="o.with_context(lang='fr')" />
<div class="page" style="font-size: 14px;"> <div class="page" style="font-size: 15px;">
<div class="row"> <div class="row">
<div class="col-6 offset-6 mt64 mb64"> <div class="col-6 offset-6 oe_mt64 oe_mb64">
<span <span
t-field="o.partner_id.name" t-field="o.partner_id.name"
style="text-transform: uppercase; font-weight: 600;" style="text-transform: uppercase; font-weight: 600;"
...@@ -30,14 +30,14 @@ ...@@ -30,14 +30,14 @@
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col-12 text-center mb32"> <div class="col-12 text-center oe_mb32">
<h2 style="color: #E5074D;"> <h2 style="color: #E5074D;">
Demande d'exonération de cotisations Demande d'exonération de cotisations
</h2> </h2>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col-12 mb32"> <div class="col-12 oe_mb32">
<p> <p>
Paris, le <span Paris, le <span
t-esc="o.date_exo_ok" t-esc="o.date_exo_ok"
...@@ -52,9 +52,9 @@ ...@@ -52,9 +52,9 @@
</p> </p>
</div> </div>
</div> </div>
<div class="row mb16"> <div class="row oe_mb16">
<div class="col-12" style="test-align: justify;"> <div class="col-12" style="test-align: justify;">
<p class="mb32">Cher Coopérateur,</p> <p class="oe_mb32">Cher Coopérateur,</p>
<!-- Avis Favorable--> <!-- Avis Favorable-->
<t t-if="o.final_notice == 'favorable'"> <t t-if="o.final_notice == 'favorable'">
<p <p
...@@ -139,7 +139,7 @@ ...@@ -139,7 +139,7 @@
<!-- QWeb Reports --> <!-- QWeb Reports -->
<record id="cgscop_exo_report" model="ir.actions.report"> <record id="cgscop_exo_report" model="ir.actions.report">
<field name="name">Courrier d'exonération</field> <field name="name">CG Scop - Courrier d'exonération</field>
<field name="model">scop.cotisation.cg.exo</field> <field name="model">scop.cotisation.cg.exo</field>
<field name="report_type">qweb-pdf</field> <field name="report_type">qweb-pdf</field>
<field name="report_name">cgscop_cotisation_cg_exo.report_exo</field> <field name="report_name">cgscop_cotisation_cg_exo.report_exo</field>
......
...@@ -16,11 +16,7 @@ ...@@ -16,11 +16,7 @@
attrs="{'invisible': ['|', ('is_cooperative', '!=', True), ('project_status', '!=', '6_suivi')]}" attrs="{'invisible': ['|', ('is_cooperative', '!=', True), ('project_status', '!=', '6_suivi')]}"
> >
<field name="exo_ids" mode="tree,form" readonly="1"> <field name="exo_ids" mode="tree,form" readonly="1">
<tree <tree create="false" edit="false" delete="false">
create="false"
edit="false"
delete="false"
>
<field name="date_request" /> <field name="date_request" />
<field name="source" /> <field name="source" />
<field name="date_exo_start" /> <field name="date_exo_start" />
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter