Skip to content

[16.0][ADD] pos_membership_delegated_partner#1374

Closed
flaenen wants to merge 1 commit intoOCA:16.0from
flaenen:16.0-add-pos_membership_delegated_partner
Closed

[16.0][ADD] pos_membership_delegated_partner#1374
flaenen wants to merge 1 commit intoOCA:16.0from
flaenen:16.0-add-pos_membership_delegated_partner

Conversation

@flaenen
Copy link
Copy Markdown

@flaenen flaenen commented Apr 28, 2025

WIP

This module implements the features of the Membership Delegated Partner module in the point of sale UI. This allows a customer to purchase memberships for other partners.

Dependencies

Usage

  1. Open the point of sale
  2. Add a membership product to the order
  3. Select the corresponding order line
  4. Click on the "Delegated Member" button that has just appeared
  5. Select a partner from the screen that opens

Once the order has been validated, the designated partner becomes a member.

@flaenen flaenen marked this pull request as draft April 29, 2025 15:39
@flaenen flaenen force-pushed the 16.0-add-pos_membership_delegated_partner branch from e4d0d51 to 1ebc0cc Compare May 6, 2025 17:21
@flaenen flaenen force-pushed the 16.0-add-pos_membership_delegated_partner branch from 1ebc0cc to ef78fc9 Compare May 15, 2025 05:45
Copy link
Copy Markdown
Member

@huguesdk huguesdk left a comment

Choose a reason for hiding this comment

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

some remarks, mostly cosmetic. otherwise, lgtm.

Comment on lines +17 to +19
"pos_membership_delegated_partner/static/src/css/*.css",
"pos_membership_delegated_partner/static/src/js/*.js",
"pos_membership_delegated_partner/static/src/xml/*.xml",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

i think it’s best to have js and xml files in the corresponding directory of the files they extend. for example, ProductScreen.esm.js should go to static/src/js/Screen/ProductScreen/ProductScreen.esm.js and OrderlineDetails.xml should go to static/src/xml/Screens/TicketScreen/OrderlineDetails.xml.

Comment on lines +12 to +37
<t t-if="props.line.delegated_member">
<i
class="fa fa-hand-o-right"
role="img"
aria-label="Member"
title="Member"
/>
<t t-out="props.line.delegated_member.name" />
</t>
<t t-else="">
<t t-if="props.line.order.get_partner()">
<i
class="fa fa-hand-o-right"
role="img"
aria-label="Member"
title="Member"
/>
<t t-out="props.line.order.get_partner().name" />
<span> (<i
class="fa fa-user"
role="img"
aria-label="Customer"
title="Customer"
/>)</span>
</t>
</t>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

instead of having a big t-if/t-else with almost the same thing in both parts, the orderline should have a method returning the membership partner (with the logic there). the display of the customer icon could be in an t-if="!props.line.delegated_member".

Comment on lines +12 to +36
<t t-if="props.line.delegated_member">
<i
class="fa fa-hand-o-right"
role="img"
aria-label="Member"
title="Member"
/>
<t t-out="props.line.delegated_member.name" />
</t>
<t t-else="">
<t t-if="props.line.order.get_partner()">
<i
class="fa fa-hand-o-right"
role="img"
aria-label="Member"
title="Member"
/>
<t t-out="props.line.order.get_partner().name" />
<span> (<i
class="fa fa-user"
role="img"
aria-label="Customer"
title="Customer"
/>)</span>
</t>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

same remark as in the Orderline template. better: as these have exactly the same content, this should additionally be defined in a component reused in both places.

This module implements the features of the Membership Delegated Partner module
in the point of sale UI. This allows a customer to purchase memberships for
other partners.
@flaenen flaenen force-pushed the 16.0-add-pos_membership_delegated_partner branch from ef78fc9 to e1cb5ed Compare July 14, 2025 23:20
@flaenen
Copy link
Copy Markdown
Author

flaenen commented Jul 14, 2025

@huguesdk Thanks for the review! I've made the adjustments.

Copy link
Copy Markdown
Member

@huguesdk huguesdk left a comment

Choose a reason for hiding this comment

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

thanks for the changes! lgtm! 🎉

@github-actions
Copy link
Copy Markdown

There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Nov 16, 2025
@github-actions github-actions bot closed this Dec 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stale PR/Issue without recent activity, it'll be soon closed automatically.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants