Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
83 changes: 83 additions & 0 deletions remove_odoo_enterprise/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
======================
Remove Odoo Enterprise
======================

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

.. |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/19.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-19-0/server-brand-19-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=19.0
:alt: Try me on Runboat

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

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

**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:%2019.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/19.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": "19.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": [],
"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 18.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"
11 changes: 11 additions & 0 deletions remove_odoo_enterprise/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# 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

try:
from . import payment_provider
except ImportError:
pass
19 changes: 19 additions & 0 deletions remove_odoo_enterprise/models/base.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# 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 IrModuleModule(models.Model):
_inherit = "ir.module.module"

@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)
return res.filtered(lambda a: not a.to_buy)

@api.model
def search(self, domain, offset=0, limit=None, order=None):
res = super().search(domain, offset=offset, limit=limit, order=order)
return res.filtered(lambda a: not a.to_buy)
17 changes: 17 additions & 0 deletions remove_odoo_enterprise/models/payment_provider.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# 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).


# class PaymentProvider(models.Model):
# _inherit = "payment.provider"
#
# @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)
# return res.filtered(lambda a: not a.module_to_buy)
#
# @api.model
# def search(self, domain, offset=0, limit=None, order=None):
# res = super().search(domain, offset=offset, limit=limit, order=order)
# return res.filtered(lambda a: not a.module_to_buy)
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

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"

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
2 changes: 2 additions & 0 deletions remove_odoo_enterprise/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
This module removes enterprise-only apps and features from all settings
views.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading