Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

Custom Line Option Similar to Order Line

By
C S
on 11/14/16, 11:35 AM 133 views

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!

0
C S
On 11/15/16, 7:33 AM

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

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 11/14/16, 11:35 AM
Seen: 133 times
Last updated: 11/15/16, 7:33 AM