# Problem with upscaling a Wizard window

**URL:** <https://discuss.tryton.org/t/problem-with-upscaling-a-wizard-window/6478>\
**Category:** Developer\
**Created:** [August 29, 2023, 4:14am UTC](https://discuss.tryton.org/t/problem-with-upscaling-a-wizard-window/6478 "2023-08-29T04:14:39Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![n00biex141](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/n00biex141/32/2498_2.png) [@n00biex141](https://discuss.tryton.org/u/n00biex141)\
**Post date:** [August 29, 2023, 4:14am UTC](https://discuss.tryton.org/t/problem-with-upscaling-a-wizard-window/6478/1 "2023-08-29T04:14:40Z")

</div>

Recently, I started working on a button (Wizard) that will help me add POS Sale Line on the fly instead of going to that **+** button. I made a custom button called **Add Lines**

Now, the problem I am facing is with the layout and size of that thing. Here:

 ![1](https://discuss-cdn.tryton.org/uploads/default/original/2X/3/3f0dab846f98e1ff0237e71b350e7ad6555ff4d8.png)

Whereas I want something like this:

 ![2](https://discuss-cdn.tryton.org/uploads/default/original/2X/2/2c24ea6cae7dcad222cf5497f7f46b71791a392f.png)

Here’s the XML Code:

```auto
<?xml version="1.0"?>
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<form>
    <label name="product"/>
    <field name="product"/>

<!-- <group id="quantity" colspan="2" col="4">-->
        <label name="quantity"/>
        <field name="quantity" symbol="unit"/>
        <label name="available_quantity"/>
        <field name="available_quantity" symbol="unit"/>
<!-- </group>-->

    <field name="base_price" invisible="1"/>
    <field name="storage_location" invisible="1" />

    <notebook>
        <page string="General" id="general">
<!-- <group id="discounts">-->
<!-- -->
                    <label name="discount_rate" xalign="0.0" xexpand="1"/>
                    <group id="discount_rate">
                        <field name="discount_rate" factor="100" xexpand="0" />
                        <label string="%" />
                    </group>
                <label name="discount_amount"/>
                <field name="discount_amount"/>
<!-- </group>-->
            <label name="unit_price"/>
            <field name="unit_price"/>

            <label name="amount"/>
            <field name="amount"/>
        </page>
    </notebook>
</form>

```

---

<div class="post-metadata">

**Author:** ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)\
**Post date:** [August 29, 2023, 6:50am UTC](https://discuss.tryton.org/t/problem-with-upscaling-a-wizard-window/6478/2 "2023-08-29T06:50:53Z")

</div>

The size of wizard dialog is always `md` but since [Change the dialog size depending of the content (#8086) · Issues · Tryton / Tryton · GitLab](https://bugs.tryton.org/issue8086) it is changed for `lg` if it contains widget with `expand` attribute.

---

<div class="post-metadata">

**Author:** ![n00biex141](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/n00biex141/32/2498_2.png) [@n00biex141](https://discuss.tryton.org/u/n00biex141)\
**Post date:** [August 29, 2023, 9:10am UTC](https://discuss.tryton.org/t/problem-with-upscaling-a-wizard-window/6478/3 "2023-08-29T09:10:18Z")

</div>

Ah! for some reason as you can see in the second screenshot it appears to be fine. Can you please go through the XML code and tell me if it’s correct.

---

<div class="post-metadata">

**Author:** ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)\
**Post date:** [August 29, 2023, 10:30am UTC](https://discuss.tryton.org/t/problem-with-upscaling-a-wizard-window/6478/4 "2023-08-29T10:30:30Z")

</div>

It is because the `sale_line_form.xml` contains the `One2Many` fields `moves` which has the `expand` attribute.

---

<div class="post-metadata">

**Author:** ![n00biex141](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/n00biex141/32/2498_2.png) [@n00biex141](https://discuss.tryton.org/u/n00biex141)\
**Post date:** [August 29, 2023, 11:04am UTC](https://discuss.tryton.org/t/problem-with-upscaling-a-wizard-window/6478/5 "2023-08-29T11:04:25Z")

</div>

I’ve downloaded that sao/src/wizard.js patch you provided ( [Issue 60531002: sao: Change the size of wizard dialog depending of the content - Code Review (tryton.org)](https://codereview.tryton.org/60531002/))

My question is do I need to update/build sao again? If so, then how?

---

<div class="post-metadata">

**Author:** ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)\
**Post date:** [August 29, 2023, 11:10am UTC](https://discuss.tryton.org/t/problem-with-upscaling-a-wizard-window/6478/6 "2023-08-29T11:10:33Z")

</div>

It is included in sao since 4 years (and your screenshots show that it is there). I put the link to describe the behavior.

For now there is no way to force one or another size for the dialog, it only depends on what is inside.

---

<div class="post-metadata">

**Author:** ![n00biex141](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/n00biex141/32/2498_2.png) [@n00biex141](https://discuss.tryton.org/u/n00biex141)\
**Post date:** [August 30, 2023, 4:32am UTC](https://discuss.tryton.org/t/problem-with-upscaling-a-wizard-window/6478/7 "2023-08-30T04:32:08Z")

</div>

Thank you so much! This issue has been resolved. However, there’s one tiny thing I need to do now.

As you can see in this image

 ![1](https://discuss-cdn.tryton.org/uploads/default/original/2X/a/a3945bef1f8e72a95d0c458d16dfb8f8d5411add.webp)

The **Amount** is followed by the **$** and then the field itself.

Here in my wizard I don’t have it ☹

 ![image](https://discuss-cdn.tryton.org/uploads/default/original/2X/b/b8f3140acb1a6d3805614da109fdc171f5a8cc66.png)

I want the experience as close as to the original itself. Please guide me about that part

```auto
<?xml version="1.0"?>
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<form>
    <label name="product"/>
    <field name="product"/>

    <group id="quantity" colspan="2" col="4">-->
        <label name="quantity"/>
        <field name="quantity" symbol="unit"/>
        <label name="available_quantity"/>
        <field name="available_quantity" symbol="unit"/>
    </group>

    <newline/>

    <field name="base_price" invisible="1"/>
    <field name="storage_location" invisible="1" />

    <notebook>
        <page string="General" id="general">
            <label id="discount" string="Discount"/>
            <group col="-1" id="discounts">
                <group col="-1" id="discount_rate">
                    <field name="discount_rate" factor="100" xexpand="0"/>
                    <label name="discount_rate" string="%" xalign="0.0" xexpand="1"/>
                </group>
                <label name="discount_amount" string="$"/>
                <field name="discount_amount"/>
            </group>

            <label name="unit_price"/>
            <field name="unit_price"/>
            <label name="amount"/>
            <field name="amount"/>
        </page>
        <page string="Hidden" id="hidden_taxes" invisible="1">
            <field name="invisible_field" expand="1" />
        </page>
    </notebook>
</form>

```

---

<div class="post-metadata">

**Author:** ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)\
**Post date:** [August 30, 2023, 6:36am UTC](https://discuss.tryton.org/t/problem-with-upscaling-a-wizard-window/6478/8 "2023-08-30T06:36:19Z")

</div>

> [@n00biex141](#):
>
> The **Amount** is followed by the **$** and then the field itself.

This is because the [`Monetary` field](https://docs.tryton.org/projects/modules-currency/en/latest/reference.html#trytond.modules.currency.fields.Monetary) is used with the `currency` attribute set to the `currency` field.  
You can also use the [`symbol` attribute](https://docs.tryton.org/projects/server/en/latest/topics/views/index.html#common-attributes-symbol) on the `<field>` of the view.

---

<div class="post-metadata">

**Author:** ![system](https://discuss-cdn.tryton.org/uploads/default/original/1X/c6f8ec0a40525cdcd50058c734283450a4b3d38b.png) [@system](https://discuss.tryton.org/u/system)\
**Post date:** [August 30, 2023, 6:36pm UTC](https://discuss.tryton.org/t/problem-with-upscaling-a-wizard-window/6478/9 "2023-08-30T18:36:22Z")

</div>

Closed on August 30, 2023, 6:36pm UTC

This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.
