-
-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[14.0][ADD] account_wallet - NOBUMP #9
Open
legalsylvain
wants to merge
60
commits into
OCA:14.0
Choose a base branch
from
legalsylvain:14.0-ADD-account_wallet
base: 14.0
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
60 commits
Select commit
Hold shift + click to select a range
d67507b
[14.0][IMP] account_cagnotte => account_wallet
rousseldenis bd1950f
[14.0][IMP] account_wallet: Add partner relation
rousseldenis 464c441
[14.0][IMP] account_wallet: Don't create move with a name
rousseldenis 26f24a5
[14.0][IMP] account_wallet: Fix tests
rousseldenis e4a042b
[14.0][IMP] account_wallet: Improve form
rousseldenis ba37c18
[14.0][IMP] account_wallet: Add migration scripts
rousseldenis 17b2ae3
[14.0][IMP] account_wallet: Migrate only if former table exist
rousseldenis e51c481
[14.0][IMP] account_wallet: Add remark for future migrations
rousseldenis ae817e5
[14.0][IMP] account_wallet: Remove former methods as models have been…
rousseldenis 166131d
[14.0][IMP] account_wallet: tests improvements, use create multi, cor…
rousseldenis cd74ba1
[14.0][IMP] account_wallet: Add todo for name_search
rousseldenis d967906
[14.0][IMP] account_wallet: Improve test, set default account
rousseldenis 15707d8
[14.0][FIX] account_wallet: Prepare good value for move
rousseldenis 7c75cd2
Apply pre-commit
sbidoul 6be4432
[14.0][FIX] account_wallet: Demo files will be loaded by code
rousseldenis c5271f2
[14.0][FIX] account_wallet*: Rely on openupgradelib
rousseldenis 04270e6
[14.0][IMP] account_wallet*: Remove OCA ref
rousseldenis e921831
[UPD] README.rst
50465ed
account_wallet 14.0.1.0.1
891a134
[14.0][IMP] account_wallet: Don't retrieve too much exisisting wallets
rousseldenis c2fd17b
account_wallet 14.0.1.0.2
16def44
[14.0][IMP] account_wallet: Remove partner name from wallet display name
rousseldenis 716a96a
pre-commit: fix manifests website
sbidoul f55ba3d
[UPD] Update account_wallet.pot
f94cedc
[14.0][IMP] account_wallet: Add wallet on payment side
rousseldenis e01c0cd
[UPD] Update account_wallet.pot
a1e0d8b
[14.0][FIX] account_wallet
xavier-bouquiaux 02ee640
account_wallet 14.0.1.1.0
1ae9f16
[FIX] account_wallet : move-> account_wallet_type_id
xavier-bouquiaux 1e4316c
[ADD] wizard to create a refund as wallet
xavier-bouquiaux 88efe8e
[UPD] Update account_wallet.pot
97510bc
account_wallet 14.0.1.2.0
cb9b25f
[UPD] Update account_wallet.pot
7c4ab74
[ADD] add documentation + reformat + comment
xavier-bouquiaux a6ff341
[UPD] Update account_wallet.pot
d69eff8
[IMP] account_wallet: black, isort, prettier
xavier-bouquiaux 9a1c542
[IMP] make account_wallet OCA compliant
xavier-bouquiaux 23cf1c7
[IMP] account_wallet : add no_anonymous feature to force to have only…
legalsylvain 545d9b2
[FIX] account_wallet : Force account_wallet_type to have product_id d…
legalsylvain 32acd33
[IMP] account_wallet : guess income account based on product accounti…
legalsylvain 7b2e714
Merge pull request #2 from legalsylvain/14.0-IMP-account_wallet-produ…
xavier-bouquiaux b761cc2
Merge pull request #1 from legalsylvain/14.0-IMP-account_wallet-add-n…
xavier-bouquiaux 9582751
[REF] account_wallet : remove useless comment
legalsylvain 73f2bb4
[IMP] account_wallet : add domain on product_id for account_wallet_ty…
legalsylvain 8100b55
[FIX] rename some 'cagnotte' into 'wallet'
legalsylvain 6de4402
[REF] rename wallet_type.xml to fit with OCA convention
legalsylvain 10acc32
[REF] rename wallet_views.xml to fit with OCA convention
legalsylvain c94432c
[FIX] remove duplicated account.move.line form view, fix incorrect na…
legalsylvain b49885a
[FIX] remove duplicated account.move form view
legalsylvain 6f6392d
[FIX] remove unnecessary dependency to openupgradelib python librairy
legalsylvain 2887ce5
[REF] refactor test
legalsylvain 6b8c6d7
[FIX] wallet balance should be updated only when related move lines (…
legalsylvain 0d0e392
[REF] rename account.wallet.type 'no_anonymous' field into 'automatic…
legalsylvain 1c69e03
fixup! [FIX] wallet balance should be updated only when related move …
legalsylvain e8c4fa3
[IMP] new field only_nominative on account.wallet.type model to preve…
legalsylvain 223e7ef
[IMP] allow to select wallet when making payment via the wizard
legalsylvain f009d90
[FIX] make payment working with refound
legalsylvain c23d67b
[FIX] make credit_note_product_id configuration working in multi comp…
legalsylvain f5de492
[IMP] simplify algorigthm
legalsylvain d8b866d
[DOC] add legalsylvain as contributors
legalsylvain File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -88,13 +88,19 @@ def name_get(self): | |
|
||
@api.model | ||
def _get_compute_balance_fields(self): | ||
return ["account_move_line_ids.debit", "account_move_line_ids.credit"] | ||
return [ | ||
"account_move_line_ids.parent_state", | ||
"account_move_line_ids.debit", | ||
"account_move_line_ids.credit", | ||
] | ||
|
||
@api.depends(lambda self: self._get_compute_balance_fields()) | ||
def _compute_balance(self): | ||
for wallet in self: | ||
balance = 0 | ||
for move_line in wallet.account_move_line_ids: | ||
for move_line in wallet.account_move_line_ids.filtered( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This one is a HUGE change |
||
lambda x: x.parent_state == "posted" | ||
): | ||
balance += move_line.credit - move_line.debit | ||
wallet.balance = balance | ||
|
||
|
This file contains 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one is linked to the other but it's also a MAJOR change