From 5659e15bfa1a2a5e1d2e7f456db8eea67ea5d1ac Mon Sep 17 00:00:00 2001 From: Bernat Brunet Date: Tue, 9 May 2023 09:15:33 +0200 Subject: [PATCH] Add the possiblity to have a party in the counterpart move when reconcile on a payment. --- counterpart_party_payment_clearing.diff | 13 +++++++++++++ series | 2 ++ 2 files changed, 15 insertions(+) create mode 100644 counterpart_party_payment_clearing.diff diff --git a/counterpart_party_payment_clearing.diff b/counterpart_party_payment_clearing.diff new file mode 100644 index 0000000..853c3f8 --- /dev/null +++ b/counterpart_party_payment_clearing.diff @@ -0,0 +1,13 @@ +diff --git a/tryton/modules/account_payment_clearing/payment.py b/tryton/modules/account_payment_clearing/payment.py +index 72c69df198..aacd386c9a 100644 +--- a/tryton/modules/account_payment_clearing/payment.py ++++ b/tryton/modules/account_payment_clearing/payment.py +@@ -277,6 +277,8 @@ class Payment(metaclass=PoolMeta): + counterpart.amount_second_currency = self.amount.copy_sign( + counterpart.debit - counterpart.credit) + counterpart.second_currency = self.journal.currency ++ counterpart.party = (self.clearing_party ++ if counterpart.account.party_required else None) + move.lines = (line, counterpart) + return move + diff --git a/series b/series index 5dd8e62..155d0cc 100644 --- a/series +++ b/series @@ -26,3 +26,5 @@ statement_of_account.diff # [account] Cumulate balance of previous fiscal years issue11731.diff # [currency] currency test don't pass when Currency Rates Source Not Ready (forex) strftime_format.diff # [ir] Fix problem with strftime format, reducing the time needed to format standard time. When the %A or %B is not used. + +counterpart_party_payment_clearing.diff # [account_payment_clearing] Add the possiblity to have a party in the counterpart move when reconcile on a payment.