[IMP] account_cashbox: improve internal transfer payments #850
Closed
cav-adhoc wants to merge 4 commits intoingadhoc:19.0from
Closed
[IMP] account_cashbox: improve internal transfer payments #850cav-adhoc wants to merge 4 commits intoingadhoc:19.0from
cav-adhoc wants to merge 4 commits intoingadhoc:19.0from
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR enhances the internal transfer payment functionality in the account_cashbox module by implementing bidirectional cashbox session tracking. When creating paired internal transfer payments, the destination cashbox session from the original payment is now properly assigned to the paired payment's cashbox session, with the paired payment's destination session cleared to prevent circular references.
Key Changes:
- Added
destination_cashbox_session_idfield to track the destination cashbox session for internal transfers - Modified paired payment creation to transfer the destination session to the paired payment's cashbox session
- Updated the UI to display the destination cashbox session field with appropriate visibility and validation rules
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| account_cashbox/views/account_payment.xml | Adds UI field for destination_cashbox_session_id with domain constraints and conditional visibility |
| account_cashbox/models/account_payment.py | Implements destination_cashbox_session_id field and updates paired payment creation logic to properly handle session assignments |
| <field | ||
| name="destination_cashbox_session_id" | ||
| domain="[('state', '=', 'opened'), ('company_id', '=', company_id), '|', ('user_ids', '=', uid), ('user_ids', '=', False)]" | ||
| required="requiere_account_cashbox_session and state == 'draft' and payment_type == 'transfer'" |
There was a problem hiding this comment.
Corrected spelling of 'requiere' to 'require'.
baf7cf4 to
1622ca5
Compare
…x sessions
1. In `account.payment`, when creating the paired internal transfer payment, set the
`cashbox_session_id` to the `destination_cashbox_session_id` of the original payment.
Before this commit, when creating or editing an account cashbox session, the user selection field allowed selecting any user in the system. This could lead to unauthorized users being assigned to cashbox sessions, affecting the restrictions in _session_id fields of payments.
1622ca5 to
8dbfcb1
Compare
When selecting the destination cashbox session for an internal transfer payment, the domain should filter cashbox sessions that are linked to the selected destination journal. This ensures that users can only select valid cashbox sessions that correspond to the destination journal of the transfer.
Contributor
|
@roboadhoc bump |
Contributor
|
@roboadhoc r+ rebase-ff |
Contributor
|
Merge method set to rebase and fast-forward. |
roboadhoc
pushed a commit
that referenced
this pull request
Feb 23, 2026
…x sessions
1. In `account.payment`, when creating the paired internal transfer payment, set the
`cashbox_session_id` to the `destination_cashbox_session_id` of the original payment.
Part-of: #850
Related: ingadhoc/account-financial-tools#852
Signed-off-by: rov-adhoc <rov@adhoc.com.ar>
roboadhoc
pushed a commit
that referenced
this pull request
Feb 23, 2026
Part-of: #850 Related: ingadhoc/account-financial-tools#852 Signed-off-by: rov-adhoc <rov@adhoc.com.ar>
roboadhoc
pushed a commit
that referenced
this pull request
Feb 23, 2026
Before this commit, when creating or editing an account cashbox session, the user selection field allowed selecting any user in the system. This could lead to unauthorized users being assigned to cashbox sessions, affecting the restrictions in _session_id fields of payments. Part-of: #850 Related: ingadhoc/account-financial-tools#852 Signed-off-by: rov-adhoc <rov@adhoc.com.ar>
roboadhoc
pushed a commit
to ingadhoc/account-financial-tools
that referenced
this pull request
Feb 23, 2026
In a transfer between a journal in main currency and one in secondary currency, the amount field in the journal entry for the main currency journal must be adjusted so it is recorded in the main currency, not in the secondary currency. This commit fixes that behavior. Part-of: #852 Related: ingadhoc/account-payment#850 Signed-off-by: rov-adhoc <rov@adhoc.com.ar>
roboadhoc
pushed a commit
to ingadhoc/account-financial-tools
that referenced
this pull request
Feb 23, 2026
…warnings Improve the user experience when managing internal transfer payments: * Auto-synchronize paired payments: When updating amount or journals on one payment, automatically propagate changes to its paired payment to maintain consistency between both sides of the transfer * State mismatch warning: Display an alert when paired payments are in different states, showing both current states and prompting users to synchronize them before completing changes * Quick navigation: Add a "Go to Paired Payment" button directly in the warning message for easy access to the related payment Technical improvements: - Override write() method with recursion prevention via context flag - Add computed HTML field for dynamic warning display - Add action method for navigation between paired payments - Update form view to display warnings before sheet content Part-of: #852 Related: ingadhoc/account-payment#850 Signed-off-by: rov-adhoc <rov@adhoc.com.ar>
roboadhoc
pushed a commit
to ingadhoc/account-financial-tools
that referenced
this pull request
Feb 23, 2026
closes #852 Related: ingadhoc/account-payment#850 Signed-off-by: rov-adhoc <rov@adhoc.com.ar>
roboadhoc
added a commit
that referenced
this pull request
Feb 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

account.payment, when creating the paired internal transfer payment, set thecashbox_session_idto thedestination_cashbox_session_idof the original payment.