Skip to Content
Menu
This question has been flagged

Hey all,

I need some structure similar to sale.order and sale.order.line. I have created a custom module with two models, a form, a list, and a QWEB report. Now, the problem I have is adding several item lines (identical in function to sale.order.line) to the view. Currently, all I can do is open a kanban and create one item line. I want several. Below is the is the view form.

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

    <field name="name">view.order.confirmation.form</field>

    <field name="model">order.confirmation</field>

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

        <form string="Confirmation Form">

             <sheet>

                <group class="col-xs-6">

                    <field name="order_number"/>

                    <field name="customer_id"/>

                    <field name="order_date"/>

                    <field name="gender" widget="radio"/>

                </group>

                <notebook>

                    <page string="Items">

                        <field name="order_confirmation_line" mode="tree,kanban">

                            <form string="Confirmed Items">

                                <group>

                                        <field name="device_quantity"/>

                                        <field name="serialnumber"/>

                                        <field name="item_name"/>

                                        <field name="manufacturer"/>

                                        <field name="model_number"/>

                                </group>

                            </form>

                        </field>

                    </page>

                </notebook>

            </sheet>

        </form>

    </field>

</record>


Thanks!

Avatar
Discard
Author Best Answer

My issue was my model relationship. I had a many2one relationship and that was not correct.

Avatar
Discard
Best Answer

Hi, do you mind sharing the code? I have the same issue

Avatar
Discard
Related Posts Replies Views Activity
4
Jul 23
1011
3
Mar 23
9511
2
Oct 16
7087
1
Nov 24
205
0
Sep 24
144