-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TA#66805 [16.0][MIG] base_external_report_layout (#150)
Co-authored-by: Majda EL MARIOULI <[email protected]>
- Loading branch information
1 parent
cec212f
commit 2e87dcc
Showing
5 changed files
with
71 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
=========================== | ||
Base External Report Layout | ||
=========================== | ||
|
||
.. contents:: Table of Contents | ||
|
||
Context | ||
------- | ||
In vanilla Odoo, from the general settings, a many2one layout field allows you to select the layout of Qweb reports. | ||
It allows you to select any view, including views that are not Qweb report layouts. | ||
|
||
This field is modified when using the wizard behind 'Configure document layout'. If the user selects a view that is not a layout, then Qweb reports no longer work. | ||
|
||
In order to avoid this scenario, this module allows to hide the external report layout field | ||
|
||
Overview | ||
-------- | ||
After installing this module, the field `external_report_layout_id` is not anymore visible in the general settings view. | ||
|
||
Contributors | ||
------------ | ||
* Numigi (tm) and all its contributors (https://bit.ly/numigiens) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Copyright 2024-today Numigi and all its contributors (https://bit.ly/numigiens) | ||
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Copyright 2024-today Numigi and all its contributors (https://bit.ly/numigiens) | ||
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). | ||
|
||
{ | ||
"name": "Base External Report Layout", | ||
"version": "16.0.1.0.0", | ||
"author": "Numigi", | ||
"maintainer": "Numigi", | ||
"license": "LGPL-3", | ||
"category": "Base", | ||
"website": "https://www.numigi.com", | ||
"summary": "Hide external report layout from the general settings view", | ||
"depends": ["base_setup"], | ||
"data": ["views/res_config_settings_views.xml"], | ||
"installable": True, | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
31 changes: 31 additions & 0 deletions
31
base_external_report_layout/views/res_config_settings_views.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<odoo> | ||
|
||
<record id="res_config_settings_view_form" model="ir.ui.view"> | ||
<field name="name">res.config.settings.view.form.inherit.base.setup</field> | ||
<field name="model">res.config.settings</field> | ||
<field name="priority" eval="0" /> | ||
<field name="inherit_id" ref="base_setup.res_config_settings_view_form" /> | ||
<field name="arch" type="xml"> | ||
<xpath expr="//div[@id='company_details_settings']/div[@class='o_setting_right_pane']" position="replace"> | ||
<span class="o_form_label">Document Layout</span> | ||
<span class="fa fa-lg fa-building-o" title="Values set here are company-specific." aria-label="Values set here are company-specific." groups="base.group_multi_company" role="img"/> | ||
<div class="text-muted"> | ||
Choose the layout of your documents | ||
</div> | ||
<div class="content-group"> | ||
<div class="mt16" groups="base.group_no_one"> | ||
<label for="external_report_layout_id" string="Layout" class="col-3 col-lg-3 o_light_label"/> | ||
<field name="external_report_layout_id" domain="[('type','=', 'qweb')]" class="oe_inline"/> | ||
</div> | ||
<div class="mt8"> | ||
<button name="%(web.action_base_document_layout_configurator)d" string="Configure Document Layout" type="action" class="oe_link" icon="fa-arrow-right"/> | ||
<button name="edit_external_header" string="Edit Layout" type="object" class="oe_link" groups="base.group_no_one"/> | ||
<button name="%(web.action_report_externalpreview)d" string="Preview Document" type="action" class="oe_link" groups="base.group_no_one"/> | ||
</div> | ||
</div> | ||
</xpath> | ||
</field> | ||
</record> | ||
|
||
</odoo> |