[IMP] sale,stock : set the context in group by in search view and add new reporting sale
bzr revid: sbh@tinyerp.com-20100205130217-nqg15vhgnwhwakyx
This commit is contained in:
parent
75b07a7a5c
commit
8f85383e09
|
@ -55,6 +55,7 @@
|
|||
'sale_report.xml',
|
||||
'sale_wizard.xml',
|
||||
'stock_view.xml',
|
||||
'report_sale_view.xml',
|
||||
'process/sale_process.xml',
|
||||
],
|
||||
'demo_xml': ['sale_demo.xml'],
|
||||
|
|
|
@ -0,0 +1,92 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<record id="view_sale_order_report_tree" model="ir.ui.view">
|
||||
<field name="name">report.sale.order.tree</field>
|
||||
<field name="model">sale.order</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Sale Orders">
|
||||
<field name="partner_id"/>
|
||||
<field name="date_order"/>
|
||||
<field name="invoiced_rate"/>
|
||||
<field name="picked_rate"/>
|
||||
<field name="amount_untaxed"/>
|
||||
<field name="amount_tax"/>
|
||||
<field name="amount_total"/>
|
||||
<field name="state"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_sale_order_report_all" model="ir.actions.act_window">
|
||||
<field name="name">Sale Orders By Month </field>
|
||||
<field name="res_model">sale.order</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,graph</field>
|
||||
<field name="context">{'report':True}</field>
|
||||
<field name="search_view_id" ref="sale.view_sales_order_filter"/>
|
||||
</record>
|
||||
<record model="ir.actions.act_window.view" id="action_crm_tag_tree_claim01">
|
||||
<field name="sequence" eval="1"/>
|
||||
<field name="view_mode">tree</field>
|
||||
<field name="view_id" ref="sale.view_sale_order_report_tree"/>
|
||||
<field name="act_window_id" ref="action_sale_order_report_all"/>
|
||||
</record>
|
||||
<record model="ir.actions.act_window.view" id="action_order_product02">
|
||||
<field name="sequence" eval="1"/>
|
||||
<field name="view_mode">graph</field>
|
||||
<field name="view_id" ref="sale.view_sale_order_graph"/>
|
||||
<field name="act_window_id" ref="action_sale_order_report_all"/>
|
||||
</record>
|
||||
|
||||
<!-- Sale Orders by Product-->
|
||||
|
||||
<record id="view_order_report_tree" model="ir.ui.view">
|
||||
<field name="name">report.sale.order.line.tree</field>
|
||||
<field name="model">sale.order.line</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Sale Orders by Product">
|
||||
<field name="name"/>
|
||||
<field name="order_id" invisible="True"/>
|
||||
<field name="product_uom_qty" />
|
||||
<field name="product_uom"/>
|
||||
<field name="product_id"/>
|
||||
<field name="price_unit" />
|
||||
<field name="discount"/>
|
||||
<field name="price_subtotal" sum="Total"/>
|
||||
<field name="state"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_order_report_tree_all" model="ir.actions.act_window">
|
||||
<field name="name">Sale Orders by Product</field>
|
||||
<field name="res_model">sale.order.line</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,graph</field>
|
||||
<field name="context">{'report':True}</field>
|
||||
<field name="domain">[('product_uom_qty','!=','0')]</field>
|
||||
<field name="search_view_id" ref="sale.view_sales_order_line_filter"/>
|
||||
</record>
|
||||
<record model="ir.actions.act_window.view" id="action_order_product01">
|
||||
<field name="sequence" eval="1"/>
|
||||
<field name="view_mode">tree</field>
|
||||
<field name="view_id" ref="view_order_report_tree"/>
|
||||
<field name="act_window_id" ref="action_order_report_tree_all"/>
|
||||
</record>
|
||||
<record model="ir.actions.act_window.view" id="action_order_product02">
|
||||
<field name="sequence" eval="1"/>
|
||||
<field name="view_mode">graph</field>
|
||||
<field name="view_id" ref="sale.view_order_line_graph"/>
|
||||
<field name="act_window_id" ref="action_order_report_tree_all"/>
|
||||
</record>
|
||||
|
||||
<menuitem id="base.next_id_64" name="Reporting" parent="base.menu_base_partner" sequence="8"/>
|
||||
<menuitem action="action_sale_order_report_all" id="menu_report_sale_order_all" parent="base.next_id_64" sequence="3"/>
|
||||
|
||||
<menuitem action="action_order_report_tree_all" id="menu_report_order_product_all1" parent="base.next_id_64" sequence="3"/>
|
||||
|
||||
</data>
|
||||
</openerp>
|
|
@ -242,13 +242,12 @@
|
|||
<filter icon="terp-sale" domain="[('user_id','child_of',[uid])]" help="My Departments Sale Orders"/>
|
||||
</field>
|
||||
<field name="date_order" select="1"/>
|
||||
</group>
|
||||
<group expand="context.get('report',False)" string="Group By..." colspan="4" col="8">
|
||||
<filter string="By Parnter" icon="terp-sale" domain="[]" context="{'group_by':'partner_id'}"/>
|
||||
</group>
|
||||
<group expand="context.get('report',False)" string="Group By..." colspan="4" col="8">
|
||||
<filter string="By Parnter" icon="terp-sale" domain="[]" context="{'group_by':'partner_id'}"/>
|
||||
<filter string="By State" icon="terp-sale" domain="[]" context="{'group_by':'state'}"/>
|
||||
<filter string="By Order Date" icon="terp-sale" domain="[]" context="{'group_by':'date_order'}"/>
|
||||
|
||||
</group>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
@ -412,6 +411,12 @@
|
|||
<filter icon="terp-sale" domain="[('salesman_id','=',uid)]" help="My Sale Order Lines"/>
|
||||
<filter icon="terp-sale" domain="[('salesman_id','child_of',[uid])]" help="My Departments Sale Order Lines"/>
|
||||
</field>
|
||||
<group expand="context.get('report',False)" string="Group By..." colspan="4" col="8">
|
||||
<filter string="By Product" icon="terp-sale" domain="[]" context="{'group_by':'product_id'}"/>
|
||||
<filter string="By Order" icon="terp-sale" domain="[]" context="{'group_by':'order_id'}"/>
|
||||
<filter string="By State" icon="terp-sale" domain="[]" context="{'group_by':'state'}"/>
|
||||
</group>
|
||||
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
|
|
|
@ -665,7 +665,7 @@
|
|||
<field name="name" select="1"/>
|
||||
<field name="address_id" select="1"/>
|
||||
</group>
|
||||
<group expand="1" string="Group By..." colspan="4" col="8">
|
||||
<group expand="context.get('report',False)" string="Group By..." colspan="4" col="8">
|
||||
<filter string="By Partner" icon="terp-stock" domain="[]" context="{'group_by':'address_id'}"/>
|
||||
<filter string="By State" icon="terp-stock" domain="[]" context="{'group_by':'state'}"/>
|
||||
<filter string="By Date" icon="terp-stock" domain="[]" context="{'group_by':'date'}"/>
|
||||
|
@ -791,7 +791,7 @@
|
|||
<field name="name" select="1"/>
|
||||
<field name="origin" select="1"/>
|
||||
</group>
|
||||
<group expand="1" string="Group By..." colspan="4" col="10">
|
||||
<group expand="context.get('report',False)" string="Group By..." colspan="4" col="10">
|
||||
<filter string="By Partner" icon="terp-stock" domain="[]" context="{'group_by':'address_id'}"/>
|
||||
<filter string="By State" icon="terp-stock" domain="[]" context="{'group_by':'state'}"/>
|
||||
<filter string="By Order Date" icon="terp-stock" domain="[]" context="{'group_by':'date'}"/>
|
||||
|
@ -949,7 +949,7 @@
|
|||
<field name="address_id" select="1"/>
|
||||
<field name="company_id" select="1" widget="selection"/>
|
||||
</group>
|
||||
<group expand="1" string="Group By..." colspan="4" col="8">
|
||||
<group expand="context.get('report',False)" string="Group By..." colspan="4" col="8">
|
||||
<filter string="By Partner" icon="terp-stock" domain="[]" context="{'group_by':'address_id'}"/>
|
||||
<filter string="By State" icon="terp-stock" domain="[]" context="{'group_by':'state'}"/>
|
||||
<filter string="By Date" icon="terp-stock" domain="[]" context="{'group_by':'date'}"/>
|
||||
|
@ -1109,7 +1109,7 @@
|
|||
<field name="address_id" select="1"/>
|
||||
<field name="company_id" select="1" widget="selection"/>
|
||||
</group>
|
||||
<group expand="1" string="Group By..." colspan="4" col="8">
|
||||
<group expand="context.get('report',False)" string="Group By..." colspan="4" col="8">
|
||||
<filter string="By Partner" icon="terp-stock" domain="[]" context="{'group_by':'address_id'}"/>
|
||||
<filter string="By State" icon="terp-stock" domain="[]" context="{'group_by':'state'}"/>
|
||||
<filter string="By Date" icon="terp-stock" domain="[]" context="{'group_by':'date'}"/>
|
||||
|
@ -1162,7 +1162,7 @@
|
|||
<field name="address_id" select="1"/>
|
||||
<field name="company_id" select="1" widget="selection"/>
|
||||
</group>
|
||||
<group expand="1" string="Group By..." colspan="4" col="8">
|
||||
<group expand="context.get('report',False)" string="Group By..." colspan="4" col="8">
|
||||
<filter string="By Partner" icon="terp-stock" domain="[]" context="{'group_by':'address_id'}"/>
|
||||
<filter string="By State" icon="terp-stock" domain="[]" context="{'group_by':'state'}"/>
|
||||
<filter string="By Date" icon="terp-stock" domain="[]" context="{'group_by':'date'}"/>
|
||||
|
@ -1279,7 +1279,7 @@
|
|||
<field name="location_dest_id" select="1"/>
|
||||
<field name="product_id" select="1"/>
|
||||
</group>
|
||||
<group expand="1" string="Group By..." colspan="4" col="8">
|
||||
<group expand="context.get('report',False)" string="Group By..." colspan="4" col="8">
|
||||
<filter string="By Location" icon="terp-stock" domain="[]" context="{'group_by':'location_id'}"/>
|
||||
<filter string="By Product" icon="terp-stock" domain="[]" context="{'group_by':'product_id'}"/>
|
||||
<filter string="By State" icon="terp-stock" domain="[]" context="{'group_by':'state'}"/>
|
||||
|
@ -1405,7 +1405,7 @@
|
|||
<field name="partner_id" string="Supplier" select="1"/>
|
||||
<field name="product_id"/>
|
||||
</group>
|
||||
<group expand="1" string="Group By..." colspan="4" col="8">
|
||||
<group expand="context.get('report',False)" string="Group By..." colspan="4" col="8">
|
||||
<filter string="By Product" icon="terp-stock" domain="[]" context="{'group_by':'product_id'}"/>
|
||||
<filter string="By State" icon="terp-stock" domain="[]" context="{'group_by':'state'}"/>
|
||||
<filter string="By Date" icon="terp-stock" domain="[]" context="{'group_by':'date'}"/>
|
||||
|
|
Loading…
Reference in New Issue