[MIG] web_dialog_size: Migration to 17.0

This commit is contained in:
Carlos Roca
2024-08-16 08:17:45 +02:00
parent d760a19735
commit 996d4e56e6
12 changed files with 47 additions and 189 deletions

View File

@@ -1,8 +0,0 @@
<?xml version="1.0" encoding="utf-8" ?>
<templates>
<t t-name="DialogDraggable" owl="1">
<div>
<t t-slot="default" />
</div>
</t>
</templates>

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8" ?>
<templates xml:space="preserve">
<t t-inherit="web.SelectCreateDialog" t-inherit-mode="extension" owl="1">
<xpath expr="//Dialog" position="attributes">
<attribute name="size">props.size</attribute>
</xpath>
</t>
</templates>

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8" ?>
<templates xml:space="preserve">
<t t-inherit="web.Dialog.header" t-inherit-mode="extension" owl="1">
<xpath expr="//button[hasclass('btn-close')]" position="before">
<ExpandButton
getsize="getSize"
setsize="setSize"
t-if="!isFullscreen and getSize and setSize"
/>
</xpath>
</t>
</templates>

View File

@@ -1,65 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<templates xml:space="preserve">
<!-- This is for old Dialog template.
Because Odoo haven't done every template to OWL. -->
<t t-extend="web.DialogWidget">
<t t-jquery="button.btn-close" t-operation="before">
<button type="button" class="dialog_button_extend btn btn-secondary">
<i class="fa fa-expand" />
</button>
<button type="button" class="dialog_button_restore btn btn-secondary">
<i class="fa fa-compress" />
</button>
</t>
</t>
<t t-inherit="web.LegacyAdaptedActionDialog" t-inherit-mode="extension" owl="1">
<xpath expr="//div[hasclass('modal-content')]" position="before">
<DialogDraggable />
</xpath>
<DialogDraggable position="inside">
<xpath expr="//div[hasclass('modal-content')]" position="move" />
</DialogDraggable>
</t>
<t t-inherit="web.Dialog" t-inherit-mode="extension" owl="1">
<xpath expr="//div[hasclass('modal-content')]" position="before">
<DialogDraggable />
</xpath>
<DialogDraggable position="inside">
<xpath expr="//div[hasclass('modal-content')]" position="move" />
</DialogDraggable>
</t>
<t t-inherit="web.ActionDialog" t-inherit-mode="extension" owl="1">
<xpath expr="//div[hasclass('modal-content')]" position="before">
<DialogDraggable />
</xpath>
<DialogDraggable position="inside">
<xpath expr="//div[hasclass('modal-content')]" position="move" />
</DialogDraggable>
</t>
<t t-inherit="web.ActionDialog.header" t-inherit-mode="extension" owl="1">
<xpath expr="//button[hasclass('btn-close')]" position="before">
<ExpandButton getsize="getSize" setsize="setSize" t-if="!isFullscreen" />
</xpath>
</t>
<t t-inherit="web.Dialog.header" t-inherit-mode="extension" owl="1">
<xpath expr="//button[hasclass('btn-close')]" position="before">
<ExpandButton
getsize="getSize"
setsize="setSize"
t-if="!isFullscreen and getSize and setSize"
/>
</xpath>
</t>
<t t-inherit="web.SelectCreateDialog" t-inherit-mode="extension" owl="1">
<xpath expr="//Dialog" position="attributes">
<attribute name="size">props.size</attribute>
</xpath>
</t>
</templates>