Skip to content
Snippets Groups Projects
Commit 43d91c28 authored by Julien Mougenot's avatar Julien Mougenot
Browse files

[FIX] base: document layout reset colors button


Fixed the button allowing to reset to the logo colors in the
document layout configurator.

Before this commit, the custom_colors boolean asserting that
the colors used by the layout are different than the ones computed
from the logo and used to revert to those colors was in readonly
and couldn't be toggled.

Now, the boolean is editable and allows to revert the colors properly.

Task 2072557

closes odoo/odoo#36968

Signed-off-by: default avatarVincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
parent d5111aec
Branches
Tags
No related merge requests found
......@@ -28,7 +28,7 @@ class BaseDocumentLayout(models.TransientModel):
primary_color = fields.Char(related='company_id.primary_color', readonly=False)
secondary_color = fields.Char(related='company_id.secondary_color', readonly=False)
custom_colors = fields.Boolean(compute="_compute_custom_colors")
custom_colors = fields.Boolean(compute="_compute_custom_colors", readonly=False)
logo_primary_color = fields.Char(compute="_compute_logo_colors")
logo_secondary_color = fields.Char(compute="_compute_logo_colors")
......
......@@ -19,7 +19,7 @@
<div class="o_document_layout_colors">
<field name="primary_color" widget="color" class="mb-4" />
<field name="secondary_color" widget="color" class="mb-4" />
<button class="btn btn-link" title="Reset to logo colors">
<button class="btn btn-link" title="Reset to logo colors" attrs="{'invisible': [('custom_colors', '=', False)]}">
<label for="custom_colors" class="fa fa-refresh mb-4" string="" />
</button>
</div>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment