Skip to content

Commit c0668e6

Browse files
[MIG] cross_connect_client to 19
1 parent 46aeaef commit c0668e6

6 files changed

Lines changed: 20 additions & 23 deletions

File tree

cross_connect_client/README.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ Cross Connect Client
2121
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
2222
:alt: License: AGPL-3
2323
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fserver--auth-lightgray.png?logo=github
24-
:target: https://github.com/OCA/server-auth/tree/18.0/cross_connect_client
24+
:target: https://github.com/OCA/server-auth/tree/19.0/cross_connect_client
2525
:alt: OCA/server-auth
2626
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
27-
:target: https://translation.odoo-community.org/projects/server-auth-18-0/server-auth-18-0-cross_connect_client
27+
:target: https://translation.odoo-community.org/projects/server-auth-19-0/server-auth-19-0-cross_connect_client
2828
:alt: Translate me on Weblate
2929
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
30-
:target: https://runboat.odoo-community.org/builds?repo=OCA/server-auth&target_branch=18.0
30+
:target: https://runboat.odoo-community.org/builds?repo=OCA/server-auth&target_branch=19.0
3131
:alt: Try me on Runboat
3232

3333
|badge1| |badge2| |badge3| |badge4| |badge5|
@@ -75,7 +75,7 @@ Bug Tracker
7575
Bugs are tracked on `GitHub Issues <https://github.com/OCA/server-auth/issues>`_.
7676
In case of trouble, please check there if your issue has already been reported.
7777
If you spotted it first, help us to smash it by providing a detailed and welcomed
78-
`feedback <https://github.com/OCA/server-auth/issues/new?body=module:%20cross_connect_client%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
78+
`feedback <https://github.com/OCA/server-auth/issues/new?body=module:%20cross_connect_client%0Aversion:%2019.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
7979

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

@@ -113,6 +113,6 @@ Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:
113113

114114
|maintainer-paradoxxxzero|
115115

116-
This module is part of the `OCA/server-auth <https://github.com/OCA/server-auth/tree/18.0/cross_connect_client>`_ project on GitHub.
116+
This module is part of the `OCA/server-auth <https://github.com/OCA/server-auth/tree/19.0/cross_connect_client>`_ project on GitHub.
117117

118118
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

cross_connect_client/__manifest__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
{
66
"name": "Cross Connect Client",
7-
"version": "18.0.1.0.0",
7+
"version": "19.0.1.0.0",
88
"author": "Akretion, Odoo Community Association (OCA)",
99
"summary": "Cross Connect Client allows to connect to a "
1010
"Cross Connect Server enabled odoo instance.",

cross_connect_client/models/cross_connect_server.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,13 @@ def _compute_menu_id(self):
6767
"name": record.name,
6868
"action": f"ir.actions.act_url,{action.id}", # noqa
6969
"web_icon": icon,
70-
"groups_id": [(6, 0, menu_groups.ids)],
70+
"group_ids": [(6, 0, menu_groups.ids)],
7171
"sequence": 100,
7272
}
7373
)
7474
else:
7575
record.menu_id.name = record.name
76-
record.menu_id.groups_id = [(6, 0, menu_groups.ids)]
76+
record.menu_id.group_ids = [(6, 0, menu_groups.ids)]
7777

7878
@api.depends("menu_id")
7979
def _compute_web_icon_data(self):
@@ -102,7 +102,7 @@ def _request(self, method, url, headers=None, data=None):
102102

103103
def _get_cross_connect_url(self, **params):
104104
self.ensure_one()
105-
groups = self.env.user.groups_id & self.group_ids
105+
groups = self.env.user.group_ids & self.group_ids
106106
if not groups:
107107
raise UserError(self.env._("You are not allowed to access this server"))
108108

cross_connect_client/models/res_groups.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,7 @@ class ResGroups(models.Model):
1515
string="Originating Cross Connect Server Group ID"
1616
)
1717

18-
_sql_constraints = [
19-
(
20-
"cross_connect_server_group_id_cross_connect_server_id_unique",
21-
"unique (cross_connect_server_group_id, cross_connect_server_id)",
22-
"Cross Connect Server Group ID must be unique per Cross Connect Server",
23-
)
24-
]
18+
_check_unique_cross_server_group = models.Constraint(
19+
"unique (cross_connect_server_group_id, cross_connect_server_id)",
20+
"Cross Connect Server Group ID must be unique per Cross Connect Server",
21+
)

cross_connect_client/static/description/index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ <h1>Cross Connect Client</h1>
374374
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
375375
!! source digest: sha256:7957b9e023d810fe509cb5ca6841cbc46040edd4bb90e26bdf421d602a4a615f
376376
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
377-
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.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/license-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/server-auth/tree/18.0/cross_connect_client"><img alt="OCA/server-auth" src="https://img.shields.io/badge/github-OCA%2Fserver--auth-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/server-auth-18-0/server-auth-18-0-cross_connect_client"><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/server-auth&amp;target_branch=18.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
377+
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.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/license-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/server-auth/tree/19.0/cross_connect_client"><img alt="OCA/server-auth" src="https://img.shields.io/badge/github-OCA%2Fserver--auth-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/server-auth-19-0/server-auth-19-0-cross_connect_client"><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/server-auth&amp;target_branch=19.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
378378
<p>This module allows this odoo instance users to connect directly on
379379
another odoo instance where the module <tt class="docutils literal">cross_connect_server</tt> is
380380
installed.</p>
@@ -418,7 +418,7 @@ <h2><a class="toc-backref" href="#toc-entry-2">Bug Tracker</a></h2>
418418
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/server-auth/issues">GitHub Issues</a>.
419419
In case of trouble, please check there if your issue has already been reported.
420420
If you spotted it first, help us to smash it by providing a detailed and welcomed
421-
<a class="reference external" href="https://github.com/OCA/server-auth/issues/new?body=module:%20cross_connect_client%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
421+
<a class="reference external" href="https://github.com/OCA/server-auth/issues/new?body=module:%20cross_connect_client%0Aversion:%2019.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
422422
<p>Do not contact contributors directly about support or help with technical issues.</p>
423423
</div>
424424
<div class="section" id="credits">
@@ -446,7 +446,7 @@ <h3><a class="toc-backref" href="#toc-entry-6">Maintainers</a></h3>
446446
promote its widespread use.</p>
447447
<p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainer</a>:</p>
448448
<p><a class="reference external image-reference" href="https://github.com/paradoxxxzero"><img alt="paradoxxxzero" src="https://github.com/paradoxxxzero.png?size=40px" /></a></p>
449-
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/server-auth/tree/18.0/cross_connect_client">OCA/server-auth</a> project on GitHub.</p>
449+
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/server-auth/tree/19.0/cross_connect_client">OCA/server-auth</a> project on GitHub.</p>
450450
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
451451
</div>
452452
</div>

cross_connect_client/tests/test_cross_connect_client.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ def test_sync(self, req):
107107
self.server.menu_id.web_icon,
108108
"cross_connect_client,static/description/web_icon_data.png",
109109
)
110-
self.assertEqual(self.server.menu_id.groups_id, self.server.group_ids)
110+
self.assertEqual(self.server.menu_id.group_ids, self.server.group_ids)
111111
self.assertTrue(self.server.menu_id.action.name, "Test Server")
112112
self.assertEqual(
113113
self.server.menu_id.action.url, f"/cross_connect_server/{self.server.id}"
@@ -177,7 +177,7 @@ def test_get_cross_connect_url(self, req):
177177
}
178178
)
179179
group = self.server.group_ids[0]
180-
user.write({"groups_id": [(4, group.id)]})
180+
user.write({"group_ids": [(4, group.id)]})
181181

182182
req.reset_mock()
183183
req.return_value = _mock_json({"client_id": 1, "token": "test-token"})
@@ -266,7 +266,7 @@ def test_act_url_redirect(self):
266266
}
267267
)
268268
group = server.group_ids[0]
269-
user.write({"groups_id": [(4, group.id)]})
269+
user.write({"group_ids": [(4, group.id)]})
270270
self.authenticate("test_user", "user_pas$w0rd")
271271
with patch(
272272
"requests.request",
@@ -284,4 +284,4 @@ def test_bad_server(self):
284284
self.assertFalse(self.env["cross.connect.server"].search([]))
285285
with mute_logger("odoo.http"):
286286
resp = self.url_open("/cross_connect_server/1", allow_redirects=False)
287-
self.assertEqual(resp.status_code, 400)
287+
self.assertEqual(resp.status_code, 422)

0 commit comments

Comments
 (0)