Skip to content

Commit d4bea9b

Browse files
[MIG] pos_user_restriction: Migration to version 18.0
1 parent 8d91f6e commit d4bea9b

File tree

5 files changed

+34
-61
lines changed

5 files changed

+34
-61
lines changed

pos_user_restriction/README.rst

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
.. image:: https://odoo-community.org/readme-banner-image
2-
:target: https://odoo-community.org/get-involved?utm_source=readme
3-
:alt: Odoo Community Association
4-
51
==============================
62
Point of Sale - Restrict users
73
==============================
@@ -17,17 +13,17 @@ Point of Sale - Restrict users
1713
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
1814
:target: https://odoo-community.org/page/development-status
1915
:alt: Beta
20-
.. |badge2| image:: https://img.shields.io/badge/license-LGPL--3-blue.png
16+
.. |badge2| image:: https://img.shields.io/badge/licence-LGPL--3-blue.png
2117
:target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
2218
:alt: License: LGPL-3
2319
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fpos-lightgray.png?logo=github
24-
:target: https://github.com/OCA/pos/tree/17.0/pos_user_restriction
20+
:target: https://github.com/OCA/pos/tree/18.0/pos_user_restriction
2521
:alt: OCA/pos
2622
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
27-
:target: https://translation.odoo-community.org/projects/pos-17-0/pos-17-0-pos_user_restriction
23+
:target: https://translation.odoo-community.org/projects/pos-18-0/pos-18-0-pos_user_restriction
2824
:alt: Translate me on Weblate
2925
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
30-
:target: https://runboat.odoo-community.org/builds?repo=OCA/pos&target_branch=17.0
26+
:target: https://runboat.odoo-community.org/builds?repo=OCA/pos&target_branch=18.0
3127
:alt: Try me on Runboat
3228

3329
|badge1| |badge2| |badge3| |badge4| |badge5|
@@ -66,7 +62,7 @@ Bug Tracker
6662
Bugs are tracked on `GitHub Issues <https://github.com/OCA/pos/issues>`_.
6763
In case of trouble, please check there if your issue has already been reported.
6864
If you spotted it first, help us to smash it by providing a detailed and welcomed
69-
`feedback <https://github.com/OCA/pos/issues/new?body=module:%20pos_user_restriction%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
65+
`feedback <https://github.com/OCA/pos/issues/new?body=module:%20pos_user_restriction%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
7066

7167
Do not contact contributors directly about support or help with technical issues.
7268

@@ -108,6 +104,6 @@ Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:
108104

109105
|maintainer-eLBati|
110106

111-
This module is part of the `OCA/pos <https://github.com/OCA/pos/tree/17.0/pos_user_restriction>`_ project on GitHub.
107+
This module is part of the `OCA/pos <https://github.com/OCA/pos/tree/18.0/pos_user_restriction>`_ project on GitHub.
112108

113109
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

pos_user_restriction/__manifest__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{
44
"name": "Point of Sale - Restrict users",
55
"summary": "Restrict some users to see and use only certain points of sale",
6-
"version": "17.0.1.0.1",
6+
"version": "18.0.1.0.0",
77
"development_status": "Beta",
88
"category": "Point of Sale",
99
"website": "https://github.com/OCA/pos",

pos_user_restriction/security/ir.model.access.csv

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,5 @@ access_pos_payment_user,pos.payment user,point_of_sale.model_pos_payment,group_a
2727
access_pos_bill_user,pos.bill,point_of_sale.model_pos_bill,group_assigned_points_of_sale_user,1,1,1,1
2828
access_pos_close_session_wizard,access.pos.close.session.wizard,point_of_sale.model_pos_close_session_wizard,group_assigned_points_of_sale_user,1,1,1,0
2929
access_pos_printer,pos.printer.user,point_of_sale.model_pos_printer,group_assigned_points_of_sale_user,1,0,0,0
30-
access_pos_combo_user,pos.combo user,point_of_sale.model_pos_combo,group_assigned_points_of_sale_user,1,0,0,0
31-
access_pos_combo_line_user,pos.combo.line user,point_of_sale.model_pos_combo_line,group_assigned_points_of_sale_user,1,0,0,0
30+
access_product_combo_user,product.combo user,point_of_sale.model_product_combo,group_assigned_points_of_sale_user,1,0,0,0
31+
access_pos_combo_item_user,product.combo.item user,point_of_sale.model_product_combo_item,group_assigned_points_of_sale_user,1,0,0,0

pos_user_restriction/static/description/index.html

Lines changed: 13 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
55
<meta name="generator" content="Docutils: https://docutils.sourceforge.io/" />
6-
<title>README.rst</title>
6+
<title>Point of Sale - Restrict users</title>
77
<style type="text/css">
88

99
/*
@@ -360,21 +360,16 @@
360360
</style>
361361
</head>
362362
<body>
363-
<div class="document">
363+
<div class="document" id="point-of-sale-restrict-users">
364+
<h1 class="title">Point of Sale - Restrict users</h1>
364365

365-
366-
<a class="reference external image-reference" href="https://odoo-community.org/get-involved?utm_source=readme">
367-
<img alt="Odoo Community Association" src="https://odoo-community.org/readme-banner-image" />
368-
</a>
369-
<div class="section" id="point-of-sale-restrict-users">
370-
<h1>Point of Sale - Restrict users</h1>
371366
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
372367
!! This file is generated by oca-gen-addon-readme !!
373368
!! changes will be overwritten. !!
374369
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
375370
!! source digest: sha256:14c113ae43cdb58649f9a57b0af2db06dad9125ea6c9a4c7507c22c366e08b9b
376371
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
377-
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/lgpl-3.0-standalone.html"><img alt="License: LGPL-3" src="https://img.shields.io/badge/license-LGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/pos/tree/17.0/pos_user_restriction"><img alt="OCA/pos" src="https://img.shields.io/badge/github-OCA%2Fpos-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/pos-17-0/pos-17-0-pos_user_restriction"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/pos&amp;target_branch=17.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
372+
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/lgpl-3.0-standalone.html"><img alt="License: LGPL-3" src="https://img.shields.io/badge/licence-LGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/pos/tree/18.0/pos_user_restriction"><img alt="OCA/pos" src="https://img.shields.io/badge/github-OCA%2Fpos-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/pos-18-0/pos-18-0-pos_user_restriction"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/pos&amp;target_branch=18.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
378373
<p>Restrict some users to only access their assigned points of sale.</p>
379374
<p><strong>Table of contents</strong></p>
380375
<div class="contents local topic" id="contents">
@@ -391,7 +386,7 @@ <h1>Point of Sale - Restrict users</h1>
391386
</ul>
392387
</div>
393388
<div class="section" id="configuration">
394-
<h2><a class="toc-backref" href="#toc-entry-1">Configuration</a></h2>
389+
<h1><a class="toc-backref" href="#toc-entry-1">Configuration</a></h1>
395390
<p>With a POS Manager, open a point of sale configration (pos.config) and
396391
set “Assigned users” field.</p>
397392
<p>Then, assign “User: Assigned POS Only” group to users who should be able
@@ -401,30 +396,30 @@ <h2><a class="toc-backref" href="#toc-entry-1">Configuration</a></h2>
401396
session and switch cashier.</p>
402397
</div>
403398
<div class="section" id="known-issues-roadmap">
404-
<h2><a class="toc-backref" href="#toc-entry-2">Known issues / Roadmap</a></h2>
399+
<h1><a class="toc-backref" href="#toc-entry-2">Known issues / Roadmap</a></h1>
405400
<p>This module alone is not compatible with pos_cache; you need to install
406401
a bridge module like
407402
<a class="reference external" href="https://github.com/OCA/pos/tree/12.0/pos_cache_user_restriction">https://github.com/OCA/pos/tree/12.0/pos_cache_user_restriction</a> for it
408403
to work.</p>
409404
</div>
410405
<div class="section" id="bug-tracker">
411-
<h2><a class="toc-backref" href="#toc-entry-3">Bug Tracker</a></h2>
406+
<h1><a class="toc-backref" href="#toc-entry-3">Bug Tracker</a></h1>
412407
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/pos/issues">GitHub Issues</a>.
413408
In case of trouble, please check there if your issue has already been reported.
414409
If you spotted it first, help us to smash it by providing a detailed and welcomed
415-
<a class="reference external" href="https://github.com/OCA/pos/issues/new?body=module:%20pos_user_restriction%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
410+
<a class="reference external" href="https://github.com/OCA/pos/issues/new?body=module:%20pos_user_restriction%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
416411
<p>Do not contact contributors directly about support or help with technical issues.</p>
417412
</div>
418413
<div class="section" id="credits">
419-
<h2><a class="toc-backref" href="#toc-entry-4">Credits</a></h2>
414+
<h1><a class="toc-backref" href="#toc-entry-4">Credits</a></h1>
420415
<div class="section" id="authors">
421-
<h3><a class="toc-backref" href="#toc-entry-5">Authors</a></h3>
416+
<h2><a class="toc-backref" href="#toc-entry-5">Authors</a></h2>
422417
<ul class="simple">
423418
<li>TAKOBI</li>
424419
</ul>
425420
</div>
426421
<div class="section" id="contributors">
427-
<h3><a class="toc-backref" href="#toc-entry-6">Contributors</a></h3>
422+
<h2><a class="toc-backref" href="#toc-entry-6">Contributors</a></h2>
428423
<ul class="simple">
429424
<li>Lorenzo Battistini (<a class="reference external" href="https://takobi.online">https://takobi.online</a>)</li>
430425
<li>Helly kapatel &lt;<a class="reference external" href="mailto:helly.kapatel&#64;initos.com">helly.kapatel&#64;initos.com</a>&gt;</li>
@@ -435,7 +430,7 @@ <h3><a class="toc-backref" href="#toc-entry-6">Contributors</a></h3>
435430
</ul>
436431
</div>
437432
<div class="section" id="maintainers">
438-
<h3><a class="toc-backref" href="#toc-entry-7">Maintainers</a></h3>
433+
<h2><a class="toc-backref" href="#toc-entry-7">Maintainers</a></h2>
439434
<p>This module is maintained by the OCA.</p>
440435
<a class="reference external image-reference" href="https://odoo-community.org">
441436
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
@@ -445,11 +440,10 @@ <h3><a class="toc-backref" href="#toc-entry-7">Maintainers</a></h3>
445440
promote its widespread use.</p>
446441
<p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainer</a>:</p>
447442
<p><a class="reference external image-reference" href="https://github.com/eLBati"><img alt="eLBati" src="https://github.com/eLBati.png?size=40px" /></a></p>
448-
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/pos/tree/17.0/pos_user_restriction">OCA/pos</a> project on GitHub.</p>
443+
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/pos/tree/18.0/pos_user_restriction">OCA/pos</a> project on GitHub.</p>
449444
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
450445
</div>
451446
</div>
452447
</div>
453-
</div>
454448
</body>
455449
</html>

pos_user_restriction/views/pos_config_views.xml

Lines changed: 12 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -6,35 +6,18 @@
66
<field name="inherit_id" ref="point_of_sale.pos_config_view_form" />
77
<field name="arch" type="xml">
88
<xpath expr="//sheet/div[last()]" position="after">
9-
<h2 groups="point_of_sale.group_pos_manager">Users</h2>
10-
<div
11-
class="row mt16 o_settings_container"
12-
groups="point_of_sale.group_pos_manager"
13-
>
14-
<div class="col-12 col-lg-6 o_setting_box">
15-
<div class="o_setting_right_pane">
16-
<div class="text-muted">
17-
Users assigned to this point of sale
18-
</div>
19-
<div class="content-group">
20-
<div
21-
class="row mt16"
22-
title="Restrict some users to only access their assigned points of sale. In order to apply the restriction, the user needs the 'User: Assigned POS Only' group"
23-
>
24-
<label
25-
for="assigned_user_ids"
26-
class="col-lg-3 o_light_label"
27-
/>
28-
<field
29-
name="assigned_user_ids"
30-
widget="many2many_tags"
31-
options="{'no_create': True}"
32-
/>
33-
</div>
34-
</div>
35-
</div>
36-
</div>
37-
</div>
9+
<block title="Users" groups="point_of_sale.group_pos_manager">
10+
<setting
11+
string="Users assigned to this point of sale"
12+
help="Restrict some users to only access their assigned points of sale. In order to apply the restriction, the user needs the 'User: Assigned POS Only' group"
13+
>
14+
<field
15+
name="assigned_user_ids"
16+
widget="many2many_tags"
17+
options="{'no_create': True}"
18+
/>
19+
</setting>
20+
</block>
3821
</xpath>
3922
</field>
4023
</record>

0 commit comments

Comments
 (0)