Skip to content

Commit

Permalink
[IMP] pos_user_restriction: Restrict POS report orders
Browse files Browse the repository at this point in the history
  • Loading branch information
peluko00 committed Mar 5, 2025
1 parent dfa4435 commit e8d6d05
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pos_user_restriction/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,11 @@ Authors
Contributors
------------

- Lorenzo Battistini (https://takobi.online)
- Helly kapatel <[email protected]>
- Lorenzo Battistini (https://takobi.online)
- Helly kapatel <[email protected]>
- [APSL-Nagarro](https://apsl.tech):

- Antoni Marroig <[email protected]>

Maintainers
-----------
Expand Down
2 changes: 2 additions & 0 deletions pos_user_restriction/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
- Lorenzo Battistini (<https://takobi.online>)
- Helly kapatel \<<[email protected]>\>
- [APSL-Nagarro\](<https://apsl.tech>):
- Antoni Marroig \<<[email protected]>\>
15 changes: 15 additions & 0 deletions pos_user_restriction/security/pos_security.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,15 @@
<field name="groups" eval="[(4, ref('group_assigned_points_of_sale_user'))]" />
</record>

<record id="pos_order_report_assigned_users" model="ir.rule">
<field name="name">Assigned POS report orders</field>
<field ref="point_of_sale.model_report_pos_order" name="model_id" />
<field
name="domain_force"
>['|',('config_id.assigned_user_ids','in',user.id),('config_id.assigned_user_ids','=',False),('config_id.company_id', 'in', company_ids)]</field>
<field name="groups" eval="[(4, ref('group_assigned_points_of_sale_user'))]" />
</record>

<record id="pos_config_see_all" model="ir.rule">
<field name="name">All points of sale</field>
<field ref="point_of_sale.model_pos_config" name="model_id" />
Expand All @@ -59,6 +68,12 @@
<field name="domain_force">[(1,'=',1)]</field>
<field name="groups" eval="[(4, ref('point_of_sale.group_pos_user'))]" />
</record>
<record id="pos_order_report_see_all" model="ir.rule">
<field name="name">All POS orders</field>
<field ref="point_of_sale.model_report_pos_order" name="model_id" />
<field name="domain_force">[(1,'=',1)]</field>
<field name="groups" eval="[(4, ref('point_of_sale.group_pos_user'))]" />
</record>
</data>

</odoo>
4 changes: 4 additions & 0 deletions pos_user_restriction/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,10 @@ <h2><a class="toc-backref" href="#toc-entry-6">Contributors</a></h2>
<ul class="simple">
<li>Lorenzo Battistini (<a class="reference external" href="https://takobi.online">https://takobi.online</a>)</li>
<li>Helly kapatel &lt;<a class="reference external" href="mailto:helly.kapatel&#64;initos.com">helly.kapatel&#64;initos.com</a>&gt;</li>
<li>[APSL-Nagarro](<a class="reference external" href="https://apsl.tech">https://apsl.tech</a>):<ul>
<li>Antoni Marroig &lt;<a class="reference external" href="mailto:amarroig&#64;apsl.net">amarroig&#64;apsl.net</a>&gt;</li>
</ul>
</li>
</ul>
</div>
<div class="section" id="maintainers">
Expand Down

0 comments on commit e8d6d05

Please sign in to comment.