Skip to content
Snippets Groups Projects
Commit db8904b0 authored by qsm-odoo's avatar qsm-odoo
Browse files

[FIX] website, theme_default: restore website creation UI

Commit https://github.com/odoo/odoo/commit/88e910e187346c095a6f0eeb8be647da1e391035
merged the inheritance of a view into the base view while the inherit
was in fact a primary mode inherit. The modal buttons of website
creation modal thus appeared in all website forms by mistake.

This commit also takes advantage of the fix to fix the design of that
creation modal (wrong classes on buttons).

Also fixes https://github.com/odoo/odoo/commit/986415cf050efbd38a5834f9bbd3a37db1fd7933


which added a data file & folder in demo data by mistake.

closes odoo/odoo#40175

Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
parent 8d792001
No related branches found
No related tags found
No related merge requests found
......@@ -8,7 +8,7 @@
'sequence': 1000,
'version': '1.0',
'depends': ['website'],
'demo': [
'data': [
'data/theme_default_data.xml',
],
'images': [
......
......@@ -152,7 +152,7 @@ class ResConfigSettings(models.TransientModel):
def action_website_create_new(self):
return {
'view_mode': 'form',
'view_id': self.env.ref('website.view_website_form').id,
'view_id': self.env.ref('website.view_website_form_view_themes_modal').id,
'res_model': 'website',
'type': 'ir.actions.act_window',
'target': 'new',
......
......@@ -43,11 +43,21 @@
</group>
</div>
</sheet>
</form>
</field>
</record>
<record id="view_website_form_view_themes_modal" model="ir.ui.view">
<field name="name">website.modal.form</field>
<field name="model">website</field>
<field name="inherit_id" ref="website.view_website_form"/>
<field name="mode">primary</field>
<field name="arch" type="xml">
<xpath expr="//form" position="inside">
<footer>
<button name="create_and_redirect_to_theme" type="object" string="Choose a theme" class="ml-2 btn btn-primary" icon="fa-paint-brush"/>
<button string="Cancel" class="btn btn-default" special="cancel"/>
<button name="create_and_redirect_to_theme" type="object" string="Choose a theme" class="btn btn-primary" icon="fa-paint-brush"/>
<button string="Cancel" class="btn btn-secondary" special="cancel"/>
</footer>
</form>
</xpath>
</field>
</record>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment