diff --git a/mail_wall_custom/README.rst b/mail_wall_custom/README.rst new file mode 100644 index 0000000..d9aad6e --- /dev/null +++ b/mail_wall_custom/README.rst @@ -0,0 +1,4 @@ +Custom mail wall +================ + +Tested on Odoo 8.0 ab7b5d7732a7c222a0aea45bd173742acd47242d diff --git a/mail_wall_custom/__init__.py b/mail_wall_custom/__init__.py new file mode 100644 index 0000000..bff786c --- /dev/null +++ b/mail_wall_custom/__init__.py @@ -0,0 +1 @@ +import models diff --git a/mail_wall_custom/__openerp__.py b/mail_wall_custom/__openerp__.py new file mode 100644 index 0000000..e2151de --- /dev/null +++ b/mail_wall_custom/__openerp__.py @@ -0,0 +1,25 @@ +{ + 'name' : 'Custom mail wall', + 'version' : '1.0.0', + 'author' : 'IT-Projects LLC, Ivan Yelizariev', + 'license': 'GPL-3', + 'category' : 'Custom', + 'website' : 'https://yelizariev.github.io', + 'depends' : ['gamification', + 'gamification_extra', + 'hr', + 'sale', + 'sales_team', + 'crm', + 'calendar', + 'project', + 'mail_wall_widgets', + 'sale_mediation_custom', + 'access_custom', + ], + 'data':[ + 'views.xml', + 'data.xml', + ], + 'installable': True, +} diff --git a/mail_wall_custom/data.xml b/mail_wall_custom/data.xml new file mode 100644 index 0000000..c6878f0 --- /dev/null +++ b/mail_wall_custom/data.xml @@ -0,0 +1,402 @@ + + + + + Average payment time + + + days + avg + progress + + + + lower + [('user_id','=', user.id),('state','in', ['done'])] + + + Average payment time [ALL] + + + days + avg + progress + + + + lower + [('state','in', ['done'])] + + + Average deal time + + + days + avg + progress + + + + lower + [('user_id','=', user.id), ('sales_funnel_type', 'in', ['won']), ('date_closed', '!=', False)] + + + Average deal time [ALL] + + + days + avg + progress + + + + lower + [('sales_funnel_type', 'in', ['won']), ('date_closed', '!=', False)] + + + Oldest lead + + + days + max + progress + lower + [('user_id','=', user.id), ('sales_funnel_type', '=', 'lead')] + + + + + Oldest lead [ALL] + + + days + max + progress + lower + [('sales_funnel_type', '=', 'lead')] + + + + + Oldest Opportunity + + + days + max + progress + lower + [('user_id','=', user.id), '|', ('sales_funnel_type', '=', 'quotation'),('sales_funnel_type', '=', 'negotiation')] + + + + + Oldest Opportunity [ALL] + + + days + max + progress + lower + ['|', ('sales_funnel_type', '=', 'quotation'),('sales_funnel_type', '=', 'negotiation')] + + + + + + Personal comission + + + python + progress + higher + [('state','!=','cancel'),('user_id','=',user.id),('type','=','out_invoice')] + + + + +personal_comission = object.user_id.employee_ids and object.user_id.employee_ids[0].personal_comission or 0.0 +result = object.sum * personal_comission / 100.0 + + + + + Team bonus + Monthly team bonus + + python + progress + higher + [('state','!=','cancel'),('section_id','=',user.default_section_id.id),('type','=','out_invoice')] + + + + + + + + + + dashboard_accountant + + Shows dashboard to accountant + + + dashboard_sales_managment + + Shows sales management dashboard + + + dashboard_managment + + Shows management dashboard. It includes: sales management + accountant dashboard + EXTRA + + + + + dashboard_sales_person + + Shows dashboard to salesperson + + + + dashboard_admin + + Shows admin dashboard + + + + Outstanding sale orders + + [('user_id', '=', user.id),('state', 'in', ['progress', 'manual'])] + + + ${record.partner_id.name}, ${record.date_order}]]> + + list + 10 + + + + + Outstanding sale orders [ALL] + + [('state', 'in', ['progress', 'manual'])] + + + ${record.partner_id.name}, ${record.date_order}]]> + + list + 10 + + + + + Sent invoices [ALL] + + [('type', 'in', ['out_invoice']),('state','in',['open'])] + + + ${record.partner_id.name}, ${record.date_invoice}]]> + + list + 10 + + + + + Received invoices [ALL] + + [('type', 'in', ['in_invoice']),('state','in',['open'])] + + + ${record.partner_id.name}, ${record.date_invoice}]]> + + list + 10 + + + + + Task deadlines + + [('user_id', '=', user.id),('date_deadline','!=',False)] + ${record.project_id and record.project_id.name or 'NO PROJECT'}, ${record.date_deadline}]]> + + + + list + 10 + priority DESC + + + + Task deadlines [ALL] + + [('date_deadline','!=',False)] + ${record.project_id and record.project_id.name or 'NO PROJECT'}, ${record.date_deadline}]]> + + + + list + 10 + priority DESC + + + + + + Next action + + [('user_id', '=', user.id), '|',('date_action','!=',False),('title_action', '!=', False)] + ${record.date_action} - ${record.title_action}]]> + + + + + + list + 10 + priority DESC,probability DESC,planned_revenue DESC + + + + Next action [ALL] + + ['|',('date_action','!=',False),('title_action', '!=', False)] + ${record.date_action} - ${record.title_action}]]> + + + + + + list + 10 + priority DESC,probability DESC,planned_revenue DESC + + + + + Calls + + [('user_id', '=', user.id),('state', 'not in', ['cancel'])] + ${record.partner_id.name}, ${record.date}]]> + + + + list + 10 + date DESC + + + + Calls [ALL] + + [('state', 'not in', ['cancel'])] + ${record.partner_id.name}, ${record.date}]]> + + + + list + 10 + date DESC + + + + + Meetings + + [('partner_ids', 'in', [user.partner_id.id])] + + + + + list + 10 + start_datetime DESC + + + + + Meetings [ALL] + + [] + + + + + + + list + 10 + start_datetime DESC + + + + + Conversion Rate + + [('user_id','=', user.id), ('sales_funnel_type', 'in', ['won', 'lost'])] + + funnel + + + + [('sales_funnel_type', 'in', ['won'])] + + + + Conversion Rate [ALL] + + [('sales_funnel_type', 'in', ['won', 'lost'])] + + funnel + + + + [('sales_funnel_type', 'in', ['won'])] + + + + + Sales contributed + + [('state', 'in', ['done'])] + [('user_id','=', user.id), ('state', 'in', ['done'])] + + slice + + + + + + + + + diff --git a/mail_wall_custom/models.py b/mail_wall_custom/models.py new file mode 100644 index 0000000..0d8b14f --- /dev/null +++ b/mail_wall_custom/models.py @@ -0,0 +1,13 @@ +from openerp import api,models,fields +from openerp.osv import fields as old_fields + +class hr_employee(models.Model): + _inherit = 'hr.employee' + + default_section_id = fields.Many2one('crm.case.section', 'Default Sales Team', related='user_id.default_section_id') + + personal_comission = fields.Float('Personal comission', help='Personal comission for sales. Value 1.0 is equal 1%') + + team_bonus = fields.Float('Team bonus', help='Maximum team bonus (per year). Value 1.0 is equal 1%') + + company_bonus = fields.Float('Company bonus', help='Maximum team bonus (per year). Value 1.0 is equal 1%') diff --git a/mail_wall_custom/static/description/icon.png b/mail_wall_custom/static/description/icon.png new file mode 100644 index 0000000..79f7d8f Binary files /dev/null and b/mail_wall_custom/static/description/icon.png differ diff --git a/mail_wall_custom/views.xml b/mail_wall_custom/views.xml new file mode 100644 index 0000000..3cee23b --- /dev/null +++ b/mail_wall_custom/views.xml @@ -0,0 +1,20 @@ + + + + + hr.employee.form + hr.employee + + + + + + + + + + + + + +