Skip to content

Commit

Permalink
Merge PR #83 into 17.0
Browse files Browse the repository at this point in the history
Signed-off-by pedrobaeza
  • Loading branch information
OCA-git-bot committed Jul 29, 2024
2 parents d28d763 + e86b875 commit 1dcaf68
Show file tree
Hide file tree
Showing 19 changed files with 823 additions and 0 deletions.
Binary file added pandoc-3.2-1-amd64.deb
Binary file not shown.
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:51e86f62ad09ef5e5264ed35cb8081541dfe7082531a4ecd13a96cc54e66c1bd
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |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/17.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-17-0/server-brand-17-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=17.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:%2017.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 <bwood@laslabs.com>
- Michell Stuttgart <michellstut@gmail.com>
- Andrea Stirpe <a.stirpe@onestein.nl>
- Levent Karakaş <leventk@eskayazilim.com.tr>
- Dennis Sluijk <d.sluijk@onestein.nl>
- 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/17.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": "17.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,
}
33 changes: 33 additions & 0 deletions remove_odoo_enterprise/i18n/hr.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# 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 <bole@dajmi5.com>\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"

#. module: remove_odoo_enterprise
#: model:ir.model,name:remove_odoo_enterprise.model_ir_module_module
msgid "Module"
msgstr ""
32 changes: 32 additions & 0 deletions remove_odoo_enterprise/i18n/it.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# 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 <stefano.consolaro@mymage.it>\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"

#. module: remove_odoo_enterprise
#: model:ir.model,name:remove_odoo_enterprise.model_ir_module_module
msgid "Module"
msgstr "Modulo"
29 changes: 29 additions & 0 deletions remove_odoo_enterprise/i18n/remove_odoo_enterprise.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# 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"
"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 ""

#. module: remove_odoo_enterprise
#: model:ir.model,name:remove_odoo_enterprise.model_ir_module_module
msgid "Module"
msgstr ""
41 changes: 41 additions & 0 deletions remove_odoo_enterprise/i18n/sv.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# 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 <simon.stromberg@vertel.se>\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"

#. module: remove_odoo_enterprise
#: model:ir.model,name:remove_odoo_enterprise.model_ir_module_module
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)
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

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 \<<bwood@laslabs.com>\>
- Michell Stuttgart \<<michellstut@gmail.com>\>
- Andrea Stirpe \<<a.stirpe@onestein.nl>\>
- Levent Karakaş \<<leventk@eskayazilim.com.tr>\>
- Dennis Sluijk \<<d.sluijk@onestein.nl>\>
- 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

0 comments on commit 1dcaf68

Please sign in to comment.