bzr revid: nel@tinyerp.com-20100706072605-8srddc5av8o96w3z
This commit is contained in:
nel@tinyerp.com 2010-07-06 09:26:05 +02:00
parent 2b21569972
commit 02051df96e
8 changed files with 41 additions and 41 deletions

View File

@ -84,7 +84,7 @@
<field name="employee_id"/>
</group>
<newline/>
<group expand="0" string="Group By...">
<group expand="1" string="Group By...">
<filter string="Employee" name="employee" icon="terp-personal" context="{'group_by':'employee_id'}"/>
<filter string="Department" icon="terp-personal+" context="{'group_by':'department_id'}"/>
<separator orientation="vertical"/>

View File

@ -47,7 +47,7 @@ class purchase_report(osv.osv):
'product_id':fields.many2one('product.product', 'Product', readonly=True),
'warehouse_id': fields.many2one('stock.warehouse', 'Warehouse', readonly=True),
'location_id': fields.many2one('stock.location', 'Destination', readonly=True),
'partner_id':fields.many2one('res.partner', 'Partner', readonly=True),
'partner_id':fields.many2one('res.partner', 'Supplier', readonly=True),
'partner_address_id':fields.many2one('res.partner.address', 'Address Contact Name', readonly=True),
'dest_address_id':fields.many2one('res.partner.address', 'Dest. Address Contact Name',readonly=True),
'pricelist_id':fields.many2one('product.pricelist', 'Pricelist', readonly=True),

View File

@ -76,37 +76,39 @@
<separator orientation="vertical"/>
<field name="partner_id"/>
<field name="product_id"/>
<field name="user_id"/>
<field name="company_id" groups="base.group_multi_company"/>
</group>
<newline/>
<group expand="0" string="Group By..." colspan="10" col="12">
<group expand="1" string="Group By..." colspan="10" col="12">
<filter string="Supplier" name="group_partner_id" icon="terp-personal" context="{'group_by':'partner_id'}"/>
<filter string="Product" name="group_product_id" icon="terp-accessories-archiver" context="{'group_by':'product_id'}"/>
<separator orientation="vertical"/>
<filter string="Responsible" name="Responsible" icon="terp-personal" context="{'group_by':'user_id'}"/>
<filter string="Validated by" icon="terp-personal" context="{'group_by':'validator'}"/>
<separator orientation="vertical"/>
<filter string="Company" icon="terp-go-home" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
<filter string="Warehouse" icon="terp-go-home" context="{'group_by':'warehouse_id'}"/>
<filter string="Destination" icon="terp-gtk-jump-to-ltr" context="{'group_by':'location_id'}"/>
<separator orientation="vertical"/>
<filter string="State" icon="terp-stock_effects-object-colorize" context="{'group_by':'state'}"/>
<separator orientation="vertical"/>
<filter string="Company" icon="terp-go-home" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
<separator orientation="vertical"/>
<filter string="Day" icon="terp-go-today" context="{'group_by':'day'}"/>
<filter string="Month" icon="terp-go-month" context="{'group_by':'month'}"/>
<filter string="Year" icon="terp-go-year" context="{'group_by':'name'}"/>
</group>
<newline/>
<group expand="0" string="Extended filters..." colspan="10" col="12" groups="base.group_extended">
<field name="user_id"/>
<field name="validator"/>
<separator orientation="vertical"/>
<field name="location_id"/>
<field name="warehouse_id" widget="selection"/>
<separator orientation="vertical"/>
<field name="company_id" groups="base.group_multi_company"/>
<newline/>
<field name="date"/>
<field name="date_approve"/>
<field name="expected_date"/>
<newline/>
<field name="warehouse_id" widget="selection"/>
<field name="validator" widget="selection"/>
<separator orientation="vertical"/>
<field name="location_id"/>
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
</group>
</search>
</field>

View File

@ -21,7 +21,7 @@
<field name="nbr" sum="# of Lines"/>
<field name="product_uom_qty" sum="# of Qty"/>
<field name="shipped_qty_1"/>
<field name="uom_name" invisible="not context.get('set_visible',False)"/>
<field name="uom_name" invisible="context.get('set_visible',False)"/>
<field name="price_average" avg="Average Price"/>
<field name="price_total" sum="Total Price"/>
<field name="delay" avg="Commitment Delay"/>

View File

@ -58,12 +58,6 @@ class sale_order_dates(osv.osv):
'effective_date': fields.function(_get_effective_date, method=True, type='date', store=True,string='Effective Date'),
}
sale_order_dates()
"""
- date_commitment: min(fields.function using delay on SO lines +
date_order)
- date_requested: fields.date
- Effective date: fields.function the first picking done.
"""
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -86,7 +86,7 @@
<field name="partner_id" context="{'contact_display':'partner'}"/>
</group>
<newline/>
<group expand="0" string="Group By...">
<group expand="1" string="Group By...">
<filter name="group_partner" string="Partner" icon="terp-personal" context="{'group_by':'partner_id'}"/>
<filter name="group_product" string="Product" icon="terp-accessories-archiver" context="{'group_by':'product_id'}"/>
<filter name="group_picking" string="Packing" icon="terp-accessories-archiver" context="{'group_by':'picking_id'}"/>

View File

@ -37,6 +37,7 @@ class report_stock_picking(osv.osv):
'product_uos_qty': fields.float('# of Products', readonly=True),
'product_id': fields.many2one('product.product', 'Product', readonly=True),
'date': fields.date('Date', readonly=True),
'avg_days_late': fields.float('Avg Due Days', digits=(16,2), readonly=True, group_operator="avg"),
'avg_days_to_deliver': fields.float('Avg Days to Deliver', digits=(16,2), readonly=True, group_operator="avg",
help="Number of Avg Days to deliver"),
'state': fields.selection([('draft', 'Draft'),('auto', 'Waiting'),('confirmed', 'Confirmed'),('assigned', 'Available'),('done', 'Done'),('cancel', 'Cancelled')], 'State'),
@ -71,8 +72,7 @@ class report_stock_picking(osv.osv):
sp.address_id as partner_id,
to_date(to_char(sp.create_date, 'MM-dd-YYYY'),'MM-dd-YYYY') as date,
count(sm.id) as nbr,
count(distinct sp.id) as nbp,
sum(sm.product_qty) as product_qty,
sum(sm.product_qty*u.factor) as product_qty,
sum(sm.product_uos_qty) as product_uos_qty,
sm.product_id as product_id,
sm.location_dest_id as location_dest_id,
@ -83,9 +83,11 @@ class report_stock_picking(osv.osv):
sp.invoice_state,
sp.company_id as company_id,
avg(extract('epoch' from (sp.date_done-sp.create_date)))/(3600*24) as avg_days_to_deliver,
avg(extract('epoch' from (sp.date_done-sp.min_date)))/(3600*24) as avg_days_late,
sp.state
from stock_move as sm
left join stock_picking as sp ON (sm.picking_id=sp.id)
from stock_picking as sp
Inner join stock_move as sm ON (sm.picking_id=sp.id)
Inner join product_uom u on (u.id=sm.product_uom)
group by sp.type,
sp.create_date,
sp.address_id,

View File

@ -25,10 +25,10 @@
<field name="type" invisible="1"/>
<field name="invoice_state" invisible="1"/>
<field name="state" invisible="1"/>
<field name="product_qty" sum="# of Products" />
<field name="nbp" sum="# of Pickings" />
<field name="nbr" sum="# of Lines" />
<field name="avg_days_to_deliver" avg='Avg Days to Deliver'/>
<field name="product_qty" sum="# of Products" />
<field name="avg_days_to_deliver" avg='Avg Days to Deliver'/>
<field name="avg_days_late" avg='Avg Due Days'/>
</tree>
</field>
</record>
@ -69,37 +69,39 @@
<separator orientation="vertical"/>
<filter string="Todo" icon="terp-gtk-go-back-rtl" domain="[('state','in',('draft','auto','confirmed','assigned'))]"/>
<filter string="Done" icon="terp-dialog-close" domain="[('state','=','done')]"/>
<separator orientation="vertical"/>
<field name="partner_id"/>
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
<separator orientation="vertical"/>
<field name="partner_id"/>
</group>
<newline/>
<group expand="0" string="Group By...">
<group expand="1" string="Group By...">
<filter string="Partner" name="Partner" icon="terp-personal" domain="[]" context="{'group_by':'partner_id'}"/>
<filter string="Company" icon="terp-go-home" domain="[]" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
<filter string="Shipping Type" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'type'}"/>
<separator orientation="vertical"/>
<filter string="Product" icon="terp-accessories-archiver" domain="[]" context="{'group_by':'product_id'}"/>
<separator orientation="vertical"/>
<filter string="Shipping Type" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'type'}"/>
<separator orientation="vertical"/>
<filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
<filter string="Invoice Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'invoice_state'}"/>
<separator orientation="vertical"/>
<filter string="Company" icon="terp-go-home" domain="[]" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
<separator orientation="vertical"/>
<filter string="Day" icon="terp-go-today" domain="[]" context="{'group_by':'day'}"/>
<filter string="Month" icon="terp-go-month" domain="[]" context="{'group_by':'month'}"/>
<filter string="Year" icon="terp-go-year" domain="[]" context="{'group_by':'year'}"/>
</group>
<newline/>
<group expand="0" string="Extended options..." groups="base.group_extended">
<field name="type"/>
<separator orientation="vertical"/>
<field name="min_date"/>
<separator orientation="vertical"/>
<field name="max_date"/>
<newline/>
<field name="product_id"/>
<separator orientation="vertical"/>
<field name="type"/>
<field name="invoice_state"/>
<separator orientation="vertical"/>
<separator orientation="vertical"/>
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
<newline/>
<field name="order_date"/>
<separator orientation="vertical"/>
<field name="date_done"/>
<field name="min_date"/>
<field name="max_date"/>
</group>
</search>