Skip to content

Commit

Permalink
[IMP] l10n_fr_intrastat_service: pre-commit fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
alexis-via committed Jan 3, 2025
1 parent d37b193 commit c5765ce
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 46 deletions.
10 changes: 5 additions & 5 deletions l10n_fr_intrastat_service/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ DES
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fl10n--france-lightgray.png?logo=github
:target: https://github.com/OCA/l10n-france/tree/17.0/l10n_fr_intrastat_service
:target: https://github.com/OCA/l10n-france/tree/18.0/l10n_fr_intrastat_service
:alt: OCA/l10n-france
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/l10n-france-17-0/l10n-france-17-0-l10n_fr_intrastat_service
:target: https://translation.odoo-community.org/projects/l10n-france-18-0/l10n-france-18-0-l10n_fr_intrastat_service
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/l10n-france&target_branch=17.0
:target: https://runboat.odoo-community.org/builds?repo=OCA/l10n-france&target_branch=18.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|
Expand Down Expand Up @@ -61,7 +61,7 @@ Bug Tracker
Bugs are tracked on `GitHub Issues <https://github.com/OCA/l10n-france/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/l10n-france/issues/new?body=module:%20l10n_fr_intrastat_service%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
`feedback <https://github.com/OCA/l10n-france/issues/new?body=module:%20l10n_fr_intrastat_service%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Expand Down Expand Up @@ -99,6 +99,6 @@ Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-alexis-via|

This module is part of the `OCA/l10n-france <https://github.com/OCA/l10n-france/tree/17.0/l10n_fr_intrastat_service>`_ project on GitHub.
This module is part of the `OCA/l10n-france <https://github.com/OCA/l10n-france/tree/18.0/l10n_fr_intrastat_service>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
37 changes: 17 additions & 20 deletions l10n_fr_intrastat_service/data/mail_template.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-->
<odoo>

<record id="intrastat_service_reminder_email_template" model="mail.template">
<field name="name">DES Reminder</field>
<field
Expand All @@ -20,54 +19,52 @@
name="subject"
>DES {{object.year_month}} for {{object.company_id.name}}</field>
<field name="body_html" type="html">
<div style="margin: 0px; padding: 0px;">
<p
<div style="margin: 0px; padding: 0px;">
<p
style="margin: 0px; padding: 0px; font-size: 12px; font-family: Arial, Helvetica, sans-serif"
>I would like to remind you that we are approaching the deadline for the DES declaration for month <t
t-out="object.year_month"
/>.<br /><br />
t-out="object.year_month"
/>.<br /><br />

As there were no DES for that month in Odoo, a draft declaration has been generated automatically.<br
/><br />
/><br />

<t t-if="ctx.get('exception')">
When trying to generate the DES lines, the following error was encountered:<br /><br />

<t t-out="ctx.get('error_msg')" /><br /><br />

You should solve this error, then go to the menu <em
>Invoicing &gt; Reporting &gt; Intrastat &gt; DES</em>, open the declaration of month <t
t-out="object.year_month"
/> and click on the button <em>Re-generate lines</em>.<br /><br
/>
>Invoicing &gt; Reporting &gt; Intrastat &gt; DES</em>, open the declaration of month <t
t-out="object.year_month"
/> and click on the button <em>Re-generate lines</em>.<br /><br />
</t>

<t t-else="">
<t t-if="object.num_decl_lines">
This draft DES contains <t
t-out="object.num_decl_lines"
/> line(s) and the total amount is <t
t-out="format_amount(object.total_amount, object.currency_id)"
/>.<br /><br />
t-out="object.num_decl_lines"
/> line(s) and the total amount is <t
t-out="format_amount(object.total_amount, object.currency_id)"
/>.<br /><br />
</t>
<t t-else="">
This draft DES generated automatically by Odoo doesn't contain any line.<br /><br />
</t>

Go and check this declaration in the menu <em
>Invoicing &gt; Reporting &gt; Intrastat &gt; DES</em>.<br /><br
/>
>Invoicing &gt; Reporting &gt; Intrastat &gt; DES</em>.<br /><br />

</t>
</p>

<p
<p
style="margin: 0px; padding: 0px; font-size: 10px; font-family: 'Courier New', Courier, Prestige, monospace"
>
-- <br />
Automatic e-mail sent by Odoo.
</p>
</div>
</field>
</record>
</div>
</field>
</record>
</odoo>
4 changes: 2 additions & 2 deletions l10n_fr_intrastat_service/models/intrastat_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ def unlink(self):
@api.depends("year_month")
def _compute_display_name(self):
for rec in self:
rec.display_name = "DES %s" % rec.year_month
rec.display_name = f"DES {rec.year_month}"

def _prepare_domain(self):
self.ensure_one()
Expand Down Expand Up @@ -343,7 +343,7 @@ def generate_xml(self):

def _attach_xml_file(self, xml_bytes):
self.ensure_one()
filename = "%s_des.xml" % self.year_month
filename = f"{self.year_month}_des.xml"
attach = self.env["ir.attachment"].create(
{
"name": filename,
Expand Down
20 changes: 8 additions & 12 deletions l10n_fr_intrastat_service/report/report.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,12 @@
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
-->
<odoo>


<record id="xlsx_report" model="ir.actions.report">
<field name="name">DES Excel</field>
<field name="model">l10n.fr.intrastat.service.declaration</field>
<field name="report_type">xlsx</field>
<field name="report_name">l10n_fr_intrastat_service.xlsx</field>
<field name="report_file">l10n_fr_intrastat_service.xlsx</field>
<field name="print_report_name">'DES-' + object.year_month</field>
</record>


<record id="xlsx_report" model="ir.actions.report">
<field name="name">DES Excel</field>
<field name="model">l10n.fr.intrastat.service.declaration</field>
<field name="report_type">xlsx</field>
<field name="report_name">l10n_fr_intrastat_service.xlsx</field>
<field name="report_file">l10n_fr_intrastat_service.xlsx</field>
<field name="print_report_name">'DES-' + object.year_month</field>
</record>
</odoo>
17 changes: 10 additions & 7 deletions l10n_fr_intrastat_service/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@

/*
:Author: David Goodger ([email protected])
:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $
:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $
:Copyright: This stylesheet has been placed in the public domain.
Default cascading style sheet for the HTML output of Docutils.
Despite the name, some widely supported CSS2 features are used.
See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
customize this style sheet.
Expand Down Expand Up @@ -274,7 +275,7 @@
margin-left: 2em ;
margin-right: 2em }

pre.code .ln { color: grey; } /* line numbers */
pre.code .ln { color: gray; } /* line numbers */
pre.code, code { background-color: #eeeeee }
pre.code .comment, code .comment { color: #5C6576 }
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
Expand All @@ -300,7 +301,7 @@
span.pre {
white-space: pre }

span.problematic {
span.problematic, pre.problematic {
color: red }

span.section-subtitle {
Expand Down Expand Up @@ -368,7 +369,7 @@ <h1 class="title">DES</h1>
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:88a020a10a39c54ad851bca7365306527a860f6286ad2c1c87c8807aa2eaa7cf
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/l10n-france/tree/17.0/l10n_fr_intrastat_service"><img alt="OCA/l10n-france" src="https://img.shields.io/badge/github-OCA%2Fl10n--france-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/l10n-france-17-0/l10n-france-17-0-l10n_fr_intrastat_service"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/l10n-france&amp;target_branch=17.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/l10n-france/tree/18.0/l10n_fr_intrastat_service"><img alt="OCA/l10n-france" src="https://img.shields.io/badge/github-OCA%2Fl10n--france-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/l10n-france-18-0/l10n-france-18-0-l10n_fr_intrastat_service"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/l10n-france&amp;target_branch=18.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>This module adds support for the <strong>Déclaration Européenne des Services</strong>
(DES) for France.</p>
<p>The DES declaration has been introduced on January 1st 2010 in France.
Expand Down Expand Up @@ -405,7 +406,7 @@ <h1><a class="toc-backref" href="#toc-entry-2">Bug Tracker</a></h1>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/l10n-france/issues">GitHub Issues</a>.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
<a class="reference external" href="https://github.com/OCA/l10n-france/issues/new?body=module:%20l10n_fr_intrastat_service%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<a class="reference external" href="https://github.com/OCA/l10n-france/issues/new?body=module:%20l10n_fr_intrastat_service%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p>
</div>
<div class="section" id="credits">
Expand All @@ -425,13 +426,15 @@ <h2><a class="toc-backref" href="#toc-entry-5">Contributors</a></h2>
<div class="section" id="maintainers">
<h2><a class="toc-backref" href="#toc-entry-6">Maintainers</a></h2>
<p>This module is maintained by the OCA.</p>
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
<a class="reference external image-reference" href="https://odoo-community.org">
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
</a>
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.</p>
<p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainer</a>:</p>
<p><a class="reference external image-reference" href="https://github.com/alexis-via"><img alt="alexis-via" src="https://github.com/alexis-via.png?size=40px" /></a></p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/l10n-france/tree/17.0/l10n_fr_intrastat_service">OCA/l10n-france</a> project on GitHub.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/l10n-france/tree/18.0/l10n_fr_intrastat_service">OCA/l10n-france</a> project on GitHub.</p>
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
</div>
</div>
Expand Down

0 comments on commit c5765ce

Please sign in to comment.