Skip to content

Commit 3153f47

Browse files
[IMP] base_portal_type: pre-commit auto fixes
1 parent f31aa05 commit 3153f47

File tree

15 files changed

+68
-52
lines changed

15 files changed

+68
-52
lines changed

base_portal_type/README.rst

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,23 @@ Portal types
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--backend-lightgray.png?logo=github
20-
:target: https://github.com/OCA/server-backend/tree/16.0/base_portal_type
20+
:target: https://github.com/OCA/server-backend/tree/18.0/base_portal_type
2121
:alt: OCA/server-backend
2222
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
23-
:target: https://translation.odoo-community.org/projects/server-backend-16-0/server-backend-16-0-base_portal_type
23+
:target: https://translation.odoo-community.org/projects/server-backend-18-0/server-backend-18-0-base_portal_type
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-backend&target_branch=16.0
26+
:target: https://runboat.odoo-community.org/builds?repo=OCA/server-backend&target_branch=18.0
2727
:alt: Try me on Runboat
2828

2929
|badge1| |badge2| |badge3| |badge4| |badge5|
3030

31-
This module allows administrator to configure groups for portal users, which is not possible with standard Odoo.
31+
This module allows administrator to configure groups for portal users,
32+
which is not possible with standard Odoo.
3233

33-
That's useful for having different types of portal users (think differentiate vendors from customers) and leveraging Odoo's group mechanism for ie views instead having to cook up custom solutions.
34+
That's useful for having different types of portal users (think
35+
differentiate vendors from customers) and leveraging Odoo's group
36+
mechanism for ie views instead having to cook up custom solutions.
3437

3538
.. IMPORTANT::
3639
This is an alpha version, the data model and design can change at any time without warning.
@@ -47,40 +50,42 @@ Usage
4750

4851
To use this module, you need to:
4952

50-
#. create a group of category ``base_portal_type.category_portal_type``
51-
#. observe the group shows up on a user form for users of type `Portal`
52-
#. now you can use this group in your frontend templates and code to make some features accessible to this group
53+
1. create a group of category ``base_portal_type.category_portal_type``
54+
2. observe the group shows up on a user form for users of type Portal
55+
3. now you can use this group in your frontend templates and code to
56+
make some features accessible to this group
5357

5458
Known issues / Roadmap
5559
======================
5660

57-
* allowing to chose portal groups in the portal wizard would be nice
61+
- allowing to chose portal groups in the portal wizard would be nice
5862

5963
Bug Tracker
6064
===========
6165

6266
Bugs are tracked on `GitHub Issues <https://github.com/OCA/server-backend/issues>`_.
6367
In case of trouble, please check there if your issue has already been reported.
6468
If you spotted it first, help us to smash it by providing a detailed and welcomed
65-
`feedback <https://github.com/OCA/server-backend/issues/new?body=module:%20base_portal_type%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
69+
`feedback <https://github.com/OCA/server-backend/issues/new?body=module:%20base_portal_type%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
6670

6771
Do not contact contributors directly about support or help with technical issues.
6872

6973
Credits
7074
=======
7175

7276
Authors
73-
~~~~~~~
77+
-------
7478

7579
* Hunki Enterprises BV
7680

7781
Contributors
78-
~~~~~~~~~~~~
82+
------------
7983

80-
* Holger Brunn <[email protected]> (https://hunki-enterprises.com)
84+
- Holger Brunn <[email protected]>
85+
(https://hunki-enterprises.com)
8186

8287
Maintainers
83-
~~~~~~~~~~~
88+
-----------
8489

8590
This module is maintained by the OCA.
8691

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

101106
|maintainer-hbrunn|
102107

103-
This module is part of the `OCA/server-backend <https://github.com/OCA/server-backend/tree/16.0/base_portal_type>`_ project on GitHub.
108+
This module is part of the `OCA/server-backend <https://github.com/OCA/server-backend/tree/18.0/base_portal_type>`_ project on GitHub.
104109

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

base_portal_type/data/ir_module_category.xml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22
<!-- Copyright 2023 Hunki Enterprises BV
33
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl-3.0) -->
44
<data>
5-
6-
<record id="category_portal_type" model="ir.module.category">
7-
<field name="name">Portal type</field>
8-
</record>
9-
5+
<record id="category_portal_type" model="ir.module.category">
6+
<field name="name">Portal type</field>
7+
</record>
108
</data>

base_portal_type/demo/res_groups.xml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,8 @@
22
<!-- Copyright 2023 Hunki Enterprises BV
33
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl-3.0) -->
44
<data>
5-
6-
<record id="group_portal_type" model="res.groups">
7-
<field name="name">A portal type</field>
8-
<field name="category_id" ref="category_portal_type" />
9-
</record>
10-
5+
<record id="group_portal_type" model="res.groups">
6+
<field name="name">A portal type</field>
7+
<field name="category_id" ref="category_portal_type" />
8+
</record>
119
</data>

base_portal_type/models/res_groups.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ def _update_user_groups_view(self):
3838
)
3939
)
4040
user_type_field = name_selection_groups(user_type_groups.ids)
41-
for node in arch.xpath("//group/field[@name='%s']" % user_type_field):
41+
for node in arch.xpath(f"//group/field[@name='{user_type_field}']"):
4242
for group in portal_groups:
4343
field_name = name_boolean_group(group.id)
44-
for field_node in arch.xpath("//field[@name='%s']" % field_name):
44+
for field_node in arch.xpath(f"//field[@name='{field_name}']"):
4545
field_node.attrib["attrs"] = str(
4646
{
4747
"readonly": [

base_portal_type/pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[build-system]
2+
requires = ["whool"]
3+
build-backend = "whool.buildapi"
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
- Holger Brunn \<[email protected]\>
2+
(<https://hunki-enterprises.com>)

base_portal_type/readme/CONTRIBUTORS.rst

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
This module allows administrator to configure groups for portal users,
2+
which is not possible with standard Odoo.
3+
4+
That's useful for having different types of portal users (think
5+
differentiate vendors from customers) and leveraging Odoo's group
6+
mechanism for ie views instead having to cook up custom solutions.

base_portal_type/readme/DESCRIPTION.rst

Lines changed: 0 additions & 3 deletions
This file was deleted.

base_portal_type/readme/ROADMAP.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- allowing to chose portal groups in the portal wizard would be nice

0 commit comments

Comments
 (0)