[IMP] Purchase name
bzr revid: nel@tinyerp.com-20100406114317-6r4l8blcdl704h1i
This commit is contained in:
parent
547c8782cf
commit
689bde0d82
|
@ -96,7 +96,7 @@
|
|||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Leaves by Type">
|
||||
<field name="name"/>
|
||||
<field name="user_id"/>
|
||||
<field name="no_of_leaves"/>
|
||||
</tree>
|
||||
</field>
|
||||
|
@ -107,9 +107,10 @@
|
|||
<field name="model">hr.holidays.by.type</field>
|
||||
<field name="type">graph</field>
|
||||
<field name="arch" type="xml">
|
||||
<graph string="Leaves by Type" type="bar">
|
||||
<field name="name"/>
|
||||
<graph string="Leaves by Type" orientation = "horizontal" type="bar">
|
||||
<field name="user_id"/>
|
||||
<field name="no_of_leaves" operator="+"/>
|
||||
<field group = "True" name="name"/>
|
||||
</graph>
|
||||
</field>
|
||||
</record>
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
from osv import fields,osv
|
||||
import tools
|
||||
|
||||
class report_purchase_order(osv.osv):
|
||||
class purchase_report(osv.osv):
|
||||
_name = "purchase.report"
|
||||
_description = "Purchases Orders"
|
||||
_auto = False
|
||||
|
@ -59,9 +59,9 @@ class report_purchase_order(osv.osv):
|
|||
}
|
||||
_order = 'name desc,price_total desc'
|
||||
def init(self, cr):
|
||||
tools.sql.drop_view_if_exists(cr, 'report_purchase_order')
|
||||
tools.sql.drop_view_if_exists(cr, 'purchase_report')
|
||||
cr.execute("""
|
||||
create or replace view report_purchase_order as (
|
||||
create or replace view purchase_report as (
|
||||
select
|
||||
min(l.id) as id,
|
||||
s.date_order as date,
|
||||
|
@ -90,7 +90,7 @@ class report_purchase_order(osv.osv):
|
|||
s.warehouse_id
|
||||
)
|
||||
""")
|
||||
report_purchase_order()
|
||||
purchase_report()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<data>
|
||||
<record model="ir.ui.view" id="view_purchase_order_graph">
|
||||
<field name="name">product.month.graph</field>
|
||||
<field name="model">report.purchase.order</field>
|
||||
<field name="model">purchase.report</field>
|
||||
<field name="type">graph</field>
|
||||
<field name="arch" type="xml">
|
||||
<graph string="Purchase Orders Statistics" type="bar">
|
||||
|
@ -16,14 +16,14 @@
|
|||
|
||||
<record id="view_purchase_order_tree" model="ir.ui.view">
|
||||
<field name="name">report.purchase.order.tree</field>
|
||||
<field name="model">report.purchase.order</field>
|
||||
<field name="model">purchase.report</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Purchase Orders Statistics">
|
||||
<field name="date"/>
|
||||
<field name="user_id"/>
|
||||
<field name="partner_id"/>
|
||||
<field name="product_id"/>
|
||||
<field name="date" invisible = "1"/>
|
||||
<field name="user_id" invisible = "1"/>
|
||||
<field name="partner_id" invisible = "1"/>
|
||||
<field name="product_id" invisible = "1"/>
|
||||
<field name="quantity"/>
|
||||
<field name="nbr" sum="# of Lines"/>
|
||||
<field name="price_average" avg="Average Price"/>
|
||||
|
@ -39,7 +39,7 @@
|
|||
|
||||
<record id="view_purchase_order_search" model="ir.ui.view">
|
||||
<field name="name">report.purchase.order.search</field>
|
||||
<field name="model">report.purchase.order</field>
|
||||
<field name="model">purchase.report</field>
|
||||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Purchase Orders">
|
||||
|
@ -73,6 +73,7 @@
|
|||
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<separator string="Group by" />
|
||||
<group expand="1" string="Group By..." colspan="10" col="12">
|
||||
<filter string="Company" icon="terp-purchase" context="{'group_by':'company_id'}"/>
|
||||
<filter string="Warehouse" icon="terp-purchase" context="{'group_by':'warehouse_id'}"/>
|
||||
|
@ -91,7 +92,7 @@
|
|||
|
||||
<record id="action_purchase_order_report_all" model="ir.actions.act_window">
|
||||
<field name="name">Purchase Orders</field>
|
||||
<field name="res_model">report.purchase.order</field>
|
||||
<field name="res_model">purchase.report</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,graph</field>
|
||||
<field name="search_view_id" ref="view_purchase_order_search"/>
|
||||
|
|
|
@ -8,4 +8,4 @@
|
|||
"access_purchase_order_stock_worker","purchase.order stock_worker","model_purchase_order","stock.group_stock_user",1,0,0,0
|
||||
"access_purchase_order_line_stock_worker","purchase.order.line stock_worker","model_purchase_order_line","stock.group_stock_user",1,0,0,0
|
||||
"access_account_tax_purchase_user","account.tax purchase_user","account.model_account_tax","purchase.group_purchase_user",1,0,0,0
|
||||
"access_report_purchase_order","report.purchase.order","model_report_purchase_order","purchase.group_purchase_manager",1,0,0,0
|
||||
"access_report_purchase_order","purchase.report","model_purchase_report","purchase.group_purchase_manager",1,0,0,0
|
||||
|
|
|
Loading…
Reference in New Issue