feat: Update payment registration, batch payment, and intercompany settlement for vendor batch payment merge.
This commit is contained in:
parent
6e126bd5f9
commit
b6c99f07d1
@ -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",
|
||||
|
||||
@ -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,
|
||||
}
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
1
vendor_batch_payment_merge
Submodule
1
vendor_batch_payment_merge
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 287d25f529feafa23919ab385498b698a941cf4b
|
||||
Loading…
Reference in New Issue
Block a user