Skip to content

[16.0][ADD] lpcr_custom_pos_buttons#153

Merged
github-grap-bot merged 1 commit into16.0from
16.0-add-lpcr_custom_pos_buttons
Apr 29, 2026
Merged

[16.0][ADD] lpcr_custom_pos_buttons#153
github-grap-bot merged 1 commit into16.0from
16.0-add-lpcr_custom_pos_buttons

Conversation

@mihien
Copy link
Copy Markdown
Member

@mihien mihien commented Mar 6, 2026

Description

Add a button redirecting to the webform and another to the members national view in the PoS.

Odoo task (if applicable)

14463

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.

@mihien mihien force-pushed the 16.0-add-lpcr_custom_pos_buttons branch from f644271 to f140e46 Compare March 9, 2026 10:24
Comment thread lpcr_custom_pos_buttons/static/src/img/Adherents.png Outdated
Comment thread lpcr_custom_pos_buttons/static/src/img/Formulaire.png Outdated
Comment thread lpcr_custom_pos_buttons/static/src/js/ChromeWidgets/ContactFormButton.esm.js Outdated
@huguesdk
Copy link
Copy Markdown
Member

huguesdk commented Mar 31, 2026

to make the tests work, you need to add this line to test-requirements.txt (please respect alphabetical order of the lines):

git+https://github.com/coopiteasy/addons.git@16.0#subdirectory=setup/membership_global_member_view

Comment thread lpcr_custom_pos_buttons/__manifest__.py Outdated
Comment thread lpcr_custom_pos_buttons/i18n/fr.po Outdated
@mihien mihien force-pushed the 16.0-add-lpcr_custom_pos_buttons branch from f140e46 to c7d381e Compare April 7, 2026 13:15
@mihien mihien force-pushed the 16.0-add-lpcr_custom_pos_buttons branch from c7d381e to 75509b7 Compare April 7, 2026 13:26
@mihien mihien force-pushed the 16.0-add-lpcr_custom_pos_buttons branch from 75509b7 to 90f8a91 Compare April 7, 2026 13:33
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!

import Registries from "point_of_sale.Registries";

class LpcrPosButtons extends PosComponent {
get companyId() {
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 prefer companyID, as ID is pronounced as an acronym, but it’s a matter of taste (same for LPCRPosButtons).


class LpcrPosButtons extends PosComponent {
get companyId() {
return this.env.pos.company && this.env.pos.company.id;
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.

is this first condition necessary? if yes, a comment should indicate in which case it can be false. assumptions should be tested when developing: it is better to have simpler code than many tests “just in case” (which actually never happen).

Comment on lines +10 to +30
<a
class="pos-topheader-button"
t-att-href="'/form?company_id=' + companyId"
target="_blank"
>
<i class="fa fa-pencil-square-o" aria-hidden="true" />
<span style="padding-left: 10px;" t-if="!env.isMobile">
ContactForm
</span>
</a>

<a
class="pos-topheader-button"
href="/web#action=membership_global_member_view.action_global_member"
target="_blank"
>
<i class="fa fa-users" aria-hidden="true" />
<span style="padding-left: 10px;" t-if="!env.isMobile">
GlobalMemberViewButton
</span>
</a>
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.

aaah, simple a links, i like it! ☺️

@huguesdk
Copy link
Copy Markdown
Member

/ocabot merge nobump

@github-grap-bot
Copy link
Copy Markdown
Contributor

On my way to merge this fine PR!
Prepared branch 16.0-ocabot-merge-pr-153-by-huguesdk-bump-nobump, awaiting test results.

@github-grap-bot github-grap-bot merged commit 141c950 into 16.0 Apr 29, 2026
3 checks passed
@github-grap-bot
Copy link
Copy Markdown
Contributor

Congratulations, your PR was merged at 340a451. Thanks a lot for contributing to coopiteasy. ❤️

@github-grap-bot github-grap-bot deleted the 16.0-add-lpcr_custom_pos_buttons branch April 29, 2026 14:23
@huguesdk huguesdk changed the title [ADD] lpcr_custom_pos_buttons [16.0][ADD] lpcr_custom_pos_buttons Apr 29, 2026
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