Hi,
I want to make search by group inherit in another form.
i want to inherit in object 'sale.report'.
code in file .py :
class sales_analysis(osv.osv):
_inherit = "sale.report"
_columns = {
'pjp_id': fields.many2one('smcus.pjp', 'PJP', required=True),
'jenis': fields.related('pjp_id', 'jenis', type="char", string="Jenis Transaksi", readonly=True,),
}
sales_analysis()
code file in .xml :
<record id="wtc_sales_analysis_tree" model="ir.ui.view">
<field name="name">sale.report</field>
<field name="model">sale.report</field>
<field name="inherit_id" ref="sale.view_order_product_search"/>
<field name="arch" type="xml"/>
<filter string="Salesperson" position="after">
<filter string="Jenis Transaksi" icon="terp-personal" context="{'group_by':'jenis'}"/>
</filter>
</record>
but the result is error :
2015-01-28 03:44:04,617 9107 ERROR century21-new openerp.tools.convert: The XML file does not fit the required schema !
2015-01-28 03:44:04,617 9107 ERROR century21-new openerp.tools.convert: /home/heru/odoo/addons/CENTURY21/wtc_sales_analysis/wtc_sales_analysis_view.xml:10:0:ERROR:RELAXNGV:RELAXNG_ERR_EXTRACONTENT: Element record has extra content: filter
How i fix my problem ?
It says "wtc_sales_analysis_view"... are you sure the view shown here is the same one?
oh i'm sorry , this is false . hehe. but, i want try make a different code, like : sale.report.search sale.report <xpath expr="//group/filter[@string='Group By...']" position="after"> but it's not work . can you give me, your solution ? thanks.