Skip to content

Commit 193d7ee

Browse files
committed
[MIG] server_environment_iap: Migration to 16.0
It's no longer possible to overwrite the groups_id field on inherited views. However, the iap.account field is now only writable by the System user, due to the new access rules in the iap module. (See iap/security/ir.model.access.csv) As such, we removed the groups_id field from view, as well as the form edit test, since it's now Odoo's default mechanism for IAP accounts, and as such is useless.
1 parent 38c844a commit 193d7ee

5 files changed

Lines changed: 16 additions & 34 deletions

File tree

server_environment_iap/README.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ IAP Account configuration with server_environment
1717
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
1818
:alt: License: AGPL-3
1919
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fserver--env-lightgray.png?logo=github
20-
:target: https://github.com/OCA/server-env/tree/14.0/server_environment_iap
20+
:target: https://github.com/OCA/server-env/tree/16.0/server_environment_iap
2121
:alt: OCA/server-env
2222
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
23-
:target: https://translation.odoo-community.org/projects/server-env-14-0/server-env-14-0-server_environment_iap
23+
:target: https://translation.odoo-community.org/projects/server-env-16-0/server-env-16-0-server_environment_iap
2424
:alt: Translate me on Weblate
2525
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
26-
:target: https://runboat.odoo-community.org/builds?repo=OCA/server-env&target_branch=14.0
26+
:target: https://runboat.odoo-community.org/builds?repo=OCA/server-env&target_branch=16.0
2727
:alt: Try me on Runboat
2828

2929
|badge1| |badge2| |badge3| |badge4| |badge5|
@@ -57,7 +57,7 @@ Bug Tracker
5757
Bugs are tracked on `GitHub Issues <https://github.com/OCA/server-env/issues>`_.
5858
In case of trouble, please check there if your issue has already been reported.
5959
If you spotted it first, help us to smash it by providing a detailed and welcomed
60-
`feedback <https://github.com/OCA/server-env/issues/new?body=module:%20server_environment_iap%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
60+
`feedback <https://github.com/OCA/server-env/issues/new?body=module:%20server_environment_iap%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
6161

6262
Do not contact contributors directly about support or help with technical issues.
6363

@@ -87,6 +87,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
8787
mission is to support the collaborative development of Odoo features and
8888
promote its widespread use.
8989

90-
This module is part of the `OCA/server-env <https://github.com/OCA/server-env/tree/14.0/server_environment_iap>`_ project on GitHub.
90+
This module is part of the `OCA/server-env <https://github.com/OCA/server-env/tree/16.0/server_environment_iap>`_ project on GitHub.
9191

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

server_environment_iap/__manifest__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
{
55
"name": "IAP Account configuration with server_environment",
66
"summary": "Configure IAP Account with server_environment_files",
7-
"version": "14.0.1.0.0",
7+
"version": "16.0.1.0.0",
88
"license": "AGPL-3",
99
"author": "Camptocamp, Odoo Community Association (OCA)",
1010
"website": "https://github.com/OCA/server-env",

server_environment_iap/static/description/index.html

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
<?xml version="1.0" encoding="utf-8"?>
21
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
32
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
43
<head>
@@ -9,10 +8,11 @@
98

109
/*
1110
:Author: David Goodger (goodger@python.org)
12-
:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $
11+
:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $
1312
:Copyright: This stylesheet has been placed in the public domain.
1413
1514
Default cascading style sheet for the HTML output of Docutils.
15+
Despite the name, some widely supported CSS2 features are used.
1616
1717
See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
1818
customize this style sheet.
@@ -275,7 +275,7 @@
275275
margin-left: 2em ;
276276
margin-right: 2em }
277277

278-
pre.code .ln { color: grey; } /* line numbers */
278+
pre.code .ln { color: gray; } /* line numbers */
279279
pre.code, code { background-color: #eeeeee }
280280
pre.code .comment, code .comment { color: #5C6576 }
281281
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
@@ -301,7 +301,7 @@
301301
span.pre {
302302
white-space: pre }
303303

304-
span.problematic {
304+
span.problematic, pre.problematic {
305305
color: red }
306306

307307
span.section-subtitle {
@@ -369,7 +369,7 @@ <h1 class="title">IAP Account configuration with server_environment</h1>
369369
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
370370
!! source digest: sha256:9d3c9e32d2ac9576d0f6df3885d7d3f201f0883a9e7e876359b55f625f59f52f
371371
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
372-
<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/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/server-env/tree/14.0/server_environment_iap"><img alt="OCA/server-env" src="https://img.shields.io/badge/github-OCA%2Fserver--env-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/server-env-14-0/server-env-14-0-server_environment_iap"><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-env&amp;target_branch=14.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
372+
<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/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/server-env/tree/16.0/server_environment_iap"><img alt="OCA/server-env" src="https://img.shields.io/badge/github-OCA%2Fserver--env-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/server-env-16-0/server-env-16-0-server_environment_iap"><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-env&amp;target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
373373
<p>This module allows to configure the IAP Accounts
374374
using the <cite>server_environment</cite> mechanism: you can then have different
375375
IAP Accounts for the production and the test environment.</p>
@@ -406,7 +406,7 @@ <h1><a class="toc-backref" href="#toc-entry-3">Bug Tracker</a></h1>
406406
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/server-env/issues">GitHub Issues</a>.
407407
In case of trouble, please check there if your issue has already been reported.
408408
If you spotted it first, help us to smash it by providing a detailed and welcomed
409-
<a class="reference external" href="https://github.com/OCA/server-env/issues/new?body=module:%20server_environment_iap%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
409+
<a class="reference external" href="https://github.com/OCA/server-env/issues/new?body=module:%20server_environment_iap%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
410410
<p>Do not contact contributors directly about support or help with technical issues.</p>
411411
</div>
412412
<div class="section" id="credits">
@@ -426,11 +426,13 @@ <h2><a class="toc-backref" href="#toc-entry-6">Contributors</a></h2>
426426
<div class="section" id="maintainers">
427427
<h2><a class="toc-backref" href="#toc-entry-7">Maintainers</a></h2>
428428
<p>This module is maintained by the OCA.</p>
429-
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
429+
<a class="reference external image-reference" href="https://odoo-community.org">
430+
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
431+
</a>
430432
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
431433
mission is to support the collaborative development of Odoo features and
432434
promote its widespread use.</p>
433-
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/server-env/tree/14.0/server_environment_iap">OCA/server-env</a> project on GitHub.</p>
435+
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/server-env/tree/16.0/server_environment_iap">OCA/server-env</a> project on GitHub.</p>
434436
<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>
435437
</div>
436438
</div>

server_environment_iap/tests/test_server_environment_iap.py

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import psycopg2
44

55
from odoo.modules.module import get_resource_path
6-
from odoo.tests.common import Form
76
from odoo.tools import convert_file
87
from odoo.tools.misc import mute_logger
98

@@ -68,20 +67,3 @@ def test_create_account_not_in_config(self):
6867
# account = self.IAP.search([("tech_name", "=", "account_xml")])
6968
# self.assertEqual(account.service_name, "partner_autocomplete_xml")
7069
# self.assertEqual(account.account_token, "my_secret_token_xml")
71-
72-
def test_update_account_data(self):
73-
"""We can't set account data that is in config file"""
74-
with self.load_config(public=self.env_config):
75-
# when creating, the value is overridden by config file
76-
account = self.IAP.create(
77-
{
78-
"tech_name": "account_2",
79-
}
80-
)
81-
account_form = Form(account)
82-
self.assertEqual(account.service_name, "partner_autocomplete_2")
83-
self.assertEqual(account.account_token, "my_secret_token_2")
84-
with self.assertRaises(AssertionError):
85-
account_form.service_name = "new_partner_autocomplete"
86-
with self.assertRaises(AssertionError):
87-
account_form.account_token = "my_new_secret_token"

server_environment_iap/views/iap_views.xml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
<field name="name">iap.account.form.inherit</field>
55
<field name="model">iap.account</field>
66
<field name="inherit_id" ref="iap.iap_account_view_form" />
7-
<field name="groups_id" eval="[(4, ref('base.group_system'))]" />
87
<field name="arch" type="xml">
98
<field name="service_name" position="before">
109
<field name="tech_name" groups="base.group_no_one" />
@@ -15,7 +14,6 @@
1514
<field name="name">iap.account.tree.inherit</field>
1615
<field name="model">iap.account</field>
1716
<field name="inherit_id" ref="iap.iap_account_view_tree" />
18-
<field name="groups_id" eval="[(4, ref('base.group_system'))]" />
1917
<field name="arch" type="xml">
2018
<field name="service_name" position="before">
2119
<field name="tech_name" groups="base.group_no_one" />

0 commit comments

Comments
 (0)