Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[18.0][MIG] remove_odoo_enterprise: Migration to 18.0 #87

Merged
merged 23 commits into from
Dec 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
2461d3a
new module remove_odoo_enterprise
lk-eska Dec 5, 2018
89e589c
Remove old module and fix travis
lk-eska Dec 10, 2018
568d632
Added translation using Weblate (Croatian)
badbole Nov 18, 2019
df99444
[IMP] remove_odoo_enterprise: black, isort
tarteo Dec 6, 2019
17f68b0
[MIG] remove_odoo_enterprise: Migration to 13.0
tarteo Dec 6, 2019
29fc2a0
[FIX] remove_odoo_enterprise: decorator for search method
astirpe Jan 9, 2020
850ea30
[FIX] access rights for portal user
astirpe Aug 5, 2020
f253c03
[14.0][MIG] remove_odoo_enterprise
astirpe Oct 20, 2020
2a03310
[IMP] remove_odoo_enterprise: add initial test
astirpe Nov 25, 2020
746b8f2
[FIX] hide enterprise config fields instead of removing them and add …
clementmbr Mar 26, 2021
61a5466
Added translation using Weblate (Swedish)
simonstromb Nov 17, 2021
de1c650
[IMP] remove_odoo_enterprise: black, isort, prettier
vincent-hatakeyama Mar 21, 2022
bad542b
remove_odoo_enterprise: fix when count is True
jguenat Apr 22, 2022
44a2500
[MIG] remove_odoo_enterprise: Migration to 16.0
remi-filament Feb 8, 2023
f44f8ea
[IMP] hide widget Google Play and Apple Store
astirpe Feb 9, 2023
f6139e1
[IMP][remove_odoo_enterprise] Hide block title if all the elements of…
MTantin Oct 10, 2023
82badcd
Added translation using Weblate (Italian)
mymage Jan 2, 2024
b412fae
[IMP] remove_odoo_enterprise: apply pre-commit auto fixes
remi-filament May 21, 2024
7bb0dff
[MIG] remove_odoo_enterprise: Migration to 17.0
remi-filament May 21, 2024
0878621
[UPD] Update remove_odoo_enterprise.pot
Jul 29, 2024
dcb4d1d
[BOT] post-merge updates
OCA-git-bot Jul 29, 2024
3b6be78
Update translation files
weblate Jul 29, 2024
093d410
[MIG] remove_odoo_enterprise: Migration to 18.0
PauMAVA Nov 8, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
86 changes: 86 additions & 0 deletions remove_odoo_enterprise/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
======================
Remove Odoo Enterprise
======================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:5a1f12d8590afb4f5c4e395ad3ef44a2368993dd60e0d4d94c5b20e2aaf5120b
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
: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--brand-lightgray.png?logo=github
:target: https://github.com/OCA/server-brand/tree/18.0/remove_odoo_enterprise
:alt: OCA/server-brand
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/server-brand-18-0/server-brand-18-0-remove_odoo_enterprise
: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-brand&target_branch=18.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

This module removes enterprise-only apps and features from all settings
views.

It also removes the widget in the General Settings page for downloading
the Odoo mobile apps from Google Play and Apple Store.

**Table of contents**

.. contents::
:local:

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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/server-brand/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-brand/issues/new?body=module:%20remove_odoo_enterprise%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
-------

* Eska
* Onestein

Contributors
------------

- Brett Wood <[email protected]>
- Michell Stuttgart <[email protected]>
- Andrea Stirpe <[email protected]>
- Levent Karakaş <[email protected]>
- Dennis Sluijk <[email protected]>
- remi-filament

Maintainers
-----------

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

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-brand <https://github.com/OCA/server-brand/tree/18.0/remove_odoo_enterprise>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
4 changes: 4 additions & 0 deletions remove_odoo_enterprise/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Copyright 2018 Eska Yazılım ve Danışmanlık A.Ş (www.eskayazilim.com.tr)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).

from . import models
14 changes: 14 additions & 0 deletions remove_odoo_enterprise/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Copyright 2018 Eska Yazılım ve Danışmanlık A.Ş (www.eskayazilim.com.tr)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
{
"name": "Remove Odoo Enterprise",
"summary": "Remove enterprise modules and setting items",
"version": "18.0.1.0.0",
"category": "Maintenance",
"author": "Eska, Onestein, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/server-brand",
"license": "AGPL-3",
"depends": ["base_setup"],
"data": ["views/res_config_settings_views.xml"],
"installable": True,
}
28 changes: 28 additions & 0 deletions remove_odoo_enterprise/i18n/hr.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * remove_odoo_enterprise
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2019-11-18 14:35+0000\n"
"Last-Translator: Bole <[email protected]>\n"
"Language-Team: none\n"
"Language: hr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && "
"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
"X-Generator: Weblate 3.8\n"

#. module: remove_odoo_enterprise
#: model:ir.model,name:remove_odoo_enterprise.model_base
msgid "Base"
msgstr ""

#. module: remove_odoo_enterprise
#: model:ir.model,name:remove_odoo_enterprise.model_res_config_settings
msgid "Config Settings"
msgstr "Postavke"
30 changes: 30 additions & 0 deletions remove_odoo_enterprise/i18n/it.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * remove_odoo_enterprise
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2024-01-02 17:34+0000\n"
"Last-Translator: mymage <[email protected]>\n"
"Language-Team: none\n"
"Language: it\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.17\n"

#. module: remove_odoo_enterprise
#: model:ir.model,name:remove_odoo_enterprise.model_base
msgid "Base"
msgstr "Base"

#. module: remove_odoo_enterprise
#: model:ir.model,name:remove_odoo_enterprise.model_res_config_settings
msgid "Config Settings"
msgstr "Impostazioni configurazione"

#~ msgid "Module"
#~ msgstr "Modulo"
24 changes: 24 additions & 0 deletions remove_odoo_enterprise/i18n/remove_odoo_enterprise.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * remove_odoo_enterprise
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 17.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: remove_odoo_enterprise
#: model:ir.model,name:remove_odoo_enterprise.model_base
msgid "Base"
msgstr ""

#. module: remove_odoo_enterprise
#: model:ir.model,name:remove_odoo_enterprise.model_res_config_settings
msgid "Config Settings"
msgstr ""
39 changes: 39 additions & 0 deletions remove_odoo_enterprise/i18n/sv.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * remove_odoo_enterprise
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2021-11-17 10:36+0000\n"
"Last-Translator: Simon S <[email protected]>\n"
"Language-Team: none\n"
"Language: sv\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.3.2\n"

#. module: remove_odoo_enterprise
#: model:ir.model,name:remove_odoo_enterprise.model_base
msgid "Base"
msgstr "Bas"

#. module: remove_odoo_enterprise
#: model:ir.model,name:remove_odoo_enterprise.model_res_config_settings
msgid "Config Settings"
msgstr "Konfigurationsinställningar"

#~ msgid "Module"
#~ msgstr "Modul"

#~ msgid "Display Name"
#~ msgstr "Visningsnamn"

#~ msgid "ID"
#~ msgstr "ID"

#~ msgid "Last Modified on"
#~ msgstr "Senast ändrad den"
6 changes: 6 additions & 0 deletions remove_odoo_enterprise/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Copyright 2018 Eska Yazılım ve Danışmanlık A.Ş (www.eskayazilim.com.tr)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).


from . import base
from . import res_config_settings
18 changes: 18 additions & 0 deletions remove_odoo_enterprise/models/base.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Copyright 2019-2020 Onestein (<https://www.onestein.eu>)
# Copyright 2023 Le Filament (https://le-filament.com)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from odoo import api, models


class Base(models.AbstractModel):
_inherit = "base"

@api.model
def search_fetch(self, domain, field_names, offset=0, limit=None, order=None):
res = super().search_fetch(domain, field_names, offset, limit, order)
if self._name == "ir.module.module":
res = res.filtered(lambda a: not a.to_buy)
elif self._name == "payment.provider":
res = res.filtered(lambda a: not a.module_to_buy)

Check warning on line 17 in remove_odoo_enterprise/models/base.py

View check run for this annotation

Codecov / codecov/patch

remove_odoo_enterprise/models/base.py#L17

Added line #L17 was not covered by tests
return res
46 changes: 46 additions & 0 deletions remove_odoo_enterprise/models/res_config_settings.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Copyright 2016 LasLabs Inc.
# Copyright 2018-2020 Onestein (<http://www.onestein.eu>)
# Copyright 2023 Le Filament (https://le-filament.com)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from lxml import etree

from odoo import api, models


class ResConfigSettings(models.TransientModel):
_inherit = "res.config.settings"

@api.model
def get_views(self, views, options=None):
ret_val = super().get_views(views, options)

form_view = self.env["ir.ui.view"].browse(ret_val["views"]["form"]["id"])
if not form_view.xml_id == "base.res_config_settings_view_form":
return ret_val

Check warning on line 20 in remove_odoo_enterprise/models/res_config_settings.py

View check run for this annotation

Codecov / codecov/patch

remove_odoo_enterprise/models/res_config_settings.py#L20

Added line #L20 was not covered by tests

doc = etree.XML(ret_val["views"]["form"]["arch"])

query = "//setting[field[@widget='upgrade_boolean']]"
for item in doc.xpath(query):
item.attrib["class"] = "d-none"

Check warning on line 26 in remove_odoo_enterprise/models/res_config_settings.py

View check run for this annotation

Codecov / codecov/patch

remove_odoo_enterprise/models/res_config_settings.py#L26

Added line #L26 was not covered by tests

for block in doc.xpath("//block"):
if (
len(
block.xpath(
"""setting[
not(contains(@class, 'd-none'))
and not(@invisible='1')]
"""
)
)
== 0
):
# Removing title and tip so that no empty h2 or h3 are displayed
block.attrib.pop("title", None)
block.attrib.pop("tip", None)
block.attrib["class"] = "d-none"

ret_val["views"]["form"]["arch"] = etree.tostring(doc)
return ret_val
3 changes: 3 additions & 0 deletions remove_odoo_enterprise/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 remove_odoo_enterprise/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
- Brett Wood \<<[email protected]>\>
- Michell Stuttgart \<<[email protected]>\>
- Andrea Stirpe \<<[email protected]>\>
- Levent Karakaş \<<[email protected]>\>
- Dennis Sluijk \<<[email protected]>\>
- remi-filament
5 changes: 5 additions & 0 deletions remove_odoo_enterprise/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
This module removes enterprise-only apps and features from all settings
views.

It also removes the widget in the General Settings page for downloading
the Odoo mobile apps from Google Play and Apple Store.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading