hi,
i try to add a custom text field "detail" to the product lines in a sales order. i created a new module and added the following code:
__init__.py
import sales_order_detail_field
sales_order_detail_field.py
from openerp.osv import fields, osv
class sales_order_detail_field(osv.Model):
_name = 'sale.order'
_inherit = 'sale.order.line'
_columns = {
'detail': fields.text('Detail'),
}
sales_order_detail_field(
sales_order_detail_field.xml
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record model="ir.ui.view" id="detail_field_in_view">
<field name="name">New Sale Order field detail</field>
<field name="model">sale.order</field>
<field name="inherit_id" ref="sale.view_order_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='order_line']/form/notebook/page[@string='Order Line']//field[@name='product_uom_qty' ]" position="before">
<field name="detail" />
</xpath>
</field>
</record>
</data>
</openerp>
but when i reload my openerp window, i jus tget the following error
raise except_orm('ValidateError', '\n'.join(error_msgs))
except_orm: ('ValidateError', u'Fehler w\xe4hrend der Pr\xfcfung des Feldes field(s) arch: Invalid XML for View Architecture!')
any advice what's wrong here? maybe the xml?