Hi, First of all I had a new parameter to the product. Then I need that new parameter in Sales Order Lines for each product in the sales order.
I've tried to add but I had some problems regarding to being inheriting a view from sales.order and adding a parameter from products.
I've done this:
<record id="view_order_form_inherit" model="ir.ui.view"> <field name="name">sale.order.form.inherit</field> <field name="model">sale.order</field> <field name="inherit_id" ref="sale.view_order_form"/> <field name="arch" type="xml"> <xpath expr="/form/sheet/notebook/page/field[@name='order_line']/tree/field[@name='price_unit']" position="before"> <field name="new_field_from_product"/> </xpath> </field> </record>
Thanks, sorry my English.
First, The code you posted is trying to insert your new field into the view_ORDER_form, you need to insert it on the view_ORDER_LINE_form.
Second, the python code must also inherit and add the new field, if you are not doing that, there is no way your XML will work right.
Third, when you ask for help, please include the error message. Without the error message those trying to help you are flying blind.
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
|Asked: 3/18/13, 3:07 PM|
|Seen: 4419 times|
|Last updated: 3/16/15, 8:10 AM|