[CLEAN] addons: various linkt cleanup (indentation, spaces, ...).
bzr revid: tde@openerp.com-20130403081009-jy35sm7dl4pq7eyu
This commit is contained in:
parent
bdd8a38121
commit
ba9412cb5d
|
@ -116,11 +116,26 @@ Dashboard for CRM will include:
|
|||
'test/ui/duplicate_lead.yml',
|
||||
'test/ui/delete_lead.yml',
|
||||
],
|
||||
'css': ['static/src/css/crm.css'],
|
||||
'js': ['static/src/js/crm.js'],
|
||||
'css': [
|
||||
'static/src/css/crm.css'
|
||||
],
|
||||
'js': [
|
||||
'static/src/js/crm.js'
|
||||
],
|
||||
'installable': True,
|
||||
'application': True,
|
||||
'auto_install': False,
|
||||
'images': ['images/crm_dashboard.png', 'images/customers.png','images/leads.png','images/opportunities_kanban.png','images/opportunities_form.png','images/opportunities_calendar.png','images/opportunities_graph.png','images/logged_calls.png','images/scheduled_calls.png','images/stages.png'],
|
||||
'images': [
|
||||
'images/crm_dashboard.png',
|
||||
'images/customers.png',
|
||||
'images/leads.png',
|
||||
'images/opportunities_kanban.png',
|
||||
'images/opportunities_form.png',
|
||||
'images/opportunities_calendar.png',
|
||||
'images/opportunities_graph.png',
|
||||
'images/logged_calls.png',
|
||||
'images/scheduled_calls.png',
|
||||
'images/stages.png',
|
||||
],
|
||||
}
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -98,6 +98,7 @@ class crm_case_stage(osv.osv):
|
|||
'case_default': True,
|
||||
}
|
||||
|
||||
|
||||
class crm_case_section(osv.osv):
|
||||
""" Model for sales teams. """
|
||||
_name = "crm.case.section"
|
||||
|
@ -128,13 +129,15 @@ class crm_case_section(osv.osv):
|
|||
'alias_id': fields.many2one('mail.alias', 'Alias', ondelete="cascade", required=True,
|
||||
help="The email address associated with this team. New emails received will automatically "
|
||||
"create new leads assigned to the team."),
|
||||
'open_lead_ids': fields.one2many('crm.lead', 'section_id', 'Open Leads', readonly=True,
|
||||
'open_lead_ids': fields.one2many('crm.lead', 'section_id',
|
||||
string='Open Leads', readonly=True,
|
||||
domain=['&', ('type', '!=', 'opportunity'), ('state', 'not in', ['done', 'cancel'])]),
|
||||
'open_opportunity_ids': fields.one2many('crm.lead', 'section_id', 'Open Opportunities', readonly=True,
|
||||
'open_opportunity_ids': fields.one2many('crm.lead', 'section_id',
|
||||
string='Open Opportunities', readonly=True,
|
||||
domain=['&', '|', ('type', '=', 'opportunity'), ('type', '=', 'both'), ('state', 'not in', ['done', 'cancel'])]),
|
||||
'color': fields.integer('Color Index'),
|
||||
'use_leads': fields.boolean('Leads',
|
||||
help="If checked, this sales team will be available in the sales teams menu and you will be able to manage leads"),
|
||||
help="This enables the management of leads in the sales team. Otherwise the sales team manages only opportunities."),
|
||||
}
|
||||
|
||||
def _get_stage_common(self, cr, uid, context):
|
||||
|
|
|
@ -92,9 +92,11 @@ class crm_lead(base_stage, format_address, osv.osv):
|
|||
return super(crm_lead, self).get_empty_list_help(cr, uid, help, context=context)
|
||||
|
||||
def onchange_user_id(self, cr, uid, ids, section_id, user_id, context=None):
|
||||
""" When changing the user, also set a section_id or restrict section id
|
||||
to the ones user_id is member of. """
|
||||
if user_id:
|
||||
section_ids = self.pool.get('crm.case.section').search(cr, uid, ['|', ('user_id', '=', user_id), ('member_ids', '=', user_id)], context=context)
|
||||
if section_id and len(section_ids) > 0 and section_id not in section_ids:
|
||||
if len(section_ids) > 0 and section_id not in section_ids:
|
||||
section_id = section_ids[0]
|
||||
return {'value': {'section_id': section_id}}
|
||||
|
||||
|
|
|
@ -156,7 +156,8 @@
|
|||
<label for="section_id" groups="base.group_multi_salesteams"/>
|
||||
<div groups="base.group_multi_salesteams">
|
||||
<field name="section_id"/>
|
||||
<button name="case_escalate" string="Escalate" type="object" attrs="{'invisible': ['|', ('section_id','=',False), ('state', 'not in', ['draft','open','pending'])]}"/>
|
||||
<button name="case_escalate" string="Escalate" type="object"
|
||||
attrs="{'invisible': ['|', ('section_id','=',False), ('state', 'not in', ['draft','open','pending'])]}"/>
|
||||
</div>
|
||||
<field name="type" invisible="1"/>
|
||||
</group>
|
||||
|
|
|
@ -103,7 +103,8 @@
|
|||
<field name="date"/>
|
||||
<field name="user_id"/>
|
||||
<field name="duration" widget="float_time"/>
|
||||
<field name="section_id" colspan="1" widget="selection" groups="base.group_multi_salesteams"/>
|
||||
<field name="section_id" colspan="1" widget="selection"
|
||||
groups="base.group_multi_salesteams"/>
|
||||
<field name="partner_id" on_change="onchange_partner_id(partner_id)"/>
|
||||
<field name="email_from" invisible="1"/> <!--not needed because of the chatter, thus invisible, but must be in the view as it's returned by onchange_partner_id()-->
|
||||
<field name="categ_id" widget="selection"
|
||||
|
@ -187,7 +188,8 @@
|
|||
help="Phone Calls Assigned to the current user or with a team having the current user as team leader"/>
|
||||
<field name="partner_id"/>
|
||||
<field name="user_id"/>
|
||||
<field name="section_id" string="Sales Team" groups="base.group_multi_salesteams"/>
|
||||
<field name="section_id" string="Sales Team"
|
||||
groups="base.group_multi_salesteams"/>
|
||||
<group expand="0" string="Group By...">
|
||||
<filter string="Partner" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/>
|
||||
<filter string="Responsible" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
|
||||
|
|
|
@ -33,7 +33,8 @@
|
|||
<field name="name"/>
|
||||
<field name="month"/>
|
||||
<field name="user_id"/>
|
||||
<field name="section_id" widget="selection" groups="base.group_multi_salesteams"/>
|
||||
<field name="section_id" widget="selection"
|
||||
groups="base.group_multi_salesteams"/>
|
||||
<field name="category2_id" />
|
||||
<field name="stage_id"/>
|
||||
<field name="amount_revenue"/>
|
||||
|
@ -53,7 +54,8 @@
|
|||
<graph string="Cases by Teams and Type" type="bar" orientation="horizontal">
|
||||
<field name="category2_id"/>
|
||||
<field name="amount_revenue" operator="+"/>
|
||||
<field name="section_id" group="True" groups="base.group_multi_salesteams"/>
|
||||
<field name="section_id" group="True"
|
||||
groups="base.group_multi_salesteams"/>
|
||||
</graph>
|
||||
</field>
|
||||
</record>
|
||||
|
@ -115,7 +117,8 @@
|
|||
<field name="name"/>
|
||||
<field name="month"/>
|
||||
<field name="user_id"/>
|
||||
<field name="section_id" widget="selection" groups="base.group_multi_salesteams"/>
|
||||
<field name="section_id" widget="selection"
|
||||
groups="base.group_multi_salesteams"/>
|
||||
<field name="stage_id"/>
|
||||
<field name="amount_revenue"/>
|
||||
<field name="nbr" />
|
||||
|
|
|
@ -19,7 +19,8 @@
|
|||
<field name="channel_id" invisible="1"/>
|
||||
<field name="type" invisible="1"/>
|
||||
<field name="priority" invisible="1"/>
|
||||
<field name="section_id" invisible="1" groups="base.group_multi_salesteams"/>
|
||||
<field name="section_id" invisible="1"
|
||||
groups="base.group_multi_salesteams"/>
|
||||
<field name="user_id" invisible="1"/>
|
||||
<field name="company_id" invisible="1"/>
|
||||
<field name="partner_id" invisible="1"/>
|
||||
|
@ -77,7 +78,8 @@
|
|||
help="Leads/Opportunities that are assigned to one of the sale teams I manage"/>
|
||||
<separator/>
|
||||
<filter icon="terp-personal" string="My Case(s)" help="Leads/Opportunities that are assigned to me" domain="[('user_id','=',uid)]"/>
|
||||
<field name="section_id" context="{'invisible_section': False}" groups="base.group_multi_salesteams"/>
|
||||
<field name="section_id" context="{'invisible_section': False}"
|
||||
groups="base.group_multi_salesteams"/>
|
||||
<field name="user_id" string="Salesperson"/>
|
||||
<group expand="0" string="Extended Filters...">
|
||||
<field name="partner_id"/>
|
||||
|
@ -134,7 +136,8 @@
|
|||
<field name="creation_month" invisible="1"/>
|
||||
<field name="creation_day" invisible="1"/>
|
||||
<field name="deadline_month" invisible="1"/>
|
||||
<field name="section_id" invisible="1" groups="base.group_multi_salesteams"/>
|
||||
<field name="section_id" invisible="1"
|
||||
groups="base.group_multi_salesteams"/>
|
||||
<field name="user_id" invisible="1"/>
|
||||
<field name="partner_id" invisible="1"/>
|
||||
<field name="country_id" invisible="1"/>
|
||||
|
|
|
@ -11,7 +11,8 @@
|
|||
<tree string="Phone calls" create="false">
|
||||
<field name="name" invisible="1"/>
|
||||
<field name="month" invisible="1"/>
|
||||
<field name="section_id" invisible="1" groups="base.group_multi_salesteams"/>
|
||||
<field name="section_id" invisible="1"
|
||||
groups="base.group_multi_salesteams"/>
|
||||
<field name="priority" invisible="1"/>
|
||||
<field name="user_id" invisible="1"/>
|
||||
<field name="company_id" invisible="1"/>
|
||||
|
@ -59,7 +60,8 @@
|
|||
help="Phone calls that are assigned to one of the sale teams I manage"/>
|
||||
<separator/>
|
||||
<filter icon="terp-personal" string="My Phone Calls" help="Phone Calls that are assigned to me" domain="[('user_id','=',uid)]" />
|
||||
<field name="section_id" string="Sales Team" context="{'invisible_section': False}" groups="base.group_multi_salesteams"/>
|
||||
<field name="section_id" string="Sales Team" context="{'invisible_section': False}"
|
||||
groups="base.group_multi_salesteams"/>
|
||||
<field name="user_id" string="Salesperson"/>
|
||||
<group expand="0" string="Extended Filters...">
|
||||
<field name="partner_id"/>
|
||||
|
|
|
@ -11,7 +11,8 @@
|
|||
<tree string="Claims" create="false">
|
||||
<field name="name" invisible="1"/>
|
||||
<field name="month" invisible="1"/>
|
||||
<field name="section_id" invisible="1" groups="base.group_multi_salesteams"/>
|
||||
<field name="section_id" invisible="1"
|
||||
groups="base.group_multi_salesteams"/>
|
||||
<field name="user_id" invisible="1"/>
|
||||
<field name="company_id" invisible="1"/>
|
||||
<field name="partner_id" invisible="1"/>
|
||||
|
@ -61,7 +62,8 @@
|
|||
<filter icon="terp-personal" string="My Case(s)" help="My Case(s)" domain="[('user_id','=',uid)]" />
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
<field name="user_id" string="Salesperson"/>
|
||||
<field name="section_id" string="Sales Team" context="{'invisible_section': False}" groups="base.group_multi_salesteams"/>
|
||||
<field name="section_id" string="Sales Team" context="{'invisible_section': False}"
|
||||
groups="base.group_multi_salesteams"/>
|
||||
<group expand="0" string="Extended Filters...">
|
||||
<field name="partner_id"/>
|
||||
<field name="stage_id" domain="[('section_ids', '=', 'section_id')]"/>
|
||||
|
|
|
@ -145,7 +145,8 @@
|
|||
states="open,pending" type="object"
|
||||
icon="gtk-go-forward" />
|
||||
<field name="section_id"
|
||||
invisible="context.get('invisible_section', True)" groups="base.group_multi_salesteams"/>
|
||||
invisible="context.get('invisible_section', True)"
|
||||
groups="base.group_multi_salesteams"/>
|
||||
<field name="user_id" />
|
||||
<field name="state" />
|
||||
<button name="case_cancel" string="Cancel"
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
* 'button' element wich comes with a lot of inappropriate
|
||||
* styling. Entypo is also a headache to center properly
|
||||
* */
|
||||
|
||||
.openerp .oe_topbar_item.oe_topbar_compose_full_email{
|
||||
padding: 0px;
|
||||
width: 32px;
|
||||
|
|
|
@ -304,8 +304,9 @@
|
|||
<field name="view_mode">kanban,tree,form,calendar,graph</field>
|
||||
<field name="context">{
|
||||
'search_default_project_id': [active_id],
|
||||
'default_project_id': active_id
|
||||
}</field>
|
||||
'default_project_id': active_id,
|
||||
}
|
||||
</field>
|
||||
<field name="help" type="html">
|
||||
<p>
|
||||
The OpenERP issues tacker allows you to efficiantly manage things
|
||||
|
|
|
@ -328,7 +328,11 @@
|
|||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form,calendar,graph</field>
|
||||
<field name="search_view_id" ref="view_sales_order_filter"/>
|
||||
<field name="context">{'show_address': 1, 'search_default_my_sale_orders_filter': 1}</field>
|
||||
<field name="context">{
|
||||
'show_address': 1,
|
||||
'search_default_my_sale_orders_filter': 1
|
||||
}
|
||||
</field>
|
||||
<field name="domain">[('state', 'not in', ('draft', 'sent', 'cancel'))]</field>
|
||||
<field name="help" type="html">
|
||||
<p class="oe_view_nocontent_create">
|
||||
|
|
|
@ -19,8 +19,8 @@
|
|||
#
|
||||
##############################################################################
|
||||
|
||||
from openerp.osv import osv, fields
|
||||
from datetime import datetime
|
||||
from openerp.osv import osv, fields
|
||||
|
||||
|
||||
class sale_order(osv.osv):
|
||||
|
@ -46,11 +46,14 @@ class crm_case_section(osv.osv):
|
|||
return res
|
||||
|
||||
_columns = {
|
||||
'quotation_ids': fields.one2many('sale.order', 'section_id', 'Quotations', readonly=True,
|
||||
'quotation_ids': fields.one2many('sale.order', 'section_id',
|
||||
string='Quotations', readonly=True,
|
||||
domain=[('state', 'in', ['draft', 'sent', 'cancel'])]),
|
||||
'sale_order_ids': fields.one2many('sale.order', 'section_id', 'Sale Orders', readonly=True,
|
||||
'sale_order_ids': fields.one2many('sale.order', 'section_id',
|
||||
string='Sale Orders', readonly=True,
|
||||
domain=[('state', 'not in', ['draft', 'sent', 'cancel'])]),
|
||||
'invoice_ids': fields.one2many('account.invoice', 'section_id', 'Invoices', readonly=True,
|
||||
'invoice_ids': fields.one2many('account.invoice', 'section_id',
|
||||
string='Invoices', readonly=True,
|
||||
domain=[('state', 'not in', ['draft', 'cancel'])]),
|
||||
'sum_month_invoice': fields.function(_get_sum_month_invoice,
|
||||
string='Total invoiced this month',
|
||||
|
|
Loading…
Reference in New Issue