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

[16.0][IMP]subscription_oca: Sale Subscription multi-company security #1115

Open
wants to merge 1 commit into
base: 16.0
Choose a base branch
from
Open
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
4 changes: 4 additions & 0 deletions subscription_oca/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@ Contributors

* Ilyas <[email protected]>

* `Komit <https://komit-consulting.com>`__:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, no need to add this here as you already added it in the contributor section

Copy link
Member Author

@quoc-pn quoc-pn Aug 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes are auto-generated by pre-commit.


* Pham Ngoc Quoc <[email protected]>

Maintainers
~~~~~~~~~~~

Expand Down
1 change: 1 addition & 0 deletions subscription_oca/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"data/sale_subscription_data.xml",
"wizard/close_subscription_wizard.xml",
"security/ir.model.access.csv",
"security/ir_rule.xml",
],
"installable": True,
"application": True,
Expand Down
1 change: 1 addition & 0 deletions subscription_oca/models/sale_subscription.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ class SaleSubscription(models.Model):
_description = "Subscription"
_inherit = ["mail.thread", "mail.activity.mixin"]
_order = "id desc"
_check_company_auto = True

color = fields.Integer("Color Index")
name = fields.Char(
Expand Down
4 changes: 4 additions & 0 deletions subscription_oca/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@
* `Ooops404 <https://www.ooops404.com>`__:

* Ilyas <[email protected]>

* `Komit <https://komit-consulting.com>`__:

* Pham Ngoc Quoc <[email protected]>
12 changes: 12 additions & 0 deletions subscription_oca/security/ir_rule.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>

<record id="sale_subscription_comp_rule" model="ir.rule">
<field name="name">Sale Subscription</field>
<field name="model_id" ref="model_sale_subscription" />
<field
name="domain_force"
>['|',('company_id','=',False), ('company_id', 'in', company_ids)]</field>
</record>

</odoo>
4 changes: 4 additions & 0 deletions subscription_oca/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,10 @@ <h2><a class="toc-backref" href="#toc-entry-6">Contributors</a></h2>
<li>Ilyas &lt;<a class="reference external" href="mailto:irazor147&#64;gmail.com">irazor147&#64;gmail.com</a>&gt;</li>
</ul>
</li>
<li><a class="reference external" href="https://komit-consulting.com">Komit</a>:<ul>
<li>Pham Ngoc Quoc &lt;<a class="reference external" href="mailto:quoc-pn&#64;komit-consulting.com">quoc-pn&#64;komit-consulting.com</a>&gt;</li>
</ul>
</li>
</ul>
</div>
<div class="section" id="maintainers">
Expand Down
Loading