Add the possiblity to have a party in the counterpart move when reconcile on

a payment.
This commit is contained in:
Bernat Brunet 2023-05-09 09:15:33 +02:00
parent b195b7f55a
commit 5659e15bfa
2 changed files with 15 additions and 0 deletions

View File

@ -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

2
series
View File

@ -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.