Skip to content

Commit

Permalink
Merge PR #76 into 16.0
Browse files Browse the repository at this point in the history
Signed-off-by pedrobaeza
  • Loading branch information
OCA-git-bot committed Nov 25, 2023
2 parents 1be2d8a + 64f6316 commit e9e0e48
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions remove_odoo_enterprise/models/res_config_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,12 @@ def get_views(self, views, options=None):
for item in doc.xpath(query):
item.attrib["class"] = "d-none"

for container in doc.xpath("//div[contains(@class, 'o_settings_container')]"):
if len(container.xpath("div[not(contains(@class, 'd-none'))]")) == 0:
prev_el = container.getprevious()
if len(prev_el) and prev_el.tag == "h2":
prev_el.attrib["class"] = "d-none"
container.attrib["class"] = "d-none"

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

0 comments on commit e9e0e48

Please sign in to comment.