Skip to content

Commit

Permalink
use different id on partial reconcile to help migrating from full rec…
Browse files Browse the repository at this point in the history
…oncile
  • Loading branch information
petrus-v committed Feb 5, 2024
1 parent bd26023 commit c0c93b9
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion base_upflow/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Base Upflow.io
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:bd21d053b40a9912cbd5c2ebd07de0691a56ce1d8f3d68a9bb47ce3e7451c062
!! source digest: sha256:d7c3cc9b72154534c57c4158ea7aef658511c0609a2631b2b5d2680065011595
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Alpha-red.png
Expand Down
2 changes: 1 addition & 1 deletion base_upflow/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{
"name": "Base Upflow.io",
"summary": "Base module to generate Upflow.io API payloads format from odoo object",
"version": "14.0.1.1.0",
"version": "14.0.2.0.0",
"development_status": "Alpha",
"category": "EDI",
"website": "https://github.com/OCA/credit-control",
Expand Down
2 changes: 1 addition & 1 deletion base_upflow/models/account_partial_reconcile.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class AccountPartialReconcile(models.Model):

def _prepare_reconcile_payload(self):
payload = {
"externalId": str(self.id),
"externalId": "partial-" + str(self.id),
"invoices": [],
"payments": [],
"creditNotes": [],
Expand Down
2 changes: 1 addition & 1 deletion base_upflow/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ <h1 class="title">Base Upflow.io</h1>
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:bd21d053b40a9912cbd5c2ebd07de0691a56ce1d8f3d68a9bb47ce3e7451c062
!! source digest: sha256:d7c3cc9b72154534c57c4158ea7aef658511c0609a2631b2b5d2680065011595
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Alpha" src="https://img.shields.io/badge/maturity-Alpha-red.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/credit-control/tree/14.0/base_upflow"><img alt="OCA/credit-control" src="https://img.shields.io/badge/github-OCA%2Fcredit--control-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/credit-control-14-0/credit-control-14-0-base_upflow"><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/credit-control&amp;target_branch=14.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>This modules provide methods to generate <a class="reference external" href="https://upflow.docs.apiary.io/">upflow.io</a>
Expand Down
4 changes: 2 additions & 2 deletions base_upflow/tests/test_upflow_post_invoices_payload.py
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ def convert_to_cent(euro_amount):
reconcile_content,
)

expected_payload["externalId"] = str(partial_reconcile.id)
expected_payload["externalId"] = "partial-" + str(partial_reconcile.id)
self.assertEqual(reconcile_content, expected_payload)

def test_get_upflow_api_post_reconcile_refund_payload(self):
Expand Down Expand Up @@ -542,7 +542,7 @@ def test_get_upflow_api_post_reconcile_refund_payload(self):
)

expected = {
"externalId": str(full_reconcile.partial_reconcile_ids.id),
"externalId": "partial-" + str(full_reconcile.partial_reconcile_ids.id),
"invoices": [],
"payments": [],
"creditNotes": [
Expand Down

0 comments on commit c0c93b9

Please sign in to comment.