Skip to content

Commit

Permalink
[IMP] l10n_pt_stock_invoicexpress: pre-commit execution
Browse files Browse the repository at this point in the history
  • Loading branch information
dreispt committed Sep 19, 2024
1 parent cb1f077 commit 7413057
Show file tree
Hide file tree
Showing 12 changed files with 113 additions and 104 deletions.
67 changes: 34 additions & 33 deletions l10n_pt_stock_invoicexpress/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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**

Expand All @@ -61,49 +60,51 @@ 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
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/l10n-portugal/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-portugal/issues/new?body=module:%20l10n_pt_stock_invoicexpress%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
`feedback <https://github.com/OCA/l10n-portugal/issues/new?body=module:%20l10n_pt_stock_invoicexpress%0Aversion:%2017.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.

Credits
=======

Authors
~~~~~~~
-------

* Open Source Integrators

Contributors
~~~~~~~~~~~~
------------

* Daniel Reis <dreis@opensourceintegrators.com>, `Open Source Integrators <https://www.opensourceintegrators.eu>`_
- Daniel Reis <dreis@opensourceintegrators.com>, `Open Source
Integrators <https://www.opensourceintegrators.eu>`__

Maintainers
~~~~~~~~~~~
-----------

This module is maintained by the OCA.

Expand All @@ -123,6 +124,6 @@ Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-dreispt|

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

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
6 changes: 2 additions & 4 deletions l10n_pt_stock_invoicexpress/models/stock_picking.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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(
Expand Down
3 changes: 3 additions & 0 deletions l10n_pt_stock_invoicexpress/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
8 changes: 8 additions & 0 deletions l10n_pt_stock_invoicexpress/readme/CONFIGURE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
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.
7 changes: 0 additions & 7 deletions l10n_pt_stock_invoicexpress/readme/CONFIGURE.rst

This file was deleted.

2 changes: 2 additions & 0 deletions l10n_pt_stock_invoicexpress/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Daniel Reis \<<dreis@opensourceintegrators.com>\>, [Open Source
Integrators](https://www.opensourceintegrators.eu)
1 change: 0 additions & 1 deletion l10n_pt_stock_invoicexpress/readme/CONTRIBUTORS.rst

This file was deleted.

22 changes: 22 additions & 0 deletions l10n_pt_stock_invoicexpress/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -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
<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.
23 changes: 0 additions & 23 deletions l10n_pt_stock_invoicexpress/readme/DESCRIPTION.rst

This file was deleted.

7 changes: 7 additions & 0 deletions l10n_pt_stock_invoicexpress/readme/USAGE.md
Original file line number Diff line number Diff line change
@@ -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.
7 changes: 0 additions & 7 deletions l10n_pt_stock_invoicexpress/readme/USAGE.rst

This file was deleted.

Loading

0 comments on commit 7413057

Please sign in to comment.