Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
2 Odpowiedzi
5715 Widoki

 Hi all, I'm new to Odoo and working with v11. I got a issue when I tried to play around with "wizard". The thing is that I'm unable to see my display name of the fields. I'm not sure what I missed

Here is the view part:

<record id="my_details_wizard_view_form" model="ir.ui.view">

    <field name="name">my.details.wizard.form</field>

    <field name="model">my.details.wizard</field>

    <field name="arch" type="xml">

        <form string="Add Details">

            <field name="details"/>

            <field name="details_notes"/>

        </form>

    </field>

</record>

<act_window id="launch_expense_line_wizard"

                        name="Add your Details"

                         src_model="my"

                         res_model="my.details.wizard"

                         view_mode="form"

                         target="new"

                         key2="client_action_multi"/>

And this is my py file:

class MyDetailsWizard(models.TransientModel):

    _name = "my.details.wizard"

    details = fields.Many2one('my', ondelete='set null', string="Details A")

    details_notes = fields.Char(string="Notes")

Can anyone help? Thanks!

Awatar
Odrzuć
Autor

BTW, It not showing any error message

Najlepsza odpowiedź

Hi,

Put the fields inside the group.

<form string="Add Details">    
    <group>
        <field name="details"/>
        <field name="details_notes"/>
</group>
</form>


Thanks

Awatar
Odrzuć
Autor

Thx a lot! It fix my problem. I didn't thought about "group" element, it doing more than I think.

Powiązane posty Odpowiedzi Widoki Czynność
1
gru 22
3247
0
gru 21
1966
What is wizard ? Rozwiązane
3
lis 23
32100
4
lip 25
4818
2
gru 23
17575