Skip to content

Commit

Permalink
[IMP] base_export_manager: pre-commit auto fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
BT-crodriguez committed Nov 12, 2024
1 parent 37c401c commit 85b3331
Show file tree
Hide file tree
Showing 16 changed files with 124 additions and 127 deletions.
98 changes: 49 additions & 49 deletions base_export_manager/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ Manage model export profiles
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fserver--ux-lightgray.png?logo=github
:target: https://github.com/OCA/server-ux/tree/16.0/base_export_manager
:target: https://github.com/OCA/server-ux/tree/18.0/base_export_manager
:alt: OCA/server-ux
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/server-ux-16-0/server-ux-16-0-base_export_manager
:target: https://translation.odoo-community.org/projects/server-ux-18-0/server-ux-18-0-base_export_manager
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/server-ux&target_branch=16.0
:target: https://runboat.odoo-community.org/builds?repo=OCA/server-ux&target_branch=18.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|
Expand All @@ -32,9 +32,9 @@ This module extends the export capability:

1. It allows an admin to manage export profiles (``ir.exports``) that
Odoo stores internally but does not show anywhere.
2. It also adds a new column to access rights to enable/disable export and
override the export method to check if the user is allowed to export. Export
is enabled by default.
2. It also adds a new column to access rights to enable/disable export
and override the export method to check if the user is allowed to
export. Export is enabled by default.

**Table of contents**

Expand All @@ -44,10 +44,10 @@ This module extends the export capability:
Configuration
=============

* Activate the developer mode
* Go to Settings > Users > Groups to select a user group
* Edit the group and go to the Access Rights tab
* Uncheck the "Export Access" box on the object of your choice and save
- Activate the developer mode
- Go to Settings > Users > Groups to select a user group
- Edit the group and go to the Access Rights tab
- Uncheck the "Export Access" box on the object of your choice and save

You can also go to Settings > Technical > Security > Access Rights.

Expand All @@ -56,82 +56,82 @@ Usage

You can create the export profiles as you are used to:

* Go to any list view.
* Check some records.
* Click *Action > Export*.
* Use the wizard to choose the columns to export.
* Click on the *Template* dropdown and select *New template*
* Give it a name.
* Click on the floppy disk icon to save it.
- Go to any list view.
- Check some records.
- Click *Action > Export*.
- Use the wizard to choose the columns to export.
- Click on the *Template* dropdown and select *New template*
- Give it a name.
- Click on the floppy disk icon to save it.

To manage export profiles, you need to:

* Go to *Settings > Technical > User Interface > Export Profiles*.
* Create a new one.
* Choose a name.
* Choose a model (table in the database).
* Choose the fields to export.
- Go to *Settings > Technical > User Interface > Export Profiles*.
- Create a new one.
- Choose a name.
- Choose a model (table in the database).
- Choose the fields to export.

* If you choose a related field, you can choose also up to 4 levels of
- If you choose a related field, you can choose also up to 4 levels of
subfields.
* You can drag & drop to reorder the fields.
- You can drag & drop to reorder the fields.

To use one of those profiles, you need to:

* Go to any list view.
* Check some records.
* Click *Action > Export*.
* Choose your saved export from *Saved exports*.
* Press *Export to file*.
- Go to any list view.
- Check some records.
- Click *Action > Export*.
- Choose your saved export from *Saved exports*.
- Press *Export to file*.

Once you have configured groups who cannot export an object:

* Connect as a user of this group
* Go to the list view of the object you disabled the export
* Select records and open the Action menu. The "Export" is not there.
- Connect as a user of this group
- Go to the list view of the object you disabled the export
- Select records and open the Action menu. The "Export" is not there.

Known issues / Roadmap
======================

* Translated labels are not used in final exported file.
- Translated labels are not used in final exported file.

Bug Tracker
===========

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

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

Credits
=======

Authors
~~~~~~~
-------

* Tecnativa
* LasLabs
* Ursa Information Systems
* brain-tec AG

Contributors
~~~~~~~~~~~~

* Javier Iniesta <[email protected]>
* Antonio Espinosa <[email protected]>
* Rafael Blasco <[email protected]>
* Jairo Llopis <[email protected]>
* Dave Lasley <[email protected]>
* Sandip Mangukiya <[email protected]>
* Maxime Chambreuil <[email protected]>
* Olivier Jossen <[email protected]>
* Alexandre Díaz <[email protected]>
* Kevin Khao <[email protected]>
------------

- Javier Iniesta <[email protected]>
- Antonio Espinosa <[email protected]>
- Rafael Blasco <[email protected]>
- Jairo Llopis <[email protected]>
- Dave Lasley <[email protected]>
- Sandip Mangukiya <[email protected]>
- Maxime Chambreuil <[email protected]>
- Olivier Jossen <[email protected]>
- Alexandre Díaz <[email protected]>
- Kevin Khao <[email protected]>

Maintainers
~~~~~~~~~~~
-----------

This module is maintained by the OCA.

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

This module is part of the `OCA/server-ux <https://github.com/OCA/server-ux/tree/16.0/base_export_manager>`_ project on GitHub.
This module is part of the `OCA/server-ux <https://github.com/OCA/server-ux/tree/18.0/base_export_manager>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
2 changes: 0 additions & 2 deletions base_export_manager/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
"views/ir_model_access.xml",
"views/res_groups.xml",
],
"qweb": ["static/src/xml/base.xml"],
"author": "Tecnativa, "
"LasLabs, "
"Ursa Information Systems, "
Expand All @@ -26,7 +25,6 @@
"assets": {
"web.assets_backend": [
"base_export_manager/static/src/views/list/list_controller.esm.js",
"base_export_manager/static/src/xml/base.xml",
],
},
"installable": True,
Expand Down
6 changes: 3 additions & 3 deletions base_export_manager/models/ir_exports_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,9 @@ def _inverse_name(self):
# You could get to failing constraint while populating the
# fields, so we skip the uniqueness check and manually check
# the full constraint after the loop
one.with_context(skip_check=True)[
one.field_n(num, True)
] = one._get_field_id(model, field_name)
one.with_context(skip_check=True)[one.field_n(num, True)] = (
one._get_field_id(model, field_name)
)
if any(parts):
# invalidate_recordset -> in order to get actual value of field 'label'
# in function '_check_name'
Expand Down
2 changes: 1 addition & 1 deletion base_export_manager/models/ir_model_access.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ class IrModelAccess(models.Model):
_inherit = "ir.model.access"

# WARN: This can't be used in 'check()'
# See https://github.com/odoo/odoo/blob/0b6a2569920b6584652c39b3465998649fe305b4/odoo/addons/base/models/ir_model.py#L1496 # noqa: B950
# See https://github.com/odoo/odoo/blob/0b6a2569920b6584652c39b3465998649fe305b4/odoo/addons/base/models/ir_model.py#L1496 # noqa: B950, E501
perm_export = fields.Boolean("Export Access", default=True)
3 changes: 3 additions & 0 deletions base_export_manager/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
6 changes: 6 additions & 0 deletions base_export_manager/readme/CONFIGURE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
- Activate the developer mode
- Go to Settings \> Users \> Groups to select a user group
- Edit the group and go to the Access Rights tab
- Uncheck the "Export Access" box on the object of your choice and save

You can also go to Settings \> Technical \> Security \> Access Rights.
6 changes: 0 additions & 6 deletions base_export_manager/readme/CONFIGURE.rst

This file was deleted.

10 changes: 10 additions & 0 deletions base_export_manager/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
- Javier Iniesta \<<[email protected]>\>
- Antonio Espinosa \<<[email protected]>\>
- Rafael Blasco \<<[email protected]>\>
- Jairo Llopis \<<[email protected]>\>
- Dave Lasley \<<[email protected]>\>
- Sandip Mangukiya \<<[email protected]>\>
- Maxime Chambreuil \<<[email protected]>\>
- Olivier Jossen \<<[email protected]>\>
- Alexandre Díaz \<<[email protected]>\>
- Kevin Khao \<<[email protected]>\>
10 changes: 0 additions & 10 deletions base_export_manager/readme/CONTRIBUTORS.rst

This file was deleted.

7 changes: 7 additions & 0 deletions base_export_manager/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
This module extends the export capability:

1. It allows an admin to manage export profiles (`ir.exports`) that
Odoo stores internally but does not show anywhere.
2. It also adds a new column to access rights to enable/disable export
and override the export method to check if the user is allowed to
export. Export is enabled by default.
7 changes: 0 additions & 7 deletions base_export_manager/readme/DESCRIPTION.rst

This file was deleted.

1 change: 1 addition & 0 deletions base_export_manager/readme/ROADMAP.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Translated labels are not used in final exported file.
1 change: 0 additions & 1 deletion base_export_manager/readme/ROADMAP.rst

This file was deleted.

34 changes: 34 additions & 0 deletions base_export_manager/readme/USAGE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
You can create the export profiles as you are used to:

- Go to any list view.
- Check some records.
- Click *Action \> Export*.
- Use the wizard to choose the columns to export.
- Click on the *Template* dropdown and select *New template*
- Give it a name.
- Click on the floppy disk icon to save it.

To manage export profiles, you need to:

- Go to *Settings \> Technical \> User Interface \> Export Profiles*.
- Create a new one.
- Choose a name.
- Choose a model (table in the database).
- Choose the fields to export.
- If you choose a related field, you can choose also up to 4 levels of
subfields.
- You can drag & drop to reorder the fields.

To use one of those profiles, you need to:

- Go to any list view.
- Check some records.
- Click *Action \> Export*.
- Choose your saved export from *Saved exports*.
- Press *Export to file*.

Once you have configured groups who cannot export an object:

- Connect as a user of this group
- Go to the list view of the object you disabled the export
- Select records and open the Action menu. The "Export" is not there.
35 changes: 0 additions & 35 deletions base_export_manager/readme/USAGE.rst

This file was deleted.

Loading

0 comments on commit 85b3331

Please sign in to comment.