Skip to content

[12.0][ADD] pos_self_service_base#655

Closed
vvrossem wants to merge 1 commit intoOCA:12.0from
coopiteasy:12.0-add-pos_self_service_base
Closed

[12.0][ADD] pos_self_service_base#655
vvrossem wants to merge 1 commit intoOCA:12.0from
coopiteasy:12.0-add-pos_self_service_base

Conversation

@vvrossem
Copy link

@vvrossem vvrossem commented May 28, 2021

This is the base module for the implementation of POS as a self-service weighing station, inspired by #470

It depends on pos_tare to avoid duplicate barcode tare rule.

This base module handles weighing (requires you to use an electronic scale) and EAN13 barcode formatting. It is aimed to be extended by other modules, such as:

Once iface_self_service (Is Self-Service) is checked in pos.config (POS Settings), the main widget Chrome is split in:

  • a leftpane containing the SelfServiceScaleWidget (the weight returned by the scale) and self-service-control-buttons. (SelfServiceHomeButton)
  • a rightpane containing the SelfServiceScreenWidget (the Home screen with user actions such as label printing, barcode scanning, etc.).

Screenshots:
POS Settings
pos_self_service_base-iface_self_service

Startup screen
pos_self_service_base

No weight
pos_self_service_base-no-weight

Printing enabled
pos_self_service_base-print-enabled

Credits:

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.

some remarks inline. (partial review) Thanks for this great work !


This self-service module can be used in kiosk mode. To launch Firefox in kiosk mode, run this command::

firefox <url> -foreground --kiosk
Copy link
Contributor

Choose a reason for hiding this comment

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

what is foreground ?
I tested without, and it is launching in kiosk mode in the same way.

Copy link
Author

Choose a reason for hiding this comment

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

-foreground used to "Make this instance the active application.". I think it is now deprecated and will be removed from README

@@ -0,0 +1,7 @@
Setup the self-service POS
~~~~~~~~~~~~~~~~~~~~~~~~~~
Copy link
Contributor

Choose a reason for hiding this comment

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

nitpicking : I think the the 2 lines are unnecessary.

Copy link
Author

Choose a reason for hiding this comment

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

points 1. and 2., right?


* **Use a dedicated odoo account with the least possible rights**
* Configure the web browser to be in kiosk mode (cf. "Launch Firefox" section)

Copy link
Contributor

Choose a reason for hiding this comment

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

maybe add : * hide the keyboard and mouse once the point of sale is launched ?

@@ -0,0 +1,52 @@
upstream cups-reverse-proxy {
Copy link
Contributor

Choose a reason for hiding this comment

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

why this file is in the readme part ?
Don't understand why it should be contained in this module.

Copy link
Author

Choose a reason for hiding this comment

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

Indeed, it should be in pos_self_service_print_zpl (or simply removed since it's in pos_self_service_print_zpl/readme/CONFIGURE.rst)

});
}
},
format_barcode: function(weight) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think that all the algorithm, could be moved in a separate module "pos_generate_barcode" to make this module more light, and because it is a generic feature. (that should be in the core, by the way in the module barcodes, near the barcode_parser.js file)

I can make a PR for that point if you want.

some thing that could replace line 62 to line 110 by :

get_barcode: function() {
  return new_function_to_do("tare", this.scale_weight * 1e3);
}

What do you think ?

Copy link

Choose a reason for hiding this comment

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

Yep, that'll be great. I can give it a try as well :)

Copy link
Author

Choose a reason for hiding this comment

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

That's a great idea and gladly accept your proposition regarding the PR :)

@legalsylvain
Copy link
Contributor

legalsylvain commented May 28, 2021

I wonder if tare printing should not be in a separate module, as it is an optional feature after all. pos_self_service_print_tare
(one could imagine installing only the future module pos_self_service_print_product without the tare print)

Don't you think?

@vvrossem
Copy link
Author

vvrossem commented Jun 3, 2021

The goal of this base module is to gather common functionalities shared by modules that would extend it :

  • weighing (and visualize the weight returned by the scale)
  • printing a label

I realize the button Print container tare is misleading. It should be instead Print label.

@github-actions
Copy link

github-actions bot commented Oct 3, 2021

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 Oct 3, 2021
@github-actions github-actions bot closed this Feb 13, 2022
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.

3 participants