@@ -51,7 +51,7 @@
|
||||
<separator orientation="vertical"/>
|
||||
<field name="name" string="Account"/>
|
||||
<field name="code"/>
|
||||
<field name="company_id" widget="selection"/>
|
||||
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Extended options..." colspan="10" col="12">
|
||||
@@ -62,7 +62,7 @@
|
||||
<group expand="1" string="Group By..." colspan="10" col="12">
|
||||
<filter string="Account" name="Account" icon="terp-account" context="{'group_by':'name'}"/>
|
||||
<filter string="Code" icon="terp-account" context="{'group_by':'code'}"/>
|
||||
<filter string="Company" icon="terp-account" context="{'group_by':'company_id'}"/>
|
||||
<filter string="Company" icon="terp-account" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Currencies Rate" icon="terp-account" context="{'group_by':'currency_mode'}"/>
|
||||
<filter string="Internal Type" icon="terp-account" context="{'group_by':'type'}"/>
|
||||
|
||||
@@ -57,6 +57,7 @@ class crm_opportunity_report(osv.osv):
|
||||
'priority': fields.selection(crm_report.AVAILABLE_PRIORITIES, 'Priority'),
|
||||
'date_action': fields.date('Next Action', readonly=True),
|
||||
'planned_revenue': fields.float('Expected Revenue', readonly=True),
|
||||
'partner_address_id': fields.many2one('res.partner.address', 'Contact', readonly=True),
|
||||
}
|
||||
|
||||
def init(self, cr):
|
||||
@@ -88,6 +89,7 @@ class crm_opportunity_report(osv.osv):
|
||||
c.priority as priority,
|
||||
c.date_action as date_action,
|
||||
c.date_deadline as date_deadline,
|
||||
c.partner_address_id as partner_address_id,
|
||||
sum(c.planned_revenue) as planned_revenue,
|
||||
date_trunc('day',c.create_date) as create_date,
|
||||
sum(planned_revenue) as amount_revenue,
|
||||
@@ -112,7 +114,8 @@ class crm_opportunity_report(osv.osv):
|
||||
c.date_open,
|
||||
c.priority,
|
||||
c.date_action,
|
||||
c.date_deadline
|
||||
c.date_deadline,
|
||||
c.partner_address_id
|
||||
)""")
|
||||
|
||||
crm_opportunity_report()
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
<field name="user_id" invisible="1"/>
|
||||
<field name="company_id" invisible="1"/>
|
||||
<field name="partner_id" invisible="1"/>
|
||||
<field name="partner_address_id" invisible="1"/>
|
||||
<field name="nbr" string="#Opportunities" sum="#Opportunities"/>
|
||||
<field name="amount_revenue" sum="Total Revenue"/>
|
||||
<field name="probability" widget="progressbar" avg="Probability"/>
|
||||
@@ -82,6 +83,7 @@
|
||||
<separator orientation="vertical"/>
|
||||
<field name="stage_id" widget="selection" domain="[('object_id.model', '=', 'crm.opportunity')]"/>
|
||||
<field name="partner_id" />
|
||||
<field name="partner_address_id" />
|
||||
<separator orientation="vertical"/>
|
||||
<field name="priority" />
|
||||
<field name="categ_id" widget="selection" domain="[('object_id.model', '=', 'crm.opportunity')]"/>
|
||||
@@ -101,6 +103,8 @@
|
||||
context="{'group_by':'stage_id'}" />
|
||||
<filter string="Partner" icon="terp-partner"
|
||||
domain="[]" context="{'group_by':'partner_id'}" />
|
||||
<filter string="Contact" icon="terp-partner"
|
||||
domain="[]" context="{'group_by':'partner_address_id'}" />
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Priority" icon="terp-sale"
|
||||
domain="[]" context="{'group_by':'priority'}" />
|
||||
|
||||
@@ -43,7 +43,8 @@ class crm_phonecall_report(osv.osv):
|
||||
'opportunity_id': fields.many2one ('crm.opportunity', 'Opportunity'),
|
||||
'canal_id': fields.many2one('res.partner.canal','Channel',domain="[('section_id','=',section_id),('object_id.model', '=', 'crm.phonecall')]"),
|
||||
'duration': fields.float('Duration',readonly=True),
|
||||
'date': fields.datetime('Planned Date')
|
||||
'date': fields.datetime('Planned Date'),
|
||||
'partner_address_id': fields.many2one('res.partner.address', 'Contact', readonly=True)
|
||||
}
|
||||
|
||||
def init(self, cr):
|
||||
@@ -75,6 +76,7 @@ class crm_phonecall_report(osv.osv):
|
||||
c.opportunity_id as opportunity_id,
|
||||
c.canal_id as canal_id,
|
||||
c.date as date,
|
||||
c.partner_address_id as partner_address_id,
|
||||
sum(c.duration) as duration,
|
||||
date_trunc('day',c.create_date) as create_date,
|
||||
avg(extract('epoch' from (c.date_closed-c.create_date)))/(3600*24) as delay_close
|
||||
@@ -84,6 +86,7 @@ class crm_phonecall_report(osv.osv):
|
||||
c.state, c.user_id,c.section_id, c.categ_id,c.partner_id,c.company_id
|
||||
,to_char(c.create_date, 'YYYY-MM-DD'),c.create_date
|
||||
,c.priority,c.date_closed,opportunity_id,canal_id,c.date
|
||||
,partner_address_id
|
||||
)""")
|
||||
|
||||
crm_phonecall_report()
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
<field name="user_id" invisible="1"/>
|
||||
<field name="company_id" invisible="1"/>
|
||||
<field name="partner_id" invisible="1"/>
|
||||
<field name="partner_address_id" invisible="1"/>
|
||||
<field name="nbr" string="#Phone calls" sum="#Phone calls"/>
|
||||
<field name="delay_close" avg="Avg Closing Delay"/>
|
||||
<field name="state" invisible="1"/>
|
||||
@@ -82,6 +83,7 @@
|
||||
<field name="canal_id" widget="selection" />
|
||||
<separator orientation="vertical"/>
|
||||
<field name="partner_id"/>
|
||||
<field name="partner_address_id"/>
|
||||
<newline/>
|
||||
<field name="date_closed"/>
|
||||
<field name="date"/>
|
||||
@@ -100,6 +102,8 @@
|
||||
<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'}" />
|
||||
</xpath>
|
||||
</data>
|
||||
</field>
|
||||
|
||||
@@ -99,7 +99,7 @@
|
||||
help="My section" />
|
||||
|
||||
</field>
|
||||
<field name="company_id" widget="selection">
|
||||
<field name="company_id" widget="selection" groups="base.group_multi_company">
|
||||
<filter icon="terp-crm"
|
||||
context="{'invisible_section': False}"
|
||||
domain="[('section_id.user_id.company_id','=',uid)]"
|
||||
@@ -128,7 +128,7 @@
|
||||
|
||||
<filter string="Company" icon="terp-sale"
|
||||
domain="[]"
|
||||
context="{'group_by':'company_id'}" />
|
||||
context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
|
||||
|
||||
<filter string="Section" icon="terp-sale"
|
||||
domain="[]"
|
||||
|
||||
@@ -33,8 +33,8 @@ class mrp_production_order(osv.osv):
|
||||
'day': fields.char('Day',size=64,readonly=True),
|
||||
'origin': fields.char('Source Document', size=64),
|
||||
'nbr': fields.integer('# of Orders', readonly=True),
|
||||
'products_to_consumme': fields.integer('Products to Consumme', readonly=True),
|
||||
'consummed_products': fields.integer('Consummed Products', readonly=True),
|
||||
# 'products_to_consumme': fields.integer('Products to Consumme', readonly=True),
|
||||
# 'consummed_products': fields.integer('Consummed Products', readonly=True),
|
||||
'date': fields.date('Date', readonly=True),
|
||||
'product_id': fields.many2one('product.product', 'Product', readonly=True),
|
||||
'product_qty': fields.float('Product Qty', readonly=True),
|
||||
@@ -79,16 +79,6 @@ class mrp_production_order(osv.osv):
|
||||
sum(l.product_qty * u.factor) as product_qty,
|
||||
s.company_id as company_id,
|
||||
count(*) as nbr,
|
||||
(select count(ll.id) from mrp_production_move_ids as mv
|
||||
left join stock_move as sm ON (sm.id=mv.move_id)
|
||||
left join mrp_production_product_line as ll ON (ll.id=mv.production_id)
|
||||
where sm.state not in ('done','cancel') and ll.id=l.id
|
||||
group by ll.id) as products_to_consumme,
|
||||
(select count(ll.id) from mrp_production_move_ids as mv
|
||||
left join stock_move as sm ON (sm.id=mv.move_id)
|
||||
left join mrp_production_product_line as ll ON (ll.id=mv.production_id)
|
||||
where sm.state in ('done','cancel') and ll.id=l.id
|
||||
group by ll.id) as consummed_products,
|
||||
s.location_src_id,
|
||||
s.location_dest_id,
|
||||
s.bom_id,
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
<field name="bom_id" invisible="1"/>
|
||||
<field name="product_id" invisible="1"/>
|
||||
<field name="product_qty" sum='Product Qty'/>
|
||||
<field name="products_to_consumme" sum='Products to Consumme'/>
|
||||
<field name="consummed_products" sum='Consummed Products'/>
|
||||
<!--field name="products_to_consumme" sum='Products to Consumme'/>
|
||||
<field name="consummed_products" sum='Consummed Products'/-->
|
||||
<field name="nbr" string="#Production Orders" sum='#Production Orders'/>
|
||||
<field name="state" invisible="1"/>
|
||||
<field name="routing_id" invisible="1"/>
|
||||
|
||||
@@ -87,9 +87,6 @@
|
||||
<field name="date_closed" string="Date Closed"/>
|
||||
</group>
|
||||
</xpath>
|
||||
<xpath expr='//search[@string="Search"]/group[@string="Group By..."]/filter[@string="Company"]' position='replace'>
|
||||
<filter string="Company" icon="terp-sale" domain="[]" context="{'group_by':'company_id'}"/>
|
||||
</xpath>
|
||||
<xpath expr='//search[@string="Search"]/group[@string="Group By..."]/filter[@string="Category"]' position='after'>
|
||||
<filter string="Stage" icon="terp-sale" domain="[]" context="{'group_by':'stage_id'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
|
||||
Reference in New Issue
Block a user