Odoo Help


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

Kit Sunde
on 10/26/14, 3:27 AM 902 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)]}"/>
    <field name="product_id" position="after">
      <field name="starting_day" attrs="{'required':[('email_chain','!=',False)]}"/>

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????

on 10/26/14, 7:47 AM

About This Community

This platform 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.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

2 follower(s)


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