Files
odoo-usability/sale_line_product_required/sale_view.xml
2014-09-19 17:45:49 +02:00

30 lines
1.0 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2014 Akretion (http://www.akretion.com/)
@author: Alexis de Lattre <alexis.delattre@akretion.com>
The licence is in the file __openerp__.py
-->
<openerp>
<data>
<record id="view_order_form" model="ir.ui.view">
<field name="name">sale.line.product.required.form</field>
<field name="model">sale.order</field>
<field name="inherit_id" ref="sale.view_order_form"/>
<!-- High priority, to go after sale_stock, which STUPIDLY replaces the field
product_id, instead of doing position="attributes" -->
<field name="priority">100</field>
<field name="arch" type="xml">
<xpath expr="//field[@name='order_line']/form//field[@name='product_id']" position="attributes">
<attribute name="required">1</attribute>
</xpath>
<xpath expr="//field[@name='order_line']/tree/field[@name='product_id']" position="attributes">
<attribute name="required">1</attribute>
</xpath>
</field>
</record>
</data>
</openerp>