diff --git a/subscription_oca/README.rst b/subscription_oca/README.rst index 4511f0c682..3570625516 100644 --- a/subscription_oca/README.rst +++ b/subscription_oca/README.rst @@ -87,6 +87,10 @@ Contributors * Ilyas +* `Komit `__: + + * Pham Ngoc Quoc + Maintainers ~~~~~~~~~~~ diff --git a/subscription_oca/__manifest__.py b/subscription_oca/__manifest__.py index fa4400f482..4f0a07ec52 100644 --- a/subscription_oca/__manifest__.py +++ b/subscription_oca/__manifest__.py @@ -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, diff --git a/subscription_oca/models/sale_subscription.py b/subscription_oca/models/sale_subscription.py index 6845706840..0458b56e50 100644 --- a/subscription_oca/models/sale_subscription.py +++ b/subscription_oca/models/sale_subscription.py @@ -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( diff --git a/subscription_oca/readme/CONTRIBUTORS.rst b/subscription_oca/readme/CONTRIBUTORS.rst index 8ddfb05210..b9980e976d 100644 --- a/subscription_oca/readme/CONTRIBUTORS.rst +++ b/subscription_oca/readme/CONTRIBUTORS.rst @@ -5,3 +5,7 @@ * `Ooops404 `__: * Ilyas + +* `Komit `__: + + * Pham Ngoc Quoc diff --git a/subscription_oca/security/ir_rule.xml b/subscription_oca/security/ir_rule.xml new file mode 100644 index 0000000000..2dde2ba26c --- /dev/null +++ b/subscription_oca/security/ir_rule.xml @@ -0,0 +1,12 @@ + + + + + Sale Subscription + + ['|',('company_id','=',False), ('company_id', 'in', company_ids)] + + + diff --git a/subscription_oca/static/description/index.html b/subscription_oca/static/description/index.html index 2f09cbdd62..0837881567 100644 --- a/subscription_oca/static/description/index.html +++ b/subscription_oca/static/description/index.html @@ -433,6 +433,10 @@

Contributors

  • Ilyas <irazor147@gmail.com>
  • +
  • Komit: +