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

Why can't I target product_id on the order.form?

By
Kit Sunde
on 10/26/14, 3:27 AM 658 views

I'm trying to insert my starting_day field after the product_id but it has no effect, best I can tell it's ignoring my XML.

<record id="view_res_sale_line_email_chain_form" model="ir.ui.view">
  <field name="name">sale.order.form.inherit</field>
  <field name="model">sale.order</field>
  <field name="type">form</field>
  <field name="inherit_id" ref="sale.view_order_form"/>
  <field name="arch" type="xml">
    <xpath expr="//field[@name='product_id']" position="after">
      <field name="starting_day" attrs="{'required':[('email_chain','!=',False)]}"/>
    </xpath>
    <field name="product_id" position="after">
      <field name="starting_day" attrs="{'required':[('email_chain','!=',False)]}"/>
    </field>
  </field>
</record>

Any idea on how I can fix it?

Hi, U should research more into inherited views... you problem is that product_id gets heavily inherited thru out.. so look 4 this and or similiar... <xpath expr="//field[@name='order_line']/form//field[@name='product_id']" position="replace"> ::: this string come from sale_stock_view - V9alpha So just check nothing else is getting there first right????

Vee
on 10/26/14, 7:47 AM

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

2 follower(s)

Stats

Asked: 10/26/14, 3:27 AM
Seen: 658 times
Last updated: 3/16/15, 8:10 AM