From 7413057f0f53552746ec96364ba470ab74aa67d3 Mon Sep 17 00:00:00 2001 From: Daniel Reis Date: Thu, 19 Sep 2024 17:43:31 +0100 Subject: [PATCH] [IMP] l10n_pt_stock_invoicexpress: pre-commit execution --- l10n_pt_stock_invoicexpress/README.rst | 67 ++++++++++--------- .../models/stock_picking.py | 6 +- l10n_pt_stock_invoicexpress/pyproject.toml | 3 + .../readme/CONFIGURE.md | 8 +++ .../readme/CONFIGURE.rst | 7 -- .../readme/CONTRIBUTORS.md | 2 + .../readme/CONTRIBUTORS.rst | 1 - .../readme/DESCRIPTION.md | 22 ++++++ .../readme/DESCRIPTION.rst | 23 ------- l10n_pt_stock_invoicexpress/readme/USAGE.md | 7 ++ l10n_pt_stock_invoicexpress/readme/USAGE.rst | 7 -- .../static/description/index.html | 64 ++++++++++-------- 12 files changed, 113 insertions(+), 104 deletions(-) create mode 100644 l10n_pt_stock_invoicexpress/pyproject.toml create mode 100644 l10n_pt_stock_invoicexpress/readme/CONFIGURE.md delete mode 100644 l10n_pt_stock_invoicexpress/readme/CONFIGURE.rst create mode 100644 l10n_pt_stock_invoicexpress/readme/CONTRIBUTORS.md delete mode 100644 l10n_pt_stock_invoicexpress/readme/CONTRIBUTORS.rst create mode 100644 l10n_pt_stock_invoicexpress/readme/DESCRIPTION.md delete mode 100644 l10n_pt_stock_invoicexpress/readme/DESCRIPTION.rst create mode 100644 l10n_pt_stock_invoicexpress/readme/USAGE.md delete mode 100644 l10n_pt_stock_invoicexpress/readme/USAGE.rst diff --git a/l10n_pt_stock_invoicexpress/README.rst b/l10n_pt_stock_invoicexpress/README.rst index a7743b00..30f9982a 100644 --- a/l10n_pt_stock_invoicexpress/README.rst +++ b/l10n_pt_stock_invoicexpress/README.rst @@ -17,40 +17,39 @@ Portugal InvoiceXpress Legal Transport Documents :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--portugal-lightgray.png?logo=github - :target: https://github.com/OCA/l10n-portugal/tree/16.0/l10n_pt_stock_invoicexpress + :target: https://github.com/OCA/l10n-portugal/tree/17.0/l10n_pt_stock_invoicexpress :alt: OCA/l10n-portugal .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/l10n-portugal-16-0/l10n-portugal-16-0-l10n_pt_stock_invoicexpress + :target: https://translation.odoo-community.org/projects/l10n-portugal-17-0/l10n-portugal-17-0-l10n_pt_stock_invoicexpress :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-portugal&target_branch=16.0 + :target: https://runboat.odoo-community.org/builds?repo=OCA/l10n-portugal&target_branch=17.0 :alt: Try me on Runboat |badge1| |badge2| |badge3| |badge4| |badge5| -Generate Portuguese tax authority legal transport documents ("Guias de Transporte") using InvoiceXpress. +Generate Portuguese tax authority legal transport documents ("Guias de +Transporte") using InvoiceXpress. -The InvoiceXpress document is automatically generated when an ougoing Transfer or -Delivery Order is validated. +The InvoiceXpress document is automatically generated when an ougoing +Transfer or Delivery Order is validated. This feature depends on the InvoiceXpress Invoice generation feature. -See https://github.com/OCA/l10n-portugal/blob/14.0/l10n_pt_account_invoicexpress/README.rst +See +https://github.com/OCA/l10n-portugal/blob/14.0/l10n_pt_account_invoicexpress/README.rst for more details. - **UPDATE November/2021:** Deliveries: -- Added support to the different document types, - Transport ("Guia de Transporte") and Shipment ("Guia de Remessa"). - The default document type is set on the Operation Type. - -- Changed the line description to be the Product name, - instead of the original Sales Order description, - so that it uses the most up to date product description. - -- Added tax details to the document lines. +- Added support to the different document types, Transport ("Guia de + Transporte") and Shipment ("Guia de Remessa"). The default document + type is set on the Operation Type. +- Changed the line description to be the Product name, instead of the + original Sales Order description, so that it uses the most up to date + product description. +- Added tax details to the document lines. **Table of contents** @@ -61,23 +60,24 @@ Configuration ============= This feature depends on the InvoiceXpress Incoice generation feature. -See https://github.com/OCA/l10n-portugal/blob/14.0/l10n_pt_account_invoicexpress/README.rst +See +https://github.com/OCA/l10n-portugal/blob/14.0/l10n_pt_account_invoicexpress/README.rst for configuration details. -An additional "InvoiceXpress Delivery Email" option is available, -to configure the email template preparing the details for the emailto be sent by the -InvoiceXpress service. +An additional "InvoiceXpress Delivery Email" option is available, to +configure the email template preparing the details for the emailto be +sent by the InvoiceXpress service. Usage ===== -On Delivery Orders and Internal Transfer documents, -validating the transfer automatically generates -an InvoiceXpress "Guia de Transporte" for the Done quantities. +On Delivery Orders and Internal Transfer documents, validating the +transfer automatically generates an InvoiceXpress "Guia de Transporte" +for the Done quantities. -The "Email InvoiceXpress" requests the InvoiceXpress service -to send an email with a copy of the legal document. -The content of this email can be configure in Odoo. +The "Email InvoiceXpress" requests the InvoiceXpress service to send an +email with a copy of the legal document. The content of this email can +be configure in Odoo. Bug Tracker =========== @@ -85,7 +85,7 @@ Bug Tracker Bugs are tracked on `GitHub 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 `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -93,17 +93,18 @@ Credits ======= Authors -~~~~~~~ +------- * Open Source Integrators Contributors -~~~~~~~~~~~~ +------------ -* Daniel Reis , `Open Source Integrators `_ +- Daniel Reis , `Open Source + Integrators `__ Maintainers -~~~~~~~~~~~ +----------- This module is maintained by the OCA. @@ -123,6 +124,6 @@ Current `maintainer `__: |maintainer-dreispt| -This module is part of the `OCA/l10n-portugal `_ project on GitHub. +This module is part of the `OCA/l10n-portugal `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/l10n_pt_stock_invoicexpress/models/stock_picking.py b/l10n_pt_stock_invoicexpress/models/stock_picking.py index 1b74dfdf..c9ccf802 100644 --- a/l10n_pt_stock_invoicexpress/models/stock_picking.py +++ b/l10n_pt_stock_invoicexpress/models/stock_picking.py @@ -200,7 +200,7 @@ def action_create_invoicexpress_delivery(self): payload = delivery._prepare_invoicexpress_vals() doctype = delivery.invoicexpress_doc_type response = InvoiceXpress.call( - delivery.company_id, "{}s.json".format(doctype), "POST", payload=payload + delivery.company_id, f"{doctype}s.json", "POST", payload=payload ) values = response.json().get(doctype) if not values: @@ -260,9 +260,7 @@ def action_send_invoicexpress_delivery(self, ignore_no_config=False): delivery.name, ) doctype = delivery.invoicexpress_doc_type - endpoint = "{}s/{}/email-document.json".format( - doctype, delivery.invoicexpress_id - ) + endpoint = f"{doctype}s/{delivery.invoicexpress_id}/email-document.json" payload = delivery._prepare_invoicexpress_email_vals(ignore_no_config) if payload: InvoiceXpress.call( diff --git a/l10n_pt_stock_invoicexpress/pyproject.toml b/l10n_pt_stock_invoicexpress/pyproject.toml new file mode 100644 index 00000000..4231d0cc --- /dev/null +++ b/l10n_pt_stock_invoicexpress/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/l10n_pt_stock_invoicexpress/readme/CONFIGURE.md b/l10n_pt_stock_invoicexpress/readme/CONFIGURE.md new file mode 100644 index 00000000..970e0c31 --- /dev/null +++ b/l10n_pt_stock_invoicexpress/readme/CONFIGURE.md @@ -0,0 +1,8 @@ +This feature depends on the InvoiceXpress Incoice generation feature. +See + +for configuration details. + +An additional "InvoiceXpress Delivery Email" option is available, to +configure the email template preparing the details for the emailto be +sent by the InvoiceXpress service. diff --git a/l10n_pt_stock_invoicexpress/readme/CONFIGURE.rst b/l10n_pt_stock_invoicexpress/readme/CONFIGURE.rst deleted file mode 100644 index a0c014ad..00000000 --- a/l10n_pt_stock_invoicexpress/readme/CONFIGURE.rst +++ /dev/null @@ -1,7 +0,0 @@ -This feature depends on the InvoiceXpress Incoice generation feature. -See https://github.com/OCA/l10n-portugal/blob/14.0/l10n_pt_account_invoicexpress/README.rst -for configuration details. - -An additional "InvoiceXpress Delivery Email" option is available, -to configure the email template preparing the details for the emailto be sent by the -InvoiceXpress service. diff --git a/l10n_pt_stock_invoicexpress/readme/CONTRIBUTORS.md b/l10n_pt_stock_invoicexpress/readme/CONTRIBUTORS.md new file mode 100644 index 00000000..69bb8f2b --- /dev/null +++ b/l10n_pt_stock_invoicexpress/readme/CONTRIBUTORS.md @@ -0,0 +1,2 @@ +- Daniel Reis \<\>, [Open Source + Integrators](https://www.opensourceintegrators.eu) diff --git a/l10n_pt_stock_invoicexpress/readme/CONTRIBUTORS.rst b/l10n_pt_stock_invoicexpress/readme/CONTRIBUTORS.rst deleted file mode 100644 index 331bd0eb..00000000 --- a/l10n_pt_stock_invoicexpress/readme/CONTRIBUTORS.rst +++ /dev/null @@ -1 +0,0 @@ -* Daniel Reis , `Open Source Integrators `_ diff --git a/l10n_pt_stock_invoicexpress/readme/DESCRIPTION.md b/l10n_pt_stock_invoicexpress/readme/DESCRIPTION.md new file mode 100644 index 00000000..e5202e49 --- /dev/null +++ b/l10n_pt_stock_invoicexpress/readme/DESCRIPTION.md @@ -0,0 +1,22 @@ +Generate Portuguese tax authority legal transport documents ("Guias de +Transporte") using InvoiceXpress. + +The InvoiceXpress document is automatically generated when an ougoing +Transfer or Delivery Order is validated. + +This feature depends on the InvoiceXpress Invoice generation feature. +See + +for more details. + +**UPDATE November/2021:** + +Deliveries: + +- Added support to the different document types, Transport ("Guia de + Transporte") and Shipment ("Guia de Remessa"). The default document + type is set on the Operation Type. +- Changed the line description to be the Product name, instead of the + original Sales Order description, so that it uses the most up to date + product description. +- Added tax details to the document lines. diff --git a/l10n_pt_stock_invoicexpress/readme/DESCRIPTION.rst b/l10n_pt_stock_invoicexpress/readme/DESCRIPTION.rst deleted file mode 100644 index 316b7982..00000000 --- a/l10n_pt_stock_invoicexpress/readme/DESCRIPTION.rst +++ /dev/null @@ -1,23 +0,0 @@ -Generate Portuguese tax authority legal transport documents ("Guias de Transporte") using InvoiceXpress. - -The InvoiceXpress document is automatically generated when an ougoing Transfer or -Delivery Order is validated. - -This feature depends on the InvoiceXpress Invoice generation feature. -See https://github.com/OCA/l10n-portugal/blob/14.0/l10n_pt_account_invoicexpress/README.rst -for more details. - - -**UPDATE November/2021:** - -Deliveries: - -- Added support to the different document types, - Transport ("Guia de Transporte") and Shipment ("Guia de Remessa"). - The default document type is set on the Operation Type. - -- Changed the line description to be the Product name, - instead of the original Sales Order description, - so that it uses the most up to date product description. - -- Added tax details to the document lines. diff --git a/l10n_pt_stock_invoicexpress/readme/USAGE.md b/l10n_pt_stock_invoicexpress/readme/USAGE.md new file mode 100644 index 00000000..2e1bf65b --- /dev/null +++ b/l10n_pt_stock_invoicexpress/readme/USAGE.md @@ -0,0 +1,7 @@ +On Delivery Orders and Internal Transfer documents, validating the +transfer automatically generates an InvoiceXpress "Guia de Transporte" +for the Done quantities. + +The "Email InvoiceXpress" requests the InvoiceXpress service to send an +email with a copy of the legal document. The content of this email can +be configure in Odoo. diff --git a/l10n_pt_stock_invoicexpress/readme/USAGE.rst b/l10n_pt_stock_invoicexpress/readme/USAGE.rst deleted file mode 100644 index 9eeb2b39..00000000 --- a/l10n_pt_stock_invoicexpress/readme/USAGE.rst +++ /dev/null @@ -1,7 +0,0 @@ -On Delivery Orders and Internal Transfer documents, -validating the transfer automatically generates -an InvoiceXpress "Guia de Transporte" for the Done quantities. - -The "Email InvoiceXpress" requests the InvoiceXpress service -to send an email with a copy of the legal document. -The content of this email can be configure in Odoo. diff --git a/l10n_pt_stock_invoicexpress/static/description/index.html b/l10n_pt_stock_invoicexpress/static/description/index.html index 3b4feb85..d112e586 100644 --- a/l10n_pt_stock_invoicexpress/static/description/index.html +++ b/l10n_pt_stock_invoicexpress/static/description/index.html @@ -1,4 +1,3 @@ - @@ -9,10 +8,11 @@ /* :Author: David Goodger (goodger@python.org) -: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. @@ -275,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 } @@ -301,7 +301,7 @@ span.pre { white-space: pre } -span.problematic { +span.problematic, pre.problematic { color: red } span.section-subtitle { @@ -369,22 +369,24 @@

Portugal InvoiceXpress Legal Transport Documents

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! source digest: sha256:7d6a253f704fca774ae3fd1b77119c2174ee6d0d7e678a1c1672f9da5d24565e !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

Production/Stable License: AGPL-3 OCA/l10n-portugal Translate me on Weblate Try me on Runboat

-

Generate Portuguese tax authority legal transport documents (“Guias de Transporte”) using InvoiceXpress.

-

The InvoiceXpress document is automatically generated when an ougoing Transfer or -Delivery Order is validated.

+

Production/Stable License: AGPL-3 OCA/l10n-portugal Translate me on Weblate Try me on Runboat

+

Generate Portuguese tax authority legal transport documents (“Guias de +Transporte”) using InvoiceXpress.

+

The InvoiceXpress document is automatically generated when an ougoing +Transfer or Delivery Order is validated.

This feature depends on the InvoiceXpress Invoice generation feature. -See https://github.com/OCA/l10n-portugal/blob/14.0/l10n_pt_account_invoicexpress/README.rst +See +https://github.com/OCA/l10n-portugal/blob/14.0/l10n_pt_account_invoicexpress/README.rst for more details.

UPDATE November/2021:

Deliveries:

    -
  • Added support to the different document types, -Transport (“Guia de Transporte”) and Shipment (“Guia de Remessa”). -The default document type is set on the Operation Type.
  • -
  • Changed the line description to be the Product name, -instead of the original Sales Order description, -so that it uses the most up to date product description.
  • +
  • Added support to the different document types, Transport (“Guia de +Transporte”) and Shipment (“Guia de Remessa”). The default document +type is set on the Operation Type.
  • +
  • Changed the line description to be the Product name, instead of the +original Sales Order description, so that it uses the most up to date +product description.
  • Added tax details to the document lines.

Table of contents

@@ -404,27 +406,28 @@

Portugal InvoiceXpress Legal Transport Documents

Configuration

This feature depends on the InvoiceXpress Incoice generation feature. -See https://github.com/OCA/l10n-portugal/blob/14.0/l10n_pt_account_invoicexpress/README.rst +See +https://github.com/OCA/l10n-portugal/blob/14.0/l10n_pt_account_invoicexpress/README.rst for configuration details.

-

An additional “InvoiceXpress Delivery Email” option is available, -to configure the email template preparing the details for the emailto be sent by the -InvoiceXpress service.

+

An additional “InvoiceXpress Delivery Email” option is available, to +configure the email template preparing the details for the emailto be +sent by the InvoiceXpress service.

Usage

-

On Delivery Orders and Internal Transfer documents, -validating the transfer automatically generates -an InvoiceXpress “Guia de Transporte” for the Done quantities.

-

The “Email InvoiceXpress” requests the InvoiceXpress service -to send an email with a copy of the legal document. -The content of this email can be configure in Odoo.

+

On Delivery Orders and Internal Transfer documents, validating the +transfer automatically generates an InvoiceXpress “Guia de Transporte” +for the Done quantities.

+

The “Email InvoiceXpress” requests the InvoiceXpress service to send an +email with a copy of the legal document. The content of this email can +be configure in Odoo.

Bug Tracker

Bugs are tracked on GitHub 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.

+feedback.

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

@@ -438,19 +441,22 @@

Authors

Maintainers

This module is maintained by the OCA.

-Odoo Community Association + +Odoo Community Association +

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.

Current maintainer:

dreispt

-

This module is part of the OCA/l10n-portugal project on GitHub.

+

This module is part of the OCA/l10n-portugal project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.