Skip to content

Commit

Permalink
[MIG] account_invoice_files_download: migration to 16.0
Browse files Browse the repository at this point in the history
  • Loading branch information
huguesdk committed Dec 17, 2024
1 parent 0f0d7d9 commit 0763460
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 12 deletions.
8 changes: 4 additions & 4 deletions account_invoice_files_download/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ Account Invoice Files Download
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fedi-lightgray.png?logo=github
:target: https://github.com/OCA/edi/tree/15.0/account_invoice_files_download
:target: https://github.com/OCA/edi/tree/16.0/account_invoice_files_download
:alt: OCA/edi
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/edi-16-0/edi-16-0-account_invoice_files_download
: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/edi&target_branch=15.0
:target: https://runboat.odoo-community.org/builds?repo=OCA/edi&target_branch=16.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|
Expand All @@ -49,7 +49,7 @@ Bug Tracker
Bugs are tracked on `GitHub Issues <https://github.com/OCA/edi/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/edi/issues/new?body=module:%20account_invoice_files_download%0Aversion:%2015.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
`feedback <https://github.com/OCA/edi/issues/new?body=module:%20account_invoice_files_download%0Aversion:%2016.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 @@ -82,6 +82,6 @@ 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.

This module is part of the `OCA/edi <https://github.com/OCA/edi/tree/15.0/account_invoice_files_download>`_ project on GitHub.
This module is part of the `OCA/edi <https://github.com/OCA/edi/tree/16.0/account_invoice_files_download>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
2 changes: 1 addition & 1 deletion account_invoice_files_download/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{
"name": "Account Invoice Files Download",
"summary": "Allow to download all files of invoices as one zip file",
"version": "15.0.1.0.0",
"version": "16.0.1.0.0",
"license": "AGPL-3",
"author": "Coop IT Easy SC, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/edi",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 15.0\n"
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: \n"
"Language-Team: \n"
Expand Down
2 changes: 1 addition & 1 deletion account_invoice_files_download/i18n/fr.po
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 15.0\n"
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: \n"
"Language-Team: \n"
Expand Down
5 changes: 3 additions & 2 deletions account_invoice_files_download/models/account_move.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
ATTACHMENT_TMP_DESC = "temporary-invoice-edi-zip-file"
ZIP_FILE_NAME = "invoice_files-{timestamp}.zip"
REPORT_REF = "account.account_invoices"
PDF_EMBEDDED_EDI_FORMATS = ["facturx_1_0_05"]


class AccountMove(models.Model):
Expand All @@ -26,7 +27,7 @@ def _get_invoice_pdf(self):
report.print_report_name, {"object": self, "time": time}
)
filename = "{}.pdf".format(report_name.replace("/", "_"))
report_contents = report._render_qweb_pdf([self.id])[0]
report_contents = report._render_qweb_pdf(REPORT_REF, [self.id])[0]
return filename, report_contents

Check warning on line 31 in account_invoice_files_download/models/account_move.py

View check run for this annotation

Codecov / codecov/patch

account_invoice_files_download/models/account_move.py#L29-L31

Added lines #L29 - L31 were not covered by tests

def _add_invoice_edi_files(self, ziparc):
Expand All @@ -36,7 +37,7 @@ def _add_invoice_edi_files(self, ziparc):
ziparc.writestr(pdf_filename, pdf_contents)

Check warning on line 37 in account_invoice_files_download/models/account_move.py

View check run for this annotation

Codecov / codecov/patch

account_invoice_files_download/models/account_move.py#L36-L37

Added lines #L36 - L37 were not covered by tests
# now, add all edi documents that are not embedded in the pdf.
for edi_document in self.edi_document_ids:
if edi_document.edi_format_id._is_embedding_to_invoice_pdf_needed():
if edi_document.edi_format_id.code in PDF_EMBEDDED_EDI_FORMATS:
# already present in the pdf
continue
attachment = edi_document.attachment_id
Expand Down
6 changes: 3 additions & 3 deletions account_invoice_files_download/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ <h1 class="title">Account Invoice Files Download</h1>
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:66222ecd351b6fd4c6e33cc1e6ba5e586921554ea203d4415a1405600b4f5ad3
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<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/edi/tree/15.0/account_invoice_files_download"><img alt="OCA/edi" src="https://img.shields.io/badge/github-OCA%2Fedi-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/edi-16-0/edi-16-0-account_invoice_files_download"><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/edi&amp;target_branch=15.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/edi/tree/16.0/account_invoice_files_download"><img alt="OCA/edi" src="https://img.shields.io/badge/github-OCA%2Fedi-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/edi-16-0/edi-16-0-account_invoice_files_download"><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/edi&amp;target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>Allow to download all files (PDF, EDI files) of (possibly multiple) invoices
as one zip file.</p>
<p><strong>Table of contents</strong></p>
Expand All @@ -395,7 +395,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/edi/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/edi/issues/new?body=module:%20account_invoice_files_download%0Aversion:%2015.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/edi/issues/new?body=module:%20account_invoice_files_download%0Aversion:%2016.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 Down Expand Up @@ -423,7 +423,7 @@ <h2><a class="toc-backref" href="#toc-entry-6">Maintainers</a></h2>
<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>This module is part of the <a class="reference external" href="https://github.com/OCA/edi/tree/15.0/account_invoice_files_download">OCA/edi</a> project on GitHub.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/edi/tree/16.0/account_invoice_files_download">OCA/edi</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 0763460

Please sign in to comment.