[IMP] mrp, purchase, sale: Improve search view with group by
bzr revid: hmo@tinyerp.com-20100209073415-kxjbog4bx1dbod6u
This commit is contained in:
+3
-3
@@ -801,8 +801,8 @@ class mrp_procurement(osv.osv):
|
||||
|
||||
'close_move': fields.boolean('Close Move at end', required=True),
|
||||
'location_id': fields.many2one('stock.location', 'Location', required=True, states={'draft':[('readonly',False)]}, readonly=True),
|
||||
'procure_method': fields.selection([('make_to_stock','from stock'),('make_to_order','on order')], 'Requisition Method', states={'draft':[('readonly',False)], 'confirmed':[('readonly',False)]},
|
||||
readonly=True, required=True, help="If you encode manually a Requisition, you probably want to use" \
|
||||
'procure_method': fields.selection([('make_to_stock','from stock'),('make_to_order','on order')], 'Procurement Method', states={'draft':[('readonly',False)], 'confirmed':[('readonly',False)]},
|
||||
readonly=True, required=True, help="If you encode manually a Procurement, you probably want to use" \
|
||||
" a make to order method."),
|
||||
|
||||
'purchase_id': fields.many2one('purchase.order', 'Purchase Order'),
|
||||
@@ -810,7 +810,7 @@ class mrp_procurement(osv.osv):
|
||||
|
||||
'property_ids': fields.many2many('mrp.property', 'mrp_procurement_property_rel', 'procurement_id','property_id', 'Properties'),
|
||||
|
||||
'message': fields.char('Latest error', size=64),
|
||||
'message': fields.char('Latest error', size=64, help="Exception occurred while computing procurement orders."),
|
||||
'state': fields.selection([
|
||||
('draft','Draft'),
|
||||
('confirmed','Confirmed'),
|
||||
|
||||
+18
-15
@@ -675,15 +675,13 @@
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Procurement Lines" colors="red:state=='draft';black:state=='running';green:state=='confirmed';gray:state in ['done','cancel']">
|
||||
<field name="name"/>
|
||||
<field name="origin"/>
|
||||
<field name="date_planned" widget="date"/>
|
||||
<field name="product_id"/>
|
||||
<field name="product_qty"/>
|
||||
<field name="product_uom" string="UOM"/>
|
||||
<field name="date_planned"/>
|
||||
<field name="procure_method"/>
|
||||
<field name="origin"/>
|
||||
<field name="state"/>
|
||||
<field name="message"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
@@ -701,7 +699,7 @@
|
||||
</group>
|
||||
<group col="2" colspan="2">
|
||||
<separator colspan="2" string="Planification"/>
|
||||
<field name="date_planned" select="1"/>
|
||||
<field name="date_planned" select="1" widget="date"/>
|
||||
<field name="procure_method" select="2"/>
|
||||
<field name="priority" groups="base.group_extended"/>
|
||||
</group>
|
||||
@@ -733,8 +731,10 @@
|
||||
<field name="date_close" select="2"/>
|
||||
<field name="close_move" groups="base.group_extended"/>
|
||||
<field name="purchase_id"/>
|
||||
<separator colspan="4" string="Properties"/>
|
||||
<field colspan="4" name="property_ids" nolabel="1" groups="base.group_extended"/>
|
||||
<group colspan="4" groups="base.group_extended">
|
||||
<separator colspan="4" string="Properties" />
|
||||
<field colspan="4" name="property_ids" nolabel="1"/>
|
||||
</group>
|
||||
</page>
|
||||
<page string="Notes">
|
||||
<separator colspan="4" string="Note" />
|
||||
@@ -750,18 +750,20 @@
|
||||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search Procurement">
|
||||
<group col='8' colspan='4'>
|
||||
<group col='10' colspan='4'>
|
||||
<filter icon="terp-mrp" string="Current" domain="[('state','in',('draft','confirmed'))]" default="1" help="Procurement Orders in draft or open state."/>
|
||||
<filter icon="terp-mrp" string="Exceptions" domain="[('state','=','exception')]" help="Procurement Orders with exceptions"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="name" select='1'/>
|
||||
<field name="product_id" select='1'/>
|
||||
<field name="date_planned" select='1'/>
|
||||
<field name="state" select='1'/>
|
||||
<field name="name"/>
|
||||
<field name="origin"/>
|
||||
<field name="product_id" />
|
||||
<field name="date_planned" widget="date"/>
|
||||
<field name="state" />
|
||||
</group>
|
||||
<group expand="context.get('report',False)" string="Group By..." colspan="4" col="8">
|
||||
<group expand="1" string="Group By..." colspan="4" col="8">
|
||||
<filter string="By Product" icon="terp-mrp" domain="[]" context="{'group_by':'product_id'}"/>
|
||||
<filter string="By State" icon="terp-mrp" domain="[]" context="{'group_by':'state'}"/>
|
||||
<filter string="Scheduled Date" icon="terp-mrp" domain="[]" context="{'group_by':'date_planned'}"/>
|
||||
<filter string="By Procurement Reason" icon="terp-mrp" domain="[]" context="{'group_by':'name'}"/>
|
||||
<filter string="By Scheduled Date" icon="terp-mrp" domain="[]" context="{'group_by':'date_planned'}"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
@@ -783,6 +785,7 @@
|
||||
<field name="res_model">mrp.procurement</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="search_view_id" ref="view_mrp_procurement_filter"/>
|
||||
<field name="domain">[]</field>
|
||||
<field name="context">{}</field>
|
||||
</record>
|
||||
|
||||
@@ -153,17 +153,16 @@
|
||||
<separator orientation="vertical"/>
|
||||
<filter icon="terp-purchase" string="To Invoice" domain="[('invoiced','=',1)]" separator="1"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="name" select="1"/>
|
||||
<field name="name" select="1" string="Reference"/>
|
||||
<field name="partner_id" select="1"/>
|
||||
<field name="product_id" select="1"/>
|
||||
<field name="create_uid" select="1" widget="selection">
|
||||
<filter icon="terp-purchase" domain="[('create_uid','=',uid)]" help="My Purchase Orders"/>
|
||||
<filter icon="terp-purchase" domain="[('create_uid','child_of',[uid])]" help="My Departments Purchase Orders"/>
|
||||
<filter icon="terp-partner" domain="[('create_uid','=',uid)]" help="My Purchase Orders"/>
|
||||
</field>
|
||||
</group>
|
||||
<group expand="context.get('report',False)" string="Group By..." colspan="4" col="10">
|
||||
<filter string="By Supplier" icon="terp-purchase" domain="[]" context="{'group_by':'partner_id'}"/>
|
||||
<filter string="By State" icon="terp-purchase" domain="[]" context="{'group_by':'state'}"/>
|
||||
<group expand="1" string="Group By..." colspan="4" col="10">
|
||||
<filter string="By Supplier" icon="terp-purchase" 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-purchase" domain="[]" context="{'group_by':'date_order'}"/>
|
||||
</group>
|
||||
</search>
|
||||
@@ -176,10 +175,11 @@
|
||||
<field name="res_model">purchase.order</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="domain">[('state','=','draft')]</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="search_view_id" ref="view_purchase_order_filter"/>
|
||||
</record>
|
||||
<menuitem action="purchase_rfq" id="menu_purchase_rfq" parent="menu_procurement_management"
|
||||
name="Request for Quotations" sequence="6" />
|
||||
<menuitem action="purchase_rfq" id="menu_purchase_rfq" parent="menu_procurement_management"
|
||||
name="Request for Quotations" sequence="6"/>
|
||||
|
||||
<record id="purchase_form_action" model="ir.actions.act_window">
|
||||
<field name="name">Purchase Orders</field>
|
||||
@@ -207,15 +207,16 @@
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Purchase Order">
|
||||
<field name="name" string="Reference"/>
|
||||
<field name="date_order"/>
|
||||
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
|
||||
<field name="minimum_planned_date"/>
|
||||
<field name="origin"/>
|
||||
<field name="date_order" string="Order Date"/>
|
||||
<field name="partner_id"/>
|
||||
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
|
||||
<field name="location_id"/>
|
||||
<field name="minimum_planned_date"/>
|
||||
<field name="invoiced_rate" widget="progressbar"/>
|
||||
<field name="shipped_rate" widget="progressbar"/>
|
||||
<field name="amount_untaxed"/>
|
||||
<field name="origin"/>
|
||||
<field name="amount_untaxed" sum="Total Untaxed amount"/>
|
||||
<field name="amount_total" sum="Total amount"/>
|
||||
<field name="state"/>
|
||||
</tree>
|
||||
</field>
|
||||
@@ -233,7 +234,7 @@
|
||||
<field context="partner_id=parent.partner_id,quantity=product_qty,pricelist=parent.pricelist_id,uom=product_uom,warehouse=parent.warehouse_id" name="product_qty" on_change="product_id_change(parent.pricelist_id,product_id,product_qty,product_uom,parent.partner_id,parent.date_order,parent.fiscal_position,date_planned,name,price_unit,notes)"/>
|
||||
<field name="product_uom" on_change="product_uom_change(parent.pricelist_id,product_id,product_qty,product_uom,parent.partner_id, parent.date_order)"/>
|
||||
<field colspan="4" name="name"/>
|
||||
<field name="date_planned"/>
|
||||
<field name="date_planned" widget="date"/>
|
||||
<field name="price_unit"/>
|
||||
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
|
||||
<field name="price_subtotal" readonly="1"/>
|
||||
@@ -263,7 +264,7 @@
|
||||
<tree colors="red:date_planned<=current_date;black:date_planned>current_date" string="Purchase Order Lines">
|
||||
<field name="order_id"/>
|
||||
<field name="name"/>
|
||||
<field name="date_planned"/>
|
||||
<field name="date_planned" widget="date"/>
|
||||
<field name="product_id"/>
|
||||
<field name="product_qty"/>
|
||||
<field name="product_uom"/>
|
||||
|
||||
@@ -82,7 +82,8 @@
|
||||
<field name="partner_shipping_id"/>
|
||||
<field name="picked_rate" widget="progressbar"/>
|
||||
<field name="invoiced_rate" widget="progressbar"/>
|
||||
<field name="amount_untaxed"/>
|
||||
<field name="amount_untaxed" sum="Total Untaxed amount"/>
|
||||
<field name="amount_total" sum="Total amount"/>
|
||||
<field name="state"/>
|
||||
</tree>
|
||||
</field>
|
||||
@@ -231,20 +232,19 @@
|
||||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search Sales Order">
|
||||
<group col='8' colspan='4'>
|
||||
<group col='10' colspan='4'>
|
||||
<filter icon="terp-sale" string="Quotation" domain="[('state','=','draft')]"/>
|
||||
<filter icon="terp-sale" string="Running" domain="[('state','in',('manual','progress'))]"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="name" select="1"/>
|
||||
<field name="partner_id" select="1"/>
|
||||
<field name="user_id" select="1" widget="selection">
|
||||
<filter icon="terp-sale" domain="[('user_id','=',uid)]" help="My Sale Orders"/>
|
||||
<filter icon="terp-sale" domain="[('user_id','child_of',[uid])]" help="My Departments Sale Orders"/>
|
||||
<filter icon="terp-partner" domain="[('user_id','=',uid)]" help="My 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 Partner" icon="terp-sale" domain="[]" default="1" context="{'group_by':'partner_id'}"/>
|
||||
<group expand="1" string="Group By..." colspan="4" col="8">
|
||||
<filter string="By Customer" 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>
|
||||
|
||||
@@ -26,6 +26,21 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_sales_order_filter_inherit" model="ir.ui.view">
|
||||
<field name="name">sale.order.list.select</field>
|
||||
<field name="model">sale.order</field>
|
||||
<field name="type">search</field>
|
||||
<field name="inherit_id" ref="sale.view_sales_order_filter"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="date_order" position="after">
|
||||
<field name="section_id" default="context.get('section_id', False)" select="1" widget="selection" string="Section">
|
||||
<filter icon="terp-crm"
|
||||
domain="[('section_id','=',context.get('section_id',False))]"
|
||||
help="My section"/>
|
||||
</field>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user