-
-
Notifications
You must be signed in to change notification settings - Fork 199
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ADD] partner_risk_insurance_security
- Loading branch information
Showing
16 changed files
with
716 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
=============================== | ||
Partner Risk Insurance Security | ||
=============================== | ||
|
||
.. | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! This file is generated by oca-gen-addon-readme !! | ||
!! changes will be overwritten. !! | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! source digest: sha256:a15148d51bb3109207bcfcc747b064f3c66b17366a2ef3e322f068b241da063e | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png | ||
:target: https://odoo-community.org/page/development-status | ||
:alt: Beta | ||
.. |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%2Fcredit--control-lightgray.png?logo=github | ||
:target: https://github.com/OCA/credit-control/tree/14.0/partner_risk_insurance_security | ||
:alt: OCA/credit-control | ||
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png | ||
:target: https://translation.odoo-community.org/projects/credit-control-14-0/credit-control-14-0-partner_risk_insurance_security | ||
: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/credit-control&target_branch=14.0 | ||
:alt: Try me on Runboat | ||
|
||
|badge1| |badge2| |badge3| |badge4| |badge5| | ||
|
||
This module enhances credit policy control by making Credit Insurance fields read-only by default, | ||
restricting editing capabilities to members of the 'Full Access to Credit Policy State' group. | ||
|
||
**Table of contents** | ||
|
||
.. contents:: | ||
:local: | ||
|
||
Usage | ||
===== | ||
|
||
Simply add the user to the 'Full Access to Credit Policy State' group | ||
to enable editing of the 'Credit Insurance' fields that are otherwise read-only. | ||
|
||
Bug Tracker | ||
=========== | ||
|
||
Bugs are tracked on `GitHub Issues <https://github.com/OCA/credit-control/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/credit-control/issues/new?body=module:%20partner_risk_insurance_security%0Aversion:%2014.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 | ||
~~~~~~~ | ||
|
||
* Ooops404 | ||
* toita86 | ||
|
||
Contributors | ||
~~~~~~~~~~~~ | ||
|
||
* `Ooops404 <https://www.ooops404.com/>`_: | ||
* Eduard Brahas <eduard@ooops404.com> | ||
|
||
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-toita86| image:: https://github.com/toita86.png?size=40px | ||
:target: https://github.com/toita86 | ||
:alt: toita86 | ||
|
||
Current `maintainer <https://odoo-community.org/page/maintainer-role>`__: | ||
|
||
|maintainer-toita86| | ||
|
||
This module is part of the `OCA/credit-control <https://github.com/OCA/credit-control/tree/14.0/partner_risk_insurance_security>`_ project on GitHub. | ||
|
||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from . import models |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"name": "Partner Risk Insurance Security", | ||
"version": "14.0.1.0.0", | ||
"summary": "Risk insurance partner information are accessible only" | ||
"being part of the Full Access to Credit Policy State group", | ||
"author": "Ooops404," "toita86," "Odoo Community Association (OCA)", | ||
"license": "AGPL-3", | ||
"application": False, | ||
"website": "https://github.com/OCA/credit-control", | ||
"depends": ["partner_risk_insurance"], | ||
"category": "Credit Control", | ||
"data": [ | ||
"security/groups.xml", | ||
"views/res_partner_view.xml", | ||
], | ||
"installable": True, | ||
"maintainers": ["toita86"], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from . import res_partner |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
from odoo import api, fields, models | ||
|
||
|
||
class ResPartner(models.Model): | ||
_inherit = "res.partner" | ||
|
||
is_full_access_user = fields.Boolean( | ||
string="Is Full Access User", | ||
compute="_compute_is_full_access_user", | ||
store=False, | ||
) | ||
|
||
@api.depends_context("uid") | ||
def _compute_is_full_access_user(self): | ||
self.is_full_access_user = self.env.user.has_group( | ||
"partner_risk_insurance_security.group_full_access_credit_policy_state" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
* `Ooops404 <https://www.ooops404.com/>`_: | ||
* Eduard Brahas <eduard@ooops404.com> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
This module enhances credit policy control by making Credit Insurance fields read-only by default, | ||
restricting editing capabilities to members of the 'Full Access to Credit Policy State' group. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Simply add the user to the 'Full Access to Credit Policy State' group | ||
to enable editing of the 'Credit Insurance' fields that are otherwise read-only. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<odoo> | ||
<odoo> | ||
<record id="group_full_access_credit_policy_state" model="res.groups"> | ||
<field name="name">Full Access to Credit Insurance Fields</field> | ||
<field name="category_id" ref="base.module_category_hidden" /> | ||
</record> | ||
</odoo> | ||
</odoo> |
Oops, something went wrong.