diff --git a/odex25_sales/pos_user_restrict/README.rst b/odex25_sales/pos_user_restrict/README.rst new file mode 100644 index 000000000..c64aeec01 --- /dev/null +++ b/odex25_sales/pos_user_restrict/README.rst @@ -0,0 +1,30 @@ +================================================================== +Restriction of POS User +================================================================== + +Allows setting the allowed Points of Sale for POS users and restricts access for other Points. + + + +Restrictions work only for users with role **Point of Sale / User**. + +After configuration, users will be able to see only the allowed Points of Sale, POS orders, and POS payments that related to these Points. + +Users with role **Point of Sale / Manager** can view all Points of Sale, POS orders, and Pos payments. + + +Configuration +============= + +Goto **Settings** \> **Users and Companies** \> **Users**. + +Choose a user and set allowed Points of Sale on the tab **Access Rights**. + + +Support and development +======================= + +Contact us: + +* support@garazd.biz +* https://garazd.biz/page/contactus diff --git a/odex25_sales/pos_user_restrict/__init__.py b/odex25_sales/pos_user_restrict/__init__.py new file mode 100644 index 000000000..0650744f6 --- /dev/null +++ b/odex25_sales/pos_user_restrict/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/odex25_sales/pos_user_restrict/__manifest__.py b/odex25_sales/pos_user_restrict/__manifest__.py new file mode 100644 index 000000000..8983c0f2f --- /dev/null +++ b/odex25_sales/pos_user_restrict/__manifest__.py @@ -0,0 +1,24 @@ +# Copyright © 2018 Garazd Creation (https://garazd.biz) +# @author: Yurii Razumovskyi (support@garazd.biz) +# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl-3.0.html). + +{ + 'name': 'Restriction of POS User', + 'version': '14.0.1.0.1', + 'category': 'Point of Sale', + 'author': 'Garazd Creation', + 'license': 'LGPL-3', + 'summary': 'Only allowed points of sale for POS users', + 'images': ['static/description/banner.png', 'static/description/icon.png'], + 'depends': [ + 'point_of_sale', + ], + 'data': [ + 'security/pos_user_restrict_security.xml', + 'views/res_users_views.xml', + ], + 'support': 'support@garazd.biz', + 'application': False, + 'installable': True, + 'auto_install': False, +} diff --git a/odex25_sales/pos_user_restrict/doc/changelog.rst b/odex25_sales/pos_user_restrict/doc/changelog.rst new file mode 100644 index 000000000..c5a2492fe --- /dev/null +++ b/odex25_sales/pos_user_restrict/doc/changelog.rst @@ -0,0 +1,14 @@ +.. _changelog: + +Changelog +========= + +`14.0.1.0.1` +------------ + +- Remove deprecetad methods. + +`14.0.1.0.0` +------------ + + diff --git a/odex25_sales/pos_user_restrict/models/__init__.py b/odex25_sales/pos_user_restrict/models/__init__.py new file mode 100644 index 000000000..883516533 --- /dev/null +++ b/odex25_sales/pos_user_restrict/models/__init__.py @@ -0,0 +1 @@ +from . import res_users diff --git a/odex25_sales/pos_user_restrict/models/res_users.py b/odex25_sales/pos_user_restrict/models/res_users.py new file mode 100644 index 000000000..54def7d07 --- /dev/null +++ b/odex25_sales/pos_user_restrict/models/res_users.py @@ -0,0 +1,18 @@ +from odoo import fields, models + + +class ResUsers(models.Model): + _inherit = 'res.users' + + pos_config_ids = fields.Many2many( + comodel_name='pos.config', + string='Allowed POS', + help="Allowed Points of Sales for the user. POS managers can use all POS.", + ) + + def write(self, values): + res = super(ResUsers, self).write(values) + if 'pos_config_ids' in values: + self.env['ir.model.access'].call_cache_clearing_methods() + self.env['ir.rule'].clear_caches() + return res diff --git a/odex25_sales/pos_user_restrict/security/pos_user_restrict_security.xml b/odex25_sales/pos_user_restrict/security/pos_user_restrict_security.xml new file mode 100644 index 000000000..edd6a95fc --- /dev/null +++ b/odex25_sales/pos_user_restrict/security/pos_user_restrict_security.xml @@ -0,0 +1,48 @@ + + + + + + Show only allowed POS configs for User + + [('id', 'in', user.pos_config_ids.ids)] + + + + + All POS configs for Manager. + + [(1, '=', 1)] + + + + + Show POS Orders only for allowed POS configs. + + [('config_id', 'in', user.pos_config_ids.ids)] + + + + + Show All POS Orders for Manager. + + [(1, '=', 1)] + + + + + Show POS Payments only for allowed POS configs. + + [('session_id.config_id', 'in', user.pos_config_ids.ids)] + + + + + Show All POS Payments for Manager. + + [(1, '=', 1)] + + + + + diff --git a/odex25_sales/pos_user_restrict/static/description/banner.png b/odex25_sales/pos_user_restrict/static/description/banner.png new file mode 100644 index 000000000..bf97941b1 Binary files /dev/null and b/odex25_sales/pos_user_restrict/static/description/banner.png differ diff --git a/odex25_sales/pos_user_restrict/static/description/banner_advert_olx.png b/odex25_sales/pos_user_restrict/static/description/banner_advert_olx.png new file mode 100644 index 000000000..b4f798701 Binary files /dev/null and b/odex25_sales/pos_user_restrict/static/description/banner_advert_olx.png differ diff --git a/odex25_sales/pos_user_restrict/static/description/banner_facebook_shop.png b/odex25_sales/pos_user_restrict/static/description/banner_facebook_shop.png new file mode 100644 index 000000000..fffb8f3d8 Binary files /dev/null and b/odex25_sales/pos_user_restrict/static/description/banner_facebook_shop.png differ diff --git a/odex25_sales/pos_user_restrict/static/description/banner_garazd_product_label_pro.png b/odex25_sales/pos_user_restrict/static/description/banner_garazd_product_label_pro.png new file mode 100644 index 000000000..e79426e0b Binary files /dev/null and b/odex25_sales/pos_user_restrict/static/description/banner_garazd_product_label_pro.png differ diff --git a/odex25_sales/pos_user_restrict/static/description/banner_website_sale_address.png b/odex25_sales/pos_user_restrict/static/description/banner_website_sale_address.png new file mode 100644 index 000000000..6dae2b47e Binary files /dev/null and b/odex25_sales/pos_user_restrict/static/description/banner_website_sale_address.png differ diff --git a/odex25_sales/pos_user_restrict/static/description/banner_website_sale_facebook_pixel.png b/odex25_sales/pos_user_restrict/static/description/banner_website_sale_facebook_pixel.png new file mode 100644 index 000000000..84bdefa5f Binary files /dev/null and b/odex25_sales/pos_user_restrict/static/description/banner_website_sale_facebook_pixel.png differ diff --git a/odex25_sales/pos_user_restrict/static/description/banner_website_sale_google_analytics_4.png b/odex25_sales/pos_user_restrict/static/description/banner_website_sale_google_analytics_4.png new file mode 100644 index 000000000..b3e3109fb Binary files /dev/null and b/odex25_sales/pos_user_restrict/static/description/banner_website_sale_google_analytics_4.png differ diff --git a/odex25_sales/pos_user_restrict/static/description/icon.png b/odex25_sales/pos_user_restrict/static/description/icon.png new file mode 100644 index 000000000..e64570cc3 Binary files /dev/null and b/odex25_sales/pos_user_restrict/static/description/icon.png differ diff --git a/odex25_sales/pos_user_restrict/static/description/index.html b/odex25_sales/pos_user_restrict/static/description/index.html new file mode 100644 index 000000000..22e3b4d37 --- /dev/null +++ b/odex25_sales/pos_user_restrict/static/description/index.html @@ -0,0 +1,363 @@ +
+
+ + + +
+ Enterprise + Community +
+ +
+
+ +
+
+

Manage POS user's access rights to Points, Sessions, and Orders.

+
+
+ +
+
+
+
Description
+
+

In cases, when your business needs to restrict access to some Points of Sales for your employees, this module allows solving these requirements.

+
    +
  • Restrictions work only for users with the role "Point of Sale / User".
  • +
  • After configuration, users will be able to see only allowed Points of Sale, POS orders and payments related to them.
  • +
  • Users with the role "Point of Sale / Manager" have full access to all Points of Sale, POS orders, sessions and payments.
  • +
  • Simply configurable from the user settings form.
  • +
+
+
+
+
+ +
+
+
+
Benefits
+
+
+
+
+
+
+ +
+
Easy & Simple
+

Easy to activate and configure

+
+
+
+
+
+
+
+ +
+
Tested
+

Include unit tests

+
+
+
+
+
+
+
+ +
+
Support
+

Free 30 days support and 180 days bug-fixing

+
+
+
+
+
+
+
+ +
+
Try me
+

Demo & Test. Click on the "Live Preview" button

+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
Configuration
+
+
+ +
+ Go to the menu "Settings" - "Users", select a user and specify points of sale that will be permitted for the current user in the "Allowed POS" field. +
+
+ Set allowed points of sale in Odoo 14.0 POS +
+
+ +
+ +
+
+
+
+
+
+ +
+
+
+
+

Configuration

+
+ +

To configure please follow these steps:

+ +
    +
  • Go to the Settings - Users menu.
  • +
  • Set up the Allowed POS in the user form.
  • +
  • Changes will be applied immediately after saving.
  • +
+ +
+ Restrict POS Users to allowed Points of Sale in Odoo 14.0 Restriction of POS User configuration +
+ +
+
+
+ +
+
+ +
+
+ +
+
+ +
+
Contact Us
+
Support, customizations, and development
+ +
+ + Skype: + GarazdCreation +
+ +
+ +
+
Our expertise
+
+
+ Odoo Learning Partner +
+
+ OCA Member +
+
+ With Odoo since 2014 +
+
+ Over 15,000 app downloads and purchases +
+
+ Our apps in the TOP 15 on Odoo Apps +
+
+
+ +
+
Explore our apps
+ +
Watch and subscribe
+ +
+
+ +
+ +
+
+ +
Version: 14.0.1.0.1
+
Module design is reserved | Copyright © Garazd Creation
+ + +
+
Changelog
+
+ + +
    +
  • + +
    +
    + 14.0.1.0.1 + 2023-04-20 +
    +
      +
    • Remove deprecetad methods.
    • +
    +
    +
  • +
  • + +
    +
    + 14.0.1.0.0 + 2020-10-01 +
    +
      +
    +
    +
  • +
+ +
+ + +
+
+ + + +
+
+
+
+ + + Rate the app + - support us to do more! + + +
+
+
+
+ diff --git a/odex25_sales/pos_user_restrict/static/description/pos_user_set_allowed_points_of_sale.png b/odex25_sales/pos_user_restrict/static/description/pos_user_set_allowed_points_of_sale.png new file mode 100644 index 000000000..9f05952b9 Binary files /dev/null and b/odex25_sales/pos_user_restrict/static/description/pos_user_set_allowed_points_of_sale.png differ diff --git a/odex25_sales/pos_user_restrict/static/description/user_settings_pos.jpg b/odex25_sales/pos_user_restrict/static/description/user_settings_pos.jpg new file mode 100644 index 000000000..36dca1355 Binary files /dev/null and b/odex25_sales/pos_user_restrict/static/description/user_settings_pos.jpg differ diff --git a/odex25_sales/pos_user_restrict/views/res_users_views.xml b/odex25_sales/pos_user_restrict/views/res_users_views.xml new file mode 100644 index 000000000..98fc0cefe --- /dev/null +++ b/odex25_sales/pos_user_restrict/views/res_users_views.xml @@ -0,0 +1,20 @@ + + + + + res.users.form.inherit.pos.user.restrict + res.users + + + + + + + + + + +