Skip to content
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

[16.0][MIG] pos_customer_wallet_partner_is_user #307

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

Conversation

carmenbianca
Copy link
Member

@carmenbianca carmenbianca commented Sep 18, 2023

Description

Depends on #300

Odoo task (if applicable)

https://gestion.coopiteasy.be/web#id=10798&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 and others added 24 commits September 18, 2023 11:55
Signed-off-by: Carmen Bianca Bakker <[email protected]>
Signed-off-by: Carmen Bianca BAKKER <[email protected]>
Signed-off-by: Carmen Bianca Bakker <[email protected]>
Signed-off-by: Carmen Bianca BAKKER <[email protected]>
Signed-off-by: Carmen Bianca Bakker <[email protected]>
Signed-off-by: Carmen Bianca BAKKER <[email protected]>
Signed-off-by: Carmen Bianca BAKKER <[email protected]>
…detect wallet usage

Signed-off-by: Carmen Bianca BAKKER <[email protected]>
Signed-off-by: Carmen Bianca BAKKER <[email protected]>
The class name was wrongly copied from some other place and does not
reflect what it's trying to represent.

Signed-off-by: Carmen Bianca Bakker <[email protected]>
Signed-off-by: Carmen Bianca BAKKER <[email protected]>
Signed-off-by: Carmen Bianca BAKKER <[email protected]>
Signed-off-by: Carmen Bianca BAKKER <[email protected]>
@carmenbianca carmenbianca force-pushed the 16.0-mig-pos_customer_wallet_partner_is_user branch from f862f7f to 5b22f64 Compare September 18, 2023 13:57
Copy link
Member

@polchampion polchampion left a comment

Choose a reason for hiding this comment

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

Functionally tested 22/01/2024 on 16-test-portal-customer-wallet

@carmenbianca See issues below + the feature list was imporved as follows.

  • Adds a boolean field on partners that shows whether they have used the customer wallet functionality --> Looks like the field isn't computed based on wallet credit or usage; also it can be changed manually. Unclear to me whether customer_partner_is_user needs fixing. I read elsewhere that this bool's intention was to display the balance on the pos ticket, in which case I was mistaken and the module's aim isn't to compute whether the partner is a customer wallet user, but instead to make it possible for a user to flag partners as wallet users - this porbably needs clarfying in the readme
  • Adds two search filters: is_customer_wallet_user and a filter on non-zero customer wallet balance
  • forbids certain accounting operations from happening if the partner is not a customer wallet user --> what operations ?
  • Hide the customer wallet payment method if the selected partner is not a user. --> NOK
  • Hide the customer wallet balance if the selected partner is not a user. ** don't know since the balance is never displayed yet**

@polchampion
Copy link
Member

@carmenbianca I updated the above review just now

…ionally

If partner is not a user, don't show the payment method.

The deleted JS code is made obsolete/superfluous because the payment
method cannot even be selected now.

Signed-off-by: Carmen Bianca BAKKER <[email protected]>
@carmenbianca carmenbianca force-pushed the 16.0-mig-pos_customer_wallet_partner_is_user branch from 5682e42 to 9b3ed72 Compare January 22, 2024 14:15
@carmenbianca
Copy link
Member Author

Looks like the field isn't computed based on wallet credit or usage; also it can be changed manually.

It was always a manual field. This has not changed in the migration.

forbids certain accounting operations from happening if the partner is not a customer wallet user --> what operations ?

It forbids the user from using the wallet payment method in the POS. An error shows up. However, I may delete this code because…

Hide the customer wallet payment method if the selected partner is not a user. --> NOK

I just added this. This makes the above code redundant.

Hide the customer wallet balance if the selected partner is not a user. ** don't know since the balance is never displayed yet**

A few notes:

  • The balance is displayed. I added the customer wallet payment method to the POS in the test server. 'Customer Account' is something else entirely that is confusingly similarly named, so I've removed that payment method.
  • Because of the above change, the balance is never shown for non-users in the POS UI.
  • However, specifically, the customer wallet balance is invisible on the receipts of non-users.

I updated the code on the test server.

Copy link
Member

@polchampion polchampion left a comment

Choose a reason for hiding this comment

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

Sucessfull functional test

@carmenbianca Thanks for your explanations, lgtm. Feel free to include anything missing in the readme from the updated features list that follows.

  • Adds an editable boolean field to partners (is_customer_wallet_user) intended to flag users of the customer wallet
  • Adds two search filters: is_customer_wallet_user and a filter on non-zero customer wallet balance
  • Hides the customer wallet payment method on the POS payment UI if the selected client is not a "customer wallet user"
  • Only displays the customer wallet balance on the POS ticket if the client is a "customer wallet user"

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.

3 participants