Skip to content

Commit

Permalink
Merge PR #32 into 16.0
Browse files Browse the repository at this point in the history
Signed-off-by simahawk
  • Loading branch information
OCA-git-bot committed Feb 5, 2024
2 parents cb609df + 9eb9923 commit 025fd88
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 3 deletions.
2 changes: 1 addition & 1 deletion webservice/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ WebService
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:f0f1f0dbc06312d3bb1b154b2935559d1a7a4d472e3277dbba117a719bfc98fb
!! source digest: sha256:fa65527a3fe0d2d23f38df3d948bef99a2607dbea8e9869d1b0f2d0a892a8b63
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png
Expand Down
6 changes: 5 additions & 1 deletion webservice/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@
"author": "Creu Blanca, Camptocamp, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/web-api",
"depends": ["component", "server_environment"],
"data": ["security/ir.model.access.csv", "views/webservice_backend.xml"],
"data": [
"security/ir.model.access.csv",
"security/ir_rule.xml",
"views/webservice_backend.xml",
],
"demo": [],
}
1 change: 1 addition & 0 deletions webservice/models/webservice_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ class WebserviceBackend(models.Model):
],
required=True,
)
company_id = fields.Many2one("res.company", string="Company")

@api.constrains("auth_type")
def _check_auth_type(self):
Expand Down
10 changes: 10 additions & 0 deletions webservice/security/ir_rule.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo noupdate="1">
<record id="rule_webservice_backend_multi_company" model="ir.rule">
<field name="name">webservice_backend multi-company</field>
<field name="model_id" ref="model_webservice_backend" />
<field
name="domain_force"
>['|',('company_id','=',False),('company_id', 'in', company_ids)]</field>
</record>
</odoo>
2 changes: 1 addition & 1 deletion webservice/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ <h1 class="title">WebService</h1>
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:f0f1f0dbc06312d3bb1b154b2935559d1a7a4d472e3277dbba117a719bfc98fb
!! source digest: sha256:fa65527a3fe0d2d23f38df3d948bef99a2607dbea8e9869d1b0f2d0a892a8b63
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Production/Stable" src="https://img.shields.io/badge/maturity-Production%2FStable-green.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/web-api/tree/16.0/webservice"><img alt="OCA/web-api" src="https://img.shields.io/badge/github-OCA%2Fweb--api-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/web-api-16-0/web-api-16-0-webservice"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/web-api&amp;target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>This module creates WebService frameworks to be used globally</p>
Expand Down
6 changes: 6 additions & 0 deletions webservice/views/webservice_backend.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
</h2>
</div>
<group name="config">
<field name="company_id" groups="base.group_multi_company" />
<field name="protocol" />
<field name="url" />
<field name="content_type" />
Expand Down Expand Up @@ -85,6 +86,11 @@
<field name="tech_name" />
<field name="url" />
<field name="protocol" />
<field
name="company_id"
groups="base.group_multi_company"
optional="hide"
/>
</tree>
</field>
</record>
Expand Down

0 comments on commit 025fd88

Please sign in to comment.