feat: Update payment registration, batch payment, and intercompany settlement for vendor batch payment merge.

This commit is contained in:
Suherdy Yacob 2026-03-12 15:25:42 +07:00
parent 6e126bd5f9
commit b6c99f07d1
4 changed files with 5 additions and 5 deletions

View File

@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
{
'name': 'Vendor Batch Payment Merge',
'version': '1.0',
'version': '19.0.1.0.0',
'category': 'Accounting/Accounting',
'summary': 'Merge vendor payments and batch payments functionality',
"author": "Suherdy Yacob",

View File

@ -84,7 +84,7 @@ class AccountBatchPayment(models.Model):
'date': line.date,
'journal_id': self.journal_id.id,
'payment_method_line_id': payment_method_line.id,
'ref': line.memo,
'memo': line.memo,
'expense_account_id': line.expense_account_id.id,
}

View File

@ -28,9 +28,8 @@ class AccountPaymentRegister(models.TransientModel):
payment_vals = super()._create_payment_vals_from_wizard(batch_result)
# If we have an expense account, replace the destination account
if self.expense_account_id and len(payment_vals.get('line_ids', [])) >= 2:
# The second line is typically the counterpart line (payable/receivable)
payment_vals['line_ids'][1]['account_id'] = self.expense_account_id.id
if self.expense_account_id:
payment_vals['destination_account_id'] = self.expense_account_id.id
return payment_vals

@ -0,0 +1 @@
Subproject commit 287d25f529feafa23919ab385498b698a941cf4b