Skip to content

[16.0][MIG] pos_customer_wallet #300

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

Open
wants to merge 78 commits into
base: 16.0
Choose a base branch
from

Conversation

carmenbianca
Copy link
Member

@carmenbianca carmenbianca commented Jul 11, 2023

Description

Odoo task (if applicable)

https://gestion.coopiteasy.be/web#id=10799&action=475&active_id=492&model=project.task&view_type=form&menu_id=536

Checklist before approval

  • Tests are present (or not needed).
  • Credits/copyright have been changed correctly.
  • Change log snippet is present.
  • (If a new module) Moving this to OCA has been considered.

@carmenbianca carmenbianca changed the title [16.0][MIGpos customer wallet [16.0][MIG] pos_customer_wallet Jul 11, 2023
@carmenbianca carmenbianca marked this pull request as draft July 11, 2023 14:14
@carmenbianca carmenbianca force-pushed the 16.0-mig-pos_customer_wallet branch from 06ace62 to 1109db1 Compare September 7, 2023 09:38
@carmenbianca carmenbianca force-pushed the 16.0-mig-pos_customer_wallet branch from 1109db1 to afb08db Compare September 7, 2023 09:46
@codecov-commenter
Copy link

codecov-commenter commented Sep 7, 2023

Codecov Report

Merging #300 (8772350) into 16.0 (b640076) will decrease coverage by 3.22%.
Report is 19 commits behind head on 16.0.
The diff coverage is 86.00%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

@@            Coverage Diff             @@
##             16.0     #300      +/-   ##
==========================================
- Coverage   97.73%   94.52%   -3.22%     
==========================================
  Files          12       26      +14     
  Lines         221      347     +126     
  Branches       30       39       +9     
==========================================
+ Hits          216      328     +112     
- Misses          1       15      +14     
  Partials        4        4              
Files Changed Coverage Δ
pos_customer_wallet/models/pos_session.py 40.00% <40.00%> (ø)
pos_customer_wallet/models/pos_config.py 58.33% <58.33%> (ø)
account_customer_wallet/tests/common.py 94.11% <100.00%> (+0.17%) ⬆️
pos_customer_wallet/__init__.py 100.00% <100.00%> (ø)
pos_customer_wallet/models/__init__.py 100.00% <100.00%> (ø)
pos_customer_wallet/models/pos_payment_method.py 100.00% <100.00%> (ø)
pos_customer_wallet/models/res_partner.py 100.00% <100.00%> (ø)
pos_customer_wallet/tests/__init__.py 100.00% <100.00%> (ø)
pos_customer_wallet/tests/common.py 100.00% <100.00%> (ø)
pos_customer_wallet/tests/test_balance.py 100.00% <100.00%> (ø)

... and 5 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

carmenbianca and others added 24 commits September 7, 2023 16:27
Signed-off-by: Carmen Bianca Bakker <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca Bakker <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
….config

Signed-off-by: Carmen Bianca Bakker <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca Bakker <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
…t payment method

Signed-off-by: Carmen Bianca Bakker <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca Bakker <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
…stead of settings

Signed-off-by: Carmen Bianca Bakker <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
…ines

This does not yet live-update in the POS. The window needs to be
reloaded to see the updated balance.

Signed-off-by: Carmen Bianca Bakker <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca Bakker <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
… balance

Signed-off-by: Carmen Bianca Bakker <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca Bakker <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca Bakker <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
…ner._invoice_total algorithm

Signed-off-by: Carmen Bianca Bakker <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
…r account is set instead

Signed-off-by: Carmen Bianca Bakker <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
…ly tree

Signed-off-by: Carmen Bianca Bakker <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca Bakker <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca Bakker <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
…thout perms

Previously there was a permission error on trying to read the
`account.bank.statement.line` model.

Signed-off-by: Carmen Bianca Bakker <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca Bakker <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca Bakker <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
@carmenbianca carmenbianca force-pushed the 16.0-mig-pos_customer_wallet branch 2 times, most recently from 228bd28 to 7f85b83 Compare May 27, 2024 12:14
base_suspend_security's functionality is wrapped into Odoo's sudo by
default
This change was also done in account_customer_wallet. It simplifies things.

This change is necessary for the 16.0 migration, but is not included in
its commit for clarity's sake.

Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
…t computation

The pos session does not create these anymore. It creates pos.payment
records instead.

Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
…ssion

Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
@carmenbianca carmenbianca force-pushed the 16.0-mig-pos_customer_wallet branch from 7f85b83 to dcf77e8 Compare May 27, 2024 12:24
@carmenbianca carmenbianca requested a review from legalsylvain May 27, 2024 12:27
@legalsylvain
Copy link
Contributor

I have to review this one ! thanks for the ping !

@polchampion
Copy link
Member

@carmenbianca à combien d'heures estimes-tu la finalisation du portage ?

…wallet products

Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
@carmenbianca carmenbianca force-pushed the 16.0-mig-pos_customer_wallet branch from dcf77e8 to 2038376 Compare January 23, 2025 14:55
@carmenbianca
Copy link
Member Author

carmenbianca commented Jan 23, 2025

@legalsylvain i added one important test for taxation. this should technically never be needed, but it's good to know that everything is correctly implemented.

ping for review :)

edit: of course it breaks in CI but not locally...

@legalsylvain
Copy link
Contributor

edit: of course it breaks in CI but not locally...

ahah ! let me know when it's green. Thanks !

@carmenbianca carmenbianca force-pushed the 16.0-mig-pos_customer_wallet branch from 2038376 to ae86302 Compare January 24, 2025 10:36
@legalsylvain
Copy link
Contributor

@carmenbianca : I'm not sure. Are you waiting for my review, or Do I have to wait the CI is green ?

thanks !

@carmenbianca carmenbianca force-pushed the 16.0-mig-pos_customer_wallet branch from 2289271 to ab6e825 Compare February 10, 2025 10:29
Copy link
Contributor

@legalsylvain legalsylvain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks ! I'll take a look in the next week.

This assertion is different between the CI environment (4 elements) and
local tests (3 elements). This discrepancy was introduced after the
previous commit. Exactly why it is different, I do not know, but the
assertion is not important enough to waste hours debugging.

Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
@carmenbianca carmenbianca force-pushed the 16.0-mig-pos_customer_wallet branch from ab6e825 to a77446d Compare February 10, 2025 12:25
@carmenbianca
Copy link
Member Author

hi @legalsylvain ! if you have time, this still needs some reviewing.

@legalsylvain
Copy link
Contributor

hi @legalsylvain ! if you have time, this still needs some reviewing.

Work in progress !

I just finished a functional review. All is OK until session is closed. At this time, the balance of the customer become wrong. Use case :

  • sell Wallet product to customer (by invoice) : Balance : 0 -> 1000€ : OK
  • Open Point of Sale, sell to customer 100€ : Balance 1000 -> 900€ : OK
  • Close Point of sale : Balance 900 -> 1000€ : KO.

What do you think ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants