Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[17.0] [MIG] sales_team_security_sale: Migration to 17.0 #3430

Merged
merged 9 commits into from
Jan 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
111 changes: 111 additions & 0 deletions sales_team_security_sale/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
===================================
Sale documents permissions by teams
===================================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:47f3a80d25980306a497be31e5cb3e4b1a6dbee9e1ce2f7e67e5f30defc65a72
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png
:target: https://odoo-community.org/page/development-status
:alt: Production/Stable
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fsale--workflow-lightgray.png?logo=github
:target: https://github.com/OCA/sale-workflow/tree/17.0/sales_team_security_sale
:alt: OCA/sale-workflow
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/sale-workflow-17-0/sale-workflow-17-0-sales_team_security_sale
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/sale-workflow&target_branch=17.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

Glue module between sales_team_security and sale.

This module adds permissions to sales documents according to such a
group as "User: Team Documents Only".

- Quotations/Sales Orders as implemented in sales_team_security_sale.

**Table of contents**

.. contents::
:local:

Configuration
=============

1. Go to *Settings > Users & Companies > Users*.
2. Open or create a user.
3. In the "Sales" section under "Access Rights" tab choose the option
"User: Team Documents Only".

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/sale-workflow/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/sale-workflow/issues/new?body=module:%20sales_team_security_sale%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

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

Credits
=======

Authors
-------

* Tecnativa
* Iván Todorovich

Contributors
------------

- `Tecnativa <https://www.tecnativa.com>`__:

- Pedro M. Baeza
- César A. Sánchez
- Luis D. Lafaurie

- `Guadaltech <https://www.guadaltech.es>`__:

- Ramón Bajona

- Iván Todorovich <[email protected]>
- `Pesol <https://www.pesol.es>`__:

- Jonathan Oscategui Taza <[email protected]>

Maintainers
-----------

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

.. |maintainer-ivantodorovich| image:: https://github.com/ivantodorovich.png?size=40px
:target: https://github.com/ivantodorovich
:alt: ivantodorovich

Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-ivantodorovich|

This module is part of the `OCA/sale-workflow <https://github.com/OCA/sale-workflow/tree/17.0/sales_team_security_sale>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
Empty file.
17 changes: 17 additions & 0 deletions sales_team_security_sale/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Copyright 2020 Iván Todorovich
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

{
"name": "Sale documents permissions by teams",
"summary": "Integrates sales_team_security with sale",
"version": "17.0.1.0.0",
"category": "Sales",
"website": "https://github.com/OCA/sale-workflow",
"author": "Tecnativa, Iván Todorovich, Odoo Community Association (OCA)",
"license": "AGPL-3",
"development_status": "Production/Stable",
"maintainers": ["ivantodorovich"],
"depends": ["sale", "sales_team_security"],
"data": ["security/security.xml"],
"auto_install": True,
}
13 changes: 13 additions & 0 deletions sales_team_security_sale/i18n/sales_team_security_sale.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 15.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
3 changes: 3 additions & 0 deletions sales_team_security_sale/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
4 changes: 4 additions & 0 deletions sales_team_security_sale/readme/CONFIGURE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
1. Go to *Settings \> Users & Companies \> Users*.
2. Open or create a user.
3. In the "Sales" section under "Access Rights" tab choose the option
"User: Team Documents Only".
9 changes: 9 additions & 0 deletions sales_team_security_sale/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
- [Tecnativa](https://www.tecnativa.com):
- Pedro M. Baeza
- César A. Sánchez
- Luis D. Lafaurie
- [Guadaltech](https://www.guadaltech.es):
- Ramón Bajona
- Iván Todorovich \<<[email protected]>\>
- [Pesol](https://www.pesol.es):
- Jonathan Oscategui Taza \<<[email protected]>\>
6 changes: 6 additions & 0 deletions sales_team_security_sale/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Glue module between sales_team_security and sale.

This module adds permissions to sales documents according to such a
group as "User: Team Documents Only".

- Quotations/Sales Orders as implemented in sales_team_security_sale.
38 changes: 38 additions & 0 deletions sales_team_security_sale/security/security.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo noupdate="1">
<record id="sale_order_team_rule" model="ir.rule">
<field name="name">Team Orders</field>
<field name="model_id" ref="sale.model_sale_order" />
<field
name="domain_force"
>['|', ('user_id', 'in', [user.id, False]), ('team_id', 'in', user.crm_team_ids.ids + [False])]
</field>
<field
name="groups"
eval="[(4, ref('sales_team_security.group_sale_team_manager'))]"
/>
</record>
<record id="sale_order_report_team_rule" model="ir.rule">
<field name="name">Team Orders Analysis</field>
<field name="model_id" ref="sale.model_sale_report" />
<field
name="domain_force"
>['|', ('user_id', 'in', [user.id, False]), ('team_id', 'in', user.crm_team_ids.ids + [False])]</field>
<field
name="groups"
eval="[(4, ref('sales_team_security.group_sale_team_manager'))]"
/>
</record>
<record id="sale_order_line_team_rule" model="ir.rule">
<field name="name">Team Order Lines</field>
<field name="model_id" ref="sale.model_sale_order_line" />
<field
name="domain_force"
>['|', ('salesman_id', 'in', [user.id, False]), ('order_id.team_id', 'in', user.crm_team_ids.ids + [False])]</field>
<field
name="groups"
eval="[(4, ref('sales_team_security.group_sale_team_manager'))]"
/>
</record>

</odoo>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading