[IMP] project_report, project_issue, sale: Rename some columns
bzr revid: nel@tinyerp.com-20100518074437-bwu9c4rjql0u8kee
This commit is contained in:
parent
114315477a
commit
69257f39a5
|
@ -52,13 +52,13 @@
|
|||
<field name="arch" type="xml">
|
||||
<search string="Tasks">
|
||||
<group>
|
||||
<filter icon="terp-project" string="This Year"
|
||||
<filter icon="terp-project" string="Last 365 Days"
|
||||
domain="[('date_start','<=', time.strftime('%%Y-%%m-%%d')),('date_start','>',(datetime.date.today()-datetime.timedelta(days=365)).strftime('%%Y-%%m-%%d'))]"
|
||||
help="Tasks performed in this year"/>
|
||||
<filter icon="terp-project" string="This Month"
|
||||
help="Tasks performed in last 365 Days"/>
|
||||
<filter icon="terp-project" string="Last 30 Days"
|
||||
name="month"
|
||||
domain="[('date_start','<=', time.strftime('%%Y-%%m-%%d')), ('date_start','>',(datetime.date.today()-datetime.timedelta(days=30)).strftime('%%Y-%%m-%%d'))]"
|
||||
help="Tasks performed in this month"/>
|
||||
help="Tasks performed in last 30 days"/>
|
||||
<filter icon="gtk-media-rewind"
|
||||
string=" 7 Days "
|
||||
separator="1"
|
||||
|
@ -77,6 +77,10 @@
|
|||
icon="terp-project"
|
||||
domain="[('state','=','pending')]"
|
||||
help = "Pending tasks"/>
|
||||
<filter string="Done"
|
||||
icon="terp-project"
|
||||
name="done"
|
||||
domain="[('state','=','done')]"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="user_id" widget="selection">
|
||||
<filter icon="terp-project"
|
||||
|
@ -101,17 +105,11 @@
|
|||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Extended options..." colspan="10" col="12">
|
||||
<filter string="Done"
|
||||
icon="terp-project"
|
||||
name="done"
|
||||
domain="[('state','=','done')]"/>
|
||||
<filter string="Cancelled"
|
||||
icon="terp-project"
|
||||
domain="[('state','=','cancelled')]"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="type" widget="selection"/>
|
||||
<field name="priority"/>
|
||||
<field name="partner_id" />
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="date_deadline"/>
|
||||
<newline/>
|
||||
|
|
|
@ -17,7 +17,7 @@ class project_issue_report(osv.osv):
|
|||
'company_id' : fields.many2one('res.company', 'Company'),
|
||||
'priority': fields.selection(crm.AVAILABLE_PRIORITIES, 'Priority'),
|
||||
'project_id':fields.many2one('project.project', 'Project',readonly=True),
|
||||
'type_id': fields.many2one('crm.case.resource.type', 'Type', domain="[('object_id.model', '=', 'project.issue')]"),
|
||||
'type_id': fields.many2one('crm.case.resource.type', 'Version', domain="[('object_id.model', '=', 'project.issue')]"),
|
||||
'date_closed': fields.datetime('Close Date', readonly=True),
|
||||
'date_open': fields.datetime('Opened', readonly=True),
|
||||
'assigned_to' : fields.many2one('res.users', 'Assigned to',readonly=True),
|
||||
|
|
|
@ -18,9 +18,7 @@
|
|||
<field name="section_id" invisible="1"/>
|
||||
<field name="user_id" invisible="1"/>
|
||||
<field name="categ_id" invisible="1"/>
|
||||
<field name="canal_id" invisible="1"/>
|
||||
<field name="partner_id" invisible="1"/>
|
||||
<field name="task_id" invisible="1"/>
|
||||
<field name="assigned_to" invisible="1"/>
|
||||
<field name="date_open" invisible="1"/>
|
||||
<field name="date_closed" invisible="1"/>
|
||||
|
@ -66,7 +64,6 @@
|
|||
<field name="priority" />
|
||||
<separator orientation="vertical"/>
|
||||
<field name="type_id" widget="selection" domain="[('object_id.model', '=', 'project.issue')]"/>
|
||||
<field name="task_id"/>
|
||||
<separator orientation="vertical"/>
|
||||
<newline/>
|
||||
<field name="categ_id" widget="selection" domain="[('object_id.model', '=', 'project.issue')]"/>
|
||||
|
@ -76,7 +73,6 @@
|
|||
<filter icon="terp-crm" help = "Project Issue Assigned To Me" domain="[('assigned_to','=',uid)]" />
|
||||
<filter icon="terp-crm" help="Non Assigned Project Issue" domain="[('assigned_to','=',False)]"/>
|
||||
</field>
|
||||
<field name="canal_id" widget="selection"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="partner_id" />
|
||||
<field name="partner_address_id" />
|
||||
|
@ -92,12 +88,8 @@
|
|||
<filter string="Priority" icon="terp-sale" domain="[]" context="{'group_by':'priority'}" />
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Type" icon="terp-sale" domain="[]" context="{'group_by':'type_id'}"/>
|
||||
<filter string="Task" icon="terp-sale" domain="[]" context="{'group_by':'task_id'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Analytic Account" icon="terp-sale" domain="[]" context="{'group_by':'task_id'}"/>
|
||||
<newline/>
|
||||
<filter string="Assigned To" icon="terp-sale" domain="[]" context="{'group_by':'assigned_to'}"/>
|
||||
<filter string="Channel" icon="terp-sale" domain="[]" context="{'group_by':'canal_id'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Partner" icon="terp-sale" domain="[]" context="{'group_by':'partner_id'}"/>
|
||||
<filter string="Contact" icon="terp-sale" domain="[]" context="{'group_by':'partner_address_id'}"/>
|
||||
|
|
|
@ -185,10 +185,14 @@ class product_bought_by_sale_order(osv.osv):
|
|||
_name = "product.bought.by.sale.order"
|
||||
_description = "Product bought by sale order"
|
||||
_auto = False
|
||||
_rec_name = 'partner'
|
||||
_rec_name = 'month'
|
||||
_columns = {
|
||||
'total_products': fields.integer('Total Products', readonly=True),
|
||||
'name': fields.char('Sale order', size=64, readonly=True)
|
||||
'product_id':fields.many2one('product.product', 'Product', readonly=True),
|
||||
'month':fields.selection([('01','January'), ('02','February'), ('03','March'), ('04','April'),
|
||||
('05','May'), ('06','June'), ('07','July'), ('08','August'), ('09','September'),
|
||||
('10','October'), ('11','November'), ('12','December')], 'Month',readonly=True),
|
||||
'year': fields.char('Year', size=64, readonly=True)
|
||||
}
|
||||
_order = 'total_products desc'
|
||||
def init(self, cr):
|
||||
|
@ -197,8 +201,10 @@ class product_bought_by_sale_order(osv.osv):
|
|||
create or replace view product_bought_by_sale_order as (
|
||||
select
|
||||
min(s.id) as id,
|
||||
count(*) as total_products,
|
||||
s.name as name
|
||||
l.product_id as product_id,
|
||||
to_char(l.create_date, 'MM') as month,
|
||||
to_char(l.create_date, 'YYYY') as year,
|
||||
count(*) as total_products
|
||||
from
|
||||
sale_order_line l
|
||||
left join
|
||||
|
@ -206,7 +212,7 @@ class product_bought_by_sale_order(osv.osv):
|
|||
where
|
||||
s.state='manual' or s.state='progress'
|
||||
group by
|
||||
s.name
|
||||
l.product_id, to_char(l.create_date, 'MM'), to_char(l.create_date, 'YYYY')
|
||||
)
|
||||
""")
|
||||
product_bought_by_sale_order()
|
||||
|
|
|
@ -226,7 +226,9 @@
|
|||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Product bought by sale order">
|
||||
<field name="name"/>
|
||||
<field name="product_id"/>
|
||||
<field name="month"/>
|
||||
<field name="year"/>
|
||||
<field name="total_products"/>
|
||||
</tree>
|
||||
</field>
|
||||
|
@ -238,8 +240,9 @@
|
|||
<field name="type">graph</field>
|
||||
<field name="arch" type="xml">
|
||||
<graph string="Product bought by sale order" type="bar">
|
||||
<field name="name"/>
|
||||
<field name="total_products" operator="+"/>
|
||||
<field name="product_id" select="1"/>
|
||||
<field name="total_products" select="1"/>
|
||||
<field name="month" group = "True"/>
|
||||
</graph>
|
||||
</field>
|
||||
</record>
|
||||
|
@ -248,7 +251,8 @@
|
|||
<field name="name">Product bought by sale order</field>
|
||||
<field name="res_model">product.bought.by.sale.order</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,graph</field>
|
||||
<field name="view_mode">graph,tree</field>
|
||||
<field name="domain">[('year','=', time.strftime('%Y'))]</field>
|
||||
<field name="view_id" ref="view_product_bought_by_sale_order_tree"/>
|
||||
</record>
|
||||
|
||||
|
|
Loading…
Reference in New Issue