6.6 KiB
Vendor Batch Payment Merge - User Guide
Overview
The Vendor Batch Payment Merge addon enhances Odoo's batch payment functionality by allowing users to create payment lines directly within the batch payment form, rather than having to create individual payments first. It also provides the ability to specify an expense or income account for each payment line that will be used in the journal entry instead of the default payable or receivable account.
Installation
- Copy the
vendor_batch_payment_mergefolder to your Odoo addons directory. - Update the Apps list in Odoo (Settings > Activate the developer mode > Apps > Update Apps List).
- Search for "Vendor Batch Payment Merge" and install the addon.
Features
Direct Payment Line Creation
Instead of creating individual payments and then adding them to a batch, you can now create payment lines directly within the batch payment form.
Expense/Income Account Specification
Each payment line can have a specific expense (for vendor payments) or income (for customer payments) account that will be used in the journal entry.
Support for Both Inbound and Outbound Payments
The addon works with both vendor (outbound) and customer (inbound) batch payments.
Smart Partner Filtering
The partner field automatically shows appropriate partners based on the batch type:
- For vendor payments (outbound): Shows partners with supplier_rank > 0
- For customer payments (inbound): Shows partners with customer_rank > 0
Usage
Creating Vendor Batch Payments
- Navigate to Accounting > Vendors > Batch Payments.
- Click Create to create a new batch payment.
- Fill in the batch payment details:
- Set Batch Type to "Vendor Payments" (Outbound)
- Select the appropriate Bank Journal
- Set the Date
- Go to the Direct Payment Lines tab.
- Add payment lines by clicking Add a line:
- Select the Vendor (only suppliers will be shown)
- Enter the Amount
- Select the Expense Account (optional but recommended)
- Add a Memo (optional)
- Set the Payment Date (optional)
- Click Generate Payments to create the actual payment records.
- Validate the batch payment as usual.
Creating Customer Batch Payments
- Navigate to Accounting > Customers > Batch Payments.
- Click Create to create a new batch payment.
- Fill in the batch payment details:
- Set Batch Type to "Customer Payments" (Inbound)
- Select the appropriate Bank Journal
- Set the Date
- Go to the Direct Payment Lines tab.
- Add payment lines by clicking Add a line:
- Select the Customer (only customers will be shown)
- Enter the Amount
- Select the Income Account (optional but recommended)
- Add a Memo (optional)
- Set the Payment Date (optional)
- Click Generate Payments to create the actual payment records.
- Validate the batch payment as usual.
How It Works
Payment Line Creation
When you add payment lines in the "Direct Payment Lines" tab, you're creating records that will be used to generate actual payment records. These lines are not payments themselves but templates for creating payments.
Payment Generation
When you click "Generate Payments", the addon:
- Validates that all lines have a partner selected
- Creates actual payment records based on your direct payment lines
- Posts these payments
- Adds them to the batch payment
- Links each direct payment line to its generated payment
Journal Entries
When the payments are posted, the journal entries will use the specified expense/income account instead of the default payable/receivable account:
- For vendor payments: The expense account is credited (instead of the vendor's payable account being debited)
- For customer payments: The income account is debited (instead of the customer's receivable account being credited)
Benefits
- Streamlined Workflow: No need to create individual payments before adding them to a batch.
- Flexible Accounting: Use specific expense/income accounts for better financial tracking.
- Time Saving: Create multiple payments and add them to a batch in one step.
- Better Organization: Keep all payment information in one place.
- Smart Partner Filtering: Automatically shows appropriate partners based on payment type.
Troubleshooting
Payment Method Not Found
If you get an error about the direct batch payment method not being found:
- Ensure the addon is properly installed
- Check that the payment methods were created (Settings > Technical > Accounting > Payment Methods)
- Verify that the journal supports the direct batch payment method
- The addon will now automatically create payment method lines if they don't exist
Missing Partner Error
If you get an error about missing partners when generating payments:
- Ensure all payment lines have a partner selected
- Check that the partner field is not empty for any line
Journal Entry Issues
If the journal entries are not using the specified expense/income accounts:
- Make sure the payments are posted after generation
- Check that the expense/income accounts were correctly specified in the payment lines
- Verify that the accounts are of the correct type (expense for vendors, income for customers)
Best Practices
- Use Descriptive Memos: Add clear memos to payment lines for better tracking.
- Specify Accounts: Always specify the appropriate expense/income account for better financial reporting.
- Review Before Generation: Double-check all payment lines before clicking "Generate Payments".
- Regular Validation: Validate batch payments regularly to ensure proper accounting.
Technical Details
Models
account.batch.payment: Extended to include direct payment linesaccount.batch.payment.line: New model for direct payment linesaccount.payment: Extended to include expense account field
Views
- Added "Direct Payment Lines" tab to batch payment form
- Added expense account field to payment form
- Restored smart partner filtering based on batch type
Data
- Created direct batch payment methods for both inbound and outbound payments
Recent Improvements
- Fixed partner field constraint issues
- Improved error handling for missing partners
- Restored smart partner filtering based on batch type
- Fixed payment method line search to properly find direct batch payment methods
- Added automatic creation of payment method lines when they don't exist
- Fixed domain context for proper partner filtering in payment lines
Support
For issues or questions about this addon, please contact your Odoo administrator or the addon developer.