[MERGE] merge from trunk addons
bzr revid: mra@mra-laptop-20100927125921-urvuknouixjnxqix
This commit is contained in:
@@ -412,7 +412,7 @@ class account_bank_statement(osv.osv):
|
||||
if t['state'] in ('draft'):
|
||||
unlink_ids.append(t['id'])
|
||||
else:
|
||||
raise osv.except_osv(_('Invalid action !'), _('Cannot delete bank statement which are already confirmed !'))
|
||||
raise osv.except_osv(_('Invalid action !'), _('Cannot delete bank statement(s) which are already confirmed !'))
|
||||
osv.osv.unlink(self, cr, uid, unlink_ids, context=context)
|
||||
return True
|
||||
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
|
||||
</separator>
|
||||
<xpath expr="//label[@string='description']" position="attributes">
|
||||
<attribute name="string">Add extra Accounting Addons to the ones already installed. Remember you can always install them at a later stage.</attribute>
|
||||
<attribute name="string">Add extra Accounting functionalities to the ones already installed.</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//button[@string='Install Modules']" position="attributes">
|
||||
<attribute name="string">Configure</attribute>
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
<field name="priority">2</field>
|
||||
<field name="inherit_id" ref="base.view_partner_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<page string="Notes" position="before">
|
||||
<page string="History" position="before">
|
||||
<page string="Accounting">
|
||||
<group col="2" colspan="2">
|
||||
<separator string="Customer Accounting Properties" colspan="2"/>
|
||||
|
||||
@@ -282,6 +282,7 @@ class account_analytic_line(osv.osv):
|
||||
_defaults = {
|
||||
'date': time.strftime('%Y-%m-%d'),
|
||||
'company_id': lambda self,cr,uid,c: self.pool.get('res.company')._company_default_get(cr, uid, 'account.analytic.line', context=c),
|
||||
'amount' : 0.00
|
||||
}
|
||||
|
||||
_order = 'date desc'
|
||||
|
||||
@@ -27,13 +27,18 @@ class profile_association_config_install_modules_wizard(osv.osv_memory):
|
||||
_inherit = 'res.config.installer'
|
||||
|
||||
_columns = {
|
||||
'hr_expense':fields.boolean('Expenses Tracking', help="Tracks the personal expenses process, from the employee expense encoding, to the reimbursement of the employee up to the reinvoicing to the final customer."),
|
||||
'project':fields.boolean('Project Management'),
|
||||
'event_project':fields.boolean('Organization and management of Events', help="This module allows you to create retro planning for managing your events."),
|
||||
'hr_expense':fields.boolean('Expenses Tracking', help="Tracks and manages employee expenses, and can "
|
||||
"automatically re-invoice clients if the expenses are "
|
||||
"project-related."),
|
||||
'project':fields.boolean('Project Management',
|
||||
help="Helps you manage your projects and tasks by tracking them, "
|
||||
"generating plannings, etc..."),
|
||||
'event_project':fields.boolean('Events', help="Helps you to manage and organize your events."),
|
||||
'project_gtd':fields.boolean('Getting Things Done',
|
||||
help="GTD is a methodology to efficiently organise yourself and your tasks. This module fully integrates GTD principle with OpenERP's project management."),
|
||||
'wiki': fields.boolean('Wiki',
|
||||
help="An integrated wiki content management system. This is really usefull to manage FAQ, quality manuals, etc.")
|
||||
'wiki': fields.boolean('Wiki', help="Lets you create wiki pages and page groups in order "
|
||||
"to keep track of business knowledge and share it with "
|
||||
"and between your employees."),
|
||||
}
|
||||
profile_association_config_install_modules_wizard()
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
@@ -35,15 +35,15 @@ class audittrail_rule(osv.osv):
|
||||
_description = "Audittrail Rule"
|
||||
_columns = {
|
||||
"name": fields.char("Rule Name", size=32, required=True),
|
||||
"object_id": fields.many2one('ir.model', 'Object', required=True),
|
||||
"object_id": fields.many2one('ir.model', 'Object', required=True, help="Select object for which you want to generate log."),
|
||||
"user_id": fields.many2many('res.users', 'audittail_rules_users',
|
||||
'user_id', 'rule_id', 'Users', help="if User is not added then it will applicable for all users"),
|
||||
"log_read": fields.boolean("Log Reads"),
|
||||
"log_write": fields.boolean("Log Writes"),
|
||||
"log_unlink": fields.boolean("Log Deletes"),
|
||||
"log_create": fields.boolean("Log Creates"),
|
||||
"log_action": fields.boolean("Log Action"),
|
||||
"log_workflow": fields.boolean("Log Workflow"),
|
||||
"log_read": fields.boolean("Log Reads", help="Select this if you want to keep track of read/open on any record of the object of this rule"),
|
||||
"log_write": fields.boolean("Log Writes", help="Select this if you want to keep track of modification on any record of the object of this rule"),
|
||||
"log_unlink": fields.boolean("Log Deletes", help="Select this if you want to keep track of deletion on any record of the object of this rule"),
|
||||
"log_create": fields.boolean("Log Creates",help="Select this if you want to keep track of creation on any record of the object of this rule"),
|
||||
"log_action": fields.boolean("Log Action",help="Select this if you want to keep track of actions on the object of this rule"),
|
||||
"log_workflow": fields.boolean("Log Workflow",help="Select this if you want to keep track of workflow on any record of the object of this rule"),
|
||||
"state": fields.selection((("draft", "Draft"),
|
||||
("subscribed", "Subscribed")),
|
||||
"State", required=True),
|
||||
|
||||
@@ -14,11 +14,13 @@
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Action Rule">
|
||||
<field name="name"/>
|
||||
<field name="model_id" select="1" on_change="onchange_model_id(model_id)"/>
|
||||
<field name="filter_id" />
|
||||
<field name="sequence"/>
|
||||
<field name="active"/>
|
||||
<group col="6" colspan="4">
|
||||
<field name="name"/>
|
||||
<field name="model_id" select="1" on_change="onchange_model_id(model_id)"/>
|
||||
<field name="filter_id" />
|
||||
<field name="sequence"/>
|
||||
<field name="active"/>
|
||||
</group>
|
||||
<notebook colspan="4">
|
||||
<page string="Conditions">
|
||||
<group col="2" colspan="2" name="model">
|
||||
|
||||
@@ -128,6 +128,11 @@
|
||||
<field name="event_date" select="1"/>
|
||||
<newline/>
|
||||
<group expand="0" string="Group By...">
|
||||
<filter string="Responsible" icon="terp-personal" domain="[]"
|
||||
context="{'group_by':'user_id'}" />
|
||||
<filter string="Contact" icon="terp-partner" domain="[]"
|
||||
context="{'group_by':'partner_address_id'}" />
|
||||
<separator orientation="vertical" />
|
||||
<filter string="Type" icon="terp-stock_symbol-selection" help="Invitation Type"
|
||||
domain="[]" context="{'group_by':'cutype'}" />
|
||||
<filter string="Role" icon="terp-gtk-select-all"
|
||||
@@ -135,10 +140,6 @@
|
||||
<filter string="Required Reply" icon="terp-mail-replied"
|
||||
domain="[]" context="{'group_by':'rsvp'}" />
|
||||
<separator orientation="vertical" />
|
||||
<filter string="User" icon="terp-personal" domain="[]"
|
||||
context="{'group_by':'user_id'}" />
|
||||
<filter string="Contact" icon="terp-gtk-jump-to-ltr" domain="[]"
|
||||
context="{'group_by':'partner_address_id'}" />
|
||||
<filter string="State" icon="terp-stock_effects-object-colorize" help="Invitation Type"
|
||||
domain="[]" context="{'group_by':'state'}" />
|
||||
</group>
|
||||
@@ -457,21 +458,23 @@
|
||||
<field name="user_id" select="1"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="show_as" select="1"/>
|
||||
<field name="class" select="1"/>
|
||||
<field name="class" select="1" string="Privacy"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Group By...">
|
||||
<filter string="State" icon="terp-stock_effects-object-colorize" domain="[]"
|
||||
context="{'group_by':'state'}" />
|
||||
<filter string="Date" icon="terp-go-month"
|
||||
domain="[]" context="{'group_by':'date'}" />
|
||||
<filter string="Responsible" icon="terp-personal" domain="[]"
|
||||
context="{'group_by':'user_id'}" />
|
||||
<separator orientation="vertical" />
|
||||
<filter string="Availability" icon="terp-camera_test"
|
||||
domain="[]" context="{'group_by':'show_as'}" />
|
||||
<filter string="Privacy" icon="terp-locked"
|
||||
domain="[]" context="{'group_by':'class'}" />
|
||||
<filter string="State" icon="terp-stock_effects-object-colorize" domain="[]"
|
||||
context="{'group_by':'state'}" />
|
||||
<separator orientation="vertical" />
|
||||
<filter string="Responsible" icon="terp-personal" domain="[]"
|
||||
context="{'group_by':'user_id'}" />
|
||||
<filter string="Date" icon="terp-go-month"
|
||||
domain="[]" context="{'group_by':'date'}" />
|
||||
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
|
||||
@@ -58,7 +58,7 @@ class base_setup_installer(osv.osv_memory):
|
||||
help="Helps you manage your purchase-related processes such as "
|
||||
"requests for quotations, supplier invoices, etc..."),
|
||||
'hr':fields.boolean('Human Resources',
|
||||
help="Helps you manage your human resources by encoding your employees structure, generating work sheets, tracking attendance and more"),
|
||||
help="Helps you manage your human resources by encoding your employees structure, generating work sheets, tracking attendance and more."),
|
||||
'point_of_sale':fields.boolean('Point of Sales',
|
||||
help="Helps you get the most out of your points of sales with "
|
||||
"fast sale encoding, simplified payment mode encoding, "
|
||||
@@ -74,7 +74,7 @@ class base_setup_installer(osv.osv_memory):
|
||||
# Vertical modules
|
||||
'product_expiry':fields.boolean('Food Industry',
|
||||
help="Installs a preselected set of OpenERP applications "
|
||||
"which will help you manage your industry"),
|
||||
"which will help you manage your industry."),
|
||||
'association':fields.boolean('Associations',
|
||||
help="Installs a preselected set of OpenERP "
|
||||
"applications which will help you manage your association "
|
||||
|
||||
+120
-64
@@ -103,7 +103,12 @@ class node_calendar_collection(nodes.node_dir):
|
||||
class node_calendar(nodes.node_class):
|
||||
our_type = 'collection'
|
||||
DAV_PROPS = {
|
||||
"http://calendarserver.org/ns/" : ('getctag',),
|
||||
"DAV:": ('principal-collection-set'),
|
||||
"http://cal.me.com/_namespace/" : ('user-state'),
|
||||
"http://calendarserver.org/ns/" : (
|
||||
'dropbox-home-URL',
|
||||
'notification-URL',
|
||||
'getctag',),
|
||||
'http://groupdav.org/': ('resourcetype',),
|
||||
"urn:ietf:params:xml:ns:caldav" : (
|
||||
'calendar-description',
|
||||
@@ -114,6 +119,7 @@ class node_calendar(nodes.node_class):
|
||||
'schedule-outbox-URL',)}
|
||||
DAV_M_NS = {
|
||||
"DAV:" : '_get_dav',
|
||||
"http://cal.me.com/_namespace/": '_get_dav',
|
||||
'http://groupdav.org/': '_get_gdav',
|
||||
"http://calendarserver.org/ns/" : '_get_dav',
|
||||
"urn:ietf:params:xml:ns:caldav" : '_get_caldav'}
|
||||
@@ -134,6 +140,35 @@ class node_calendar(nodes.node_class):
|
||||
result = self._get_ttag(cr) + ':' + str(time.time())
|
||||
return str(result)
|
||||
|
||||
def _get_dav_dropbox_home_URL(self, cr):
|
||||
import xml.dom.minidom
|
||||
import urllib
|
||||
uid = self.context.uid
|
||||
ctx = self.context.context.copy()
|
||||
ctx.update(self.dctx)
|
||||
calendar_obj = self.context._dirobj.pool.get('basic.calendar')
|
||||
calendar = calendar_obj.browse(cr, uid, self.calendar_id, context=ctx)
|
||||
res = '%s/%s' %(calendar.collection_id.name, calendar.name)
|
||||
url = urllib.quote('/%s/%s' % (cr.dbname, res))
|
||||
return url
|
||||
|
||||
def _get_dav_notification_URL(self, cr):
|
||||
import xml.dom.minidom
|
||||
import urllib
|
||||
uid = self.context.uid
|
||||
ctx = self.context.context.copy()
|
||||
ctx.update(self.dctx)
|
||||
calendar_obj = self.context._dirobj.pool.get('basic.calendar')
|
||||
calendar = calendar_obj.browse(cr, uid, self.calendar_id, context=ctx)
|
||||
res = '%s/%s' %(calendar.collection_id.name, calendar.name)
|
||||
url = urllib.quote('/%s/%s' % (cr.dbname, res))
|
||||
return url
|
||||
|
||||
def _get_dav_user_state(self, cr):
|
||||
#TODO
|
||||
return True
|
||||
|
||||
|
||||
def get_dav_resourcetype(self, cr):
|
||||
res = [ ('collection', 'DAV:'),
|
||||
(str(self.cal_type + '-collection'), 'http://groupdav.org/'),
|
||||
@@ -258,6 +293,86 @@ class node_calendar(nodes.node_class):
|
||||
def rmcol(self, cr):
|
||||
return False
|
||||
|
||||
|
||||
def _get_caldav_calendar_data(self, cr):
|
||||
res = []
|
||||
for child in self.children(cr):
|
||||
res.append(child._get_caldav_calendar_data(cr))
|
||||
return res
|
||||
|
||||
def _get_caldav_calendar_description(self, cr):
|
||||
uid = self.context.uid
|
||||
calendar_obj = self.context._dirobj.pool.get('basic.calendar')
|
||||
ctx = self.context.context.copy()
|
||||
ctx.update(self.dctx)
|
||||
calendar = calendar_obj.browse(cr, uid, self.calendar_id, context=ctx)
|
||||
return calendar.description
|
||||
|
||||
def _get_dav_principal_collection_set(self, uri):
|
||||
import urllib
|
||||
uid = self.context.uid
|
||||
ctx = self.context.context.copy()
|
||||
ctx.update(self.dctx)
|
||||
calendar_obj = self.context._dirobj.pool.get('basic.calendar')
|
||||
calendar = calendar_obj.browse(cr, uid, self.calendar_id, context=ctx)
|
||||
res = '%s/%s' %(calendar.collection_id.name, calendar.name)
|
||||
doc = xml.dom.minidom.getDOMImplementation().createDocument(None, 'href', None)
|
||||
href = doc.documentElement
|
||||
href.tagName = 'D:href'
|
||||
huri = doc.createTextNode(urllib.quote('/%s/%s' % (cr.dbname, res)))
|
||||
href.appendChild(huri)
|
||||
return href
|
||||
|
||||
def _get_caldav_calendar_home_set(self, cr):
|
||||
import xml.dom.minidom
|
||||
import urllib
|
||||
uid = self.context.uid
|
||||
ctx = self.context.context.copy()
|
||||
ctx.update(self.dctx)
|
||||
doc = xml.dom.minidom.getDOMImplementation().createDocument(None, 'href', None)
|
||||
|
||||
calendar_obj = self.context._dirobj.pool.get('basic.calendar')
|
||||
calendar = calendar_obj.browse(cr, uid, self.calendar_id, context=ctx)
|
||||
huri = doc.createTextNode(urllib.quote('/%s/%s' % (cr.dbname, calendar.collection_id.name)))
|
||||
href = doc.documentElement
|
||||
href.tagName = 'D:href'
|
||||
href.appendChild(huri)
|
||||
return href
|
||||
|
||||
def _get_caldav_calendar_user_address_set(self, cr):
|
||||
import xml.dom.minidom
|
||||
dirobj = self.context._dirobj
|
||||
uid = self.context.uid
|
||||
ctx = self.context.context.copy()
|
||||
ctx.update(self.dctx)
|
||||
user_obj = self.context._dirobj.pool.get('res.users')
|
||||
user = user_obj.browse(cr, uid, uid, context=ctx)
|
||||
doc = xml.dom.minidom.getDOMImplementation().createDocument(None, 'href', None)
|
||||
href = doc.documentElement
|
||||
href.tagName = 'D:href'
|
||||
huri = doc.createTextNode('MAILTO:' + str(user.email) or str(user.name))
|
||||
href.appendChild(huri)
|
||||
return href
|
||||
|
||||
def _get_caldav_schedule_outbox_URL(self, cr):
|
||||
return self._get_caldav_schedule_inbox_URL(cr)
|
||||
|
||||
def _get_caldav_schedule_inbox_URL(self, cr):
|
||||
import xml.dom.minidom
|
||||
import urllib
|
||||
uid = self.context.uid
|
||||
ctx = self.context.context.copy()
|
||||
ctx.update(self.dctx)
|
||||
calendar_obj = self.context._dirobj.pool.get('basic.calendar')
|
||||
calendar = calendar_obj.browse(cr, uid, self.calendar_id, context=ctx)
|
||||
res = '%s/%s' %(calendar.collection_id.name, calendar.name)
|
||||
doc = xml.dom.minidom.getDOMImplementation().createDocument(None, 'href', None)
|
||||
href = doc.documentElement
|
||||
href.tagName = 'D:href'
|
||||
huri = doc.createTextNode(urllib.quote('/%s/%s' % (cr.dbname, res)))
|
||||
href.appendChild(huri)
|
||||
return href
|
||||
|
||||
|
||||
class res_node_calendar(nodes.node_class):
|
||||
our_type = 'file'
|
||||
@@ -309,6 +424,9 @@ class res_node_calendar(nodes.node_class):
|
||||
context.update({'model': self.model, 'res_id':self.res_id})
|
||||
res = calendar_obj.export_cal(cr, uid, [self.calendar_id], context=context)
|
||||
return res
|
||||
|
||||
def _get_caldav_calendar_data(self, cr):
|
||||
return self.get_data(cr)
|
||||
|
||||
def get_data_len(self, cr, fil_obj = None):
|
||||
return self.content_length
|
||||
@@ -327,67 +445,6 @@ class res_node_calendar(nodes.node_class):
|
||||
res = '%d' % (self.calendar_id)
|
||||
return res
|
||||
|
||||
def _get_caldav_calendar_data(self, cr):
|
||||
return self.get_data(cr)
|
||||
|
||||
|
||||
def _get_caldav_calendar_description(self, cr):
|
||||
uid = self.context.uid
|
||||
calendar_obj = self.context._dirobj.pool.get('basic.calendar')
|
||||
ctx = self.context.context.copy()
|
||||
ctx.update(self.dctx)
|
||||
calendar = calendar_obj.browse(cr, uid, self.calendar_id, context=ctx)
|
||||
return calendar.description
|
||||
|
||||
|
||||
def _get_caldav_calendar_home_set(self, cr):
|
||||
import xml.dom.minidom
|
||||
import urllib
|
||||
uid = self.context.uid
|
||||
ctx = self.context.context.copy()
|
||||
ctx.update(self.dctx)
|
||||
doc = xml.dom.minidom.getDOMImplementation().createDocument(None, 'href', None)
|
||||
|
||||
calendar_obj = self.context._dirobj.pool.get('basic.calendar')
|
||||
calendar = calendar_obj.browse(cr, uid, self.calendar_id, context=ctx)
|
||||
huri = doc.createTextNode(urllib.quote('/%s/%s' % (cr.dbname, calendar.collection_id.name)))
|
||||
href = doc.documentElement
|
||||
href.tagName = 'D:href'
|
||||
href.appendChild(huri)
|
||||
return href
|
||||
|
||||
def _get_caldav_calendar_user_address_set(self, cr):
|
||||
import xml.dom.minidom
|
||||
dirobj = self.context._dirobj
|
||||
uid = self.context.uid
|
||||
ctx = self.context.context.copy()
|
||||
ctx.update(self.dctx)
|
||||
user_obj = self.context._dirobj.pool.get('res.users')
|
||||
user = user_obj.browse(cr, uid, uid, context=ctx)
|
||||
doc = xml.dom.minidom.getDOMImplementation().createDocument(None, 'href', None)
|
||||
href = doc.documentElement
|
||||
href.tagName = 'D:href'
|
||||
huri = doc.createTextNode('MAILTO:' + user.email)
|
||||
href.appendChild(huri)
|
||||
return href
|
||||
|
||||
|
||||
def _get_caldav_schedule_inbox_URL(self, cr):
|
||||
import xml.dom.minidom
|
||||
import urllib
|
||||
uid = self.context.uid
|
||||
ctx = self.context.context.copy()
|
||||
ctx.update(self.dctx)
|
||||
calendar_obj = self.context._dirobj.pool.get('basic.calendar')
|
||||
calendar = calendar_obj.browse(cr, uid, self.calendar_id, context=ctx)
|
||||
res = '%s/%s' %(calendar.name, calendar.collection_id.name)
|
||||
doc = xml.dom.minidom.getDOMImplementation().createDocument(None, 'href', None)
|
||||
href = doc.documentElement
|
||||
href.tagName = 'D:href'
|
||||
huri = doc.createTextNode(urllib.quote('/%s/%s' % (cr.dbname, res)))
|
||||
href.appendChild(huri)
|
||||
return href
|
||||
|
||||
|
||||
def rm(self, cr):
|
||||
uid = self.context.uid
|
||||
@@ -401,7 +458,6 @@ class res_node_calendar(nodes.node_class):
|
||||
|
||||
return res
|
||||
|
||||
def _get_caldav_schedule_outbox_URL(self, cr):
|
||||
return self._get_caldav_schedule_inbox_URL(cr)
|
||||
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4
|
||||
|
||||
@@ -453,7 +453,7 @@ class CalDAV(object):
|
||||
else:
|
||||
for key1, val1 in self.ical_get(field, 'mapping').items():
|
||||
if val1 == data[map_field]:
|
||||
vevent.add(field).value = key1
|
||||
vevent.add(field).value = key1.upper()
|
||||
return vevent
|
||||
|
||||
def check_import(self, cr, uid, vals, context=None):
|
||||
|
||||
+2
-2
@@ -587,7 +587,7 @@ class crm_case_categ(osv.osv):
|
||||
_description = "Category of case"
|
||||
|
||||
_columns = {
|
||||
'name': fields.char('Case Category Name', size=64, required=True, translate=True),
|
||||
'name': fields.char('Name', size=64, required=True, translate=True),
|
||||
'section_id': fields.many2one('crm.case.section', 'Sales Team'),
|
||||
'object_id': fields.many2one('ir.model', 'Object Name'),
|
||||
}
|
||||
@@ -636,7 +636,7 @@ class crm_case_stage(osv.osv):
|
||||
'section_id': fields.many2one('crm.case.section', 'Sales Team'),
|
||||
'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list of case stages."),
|
||||
'object_id': fields.many2one('ir.model', 'Object Name'),
|
||||
'probability': fields.float('Probability (%)', required=True),
|
||||
'probability': fields.float('Probability (%)', required=True, help="This percentage depicts the default/average probability of the Case for this stage to be a success"),
|
||||
'on_change': fields.boolean('Change Probability Automatically', \
|
||||
help="Change Probability on next and previous stages."),
|
||||
'requirements': fields.text('Requirements')
|
||||
|
||||
@@ -33,15 +33,15 @@ class crm_installer(osv.osv_memory):
|
||||
|
||||
_columns = {
|
||||
'name': fields.char('Name', size=64),
|
||||
'crm_helpdesk': fields.boolean('Helpdesk', help="Manages an Helpdesk service."),
|
||||
'crm_helpdesk': fields.boolean('Helpdesk', help="Manages a Helpdesk service."),
|
||||
'crm_fundraising': fields.boolean('Fundraising', help="This may help associations in their fundraising process and tracking."),
|
||||
'crm_claim': fields.boolean('Claims', help="Manages the suppliers and customers claims, including your corrective or preventive actions."),
|
||||
'crm_caldav': fields.boolean('Calendar Synchronizing', help="Helps you to synchronize the meetings with other calendar clients and mobiles."),
|
||||
'sale_crm': fields.boolean('Opportunity to Quotation', help="This module relates sale from opportunity cases in the CRM."),
|
||||
'fetchmail': fields.boolean('Fetch Emails', help="Fetchmail Server."),
|
||||
'thunderbird': fields.boolean('Thunderbird', help="Allows you to link your e-mail to OpenERP's documents. You can attach it to any existing one in OpenERP or create a new one"),
|
||||
'outlook': fields.boolean('MS-Outlook', help="Allows you to link your e-mail to OpenERP's documents. You can attach it to any existing one in OpenERP or create a new one"),
|
||||
'wiki_sale_faq': fields.boolean('Sale FAQ', help="Sale FAQ."),
|
||||
'fetchmail': fields.boolean('Fetch Emails', help="Allows you to receive E-Mails from POP/IMAP server."),
|
||||
'thunderbird': fields.boolean('Thunderbird', help="Allows you to link your e-mail to OpenERP's documents. You can attach it to any existing one in OpenERP or create a new one."),
|
||||
'outlook': fields.boolean('MS-Outlook', help="Allows you to link your e-mail to OpenERP's documents. You can attach it to any existing one in OpenERP or create a new one."),
|
||||
'wiki_sale_faq': fields.boolean('Sale FAQ', help="Helps you manage wiki pages for Frequently Asked Questions on Sales Application."),
|
||||
}
|
||||
|
||||
def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False):
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
</separator>
|
||||
<xpath expr="//label[@string='description']"
|
||||
position="attributes">
|
||||
<attribute name="string">Enhance your CRM basic Application with additional Addons.</attribute>
|
||||
<attribute name="string">Enhance your core CRM Application with additional functionalities.</attribute>
|
||||
</xpath>
|
||||
<xpath expr='//separator[@string="vsep"]' position='attributes'>
|
||||
<attribute name='rowspan'>13</attribute>
|
||||
|
||||
@@ -125,6 +125,7 @@ class crm_lead(crm_case, osv.osv):
|
||||
domain="['|',('section_id','=',section_id),('section_id','=',False)]"),
|
||||
'channel_id': fields.many2one('res.partner.canal', 'Channel'),
|
||||
|
||||
'contact_name': fields.char('Contact Name', size=64),
|
||||
'partner_name': fields.char("Partner Name", size=64),
|
||||
'optin': fields.boolean('Opt-In'),
|
||||
'optout': fields.boolean('Opt-Out'),
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
<field name="arch" type="xml">
|
||||
<form string="Leads Form">
|
||||
<group colspan="4" col="7">
|
||||
<field name="name" required="1" string="Name"/>
|
||||
<field name="name" required="1" string="Subject"/>
|
||||
<field name="priority"/>
|
||||
<field name="categ_id"
|
||||
widget="selection"
|
||||
@@ -83,9 +83,12 @@
|
||||
</group>
|
||||
<notebook colspan="4">
|
||||
<page string="Lead">
|
||||
<group colspan="4" col="2">
|
||||
<field name="partner_name" string="Partner Name" />
|
||||
</group>
|
||||
<group colspan="2" col="4">
|
||||
<separator string="Contact" colspan="4" col="4"/>
|
||||
<field name="partner_name" colspan="4"/>
|
||||
<field name="contact_name" colspan="4"/>
|
||||
<newline/>
|
||||
<field domain="[('domain', '=', 'contact')]" name="title"/>
|
||||
<field name="function" />
|
||||
@@ -211,7 +214,7 @@
|
||||
</notebook>
|
||||
</form>
|
||||
</field>
|
||||
<button string="Add New Note"
|
||||
<button string="Add Internal Note"
|
||||
name="%(crm.action_crm_add_note)d"
|
||||
context="{'model': 'crm.lead' }"
|
||||
icon="terp-document-new" type="action" />
|
||||
@@ -235,8 +238,8 @@
|
||||
<tree string="Leads" colors="blue:state=='pending';grey:state in ('cancel', 'done')">
|
||||
<field name="date_deadline" invisible="1"/>
|
||||
<field name="create_date"/>
|
||||
<field name="name"/>
|
||||
<field name="partner_name"/>
|
||||
<field name="name" string="Subject"/>
|
||||
<field name="contact_name"/>
|
||||
<field name="country_id" invisible="context.get('invisible_country', True)" />
|
||||
<field name="email_from"/>
|
||||
<field name="phone"/>
|
||||
@@ -299,7 +302,7 @@
|
||||
<search string="Search Leads">
|
||||
<filter icon="terp-check"
|
||||
string="Current"
|
||||
default="1" name="current"
|
||||
default="1" name="current" help="Draft and Open Leads"
|
||||
domain="[('state','in',('draft','open'))]"/>
|
||||
<filter icon="terp-camera_test"
|
||||
string="Open"
|
||||
@@ -317,7 +320,7 @@
|
||||
domain="[('create_date','<', time.strftime('%%Y-%%m-%%d 23:59:59')),('create_date','>=',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d 00:00:00'))]"
|
||||
/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="name"/>
|
||||
<field name="name" string="Subject"/>
|
||||
<field name="partner_name"/>
|
||||
<field name="email_from"/>
|
||||
<field name="user_id">
|
||||
@@ -337,6 +340,7 @@
|
||||
help="Show Sales Team"/>
|
||||
</field>
|
||||
<newline/>
|
||||
|
||||
<group expand="0" string="Extended Filters..." groups="base.group_extended">
|
||||
<field name="stage_id" widget="selection" domain="[('object_id.model', '=', 'crm.lead')]"/>
|
||||
<field name="categ_id" widget="selection" domain="[('object_id.model', '=', 'crm.lead')]"/>
|
||||
@@ -365,7 +369,7 @@
|
||||
<filter string="Salesman" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
|
||||
<filter string="Referrer" icon="terp-personal" domain="[]" context="{'group_by':'referred'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Creation" icon="terp-go-month"
|
||||
<filter string="Creation Month" icon="terp-go-month"
|
||||
domain="[]" context="{'group_by':'create_date'}" />
|
||||
</group>
|
||||
</search>
|
||||
|
||||
@@ -317,32 +317,31 @@
|
||||
</field>
|
||||
<field name="user_id" select="1"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Group By...">
|
||||
<filter string="Date" icon="terp-go-month"
|
||||
domain="[]" context="{'group_by':'date'}" />
|
||||
<filter string="Privacy" icon="terp-locked"
|
||||
domain="[]" context="{'group_by':'class'}" />
|
||||
<filter string="Show time as" icon="terp-project"
|
||||
domain="[]" context="{'group_by':'show_as'}" />
|
||||
<separator orientation="vertical" />
|
||||
<filter string="Responsible" icon="terp-personal" domain="[]"
|
||||
context="{'group_by':'user_id'}" />
|
||||
<filter string="Partner" icon="terp-personal" domain="[]"
|
||||
context="{'group_by':'partner_id'}" />
|
||||
<separator orientation="vertical" />
|
||||
<filter string="Meeting Type" help="Meeting Type"
|
||||
icon="terp-stock_symbol-selection" domain="[]"
|
||||
context="{'group_by':'categ_id'}" />
|
||||
<filter string="State" icon="terp-stock_effects-object-colorize" domain="[]"
|
||||
context="{'group_by':'state'}" />
|
||||
<separator orientation="vertical" />
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Extended Options...">
|
||||
<field name="class" select="1" string="Privacy"/>
|
||||
<field name="show_as" string="Show time as" select="1"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Group By...">
|
||||
<filter string="Responsible" icon="terp-personal" domain="[]"
|
||||
context="{'group_by':'user_id'}" />
|
||||
<filter string="Partner" icon="terp-partner" domain="[]"
|
||||
context="{'group_by':'partner_id'}" />
|
||||
<separator orientation="vertical" />
|
||||
<filter string="Type" help="Meeting Type"
|
||||
icon="terp-stock_symbol-selection" domain="[]"
|
||||
context="{'group_by':'categ_id'}" />
|
||||
<filter string="Privacy" icon="terp-locked"
|
||||
domain="[]" context="{'group_by':'class'}" />
|
||||
<filter string="Show time as" icon="terp-project"
|
||||
domain="[]" context="{'group_by':'show_as'}" />
|
||||
<filter string="State" icon="terp-stock_effects-object-colorize" domain="[]"
|
||||
context="{'group_by':'state'}" />
|
||||
<separator orientation="vertical" />
|
||||
<filter string="Date" icon="terp-go-month" help="Meeting date"
|
||||
domain="[]" context="{'group_by':'date'}" />
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -133,7 +133,7 @@
|
||||
<field colspan="4" name="email_cc" string="Global CC" widget="char" size="512"/>
|
||||
</group>
|
||||
<field name="message_ids" colspan="4" nolabel="1" mode="tree,form">
|
||||
<tree string="Communication history">
|
||||
<tree string="History">
|
||||
<field name="display_text" string="History Information"/>
|
||||
<field name="history" invisible="1"/>
|
||||
<button
|
||||
@@ -142,7 +142,7 @@
|
||||
context="{'mail':'reply', 'model': 'crm.lead', 'include_original' : True}"
|
||||
icon="terp-mail-replied" type="action" />
|
||||
</tree>
|
||||
<form string="Communication history">
|
||||
<form string="History">
|
||||
<group col="4" colspan="4">
|
||||
<field name="email_from"/>
|
||||
<field name="date"/>
|
||||
@@ -171,7 +171,7 @@
|
||||
</notebook>
|
||||
</form>
|
||||
</field>
|
||||
<button string="Add New Note"
|
||||
<button string="Add Internal Note"
|
||||
name="%(crm.action_crm_add_note)d"
|
||||
context="{'model': 'crm.lead' }"
|
||||
icon="terp-document-new" type="action" />
|
||||
@@ -272,7 +272,7 @@
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search Opportunities">
|
||||
<filter icon="terp-check"
|
||||
string="Current" help="Current Opportunities"
|
||||
string="Current" help="Draft and Open Opportunities"
|
||||
name="current"
|
||||
domain="[('state','in',('draft','open'))]"/>
|
||||
<filter icon="terp-camera_test"
|
||||
@@ -326,9 +326,12 @@
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Group By..." colspan="16">
|
||||
<filter string="Salesman" icon="terp-personal"
|
||||
domain="[]" context="{'group_by':'user_id'}" />
|
||||
<filter string="Team" help="Sales Team" icon="terp-personal+" domain="[]" context="{'group_by':'section_id'}"/>
|
||||
<separator orientation="vertical" />
|
||||
<filter string="Stage" icon="terp-stage" domain="[]"
|
||||
context="{'group_by':'stage_id'}" />
|
||||
<filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
|
||||
<filter string="Priority" icon="terp-rating-rated" domain="[]"
|
||||
context="{'group_by':'priority'}" />
|
||||
<filter string="Category" icon="terp-stock_symbol-selection"
|
||||
@@ -337,10 +340,7 @@
|
||||
domain="[]" context="{'group_by':'type_id'}" />
|
||||
<filter string="Channel" icon="terp-stock_symbol-selection"
|
||||
domain="[]" context="{'group_by':'channel_id'}" />
|
||||
<separator orientation="vertical" />
|
||||
<filter string="Salesman" icon="terp-personal"
|
||||
domain="[]" context="{'group_by':'user_id'}" />
|
||||
<filter string="Team" help="Sales Team" icon="terp-personal+" domain="[]" context="{'group_by':'section_id'}"/>
|
||||
<filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
|
||||
<separator orientation="vertical" />
|
||||
<filter string="Creation" icon="terp-go-month"
|
||||
domain="[]" context="{'group_by':'create_date'}" />
|
||||
|
||||
@@ -13,7 +13,8 @@
|
||||
groups="base.group_extended"
|
||||
/>
|
||||
|
||||
<act_window
|
||||
<!-- TO CONFIRM: This is fine -->
|
||||
<!-- act_window
|
||||
id="act_crm_phonecall_crm_meeting_new"
|
||||
name="Meetings"
|
||||
res_model="crm.meeting"
|
||||
@@ -21,7 +22,7 @@
|
||||
view_mode="tree,form,calendar,"
|
||||
context="{'default_duration': 4.0, 'default_phonecall_id': active_id}"
|
||||
domain="[('phonecall_id', '=', active_id)]"
|
||||
view_type="form"/>
|
||||
view_type="form"/-->
|
||||
|
||||
<!-- PHONE CALLS (menu) -->
|
||||
|
||||
|
||||
@@ -16,19 +16,6 @@
|
||||
<menuitem action="crm_phonecall_categ_action" name="Categories"
|
||||
id="menu_crm_case_phonecall-act" parent="menu_crm_config_phonecall" />
|
||||
|
||||
<!-- ResourceType Form View -->
|
||||
|
||||
<record id="crm_phonecall_resource_act" model="ir.actions.act_window">
|
||||
<field name="name">Phonecall Campaigns</field>
|
||||
<field name="res_model">crm.case.resource.type</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_id" ref="crm.crm_case_resource_type_tree"/>
|
||||
</record>
|
||||
|
||||
<menuitem action="crm_phonecall_resource_act"
|
||||
id="menu_crm_phonecall_resource_act" name="Campaigns"
|
||||
parent="menu_crm_config_phonecall" />
|
||||
|
||||
<!-- PhoneCalls Tree View -->
|
||||
|
||||
<record model="ir.ui.view" id="crm_case_phone_tree_view">
|
||||
@@ -47,9 +34,10 @@
|
||||
<button string="Opportunity"
|
||||
name="%(phonecall2opportunity_act)d"
|
||||
states="draft,open,pending"
|
||||
icon="gtk-index"
|
||||
type="action" attrs="{'invisible':[('opportunity_id','!=',False)]}" />
|
||||
<button string="Meeting"
|
||||
states="draft,open,pending"
|
||||
states="draft,open,pending" icon="gtk-redo"
|
||||
name="action_make_meeting" type="object" />
|
||||
<field name="state"/>
|
||||
<button name="case_open" string="Open" states="draft,pending" type="object" icon="gtk-go-forward"/>
|
||||
@@ -94,7 +82,7 @@
|
||||
<field name="partner_id"
|
||||
on_change="onchange_partner_id(partner_id, email_from)" />
|
||||
<button string="Create a Partner"
|
||||
icon="terp-crm"
|
||||
icon="gtk-index"
|
||||
name="%(action_crm_phonecall2partner)d"
|
||||
type="action"
|
||||
attrs="{'invisible':[('partner_id','!=',False)]}" />
|
||||
@@ -121,7 +109,7 @@
|
||||
states="draft,pending" type="object"
|
||||
icon="gtk-go-forward" />
|
||||
<button name="case_pending" string="Not Held"
|
||||
states="open" type="object" icon="gtk-undo" />
|
||||
states="open" type="object" icon="gtk-media-pause" />
|
||||
<button name="case_close" string="Held"
|
||||
states="open,draft,pending" type="object"
|
||||
icon="gtk-jump-to" />
|
||||
@@ -172,7 +160,7 @@
|
||||
<field name="partner_id"
|
||||
on_change="onchange_partner_id(partner_id, email_from)" />
|
||||
<button string="Create a Partner"
|
||||
icon="terp-crm"
|
||||
icon="gtk-index"
|
||||
name="%(action_crm_phonecall2partner)d"
|
||||
type="action"
|
||||
attrs="{'invisible':[('partner_id','!=',False)]}" />
|
||||
@@ -219,10 +207,14 @@
|
||||
string="Type" />
|
||||
<field name="state" invisible="1"/>
|
||||
<field name="create_date" invisible="1"/>
|
||||
<button string="Schedule Other Call"
|
||||
icon="terp-call-start"
|
||||
name="%(phonecall_to_phonecall_act)d"
|
||||
type="action" />
|
||||
<button string="Opportunity"
|
||||
name="%(phonecall2opportunity_act)d"
|
||||
states="draft,open,pending"
|
||||
icon="gtk-convert"
|
||||
icon="gtk-index"
|
||||
type="action" attrs="{'invisible':[('opportunity_id','!=',False)]}" />
|
||||
<button string="Meeting"
|
||||
states="draft,open,pending" icon="gtk-redo"
|
||||
@@ -254,10 +246,9 @@
|
||||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search Phonecalls">
|
||||
<filter icon="terp-go-today" string="Current"
|
||||
<filter icon="terp-check" string="Current"
|
||||
name="current"
|
||||
domain="[('state','in', ('draft','open','pending'))]"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter icon="terp-go-today" string="Today"
|
||||
domain="[('date','<', time.strftime('%%Y-%%m-%%d 23:59:59')),\
|
||||
('date','>=',datetime.strftime('%%Y-%%m-%%d 00:00:00'))]"
|
||||
@@ -286,15 +277,15 @@
|
||||
</field>
|
||||
<newline/>
|
||||
<group expand="0" string="Group By..." colspan="4">
|
||||
<filter string="Partner" icon="terp-personal" domain="[]"
|
||||
<filter string="Partner" icon="terp-partner" domain="[]"
|
||||
context="{'group_by':'partner_id'}" />
|
||||
<filter string="Responsible" icon="terp-personal"
|
||||
domain="[]" context="{'group_by':'user_id'}" />
|
||||
<separator orientation="vertical" />
|
||||
<filter string="Creation" icon="terp-go-month"
|
||||
<filter string="Creation" icon="terp-go-month" help="Creation Date"
|
||||
domain="[]" context="{'group_by':'create_date'}" />
|
||||
<filter string="Date" icon="terp-go-month" domain="[]"
|
||||
context="{'group_by':'date'}" />
|
||||
context="{'group_by':'date'}" help="Date of Call" />
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
|
||||
@@ -113,7 +113,7 @@
|
||||
<form string="Stage">
|
||||
<separator string="Stage Definition" colspan="4"/>
|
||||
<field name="name" select="1"/>
|
||||
<field name="section_id" select="1" widget="selection"/>
|
||||
<field name="section_id" select="1"/>
|
||||
<field name="object_id" invisible="1" />
|
||||
<field name="sequence"/>
|
||||
<field name="probability"/>
|
||||
@@ -142,7 +142,7 @@
|
||||
<field name="arch" type="xml">
|
||||
<form string="Case Category">
|
||||
<field name="name" select="1"/>
|
||||
<field name="section_id" select="1" widget="selection"/>
|
||||
<field name="section_id" select="1"/>
|
||||
<field name="object_id" invisible="1" />
|
||||
</form>
|
||||
</field>
|
||||
@@ -199,6 +199,10 @@
|
||||
<field name="view_id" ref="crm_case_resource_type_tree"/>
|
||||
</record>
|
||||
|
||||
<menuitem action="crm_case_resource_type_act"
|
||||
id="menu_crm_case_resource_type_act" sequence="4"
|
||||
parent="base.menu_sale_config_sales" />
|
||||
|
||||
<record id="crm_case_section_act_tree" model="ir.actions.act_window">
|
||||
<field name="name">Cases by Sales Team</field>
|
||||
<field name="res_model">crm.case.section</field>
|
||||
@@ -528,7 +532,7 @@
|
||||
<field colspan="4" name="email_cc" widget="char" size="512"/>
|
||||
</group>
|
||||
<field name="message_ids" colspan="4" nolabel="1" mode="tree,form">
|
||||
<tree string="Communication history">
|
||||
<tree string="History">
|
||||
<field name="display_text" string="History Information"/>
|
||||
<field name="history" invisible="1"/>
|
||||
<button
|
||||
@@ -537,7 +541,7 @@
|
||||
context="{'mail':'reply', 'model': 'crm.case.custom', 'include_original' : True}"
|
||||
icon="terp-mail-replied" type="action" />
|
||||
</tree>
|
||||
<form string="Communication history">
|
||||
<form string="History">
|
||||
<group col="4" colspan="4">
|
||||
<field name="email_from"/>
|
||||
<field name="date"/>
|
||||
@@ -566,7 +570,7 @@
|
||||
</notebook>
|
||||
</form>
|
||||
</field>
|
||||
<button string="Add New Note"
|
||||
<button string="Add Internal Note"
|
||||
name="%(crm.action_crm_add_note)d"
|
||||
context="{'model': 'crm.lead' }"
|
||||
icon="terp-document-new" type="action" />
|
||||
|
||||
@@ -156,7 +156,7 @@ class crm_lead_report(osv.osv):
|
||||
(SELECT count(id) FROM mailgate_message WHERE model='crm.lead' AND res_id=c.id AND history=True) AS email,
|
||||
date_trunc('day',c.create_date) as create_date,
|
||||
extract('epoch' from (c.date_closed-c.create_date))/(3600*24) as delay_close,
|
||||
extract('epoch' from (c.date_deadline - c.date_closed))/(3600*24) as delay_expected,
|
||||
abs(extract('epoch' from (c.date_deadline - c.date_closed))/(3600*24)) as delay_expected,
|
||||
extract('epoch' from (c.date_open-c.create_date))/(3600*24) as delay_open
|
||||
FROM
|
||||
crm_lead c
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<field name="model">crm.lead.report</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree colors="blue:state in ('draft');black:state in ('open','pending','done');gray:state in ('cancel') " string="Leads Analysis">
|
||||
<tree string="Leads Analysis">
|
||||
<field name="name" invisible="1"/>
|
||||
<field name="state" invisible="1"/>
|
||||
<field name="stage_id" invisible="1"/>
|
||||
@@ -23,12 +23,12 @@
|
||||
<field name="user_id" invisible="1"/>
|
||||
<field name="company_id" invisible="1"/>
|
||||
<field name="partner_id" invisible="1"/>
|
||||
<field name="country_id" invisible="1"/>
|
||||
<field name="day" invisible="1"/>
|
||||
<field name="nbr" sum="# Leads"/>
|
||||
<field name="email" sum="# Mails"/>
|
||||
<field name="delay_open"/>
|
||||
<field name="delay_close"/>
|
||||
<field name="delay_expected"/>
|
||||
<field name="avg_answers"/>
|
||||
</tree>
|
||||
</field>
|
||||
@@ -71,41 +71,40 @@
|
||||
<field name="arch" type="xml">
|
||||
<search string="Leads Analysis">
|
||||
<group col="20" colspan="8">
|
||||
<filter string="Leads"
|
||||
icon="terp-check"
|
||||
name="filter_lead"
|
||||
groups="base.group_extended"
|
||||
domain="[('type','=','lead')]"/>
|
||||
<filter string="Opportunities"
|
||||
icon="terp-check"
|
||||
name="filter_opportunity"
|
||||
domain="[('type','=','opportunity')]"/>
|
||||
<separator orientation="vertical" />
|
||||
<filter string="30 Days" icon="terp-go-month" name="this_month"
|
||||
domain="[('create_date','>',(datetime.date.today()-datetime.timedelta(days=30)).strftime('%%Y-%%m-%%d'))]"/>
|
||||
<filter icon="terp-go-week" string="7 Days" separator="1"
|
||||
domain="[('create_date','>',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"/>
|
||||
<filter string=" Year " icon="terp-go-year"
|
||||
domain="[('create_date','<=', time.strftime('%%Y-%%m-%%d')),('create_date','>=',time.strftime('%%Y-01-01'))]"
|
||||
help="Leads/Opportunities created in current year"/>
|
||||
<filter string=" Month " icon="terp-go-month" name="this_month"
|
||||
domain="[('create_date','<=', time.strftime('%%Y-%%m-%%d')),('create_date','>=',time.strftime('%%Y-%%m-01'))]"
|
||||
help="Leads/Opportunities created in current month"/>
|
||||
<filter icon="terp-go-month" string=" Month-1 " separator="1"
|
||||
domain="[('create_date','<=', (datetime.date (int(time.strftime('%%Y')), datetime.date.today().month, 1) - datetime.timedelta (days = 1)).strftime('%%Y-%%m-%%d')),('create_date','>',(datetime.date (int(time.strftime('%%Y')), datetime.date.today().month-1, 1)).strftime('%%Y-%%m-%%d'))]"
|
||||
help="Leads/Opportunities created in last month"/>
|
||||
|
||||
<separator orientation="vertical" />
|
||||
<filter icon="terp-check"
|
||||
string="Current"
|
||||
domain="[('state','in',('draft','open'))]"/>
|
||||
<filter icon="terp-check"
|
||||
string="Active"
|
||||
domain="[('state','in',('draft','open'))]"
|
||||
help="Leads/Opportunities which are in draft and open state"/>
|
||||
<filter icon="gtk-media-pause"
|
||||
string="Pending"
|
||||
domain="[('state','=','pending')]"/>
|
||||
<filter icon="terp-check"
|
||||
domain="[('state','=','pending')]"
|
||||
help="Leads/Opportunities which are in pending state"/>
|
||||
<filter icon="terp-dialog-close"
|
||||
string="Closed"
|
||||
domain="[('state','=','done')]"/>
|
||||
domain="[('state','=','done')]"
|
||||
help="Leads/Opportunities which are in done state"/>
|
||||
|
||||
<separator orientation="vertical" />
|
||||
<field name="section_id"
|
||||
default="context.get('section_id', False)"
|
||||
widget="selection"
|
||||
context="{'invisible_section': False}">
|
||||
<filter icon="terp-crm"
|
||||
context="{'invisible_section': False}"
|
||||
domain="[('section_id.user_id','=',uid)]"
|
||||
help="My section" />
|
||||
help="My team" />
|
||||
</field>
|
||||
<field name="user_id">
|
||||
<field name="user_id" string="Salesman">
|
||||
<filter icon="terp-personal+" string="My Case" help="My Case" domain="[('user_id','=',uid)]" />
|
||||
</field>
|
||||
</group>
|
||||
@@ -128,12 +127,15 @@
|
||||
<group expand="1" string="Group By...">
|
||||
<filter string="User" name="user" icon="terp-personal"
|
||||
domain="[]" context="{'group_by':'user_id'}" />
|
||||
<filter string="Sales Team" icon="terp-personal+"
|
||||
domain="[]"
|
||||
context="{'group_by':'section_id'}" />
|
||||
<filter string="Partner" icon="terp-personal" context="{'group_by':'partner_id'}" />
|
||||
<filter string="Country" icon="terp-go-home" context="{'group_by':'country_id'}" />
|
||||
<separator orientation="vertical" />
|
||||
<filter string="Section" icon="terp-personal+"
|
||||
domain="[]"
|
||||
context="{'group_by':'section_id'}" />
|
||||
<separator orientation="vertical" />
|
||||
<filter string="Stage" icon="terp-stage" domain="[]" context="{'group_by':'stage_id'}"/>
|
||||
<filter string="Priority" icon="terp-rating-rated" domain="[]" context="{'group_by':'priority'}" />
|
||||
<filter string="Category" icon="terp-stock_symbol-selection"
|
||||
domain="[]" context="{'group_by':'categ_id'}" />
|
||||
<filter string="Campaign" icon="terp-stock_symbol-selection"
|
||||
@@ -141,10 +143,6 @@
|
||||
<filter string="Channel" icon="terp-stock_symbol-selection"
|
||||
domain="[]" context="{'group_by':'channel_id'}" />
|
||||
<separator orientation="vertical" />
|
||||
<filter string="Stage" icon="terp-stage" domain="[]" context="{'group_by':'stage_id'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Priority" icon="terp-rating-rated" domain="[]" context="{'group_by':'priority'}" />
|
||||
<separator orientation="vertical" />
|
||||
<filter string="State" icon="terp-stock_effects-object-colorize"
|
||||
domain="[]" context="{'group_by':'state'}" />
|
||||
<separator orientation="vertical" />
|
||||
@@ -153,11 +151,11 @@
|
||||
context="{'group_by':'company_id'}" />
|
||||
<separator orientation="vertical" />
|
||||
<filter string="Day" icon="terp-go-today"
|
||||
domain="[]" context="{'group_by':'day'}"/>
|
||||
domain="[]" context="{'group_by':'day'}" help="Day on which lead/opportunity is created"/>
|
||||
<filter string="Month" icon="terp-go-month"
|
||||
domain="[]" context="{'group_by':'month'}" />
|
||||
domain="[]" context="{'group_by':'month'}" help="Month in which lead/opportunity is created"/>
|
||||
<filter string="Year" icon="terp-go-year"
|
||||
domain="[]" context="{'group_by':'name'}" />
|
||||
domain="[]" context="{'group_by':'name'}" help="Year in which lead/opportunity is created"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
|
||||
@@ -119,9 +119,9 @@ class crm_phonecall_report(osv.osv):
|
||||
create or replace view crm_phonecall_report as (
|
||||
select
|
||||
id,
|
||||
to_char(c.create_date, 'YYYY') as name,
|
||||
to_char(c.create_date, 'MM') as month,
|
||||
to_char(c.create_date, 'YYYY-MM-DD') as day,
|
||||
to_char(c.date, 'YYYY') as name,
|
||||
to_char(c.date, 'MM') as month,
|
||||
to_char(c.date, 'YYYY-MM-DD') as day,
|
||||
to_char(c.create_date, 'YYYY-MM-DD') as creation_date,
|
||||
to_char(c.date_open, 'YYYY-MM-DD') as opening_date,
|
||||
to_char(c.date_closed, 'YYYY-mm-dd') as date_closed,
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<field name="model">crm.phonecall.report</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree colors="blue:state in ('draft');black:state in ('open','pending','done');gray:state in ('cancel') " string="Phone calls">
|
||||
<tree string="Phone calls">
|
||||
<field name="name" invisible="1"/>
|
||||
<field name="month" invisible="1"/>
|
||||
<field name="section_id" invisible="1"/>
|
||||
@@ -75,37 +75,41 @@
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search">
|
||||
<group col="16" colspan="8">
|
||||
<filter string="This Year" icon="terp-go-year"
|
||||
domain="[('create_date','<=', time.strftime('%%Y-%%m-%%d')), ('create_date','>',(datetime.date.today()-datetime.timedelta(days=365)).strftime('%%Y-%%m-%%d'))]"/>
|
||||
<filter string=" Year " icon="terp-go-year"
|
||||
domain="[('create_date','<=', time.strftime('%%Y-%%m-%%d')),('create_date','>=',time.strftime('%%Y-01-01'))]"
|
||||
help="Phone calls made in current year"/>
|
||||
|
||||
<filter string="This Month" icon="terp-go-month" name="This Month"
|
||||
domain="[('create_date','<=', time.strftime('%%Y-%%m-%%d')), ('create_date','>',(datetime.date.today()-datetime.timedelta(days=30)).strftime('%%Y-%%m-%%d'))]"/>
|
||||
<filter string=" Month " icon="terp-go-month" name="This Month"
|
||||
domain="[('create_date','<=', time.strftime('%%Y-%%m-%%d')),('create_date','>=',time.strftime('%%Y-%%m-01'))]"
|
||||
help="Phone calls made in current month"/>
|
||||
|
||||
<filter icon="terp-go-week" string="7 Days" separator="1"
|
||||
domain="[('create_date','<=', time.strftime('%%Y-%%m-%%d')), ('create_date','>',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"/>
|
||||
<filter icon="terp-go-month" string=" Month-1 " separator="1"
|
||||
domain="[('create_date','<=', (datetime.date (int(time.strftime('%%Y')), datetime.date.today().month, 1) - datetime.timedelta (days = 1)).strftime('%%Y-%%m-%%d')),('create_date','>',(datetime.date (int(time.strftime('%%Y')), datetime.date.today().month-1, 1)).strftime('%%Y-%%m-%%d'))]"
|
||||
help="Phone calls made in last month"/>
|
||||
|
||||
<separator orientation="vertical" />
|
||||
<filter icon="terp-check"
|
||||
string="Current"
|
||||
domain="[('state','in',('draft','oprn'))]"/>
|
||||
<filter icon="terp-hr"
|
||||
string="Pending"
|
||||
domain="[('state','=','pending')]"/>
|
||||
<filter icon="terp-sale"
|
||||
string="Done"
|
||||
domain="[('state','=','done')]"/>
|
||||
|
||||
<separator orientation="vertical" />
|
||||
<filter string="Stage" icon="terp-crm" domain="[]"
|
||||
context="{'group_by':'stage_id'}" />
|
||||
|
||||
|
||||
<filter icon="terp-personal+"
|
||||
context="{'invisible_section': False}"
|
||||
domain="[('section_id.user_id','=',uid)]"
|
||||
help="My section" />
|
||||
|
||||
<field name="user_id" select="1">
|
||||
string="Todo"
|
||||
domain="[('state','in',('draft','open'))]"
|
||||
help="Phone calls which are in draft and open state"/>
|
||||
<filter icon="gtk-media-pause"
|
||||
string="Not Held"
|
||||
domain="[('state','=','pending')]"
|
||||
help="Phone calls which are in pending state"/>
|
||||
<filter icon="terp-camera_test"
|
||||
string="Held"
|
||||
domain="[('state','=','done')]"
|
||||
help="Phone calls which are in closed state"/>
|
||||
<separator orientation="vertical" />
|
||||
<field name="section_id" string="Sales Team"
|
||||
default="context.get('section_id', False)"
|
||||
context="{'invisible_section': False}">
|
||||
<filter icon="terp-personal+"
|
||||
context="{'invisible_section': False}"
|
||||
domain="[('section_id.user_id','=',uid)]"
|
||||
help="My team" />
|
||||
</field>
|
||||
<field name="user_id" string="Salesman" select="1">
|
||||
<filter icon="terp-crm" string="My Case" help="My Case" domain="[('user_id','=',uid)]" />
|
||||
</field>
|
||||
</group>
|
||||
@@ -128,29 +132,28 @@
|
||||
domain="[]" context="{'group_by':'user_id'}" />
|
||||
<filter string="Partner" icon="terp-personal" context="{'group_by':'partner_id'}" />
|
||||
<separator orientation="vertical" />
|
||||
<filter string="Section" icon="terp-sale"
|
||||
<filter string="Sales Team" icon="terp-personal+"
|
||||
domain="[]"
|
||||
context="{'group_by':'section_id'}" />
|
||||
<filter string="Category" icon="terp-stock_symbol-selection"
|
||||
domain="[]" context="{'group_by':'categ_id'}" />
|
||||
|
||||
<separator orientation="vertical" />
|
||||
<filter string="Stage" icon="terp-stage" domain="[]" context="{'group_by':'stage_id'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Priority" icon="terp-rating-rated" domain="[]" context="{'group_by':'priority'}" />
|
||||
<filter string="Type" icon="terp-stock_symbol-selection"
|
||||
domain="[]" context="{'group_by':'categ_id'}" />
|
||||
<separator orientation="vertical" />
|
||||
<filter string="State" icon="terp-stock_effects-object-colorize"
|
||||
domain="[]" context="{'group_by':'state'}" />
|
||||
<separator orientation="vertical" />
|
||||
<filter string="Company" icon="terp-go-home"
|
||||
domain="[]"
|
||||
context="{'group_by':'company_id'}" />
|
||||
context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
|
||||
<separator orientation="vertical" />
|
||||
<filter string="Day" icon="terp-go-today"
|
||||
domain="[]" context="{'group_by':'day'}"/>
|
||||
domain="[]" context="{'group_by':'day'}" help="Date of call"/>
|
||||
<filter string="Month" icon="terp-go-month"
|
||||
domain="[]" context="{'group_by':'month'}" />
|
||||
domain="[]" context="{'group_by':'month'}" help="Month of call"/>
|
||||
<filter string="Year" icon="terp-go-year"
|
||||
domain="[]" context="{'group_by':'name'}" />
|
||||
domain="[]" context="{'group_by':'name'}" help="Year of call"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
@@ -159,7 +162,7 @@
|
||||
<!-- Phone calls by user and section Action -->
|
||||
|
||||
<record id="action_report_crm_phonecall" model="ir.actions.act_window">
|
||||
<field name="name">Phone Calls</field>
|
||||
<field name="name">Phone Calls Analysis</field>
|
||||
<field name="res_model">crm.phonecall.report</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,graph</field>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
"access_crm_phonecall_system","crm.phonecall.system","model_crm_phonecall","base.group_system",1,0,0,0
|
||||
"access_crm_phonecall_manager","crm.phonecall.manager","model_crm_phonecall","base.group_sale_manager",1,0,0,0
|
||||
"access_crm_case_categ","crm.case.categ","model_crm_case_categ","base.group_user",1,0,0,0
|
||||
"access_crm_meeting","crm.meeting","model_crm_meeting","base.group_sale_salesman",1,1,1,0
|
||||
"access_crm_meeting","crm.meeting","model_crm_meeting","base.group_sale_salesman",1,0,0,0
|
||||
"access_crm_meeting_all","crm.meeting_allll","model_crm_meeting","base.group_user",1,0,0,0
|
||||
"access_crm_lead","crm.lead","model_crm_lead","base.group_sale_salesman",1,1,1,1
|
||||
"access_crm_lead.all","crm.lead.all","model_crm_lead","base.group_user",1,0,0,0
|
||||
|
||||
|
@@ -9,7 +9,7 @@ AVAILABLE_STATES = crm.AVAILABLE_STATES + [('unchanged', 'Unchanged')]
|
||||
class crm_add_note(osv.osv_memory):
|
||||
"""Adds a new note to the case."""
|
||||
_name = 'crm.add.note'
|
||||
_description = "Add New Note"
|
||||
_description = "Add Internal Note"
|
||||
|
||||
_columns = {
|
||||
'body': fields.text('Note Body', required=True),
|
||||
|
||||
@@ -105,8 +105,8 @@ class crm_lead2opportunity(osv.osv_memory):
|
||||
return value
|
||||
|
||||
_columns = {
|
||||
'name' : fields.char('Opportunity Summary', size=64, required=True, select=1),
|
||||
'probability': fields.float('Success Probability'),
|
||||
'name' : fields.char('Opportunity', size=64, required=True, select=1),
|
||||
'probability': fields.float('Success Rate (%)'),
|
||||
'planned_revenue': fields.float('Expected Revenue'),
|
||||
'partner_id': fields.many2one('res.partner', 'Partner'),
|
||||
}
|
||||
|
||||
@@ -143,13 +143,13 @@ class crm_lead2partner(osv.osv_memory):
|
||||
for lead in lead_obj.browse(cr, uid, rec_ids):
|
||||
if data.action == 'create':
|
||||
partner_id = partner_obj.create(cr, uid, {
|
||||
'name': lead.partner_name or lead.name,
|
||||
'name': lead.partner_name or lead.contact_name or lead.name,
|
||||
'user_id': lead.user_id.id,
|
||||
'comment': lead.description,
|
||||
})
|
||||
contact_id = contact_obj.create(cr, uid, {
|
||||
'partner_id': partner_id,
|
||||
'name': lead.name,
|
||||
'name': lead.contact_name,
|
||||
'phone': lead.phone,
|
||||
'mobile': lead.mobile,
|
||||
'email': lead.email_from,
|
||||
|
||||
@@ -34,5 +34,10 @@
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
<act_window id="action_merge_opportunities"
|
||||
key2="client_action_multi" name="Merge Opportunities"
|
||||
res_model="crm.merge.opportunity" src_model="crm.lead"
|
||||
view_mode="form" target="new" view_type="form" />
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
@@ -16,7 +16,7 @@
|
||||
<field name="date" string="Planned Date"/>
|
||||
<newline/>
|
||||
<field name="user_id" />
|
||||
<field name="section_id"/>
|
||||
<field name="section_id" widget="selection" />
|
||||
<field name="categ_id" widget="selection" domain="[('object_id.model', '=', 'crm.phonecall')]"/>
|
||||
<separator string="" colspan="4"/>
|
||||
<label string ="" colspan="2"/>
|
||||
|
||||
@@ -81,7 +81,7 @@
|
||||
<separator string=" " colspan="4"/>
|
||||
<group colspan="4" col="3" >
|
||||
<label string=" " />
|
||||
<button name="action_cancel" string="_Cancel" icon="gtk-cancel" special="cancel" />
|
||||
<button string="_Cancel" icon="gtk-cancel" special="cancel" />
|
||||
<button name="action_send" type="object" string="_Send Reply" icon="gtk-go-forward" />
|
||||
</group>
|
||||
</form>
|
||||
|
||||
@@ -46,10 +46,8 @@ class crm_claim(crm.crm_case, osv.osv):
|
||||
'ref' : fields.reference('Reference', selection=crm._links_get, size=128),
|
||||
'ref2' : fields.reference('Reference 2', selection=crm._links_get, size=128),
|
||||
'canal_id': fields.many2one('res.partner.canal', 'Channel', \
|
||||
help="The channels represent the different communication"\
|
||||
"modes available with the customer." \
|
||||
" With each commercial opportunity, you can indicate the"\
|
||||
"canall which is this opportunity source."),
|
||||
help="The channels represent the different communication \
|
||||
modes available with the customer."),
|
||||
'planned_revenue': fields.float('Planned Revenue'),
|
||||
'planned_cost': fields.float('Planned Costs'),
|
||||
'categ_id': fields.many2one('crm.case.categ', 'Category', \
|
||||
|
||||
@@ -35,21 +35,6 @@
|
||||
<menuitem action="crm_claim_stage_act" name="Stages"
|
||||
id="menu_crm_claim_stage_act" parent="menu_config_claim" />
|
||||
|
||||
<!-- Claim Resource Type -->
|
||||
|
||||
<record id="crm_claim_resource_act" model="ir.actions.act_window">
|
||||
<field name="name">Claim Resource Type</field>
|
||||
<field name="res_model">crm.case.resource.type</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_id" ref="crm.crm_case_resource_type_tree"/>
|
||||
<field name="domain">[('object_id.model', '=', 'crm.claim')]</field>
|
||||
<field name="context">{'object_id':'crm.claim'}</field>
|
||||
</record>
|
||||
|
||||
<menuitem action="crm_claim_resource_act" name="Resource Type"
|
||||
id="menu_crm_claim_type_act"
|
||||
parent="menu_config_claim" />
|
||||
|
||||
<!-- Claims -->
|
||||
|
||||
<record model="ir.ui.view" id="crm_case_claims_tree_view">
|
||||
@@ -57,7 +42,7 @@
|
||||
<field name="model">crm.claim</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Claims" colors="blue:state=='pending';black:state=='open';gray:state in ('close', 'cancel')">
|
||||
<tree string="Claims" colors="blue:state=='pending';black:state=='open';gray:state in ('close', 'cancel');red:date_deadline and (date_deadline < current_date)">
|
||||
<field name="name"/>
|
||||
<field name="partner_id"/>
|
||||
<field name="user_id" />
|
||||
@@ -168,7 +153,7 @@
|
||||
<field colspan="4" name="email_cc" string="Global CC" widget="char"/>
|
||||
</group>
|
||||
<field name="message_ids" colspan="4" nolabel="1" mode="tree,form">
|
||||
<tree string="Communication history">
|
||||
<tree string="History">
|
||||
<field name="display_text" string="History Information"/>
|
||||
<button
|
||||
string="Reply"
|
||||
@@ -176,7 +161,7 @@
|
||||
context="{'mail':'reply', 'model': 'crm.claim', 'include_original' : True}"
|
||||
icon="terp-mail-replied" type="action" attrs="{'invisible': [('history', '!=', True)]}" />
|
||||
</tree>
|
||||
<form string="Communication history">
|
||||
<form string="History">
|
||||
<group col="4" colspan="4">
|
||||
<field name="email_from"/>
|
||||
<field name="date"/>
|
||||
@@ -205,7 +190,7 @@
|
||||
</notebook>
|
||||
</form>
|
||||
</field>
|
||||
<button string="Add New Note"
|
||||
<button string="Add Internal Note"
|
||||
name="%(crm.action_crm_add_note)d"
|
||||
context="{'model': 'crm.lead' }"
|
||||
icon="terp-document-new" type="action" />
|
||||
@@ -269,7 +254,7 @@
|
||||
<search string="Search Claims">
|
||||
<filter icon="terp-check" string="Current" name="current"
|
||||
domain="[('state','in',('draft', 'open'))]"
|
||||
separator="1" help="Current Claims" default="1"
|
||||
separator="1" help="Draft and Open Claims" default="1"
|
||||
/>
|
||||
<filter icon="terp-camera_test"
|
||||
string="In Progress"
|
||||
@@ -330,6 +315,7 @@
|
||||
context="{'default_partner_id': active_id}"
|
||||
id="act_claim_partner"
|
||||
name="Report a Claim"
|
||||
view_mode="form,tree"
|
||||
res_model="crm.claim"
|
||||
src_model="res.partner"/>
|
||||
|
||||
@@ -339,6 +325,7 @@
|
||||
context="{'default_partner_address_id': active_id}"
|
||||
id="act_claim_partner_address"
|
||||
name="Report a Claim"
|
||||
view_mode="form,tree"
|
||||
res_model="crm.claim"
|
||||
src_model="res.partner.address"/>
|
||||
|
||||
|
||||
@@ -87,8 +87,8 @@ msgstr "Day"
|
||||
|
||||
#. module: crm_claim
|
||||
#: help:crm.claim,canal_id:0
|
||||
msgid "The channels represent the different communicationmodes available with the customer. With each commercial opportunity, you can indicate thecanall which is this opportunity source."
|
||||
msgstr "The channels represent the different communicationmodes available with the customer. With each commercial opportunity, you can indicate thecanall which is this opportunity source."
|
||||
msgid "The channels represent the different communication modes available with the customer."
|
||||
msgstr "The channels represent the different communication modes available with the customer."
|
||||
|
||||
#. module: crm_claim
|
||||
#: help:crm.claim,section_id:0
|
||||
|
||||
@@ -74,6 +74,8 @@ class crm_claim_report(osv.osv):
|
||||
'type_id': fields.many2one('crm.case.resource.type', 'Claim Type',\
|
||||
domain="[('section_id','=',section_id),\
|
||||
('object_id.model', '=', 'crm.claim')]"),
|
||||
'date_closed': fields.date('Closed', readonly=True),
|
||||
'delay_expected': fields.float('Overpassed Deadline',digits=(16,2),readonly=True, group_operator="avg"),
|
||||
}
|
||||
|
||||
def init(self, cr):
|
||||
@@ -87,9 +89,10 @@ class crm_claim_report(osv.osv):
|
||||
create or replace view crm_claim_report as (
|
||||
select
|
||||
min(c.id) as id,
|
||||
to_char(c.create_date, 'YYYY') as name,
|
||||
to_char(c.create_date, 'MM') as month,
|
||||
to_char(c.create_date, 'YYYY-MM-DD') as day,
|
||||
to_char(c.date, 'YYYY') as name,
|
||||
to_char(c.date, 'MM') as month,
|
||||
to_char(c.date, 'YYYY-MM-DD') as day,
|
||||
to_char(c.date_closed, 'YYYY-MM-DD') as date_closed,
|
||||
c.state,
|
||||
c.user_id,
|
||||
c.stage_id,
|
||||
@@ -101,13 +104,14 @@ class crm_claim_report(osv.osv):
|
||||
c.priority as priority,
|
||||
c.type_id as type_id,
|
||||
date_trunc('day',c.create_date) as create_date,
|
||||
avg(extract('epoch' from (c.date_closed-c.create_date)))/(3600*24) as delay_close
|
||||
avg(extract('epoch' from (c.date_closed-c.create_date)))/(3600*24) as delay_close,
|
||||
extract('epoch' from (c.date_deadline - c.date_closed))/(3600*24) as delay_expected
|
||||
from
|
||||
crm_claim c
|
||||
group by to_char(c.create_date, 'YYYY'), to_char(c.create_date, 'MM'), \
|
||||
group by to_char(c.date, 'YYYY'), to_char(c.date, 'MM'),to_char(c.date, 'YYYY-MM-DD'),\
|
||||
c.state, c.user_id,c.section_id, c.stage_id,\
|
||||
c.categ_id,c.partner_id,c.company_id,c.create_date,to_char(c.create_date, 'YYYY-MM-DD')
|
||||
,c.priority,c.type_id
|
||||
c.categ_id,c.partner_id,c.company_id,c.create_date,
|
||||
c.priority,c.type_id,c.date_deadline,c.date_closed
|
||||
)""")
|
||||
|
||||
crm_claim_report()
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
<field name="day" invisible="1"/>
|
||||
<field name="nbr" string="#Claim" sum="#Claim"/>
|
||||
<field name="delay_close" avg="Avg Closing Delay"/>
|
||||
<field name="delay_expected"/>
|
||||
<field name="state" invisible="1"/>
|
||||
<field name="stage_id" invisible="1"/>
|
||||
<field name="categ_id" invisible="1"/>
|
||||
@@ -42,6 +43,7 @@
|
||||
<field name="section_id" select="1"/>
|
||||
<field name="nbr" select="1"/>
|
||||
<field name="delay_close"/>
|
||||
<field name="delay_expected"/>
|
||||
<field name="amount_revenue"/>
|
||||
<field name="amount_costs"/>
|
||||
<field name="amount_revenue_prob"/>
|
||||
@@ -75,14 +77,17 @@
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search">
|
||||
<group col="16" colspan="8">
|
||||
<filter string="This Year" icon="terp-go-year"
|
||||
domain="[('create_date','<=', time.strftime('%%Y-%%m-%%d')), ('create_date','>',(datetime.date.today()-datetime.timedelta(days=365)).strftime('%%Y-%%m-%%d'))]"/>
|
||||
<filter string=" Year " icon="terp-go-year"
|
||||
domain="[('create_date','<=', time.strftime('%%Y-%%m-%%d')),('create_date','>=',time.strftime('%%Y-01-01'))]"
|
||||
help="Claims created in current year"/>
|
||||
|
||||
<filter string="This Month" icon="terp-go-month" name="This Month"
|
||||
domain="[('create_date','<=', time.strftime('%%Y-%%m-%%d')), ('create_date','>',(datetime.date.today()-datetime.timedelta(days=30)).strftime('%%Y-%%m-%%d'))]"/>
|
||||
<filter string=" Month " icon="terp-go-month" name="This Month"
|
||||
domain="[('create_date','<=', time.strftime('%%Y-%%m-%%d')),('create_date','>=',time.strftime('%%Y-%%m-01'))]"
|
||||
help="Claims created in current month"/>
|
||||
|
||||
<filter icon="terp-go-week" string="7 Days" separator="1"
|
||||
domain="[('create_date','<=', time.strftime('%%Y-%%m-%%d')), ('create_date','>',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"/>
|
||||
<filter icon="terp-go-month" string=" Month-1 " separator="1"
|
||||
domain="[('create_date','<=', (datetime.date (int(time.strftime('%%Y')), datetime.date.today().month, 1) - datetime.timedelta (days = 1)).strftime('%%Y-%%m-%%d')),('create_date','>',(datetime.date (int(time.strftime('%%Y')), datetime.date.today().month-1, 1)).strftime('%%Y-%%m-%%d'))]"
|
||||
help="Claims created in last month"/>
|
||||
|
||||
<separator orientation="vertical" />
|
||||
<filter icon="terp-document-new"
|
||||
@@ -96,25 +101,24 @@
|
||||
domain="[('state','=','pending')]"/>
|
||||
|
||||
<separator orientation="vertical" />
|
||||
<field name="section_id"
|
||||
<field name="section_id" string="Sales Team"
|
||||
default="context.get('section_id', False)"
|
||||
widget="selection"
|
||||
context="{'invisible_section': False}">
|
||||
|
||||
<filter icon="terp-personal+"
|
||||
context="{'invisible_section': False}"
|
||||
domain="[('section_id.user_id','=',uid)]"
|
||||
help="My section" />
|
||||
help="My team" />
|
||||
|
||||
</field>
|
||||
<field name="company_id" widget="selection">
|
||||
<field name="company_id">
|
||||
<filter icon="terp-go-home"
|
||||
context="{'invisible_section': False}"
|
||||
domain="[('section_id.user_id.company_id','=',uid)]"
|
||||
help="My company"/>
|
||||
</field>
|
||||
|
||||
<field name="user_id" select="1" widget="selection">
|
||||
<field name="user_id" string="Salesman" select="1">
|
||||
<filter icon="terp-personal+" string="My Case" help="My Case" domain="[('user_id','=',uid)]" />
|
||||
</field>
|
||||
</group>
|
||||
@@ -139,42 +143,41 @@
|
||||
<group expand="1" string="Group By...">
|
||||
<filter string="User" name="User" icon="terp-personal"
|
||||
domain="[]" context="{'group_by':'user_id'}" />
|
||||
|
||||
<filter string="Company" icon="terp-go-home"
|
||||
domain="[]"
|
||||
context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
|
||||
|
||||
<filter string="Section" icon="terp-personal+"
|
||||
<filter string="Sales Team" icon="terp-personal+"
|
||||
domain="[]"
|
||||
context="{'group_by':'section_id'}" />
|
||||
|
||||
|
||||
<separator orientation="vertical" />
|
||||
<filter string="State" icon="terp-stock_effects-object-colorize"
|
||||
domain="[]" context="{'group_by':'state'}" />
|
||||
|
||||
<filter string="Stage" icon="terp-stage" domain="[]"
|
||||
context="{'group_by':'stage_id'}" />
|
||||
|
||||
<filter string="Priority" icon="terp-rating-rated" domain="[]"
|
||||
context="{'group_by':'priority'}" />
|
||||
<filter string="Category" icon="terp-stock_symbol-selection"
|
||||
domain="[]" context="{'group_by':'categ_id'}" />
|
||||
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Priority" icon="terp-rating-rated" domain="[]"
|
||||
context="{'group_by':'priority'}" />
|
||||
<filter string="Type" icon="terp-stock_symbol-selection" domain="[]"
|
||||
<filter string="Type" icon="terp-stock_symbol-selection" domain="[]"
|
||||
context="{'group_by':'type_id'}" />
|
||||
|
||||
<filter string="State" icon="terp-stock_effects-object-colorize"
|
||||
domain="[]" context="{'group_by':'state'}" />
|
||||
<separator orientation="vertical" />
|
||||
<filter string="Company" icon="terp-go-home"
|
||||
domain="[]"
|
||||
context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
|
||||
|
||||
<separator orientation="vertical" />
|
||||
<filter string="Day" icon="terp-go-today"
|
||||
domain="[]" context="{'group_by':'day'}"/>
|
||||
domain="[]" context="{'group_by':'day'}"
|
||||
help="Date of claim"/>
|
||||
|
||||
<filter string="Month" icon="terp-go-month"
|
||||
domain="[]" context="{'group_by':'month'}" />
|
||||
domain="[]" context="{'group_by':'month'}"
|
||||
help="Month of claim"/>
|
||||
|
||||
<filter string="Year" icon="terp-go-year"
|
||||
domain="[]" context="{'group_by':'name'}" />
|
||||
domain="[]" context="{'group_by':'name'}"
|
||||
help="Year of claim"/>
|
||||
</group>
|
||||
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
@@ -182,7 +185,7 @@
|
||||
<!-- CRM Claim Report Action -->
|
||||
|
||||
<record id="action_report_crm_claim" model="ir.actions.act_window">
|
||||
<field name="name">Claims</field>
|
||||
<field name="name">Claims Analysis</field>
|
||||
<field name="res_model">crm.claim.report</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,graph</field>
|
||||
|
||||
@@ -71,10 +71,8 @@ class crm_fundraising(crm.crm_case, osv.osv):
|
||||
'ref': fields.reference('Reference', selection=crm._links_get, size=128),
|
||||
'ref2': fields.reference('Reference 2', selection=crm._links_get, size=128),
|
||||
'canal_id': fields.many2one('res.partner.canal', 'Channel', \
|
||||
help="The channels represent the different communication "\
|
||||
"modes available with the customer." \
|
||||
" With each commercial opportunity, you can indicate\
|
||||
the canall which is this opportunity source."),
|
||||
help="The channels represent the different communication \
|
||||
modes available with the customer."),
|
||||
'state': fields.selection(crm.AVAILABLE_STATES, 'State', size=16, readonly=True,
|
||||
help='The state is set to \'Draft\', when a case is created.\
|
||||
\nIf the case is in progress the state is set to \'Open\'.\
|
||||
|
||||
@@ -37,24 +37,6 @@
|
||||
id="menu_crm_fundraising_stage_act"
|
||||
parent="menu_config_fundrising" />
|
||||
|
||||
|
||||
<!-- Fund Resource Type Form View -->
|
||||
|
||||
<record id="crm_fundraising_resource_act" model="ir.actions.act_window">
|
||||
<field name="name">Fundraising Resource Type</field>
|
||||
<field name="res_model">crm.case.resource.type</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_id" ref="crm.crm_case_resource_type_tree"/>
|
||||
<field name="domain">[('object_id.model', '=', 'crm.fundraising')]</field>
|
||||
<field name="context">{'object_id':'crm.fundraising'}</field>
|
||||
</record>
|
||||
|
||||
<menuitem action="crm_fundraising_resource_act"
|
||||
groups="base.group_extended" name="Resource Type"
|
||||
id="menu_crm_fundraising_resource_act"
|
||||
parent="menu_config_fundrising" />
|
||||
|
||||
|
||||
<!-- Fund Raising Tree View -->
|
||||
|
||||
<record model="ir.ui.view" id="crm_case_tree_view_fund">
|
||||
@@ -63,7 +45,7 @@
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Funds Tree"
|
||||
colors="red:state=='open';black:state in ('draft', 'cancel','done','pending')">
|
||||
colors="blue:state=='pending';grey:state in ('cancel', 'done')">
|
||||
<field name="name" string="Fund Description" />
|
||||
<field name="categ_id" />
|
||||
<field name="type_id" string="Payment Mode" />
|
||||
@@ -159,7 +141,7 @@
|
||||
<field colspan="4" name="email_cc" string="Global CC" widget="char"/>
|
||||
</group>
|
||||
<field name="message_ids" colspan="4" nolabel="1" mode="tree,form">
|
||||
<tree string="Communication history">
|
||||
<tree string="History">
|
||||
<field name="display_text" string="History Information"/>
|
||||
<field name="history" invisible="1"/>
|
||||
<button
|
||||
@@ -168,7 +150,7 @@
|
||||
context="{'mail':'reply', 'model': 'crm.fundraising', 'include_original' : True}"
|
||||
icon="terp-mail-replied" type="action" />
|
||||
</tree>
|
||||
<form string="Communication history">
|
||||
<form string="History">
|
||||
<group col="4" colspan="4">
|
||||
<field name="email_from"/>
|
||||
<field name="date"/>
|
||||
@@ -197,7 +179,7 @@
|
||||
</notebook>
|
||||
</form>
|
||||
</field>
|
||||
<button string="Add New Note"
|
||||
<button string="Add Internal Note"
|
||||
name="%(crm.action_crm_add_note)d"
|
||||
context="{'model': 'crm.lead' }"
|
||||
icon="terp-document-new" type="action" />
|
||||
@@ -298,7 +280,7 @@
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Group By...">
|
||||
<filter string="Partner" icon="terp-personal"
|
||||
<filter string="Partner" icon="terp-partner"
|
||||
domain="[]"
|
||||
context="{'group_by':'partner_id'}" />
|
||||
<filter string="Responsible" icon="terp-personal"
|
||||
|
||||
@@ -38,8 +38,8 @@ msgstr "Avg. Probability"
|
||||
|
||||
#. module: crm_fundraising
|
||||
#: help:crm.fundraising,canal_id:0
|
||||
msgid "The channels represent the different communication modes available with the customer. With each commercial opportunity, you can indicate the canall which is this opportunity source."
|
||||
msgstr "The channels represent the different communication modes available with the customer. With each commercial opportunity, you can indicate the canall which is this opportunity source."
|
||||
msgid "The channels represent the different communication modes available with the customer."
|
||||
msgstr "The channels represent the different communication modes available with the customer."
|
||||
|
||||
#. module: crm_fundraising
|
||||
#: constraint:ir.actions.act_window:0
|
||||
|
||||
@@ -61,6 +61,10 @@ class crm_fundraising_report(osv.osv):
|
||||
'delay_close': fields.float('Delay to close', digits=(16,2),readonly=True, group_operator="avg",help="Number of Days to close the case"),
|
||||
'partner_id': fields.many2one('res.partner', 'Partner'),
|
||||
'company_id': fields.many2one('res.company', 'Company'),
|
||||
'type_id': fields.many2one('crm.case.resource.type', 'Fundraising Type', \
|
||||
domain="[('section_id','=',section_id),\
|
||||
('object_id.model', '=', 'crm.fundraising')]"),
|
||||
'planned_cost': fields.float('Planned Costs',readonly=True,digits=(16,2)),
|
||||
}
|
||||
|
||||
def init(self, cr):
|
||||
@@ -74,26 +78,28 @@ class crm_fundraising_report(osv.osv):
|
||||
create or replace view crm_fundraising_report as (
|
||||
select
|
||||
min(c.id) as id,
|
||||
to_char(c.create_date, 'YYYY') as name,
|
||||
to_char(c.create_date, 'MM') as month,
|
||||
to_char(c.create_date, 'YYYY-MM-DD') as day,
|
||||
to_char(c.date, 'YYYY') as name,
|
||||
to_char(c.date, 'MM') as month,
|
||||
to_char(c.date, 'YYYY-MM-DD') as day,
|
||||
c.state,
|
||||
c.user_id,
|
||||
c.section_id,
|
||||
c.categ_id,
|
||||
c.type_id,
|
||||
c.company_id,
|
||||
c.partner_id,
|
||||
count(*) as nbr,
|
||||
date_trunc('day',c.create_date) as create_date,
|
||||
sum(planned_revenue) as amount_revenue,
|
||||
sum(planned_cost) as planned_cost,
|
||||
sum(planned_revenue*probability)::decimal(16,2) as amount_revenue_prob,
|
||||
avg(probability)::decimal(16,2) as probability,
|
||||
avg(extract('epoch' from (c.date_closed-c.create_date)))/(3600*24) as delay_close
|
||||
from
|
||||
crm_fundraising c
|
||||
group by to_char(c.create_date, 'YYYY'), to_char(c.create_date, 'MM'),\
|
||||
c.state, c.user_id,c.section_id,c.categ_id,c.partner_id,c.company_id,
|
||||
c.create_date,to_char(c.create_date, 'YYYY-MM-DD')
|
||||
group by to_char(c.date, 'YYYY'), to_char(c.date, 'MM'),\
|
||||
c.state, c.user_id,c.section_id,c.categ_id,type_id,c.partner_id,c.company_id,
|
||||
c.create_date,to_char(c.date, 'YYYY-MM-DD')
|
||||
)""")
|
||||
|
||||
crm_fundraising_report()
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<field name="model">crm.fundraising.report</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree colors="blue:state in ('draft');black:state in ('open','pending');gray:state in ('done','cancel') " string="Fundraising">
|
||||
<tree string="Fundraising">
|
||||
<field name="name" invisible="1"/>
|
||||
<field name="month" invisible="1"/>
|
||||
<field name="section_id" invisible="1"/>
|
||||
@@ -17,6 +17,7 @@
|
||||
<field name="company_id" invisible="1"/>
|
||||
<field name="partner_id" invisible="1"/>
|
||||
<field name="nbr" string='#Fundraising' sum="#Fundraising"/>
|
||||
<field name="planned_cost" sum='Planned Costs'/>
|
||||
<field name="amount_revenue" sum='Est.Revenue'/>
|
||||
<field name="probability" avg='Avg. Probability' widget="progressbar"/>
|
||||
<field name="amount_revenue_prob" sum='Est. Rev*Prob.'/>
|
||||
@@ -24,6 +25,7 @@
|
||||
<field name="state" invisible="1"/>
|
||||
<field name="categ_id" invisible="1"/>
|
||||
<field name="day" invisible="1"/>
|
||||
<field name="type_id" invisible="1"/>
|
||||
</tree>
|
||||
</field>
|
||||
|
||||
@@ -74,14 +76,17 @@
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search">
|
||||
<group col="16" colspan="8">
|
||||
<filter string="This Year" icon="terp-go-year"
|
||||
domain="[('create_date','<=', time.strftime('%%Y-%%m-%%d')), ('create_date','>',(datetime.date.today()-datetime.timedelta(days=365)).strftime('%%Y-%%m-%%d'))]"/>
|
||||
<filter string=" Year " icon="terp-go-year"
|
||||
domain="[('create_date','<=', time.strftime('%%Y-%%m-%%d')),('create_date','>=',time.strftime('%%Y-01-01'))]"
|
||||
help="Funds raised in current year"/>
|
||||
|
||||
<filter string="This Month" icon="terp-go-month" name="This Month"
|
||||
domain="[('create_date','<=', time.strftime('%%Y-%%m-%%d')), ('create_date','>',(datetime.date.today()-datetime.timedelta(days=30)).strftime('%%Y-%%m-%%d'))]"/>
|
||||
<filter string=" Month " icon="terp-go-month" name="This Month"
|
||||
domain="[('create_date','<=', time.strftime('%%Y-%%m-%%d')),('create_date','>=',time.strftime('%%Y-%%m-01'))]"
|
||||
help="Funds raised in current month"/>
|
||||
|
||||
<filter icon="terp-go-week" string="7 Days" separator="1"
|
||||
domain="[('create_date','<=', time.strftime('%%Y-%%m-%%d')), ('create_date','>',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"/>
|
||||
<filter icon="terp-go-month" string=" Month-1 " separator="1"
|
||||
domain="[('create_date','<=', (datetime.date (int(time.strftime('%%Y')), datetime.date.today().month, 1) - datetime.timedelta (days = 1)).strftime('%%Y-%%m-%%d')),('create_date','>',(datetime.date (int(time.strftime('%%Y')), datetime.date.today().month-1, 1)).strftime('%%Y-%%m-%%d'))]"
|
||||
help="Funds raised in last month"/>
|
||||
|
||||
<separator orientation="vertical" />
|
||||
<filter icon="terp-document-new"
|
||||
@@ -95,25 +100,24 @@
|
||||
domain="[('state','=','pending')]"/>
|
||||
|
||||
<separator orientation="vertical" />
|
||||
<field name="section_id"
|
||||
<field name="section_id" string="Sales Team"
|
||||
default="context.get('section_id', False)"
|
||||
widget="selection"
|
||||
context="{'invisible_section': False}">
|
||||
|
||||
<filter icon="terp-personal+"
|
||||
context="{'invisible_section': False}"
|
||||
domain="[('section_id.user_id','=',uid)]"
|
||||
help="My section" />
|
||||
help="My team" />
|
||||
|
||||
</field>
|
||||
<field name="company_id" widget="selection">
|
||||
<field name="company_id">
|
||||
<filter icon="terp-go-home"
|
||||
context="{'invisible_section': False}"
|
||||
domain="[('section_id.user_id.company_id','=',uid)]"
|
||||
help="My company"/>
|
||||
</field>
|
||||
|
||||
<field name="user_id" select="1" widget="selection">
|
||||
<field name="user_id" select="1" string="Salesman">
|
||||
<filter icon="terp-personal+" string="My Case" help="My Case" domain="[('user_id','=',uid)]" />
|
||||
</field>
|
||||
</group>
|
||||
@@ -137,27 +141,31 @@
|
||||
<filter string="User" name="User" icon="terp-personal"
|
||||
domain="[]" context="{'group_by':'user_id'}" />
|
||||
|
||||
<filter string="Company" icon="terp-go-home"
|
||||
domain="[]"
|
||||
context="{'group_by':'company_id'}" />
|
||||
|
||||
<filter string="Section" icon="terp-personal+"
|
||||
<filter string="Sales Team" icon="terp-personal+"
|
||||
domain="[]"
|
||||
context="{'group_by':'section_id'}" />
|
||||
|
||||
<separator orientation="vertical" />
|
||||
<filter string="State" icon="terp-stock_effects-object-colorize"
|
||||
<filter string="State" icon="terp-stock_effects-object-colorize"
|
||||
domain="[]" context="{'group_by':'state'}" />
|
||||
|
||||
<filter string="Category" icon="terp-stock_symbol-selection"
|
||||
domain="[]" context="{'group_by':'categ_id'}" />
|
||||
|
||||
<filter string="Payment Mode" help="Payment Mode"
|
||||
icon="terp-dolar" domain="[]"
|
||||
context="{'group_by':'type_id'}" />
|
||||
<separator orientation="vertical" />
|
||||
<filter string="Company" icon="terp-go-home"
|
||||
domain="[]"
|
||||
context="{'group_by':'company_id'}" />
|
||||
|
||||
<separator orientation="vertical" />
|
||||
<filter string="Day" icon="terp-go-today"
|
||||
domain="[]" context="{'group_by':'day'}"/>
|
||||
domain="[]" context="{'group_by':'day'}"
|
||||
help="Date of fundraising"/>
|
||||
|
||||
<filter string="Month" icon="terp-go-month"
|
||||
domain="[]" context="{'group_by':'month'}" />
|
||||
domain="[]" context="{'group_by':'month'}"
|
||||
help="Month of fundraising"/>
|
||||
|
||||
<filter string="Year" icon="terp-go-year"
|
||||
domain="[]" context="{'group_by':'name'}" />
|
||||
@@ -169,7 +177,7 @@
|
||||
<!-- Fundraising by user and section Action -->
|
||||
|
||||
<record id="action_report_crm_fundraising" model="ir.actions.act_window">
|
||||
<field name="name">Fundraising</field>
|
||||
<field name="name">Fundraising Analysis</field>
|
||||
<field name="res_model">crm.fundraising.report</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,graph</field>
|
||||
|
||||
@@ -96,7 +96,7 @@
|
||||
<field colspan="4" name="email_cc" string="Global CC" widget="char"/>
|
||||
</group>
|
||||
<field name="message_ids" colspan="4" nolabel="1" mode="tree,form">
|
||||
<tree string="Communication history">
|
||||
<tree string="History">
|
||||
<field name="display_text" string="History Information"/>
|
||||
<field name="history" invisible="1"/>
|
||||
<button
|
||||
@@ -105,7 +105,7 @@
|
||||
context="{'mail':'reply', 'model': 'crm.helpdesk', 'include_original' : True}"
|
||||
icon="terp-mail-replied" type="action" />
|
||||
</tree>
|
||||
<form string="Communication history">
|
||||
<form string="History">
|
||||
<group col="4" colspan="4">
|
||||
<field name="email_from"/>
|
||||
<field name="date"/>
|
||||
@@ -134,7 +134,7 @@
|
||||
</notebook>
|
||||
</form>
|
||||
</field>
|
||||
<button string="Add New Note"
|
||||
<button string="Add Internal Note"
|
||||
name="%(crm.action_crm_add_note)d"
|
||||
context="{'model': 'crm.lead' }"
|
||||
icon="terp-document-new" type="action" />
|
||||
@@ -264,10 +264,10 @@
|
||||
domain="[]" help="Sales Team"
|
||||
context="{'group_by':'section_id'}" />
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="State" icon="terp-stock_effects-object-colorize" domain="[]"
|
||||
context="{'group_by':'state'}" />
|
||||
<filter string="Priority" icon="terp-rating-rated"
|
||||
domain="[]" context="{'group_by':'priority'}" />
|
||||
<filter string="State" icon="terp-stock_effects-object-colorize" domain="[]"
|
||||
context="{'group_by':'state'}" />
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Date" icon="terp-go-month"
|
||||
domain="[]" help="Request Date"
|
||||
|
||||
@@ -547,8 +547,8 @@ msgstr "Probability (%)"
|
||||
|
||||
#. module: crm_helpdesk
|
||||
#: help:crm.helpdesk,canal_id:0
|
||||
msgid "The channels represent the different communication modes available with the customer."
|
||||
msgstr "The channels represent the different communication modes available with the customer."
|
||||
msgid "The channels represent the different communication modes available with the customer."
|
||||
msgstr "The channels represent the different communication modes available with the customer."
|
||||
|
||||
#. module: crm_helpdesk
|
||||
#: view:crm.helpdesk.report:0
|
||||
|
||||
@@ -50,12 +50,22 @@ class crm_helpdesk_report(osv.osv):
|
||||
('07', 'July'), ('08', 'August'),\
|
||||
('09', 'September'), ('10', 'October'),\
|
||||
('11', 'November'), ('12', 'December')], 'Month', readonly=True),
|
||||
'delay_close': fields.char('Delay to close', size=20, readonly=True),
|
||||
'delay_close': fields.float('Delay to Close',digits=(16,2),readonly=True, group_operator="avg"),
|
||||
'partner_id': fields.many2one('res.partner', 'Partner' , readonly=True),
|
||||
'company_id': fields.many2one('res.company', 'Company', readonly=True),
|
||||
'date_deadline': fields.date('Deadline'),
|
||||
'priority': fields.selection([('5', 'Lowest'), ('4', 'Low'), \
|
||||
('3', 'Normal'), ('2', 'High'), ('1', 'Highest')], 'Priority'),
|
||||
'canal_id': fields.many2one('res.partner.canal', 'Channel'),
|
||||
'categ_id': fields.many2one('crm.case.categ', 'Category', \
|
||||
domain="[('section_id','=',section_id),\
|
||||
('object_id.model', '=', 'crm.helpdesk')]"),
|
||||
'planned_cost': fields.float('Planned Costs'),
|
||||
'create_date': fields.date('Creation Date' , readonly=True),
|
||||
'date_closed': fields.date('Close Date', readonly=True),
|
||||
'delay_expected': fields.float('Overpassed Deadline',digits=(16,2),readonly=True, group_operator="avg"),
|
||||
'day': fields.char('Day', size=128, readonly=True),
|
||||
'email': fields.integer('# Emails', size=128, readonly=True),
|
||||
}
|
||||
|
||||
def init(self, cr):
|
||||
@@ -70,8 +80,11 @@ class crm_helpdesk_report(osv.osv):
|
||||
create or replace view crm_helpdesk_report as (
|
||||
select
|
||||
min(c.id) as id,
|
||||
to_char(c.create_date, 'YYYY') as name,
|
||||
to_char(c.create_date, 'MM') as month,
|
||||
to_char(c.date, 'YYYY') as name,
|
||||
to_char(c.date, 'MM') as month,
|
||||
to_char(c.date, 'YYYY-MM-DD') as day,
|
||||
to_char(c.create_date, 'YYYY-MM-DD') as create_date,
|
||||
to_char(c.date_closed, 'YYYY-mm-dd') as date_closed,
|
||||
c.state,
|
||||
c.user_id,
|
||||
c.section_id,
|
||||
@@ -79,13 +92,19 @@ class crm_helpdesk_report(osv.osv):
|
||||
c.company_id,
|
||||
c.priority,
|
||||
c.date_deadline,
|
||||
c.categ_id,
|
||||
c.canal_id,
|
||||
c.planned_cost,
|
||||
count(*) as nbr,
|
||||
to_char(avg(date_closed-c.create_date), 'DD"d" HH24:MI:SS') as delay_close
|
||||
extract('epoch' from (c.date_closed-c.create_date))/(3600*24) as delay_close,
|
||||
(SELECT count(id) FROM mailgate_message WHERE model='crm.helpdesk' AND res_id=c.id AND history=True) AS email,
|
||||
abs(avg(extract('epoch' from (c.date_deadline - c.date_closed)))/(3600*24)) as delay_expected
|
||||
from
|
||||
crm_helpdesk c
|
||||
group by to_char(c.create_date, 'YYYY'), to_char(c.create_date, 'MM'),\
|
||||
group by to_char(c.date, 'YYYY'), to_char(c.date, 'MM'),to_char(c.date, 'YYYY-MM-DD'),\
|
||||
c.state, c.user_id,c.section_id,c.priority,\
|
||||
c.partner_id,c.company_id,c.date_deadline
|
||||
c.partner_id,c.company_id,c.date_deadline,c.create_date,c.date,c.date_closed,\
|
||||
c.categ_id,c.canal_id,c.planned_cost,c.id
|
||||
)""")
|
||||
|
||||
crm_helpdesk_report()
|
||||
|
||||
@@ -9,18 +9,23 @@
|
||||
<field name="model">crm.helpdesk.report</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree colors="blue:state in ('draft');black:state in ('open','pending');gray:state in ('done','cancel') " string="Helpdesk">
|
||||
<field name="name" />
|
||||
<field name="month"/>
|
||||
<field name="section_id" />
|
||||
<field name="user_id" />
|
||||
<field name="company_id"/>
|
||||
<field name="partner_id" />
|
||||
<tree string="Helpdesk">
|
||||
<field name="name" invisible="1"/>
|
||||
<field name="month" invisible="1"/>
|
||||
<field name="section_id" invisible="1"/>
|
||||
<field name="user_id" invisible="1"/>
|
||||
<field name="company_id" invisible="1"/>
|
||||
<field name="partner_id" invisible="1"/>
|
||||
<field name="date_deadline" invisible="1"/>
|
||||
<field name="priority" invisible="1"/>
|
||||
<field name="nbr" string="#Helpdesk" />
|
||||
<field name="nbr" string="#Helpdesk" sum="#Helpdesk"/>
|
||||
<field name="email" sum="# Mails"/>
|
||||
<field name="delay_close"/>
|
||||
<field name="delay_expected"/>
|
||||
<field name="planned_cost"/>
|
||||
<field name="state" invisible="1"/>
|
||||
<field name="day" invisible="1"/>
|
||||
<field name="canal_id" invisible="1"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
@@ -71,13 +76,15 @@
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search">
|
||||
<group col="16" colspan="9">
|
||||
<filter string="This Year" icon="terp-go-year"
|
||||
domain="[('name','=',time.localtime()[0])]"
|
||||
default="1" />
|
||||
|
||||
<filter string="This Month" icon="terp-go-month"
|
||||
domain="[('month','=',time.strftime('%%m'))]"
|
||||
default="1" />
|
||||
<filter string=" Year " icon="terp-go-year"
|
||||
domain="[('create_date','<=', time.strftime('%%Y-%%m-%%d')),('create_date','>=',time.strftime('%%Y-01-01'))]"
|
||||
help="Helpdesk requests occurred in current year"/>
|
||||
<filter string=" Month " icon="terp-go-month" name="this_month"
|
||||
domain="[('create_date','<=', time.strftime('%%Y-%%m-%%d')),('create_date','>=',time.strftime('%%Y-%%m-01'))]"
|
||||
help="Helpdesk requests occurred in current month"/>
|
||||
<filter icon="terp-go-month" string=" Month-1 " separator="1"
|
||||
domain="[('create_date','<=', (datetime.date (int(time.strftime('%%Y')), datetime.date.today().month, 1) - datetime.timedelta (days = 1)).strftime('%%Y-%%m-%%d')),('create_date','>',(datetime.date (int(time.strftime('%%Y')), datetime.date.today().month-1, 1)).strftime('%%Y-%%m-%%d'))]"
|
||||
help="Helpdesk requests occurred in last month"/>
|
||||
|
||||
<separator orientation="vertical" />
|
||||
<filter string="Current" icon="terp-check"
|
||||
@@ -89,29 +96,26 @@
|
||||
<filter string="Lost" icon="terp-dialog-close"
|
||||
domain="[('state','=','cancel')]" />
|
||||
|
||||
<filter string="Deadline" icon="terp-go-month"
|
||||
domain="[('date_deadline','=',time.strftime('%%m/%%d/%%Y'))]" />
|
||||
|
||||
<separator orientation="vertical" />
|
||||
<field name="section_id"
|
||||
<field name="section_id" string="Sales Team"
|
||||
default="context.get('section_id', False)"
|
||||
widget="selection"
|
||||
context="{'invisible_section': False}">
|
||||
|
||||
<filter icon="terp-personal+"
|
||||
context="{'invisible_section': False}"
|
||||
domain="[('section_id.user_id','=',uid)]"
|
||||
help="My section" />
|
||||
help="My team" />
|
||||
|
||||
</field>
|
||||
<field name="company_id" widget="selection">
|
||||
<filter icon="terp-go-home"
|
||||
<field name="company_id">
|
||||
<filter icon="terp-go-home"
|
||||
context="{'invisible_section': False}"
|
||||
domain="[('section_id.user_id.company_id','=',uid)]"
|
||||
help="My company"/>
|
||||
|
||||
</field>
|
||||
<field name="user_id" widget="selection"/>
|
||||
<field name="user_id" string="Salesman">
|
||||
<filter icon="terp-personal+" string="My Case" help="My Case" domain="[('user_id','=',uid)]" />
|
||||
</field>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Extended Filters..." groups="base.group_extended">
|
||||
@@ -123,29 +127,34 @@
|
||||
<filter string="User" icon="terp-personal"
|
||||
domain="[]" context="{'group_by':'user_id'}"
|
||||
default="1" />
|
||||
|
||||
<filter string="Company" icon="terp-go-home"
|
||||
domain="[]"
|
||||
context="{'group_by':'company_id'}" />
|
||||
|
||||
<filter string="Section" icon="terp-personal+"
|
||||
<filter string="Sales Team" icon="terp-personal+"
|
||||
domain="[]"
|
||||
context="{'group_by':'section_id'}" />
|
||||
|
||||
<separator orientation="vertical" />
|
||||
<filter string="State" icon="terp-stock_effects-object-colorize"
|
||||
domain="[]" context="{'group_by':'state'}" />
|
||||
|
||||
<filter string="Partner" icon="terp-personal"
|
||||
domain="[]"
|
||||
context="{'group_by':'partner_id'}" />
|
||||
|
||||
|
||||
<separator orientation="vertical" />
|
||||
<filter string="Channel" icon="terp-call-start"
|
||||
domain="[]"
|
||||
context="{'group_by':'canal_id'}" />
|
||||
|
||||
<separator orientation="vertical" />
|
||||
<filter string="State" icon="terp-stock_effects-object-colorize"
|
||||
domain="[]" context="{'group_by':'state'}" />
|
||||
|
||||
<separator orientation="vertical" />
|
||||
<filter string="Company" icon="terp-go-home"
|
||||
domain="[]"
|
||||
context="{'group_by':'company_id'}" />
|
||||
|
||||
<separator orientation="vertical" />
|
||||
<filter string="Day" icon="terp-go-today"
|
||||
domain="[]" context="{'group_by':'day'}" help="Date of helpdesk requests"/>
|
||||
<filter string="Month" icon="terp-go-month"
|
||||
domain="[]" context="{'group_by':'month'}" />
|
||||
|
||||
domain="[]" context="{'group_by':'month'}" help="Month of helpdesk requests"/>
|
||||
<filter string="Year" icon="terp-go-year"
|
||||
domain="[]" context="{'group_by':'name'}" />
|
||||
domain="[]" context="{'group_by':'name'}" help="Year of helpdesk requests" />
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
@@ -154,10 +163,11 @@
|
||||
<!-- Helpdesk report after Sales Services Action -->
|
||||
|
||||
<record id="action_report_crm_helpdesk" model="ir.actions.act_window">
|
||||
<field name="name">Helpdesk</field>
|
||||
<field name="name">Helpdesk Analysis</field>
|
||||
<field name="res_model">crm.helpdesk.report</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,graph</field>
|
||||
<field name="context">{"search_default_User":1,"search_default_This Month":1,'group_by_no_leaf':1,'group_by':[]}</field>
|
||||
<field name="view_id" ref="view_report_crm_helpdesk_tree"/>
|
||||
<field name="search_view_id" ref="view_report_crm_helpdesk_filter"/>
|
||||
<field name="help">Helpdesk allows you to consult different informations relative to support demands. Check for treatments delays, number of responses given and emails send and costs. You can sort out your analysis on different groups to get fine grained analysis.</field>
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
<field name="name" />
|
||||
<newline/>
|
||||
<group expand="0" string="Group By..." groups="base.group_extended">
|
||||
<filter string="Type" domain="[]" context="{'group_by':'type'}"/>
|
||||
<filter string="Type" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'type'}"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
@@ -80,7 +80,7 @@
|
||||
<separator string="Directory Type" colspan="4"/>
|
||||
<field name="type"/>
|
||||
<group colspan="4" col="4" attrs="{'invisible': [('type','!=','ressource')]}">
|
||||
<field name="ressource_type_id" on_change="onchange_content_id(ressource_type_id)"
|
||||
<field name="ressource_type_id" on_change="onchange_content_id(ressource_type_id)"
|
||||
attrs="{'required': [('type','=','ressource')] }"/>
|
||||
<field name="resource_find_all" groups="base.group_extended" />
|
||||
<newline/>
|
||||
@@ -93,7 +93,7 @@
|
||||
<field name="ressource_parent_type_id"/>
|
||||
<field name="ressource_id" select="2" readonly="1"/>
|
||||
</group>
|
||||
|
||||
|
||||
</page>
|
||||
<page string="Generated Files" groups="base.group_extended">
|
||||
<label colspan="4" string="For each entry here, virtual files will appear in this folder." />
|
||||
@@ -168,7 +168,7 @@
|
||||
<field name="storage_id" />
|
||||
<newline/>
|
||||
<group expand="0" string="Group By..." groups="base.group_extended">
|
||||
<filter string="Type" domain="[]" context="{'group_by':'type'}"/>
|
||||
<filter string="Type" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'type'}"/>
|
||||
<filter string="Owner" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
|
||||
<filter string="Storage" domain="[]" context="{'group_by':'storage_id'}"/>
|
||||
</group>
|
||||
@@ -282,10 +282,9 @@
|
||||
<field name="model">ir.attachment</field>
|
||||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="IR Attachment">
|
||||
<filter icon="terp-go-month" string="Recent Month"
|
||||
help="Attachment modified/created last 30 days"
|
||||
domain="[('create_date','<=', time.strftime('%%Y-%%m-%%d')),('create_date','>',(datetime.date.today()-datetime.timedelta(days=30)).strftime('%%Y-%%m-%%d'))]"
|
||||
<search string="Document">
|
||||
<filter icon="terp-go-month" string="Month"
|
||||
domain="[('create_date','<=', time.strftime('%%Y-%%m-%%d')),('create_date','>=',time.strftime('%%Y-%%m-01'))]"
|
||||
/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="name"/>
|
||||
@@ -293,7 +292,7 @@
|
||||
<field name="user_id">
|
||||
<filter icon="terp-personal"
|
||||
domain="[('user_id','=', False)]"
|
||||
help="Filter on my Attachment" />
|
||||
help="Filter on my documents" />
|
||||
</field>
|
||||
<field name="partner_id"/>
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
@@ -332,7 +331,6 @@
|
||||
<field name="name">Documents</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">ir.attachment</field>
|
||||
<field name="name">Document</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="search_view_id" ref="view_attach_filter"/>
|
||||
<field name="help">Documents give your access to all attached documents; it's a repository of all attached documents (mails, documents attached to a project, etc.)</field>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<record id="ftp_browse_form" model="ir.ui.view">
|
||||
<field name="name">Document FTP Browse</field>
|
||||
<field name="model">document.ftp.browse</field>
|
||||
<field name="type">form</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Browse Document">
|
||||
<separator string="Browse Document" colspan="4"/>
|
||||
@@ -12,7 +12,7 @@
|
||||
<separator colspan="4"/>
|
||||
<group col="4" colspan="4">
|
||||
<label string="" colspan="2"/>
|
||||
<button special="cancel" string="_Close" icon="gtk-cancel"/>
|
||||
<button special="cancel" string="_Cancel" icon="gtk-cancel"/>
|
||||
<button name="browse_ftp" string="_Browse" type="object" icon="gtk-ok"/>
|
||||
</group>
|
||||
</form>
|
||||
@@ -32,7 +32,7 @@
|
||||
<menuitem
|
||||
name="Shared Repository (FTP)"
|
||||
action="action_ftp_browse"
|
||||
id="menu_document_browse"
|
||||
id="menu_document_browse"
|
||||
icon="STOCK_EXECUTE"
|
||||
parent="document.menu_document_doc" sequence="1"/>
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<record model="ir.actions.url" id="action_document_browse">
|
||||
<field name="name">Browse Files</field>
|
||||
<field name="url">ftp://localhost:8021/</field>
|
||||
</record>
|
||||
</record>
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -371,7 +371,7 @@
|
||||
<field colspan="4" name="email_cc" string="CC" widget="char" size="512"/>
|
||||
</group>
|
||||
<field name="message_ids" colspan="4" nolabel="1" mode="tree,form">
|
||||
<tree string="Communication history">
|
||||
<tree string="History">
|
||||
<field name="display_text" string="History Information"/>
|
||||
<field name="history" invisible="1"/>
|
||||
<button
|
||||
@@ -380,7 +380,7 @@
|
||||
context="{'mail':'reply', 'model': 'event.registration', 'include_original' : True}"
|
||||
icon="terp-mail-replied" type="action" />
|
||||
</tree>
|
||||
<form string="Communication history">
|
||||
<form string="History">
|
||||
<group col="4" colspan="4">
|
||||
<field name="email_from"/>
|
||||
<field name="date"/>
|
||||
@@ -409,7 +409,7 @@
|
||||
</notebook>
|
||||
</form>
|
||||
</field>
|
||||
<button string="Add New Note"
|
||||
<button string="Add Internal Note"
|
||||
name="%(crm.action_crm_add_note)d"
|
||||
context="{'model': 'crm.lead' }"
|
||||
icon="terp-document-new" type="action" />
|
||||
|
||||
@@ -44,6 +44,7 @@
|
||||
'hr_installer.xml',
|
||||
'hr_data.xml',
|
||||
'board_hr_view.xml',
|
||||
'board_hr_manager_view.xml',
|
||||
],
|
||||
'demo_xml': [
|
||||
'hr_demo.xml',
|
||||
@@ -54,4 +55,4 @@
|
||||
'active': False,
|
||||
'certificate': '0086710558965',
|
||||
}
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<!-- This board view will be complete by other hr_* modules-->
|
||||
<record id="board_hr_manager_form" model="ir.ui.view">
|
||||
<field name="name">board.hr.manager.form</field>
|
||||
<field name="model">board.board</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="HR Manager Board">
|
||||
<hpaned>
|
||||
<child1>
|
||||
</child1>
|
||||
<child2>
|
||||
</child2>
|
||||
</hpaned>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="open_board_hr_manager" model="ir.actions.act_window">
|
||||
<field name="name">HR Manager Dashboard</field>
|
||||
<field name="res_model">board.board</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="usage">menu</field>
|
||||
<field name="view_id" ref="board_hr_manager_form"/>
|
||||
</record>
|
||||
</data>
|
||||
</openerp>
|
||||
+21
-6
@@ -107,10 +107,10 @@ class hr_employee(osv.osv):
|
||||
_inherits = {'resource.resource': "resource_id"}
|
||||
_columns = {
|
||||
'country_id': fields.many2one('res.country', 'Nationality'),
|
||||
'birthday': fields.date("Birthday"),
|
||||
'birthday': fields.date("Date of Birth"),
|
||||
'ssnid': fields.char('SSN No', size=32, help='Social Security Number'),
|
||||
'sinid': fields.char('SIN No', size=32, help="Social Insurance Number"),
|
||||
'otherid': fields.char('Other ID', size=32),
|
||||
'identification_id': fields.char('Identification No', size=32),
|
||||
'gender': fields.selection([('male', 'Male'),('female', 'Female')], 'Gender'),
|
||||
'marital': fields.many2one('hr.employee.marital.status', 'Marital Status'),
|
||||
'bank_account': fields.char('Bank Account', size=64),
|
||||
@@ -119,10 +119,10 @@ class hr_employee(osv.osv):
|
||||
'address_id': fields.many2one('res.partner.address', 'Working Address'),
|
||||
'address_home_id': fields.many2one('res.partner.address', 'Home Address'),
|
||||
'work_phone': fields.related('address_id', 'phone', type='char', string='Work Phone', readonly=True),
|
||||
'work_email': fields.related('address_id', 'email', type='char', size=240, string='Work E-mail', readonly=True),
|
||||
'work_email': fields.related('address_id', 'email', type='char', size=240, string='Work E-mail'),
|
||||
'work_location': fields.char('Office Location', size=32),
|
||||
'notes': fields.text('Notes'),
|
||||
'parent_id': fields.related('department_id', 'manager_id', relation='hr.employee', string='Manager', type='many2one', store=True, select=True),
|
||||
'parent_id': fields.related('department_id', 'manager_id', relation='hr.employee', string='Manager', type='many2one', store=True, select=True, readonly=True, help="It is linked with manager of Department"),
|
||||
'category_ids': fields.many2many('hr.employee.category', 'employee_category_rel','category_id','emp_id','Category'),
|
||||
'child_ids': fields.one2many('hr.employee', 'parent_id', 'Subordinates'),
|
||||
'resource_id': fields.many2one('resource.resource', 'Resource', ondelete='cascade', required=True),
|
||||
@@ -131,14 +131,29 @@ class hr_employee(osv.osv):
|
||||
'photo': fields.binary('Photo')
|
||||
}
|
||||
|
||||
def onchange_company(self, cr, uid, ids, company, context=None):
|
||||
company_id = self.pool.get('res.company').browse(cr,uid,company)
|
||||
for address in company_id.partner_id.address:
|
||||
return {'value': {'address_id': address.id}}
|
||||
return {'value':{}}
|
||||
|
||||
def onchange_department(self, cr, uid, ids, department_id, context=None):
|
||||
manager = self.pool.get('hr.department').browse(cr, uid, department_id).manager_id.id
|
||||
return {'value': {'parent_id':manager or False}}
|
||||
|
||||
def onchange_user(self, cr, uid, ids, user_id, context=None):
|
||||
mail = self.pool.get('res.users').browse(cr,uid,user_id)
|
||||
return {'value': {'work_email':mail.user_email}}
|
||||
|
||||
def _get_photo(self, cr, uid, context=None):
|
||||
return open(os.path.join(
|
||||
tools.config['addons_path'], 'hr/image', 'photo.png'),
|
||||
'rb') .read().encode('base64')
|
||||
|
||||
|
||||
_defaults = {
|
||||
'active': 1,
|
||||
'photo': _get_photo,
|
||||
'address_id': lambda self,cr,uid,c: self.pool.get('res.partner.address').browse(cr, uid, uid, c).partner_id.id
|
||||
}
|
||||
|
||||
def _check_recursion(self, cr, uid, ids, context=None):
|
||||
@@ -174,4 +189,4 @@ class hr_department(osv.osv):
|
||||
|
||||
hr_department()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
@@ -14,9 +14,9 @@
|
||||
<field name="arch" type="xml">
|
||||
<form string="department">
|
||||
<group col="6" colspan="4">
|
||||
<field colspan="4" name="name" select="1"/>
|
||||
<field name="name" select="1"/>
|
||||
<field name="parent_id"/>
|
||||
<field colspan="4" name="manager_id" select="1"/>
|
||||
<field name="manager_id" select="1"/>
|
||||
<field name="company_id" select="1" widget="selection" groups="base.group_multi_company"/>
|
||||
</group>
|
||||
<notebook colspan="4" >
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<attribute name='string'></attribute>
|
||||
</xpath>
|
||||
<xpath expr="//label[@string='description']" position="attributes">
|
||||
<attribute name="string">You can enhance the base HR Application by installing few HR-related modules.</attribute>
|
||||
<attribute name="string">You can enhance the base HR Application by installing few HR-related functionalities.</attribute>
|
||||
</xpath>
|
||||
<group colspan="8">
|
||||
<field name="hr_holidays"/>
|
||||
|
||||
+11
-9
@@ -22,12 +22,12 @@
|
||||
<group colspan="4" col="8">
|
||||
<group colspan="6" col="6">
|
||||
<field colspan="6" name="name" />
|
||||
<field name="user_id"/>
|
||||
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
|
||||
<field name="user_id" on_change="onchange_user(user_id)"/>
|
||||
<field name="company_id" widget="selection" groups="base.group_multi_company,base.group_extended" on_change="onchange_company(company_id)"/>
|
||||
<field name="active" groups="base.group_extended"/>
|
||||
<newline/>
|
||||
<field name="department_id" widget="selection" on_change="onchange_department(department_id)"/>
|
||||
<field name="parent_id" />
|
||||
<field name="coach_id" />
|
||||
</group>
|
||||
<group colspan="2" col="1">
|
||||
<field name="photo" widget='image' nolabel="1"/>
|
||||
@@ -39,7 +39,7 @@
|
||||
<separator colspan="2" string="Social IDs"/>
|
||||
<field name="ssnid"/>
|
||||
<field name="sinid" groups="base.group_extended"/>
|
||||
<field name="otherid" groups="base.group_extended"/>
|
||||
<field name="identification_id" groups="base.group_extended"/>
|
||||
</group>
|
||||
<group col="2" colspan="2">
|
||||
<separator string="Status" colspan="2"/>
|
||||
@@ -59,8 +59,8 @@
|
||||
</group>
|
||||
<group col="2" colspan="2">
|
||||
<separator string="Position" colspan="2"/>
|
||||
<field name="job_id" widget="selection" domain="[('state','!=','old')]"/>
|
||||
<field name="department_id" widget="selection"/>
|
||||
<field name="job_id" domain="[('state','!=','old')]"/>
|
||||
<field name="coach_id" />
|
||||
</group>
|
||||
</page>
|
||||
<page string="Categories">
|
||||
@@ -83,7 +83,8 @@
|
||||
<tree string="Employees">
|
||||
<field name="name"/>
|
||||
<field name="work_phone"/>
|
||||
<field name="work_email"/>
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
<field name="work_email" invisible="1"/>
|
||||
<field name="department_id"/>
|
||||
<field name="job_id"/>
|
||||
<field name="parent_id"/>
|
||||
@@ -98,7 +99,7 @@
|
||||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Employees">
|
||||
<filter icon="terp-personal-" domain="[('active','=',False)]" string="Unactive" groups="base.group_extended"/>
|
||||
<filter icon="terp-personal+" domain="[('active','=',True)]" string="Active" groups="base.group_extended"/>
|
||||
<separator orientation="vertical" />
|
||||
<field name="name"/>
|
||||
<field name="department_id" widget="selection">
|
||||
@@ -113,6 +114,7 @@
|
||||
<separator orientation="vertical" />
|
||||
<filter string="Department" icon="terp-personal+" domain="[]" context="{'group_by':'department_id'}"/>
|
||||
<filter string="Job" icon="terp-gtk-select-all" domain="[]" context="{'group_by':'job_id'}"/>
|
||||
<filter string="Company" icon="terp-go-home" domain="[]" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
@@ -148,7 +150,7 @@
|
||||
<field name="help">The employee directory contains all data related to your employees: from their photo up to their hourly estimated costs for the timesheets. Employees are managed by departments and can be linked to users to manage their access rights.</field>
|
||||
</record>
|
||||
|
||||
<menuitem action="open_view_employee_list_my" id="menu_open_view_employee_list_my" sequence="3" parent="menu_hr_main"/>
|
||||
<menuitem action="open_view_employee_list_my" id="menu_open_view_employee_list_my" sequence="3" parent="menu_hr_main" groups="base.group_system,base.group_hr_manager,base.group_hr_user"/>
|
||||
|
||||
<!--
|
||||
=======================
|
||||
|
||||
@@ -35,7 +35,7 @@ class hr_installer(osv.osv_memory):
|
||||
help="Helps you manage and streamline your recruitment process."),
|
||||
'hr_timesheet_sheet':fields.boolean('Timesheets',
|
||||
help="Tracks and helps employees encode and validate timesheets "
|
||||
"and attendance."),
|
||||
"and attendances."),
|
||||
'hr_contract': fields.boolean("Employee's Contracts",
|
||||
help="Extends employee profiles to help manage their contracts."),
|
||||
'hr_evaluation': fields.boolean('Periodic Evaluations',
|
||||
@@ -44,7 +44,7 @@ class hr_installer(osv.osv_memory):
|
||||
'hr_attendance': fields.boolean('Attendances',
|
||||
help="Simplifies the management of employee's attendances."),
|
||||
'hr_payroll': fields.boolean('Payroll',
|
||||
help="Generic Payroll system"),
|
||||
help="Generic Payroll system."),
|
||||
'hr_payroll_account': fields.boolean('Payroll Accounting',
|
||||
help="Generic Payroll system Integrated with Accountings."),
|
||||
}
|
||||
|
||||
@@ -121,6 +121,17 @@
|
||||
<field name="action">sign_out</field>
|
||||
<field name="employee_id" ref="hr.employee1"/>
|
||||
</record>
|
||||
|
||||
<record id="property_rule_attendace" model="ir.rule">
|
||||
<field name="name">Employee Attendance</field>
|
||||
<field model="ir.model" name="model_id" ref="model_hr_attendance"/>
|
||||
<field name="domain_force">[('employee_id.user_id','=',user.id)]</field>
|
||||
<field name="groups" eval="[(6,0,[ref('base.group_user')])]"/>
|
||||
</record>
|
||||
<record id="property_rule_attendace_manager" model="ir.rule">
|
||||
<field name="name">Manager Attendance</field>
|
||||
<field model="ir.model" name="model_id" ref="model_hr_attendance"/>
|
||||
<field name="domain_force">['|',('employee_id.user_id','=',user.id),('employee_id.parent_id.user_id','=',user.id )]</field>
|
||||
<field name="groups" eval="[(6,0,[ref('base.group_hr_user'),ref('base.group_hr_manager')])]"/>
|
||||
</record>
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -51,6 +51,7 @@
|
||||
<field name="arch" type="xml">
|
||||
<search string="Hr Attendance Search">
|
||||
<filter icon="terp-stock_align_left_24" string="My Attendances" domain="[('employee_id.user_id.id', '=', uid)]" />
|
||||
<separator orientation="vertical"/>
|
||||
<filter icon="terp-go-today" string="Today" domain="[('name::date','=',current_date)]" />
|
||||
<separator orientation="vertical"/>
|
||||
<field name="employee_id" />
|
||||
@@ -59,6 +60,7 @@
|
||||
<newline/>
|
||||
<group expand="0" string="Group By...">
|
||||
<filter name="employee" string="Employee" icon="terp-personal" domain="[]" context="{'group_by':'employee_id'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Day" icon="terp-go-today" domain="[]" context="{'group_by':'day'}"/>
|
||||
</group>
|
||||
</search>
|
||||
@@ -76,7 +78,7 @@
|
||||
</record>
|
||||
|
||||
<menuitem id="menu_hr_time_tracking" name="Time Tracking" parent="hr.menu_hr_root" sequence="3"/>
|
||||
<menuitem action="open_view_attendance" id="menu_open_view_attendance" parent="menu_hr_time_tracking" groups="base.group_hr_manager,base.group_hr_user,base.group_hr_attendance,base.group_system" sequence="3"/>
|
||||
<menuitem action="open_view_attendance" id="menu_open_view_attendance" parent="menu_hr_time_tracking" groups="base.group_hr_manager,base.group_hr_user,base.group_hr_attendance,base.group_system,base.group_user" sequence="3"/>
|
||||
|
||||
<record id="edit_attendance_reason" model="ir.ui.view">
|
||||
<field name="name">hr.action.reason.form</field>
|
||||
@@ -111,8 +113,8 @@
|
||||
<field name="view_id" ref="view_attendance_reason"/>
|
||||
</record>
|
||||
|
||||
<menuitem sequence="9" id="hr.menu_open_view_attendance_reason_config" parent="hr.menu_hr_configuration" name="Leaves" />
|
||||
<menuitem action="open_view_attendance_reason" id="menu_open_view_attendance_reason" parent="hr.menu_open_view_attendance_reason_config"/>
|
||||
<menuitem sequence="2" id="hr.menu_open_view_attendance_reason_new_config" parent="hr.menu_hr_configuration" name="Time Tracking" />
|
||||
<menuitem action="open_view_attendance_reason" id="menu_open_view_attendance_reason" parent="hr.menu_open_view_attendance_reason_new_config"/>
|
||||
|
||||
<record id="hr_attendance_employee" model="ir.ui.view">
|
||||
<field name="name">hr.employee.form1</field>
|
||||
|
||||
@@ -10,3 +10,4 @@
|
||||
"access_hr_department_attendance","hr.department attendance","hr.model_hr_department","base.group_hr_attendance",1,0,0,0
|
||||
"access_hr_action_reason_system","hr.action.reason.system","model_hr_action_reason","base.group_system",1,1,1,1
|
||||
"access_hr_attendance_system","hr.attendance.system","model_hr_attendance","base.group_system",1,0,0,0
|
||||
"access_hr_attendance_employee","hr.attendance.employee","model_hr_attendance","base.group_user",1,0,0,0
|
||||
|
||||
|
@@ -15,8 +15,8 @@
|
||||
<separator colspan="4"/>
|
||||
<group colspan="4" col="6">
|
||||
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
|
||||
<button icon="gtk-go-back" string="Sign in" name="si_check" type="object"/>
|
||||
<button icon="gtk-go-forward" string="Sign out" name="so_check" type="object"/>
|
||||
<button icon="terp-gtk-jump-to-ltr" string="Sign in" name="si_check" type="object"/>
|
||||
<button icon="terp-gtk-jump-to-rtl" string="Sign out" name="so_check" type="object"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
|
||||
@@ -95,11 +95,13 @@ class hr_contract(osv.osv):
|
||||
_columns = {
|
||||
'name': fields.char('Contract Reference', size=32, required=True),
|
||||
'employee_id': fields.many2one('hr.employee', "Employee", required=True),
|
||||
'department_id': fields.related('employee_id','department_id', string="Department", readonly=True),
|
||||
'type_id': fields.many2one('hr.contract.type', "Contract Type"),
|
||||
'department_id': fields.related('employee_id','department_id', type='many2one', relation='hr.department', string="Department", readonly=True),
|
||||
'type_id': fields.many2one('hr.contract.type', "Contract Type", required=True),
|
||||
'job_id': fields.many2one('hr.job', 'Job Title'),
|
||||
'date_start': fields.date('Start Date', required=True),
|
||||
'date_end': fields.date('End Date'),
|
||||
'trial_date_start': fields.date('Trial Start Date'),
|
||||
'trial_date_end': fields.date('Trial End Date'),
|
||||
'working_hours': fields.many2one('resource.calendar','Working Schedule'),
|
||||
'wage_type_id': fields.many2one('hr.contract.wage.type', 'Wage Type', required=True),
|
||||
'wage': fields.float('Wage', digits=(16,2), required=True),
|
||||
|
||||
@@ -24,7 +24,20 @@
|
||||
<field name="name">Monthly Net Wage</field>
|
||||
<field name="type">net</field>
|
||||
<field name="period_id" ref="hr_contract_wage_type_period_monthly"/>
|
||||
</record>
|
||||
</record>
|
||||
|
||||
<!-- Contract Types -->
|
||||
<record id="hr_contract_type_emp" model="hr.contract.type">
|
||||
<field name="name">Employee</field>
|
||||
</record>
|
||||
|
||||
<record id="hr_contract_type_wrkr" model="hr.contract.type">
|
||||
<field name="name">Worker</field>
|
||||
</record>
|
||||
|
||||
<record id="hr_contract_type_sub" model="hr.contract.type">
|
||||
<field name="name">Subcontractor</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
</record>
|
||||
|
||||
<record id="action_hr_contract_wage_type" model="ir.actions.act_window">
|
||||
<field name="name">Contract Wage Type</field>
|
||||
<field name="name">Wage Type</field>
|
||||
<field name="res_model">hr.contract.wage.type</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
@@ -58,7 +58,7 @@
|
||||
</record>
|
||||
|
||||
<menuitem id="next_id_56" name="Contract" parent="hr.menu_hr_management" sequence="5" groups="base.group_system"/>
|
||||
<menuitem action="action_hr_contract_wage_type" id="hr_menu_contract_wage_type" parent="next_id_56"/>
|
||||
<menuitem action="action_hr_contract_wage_type" id="hr_menu_contract_wage_type" parent="next_id_56" sequence="7"/>
|
||||
|
||||
<record id="hr_contract_wage_type_period_view_form" model="ir.ui.view">
|
||||
<field name="name">hr.contract.wage.type.period.view.form</field>
|
||||
@@ -101,7 +101,7 @@
|
||||
<field name="model">hr.employee</field>
|
||||
<field name="inherit_id" ref="hr.view_employee_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<page string="Notes" position="before">
|
||||
<page string="Personal Information" position="after">
|
||||
<page string="Miscellaneous">
|
||||
<group colspan="2" col="2">
|
||||
<separator string="Personal Info" colspan="2"/>
|
||||
@@ -133,7 +133,7 @@
|
||||
<field name="type">form</field>
|
||||
<field name="inherit_id" ref="hr.view_employee_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="department_id" position="after">
|
||||
<field name="parent_id" position="after">
|
||||
<field name="contract_id"/>
|
||||
</field>
|
||||
</field>
|
||||
@@ -154,8 +154,11 @@
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Group By..." colspan="4" col="20">
|
||||
<filter string="Wage Type" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'wage_type_id'}"/>
|
||||
<filter string="Contract Type" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'type_id'}"/>
|
||||
<filter string="Working Schedule" icon="terp-personal+" domain="[]" context="{'group_by':'working_hours'}"/>
|
||||
<filter string="Current" icon="terp-stock_symbol-selection"
|
||||
domain="[('date_end','>=', time.strftime('%%Y-%%m-%%d'))]"
|
||||
context="{'group_by':'date_end'}"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
@@ -182,7 +185,10 @@
|
||||
<field name="date_start" />
|
||||
<field name="date_end" />
|
||||
<field name="working_hours"/>
|
||||
</group>
|
||||
<separator colspan="2" string="Trial Period"/>
|
||||
<field name="trial_date_start" />
|
||||
<field name="trial_date_end" />
|
||||
</group>
|
||||
<group col="2" colspan="2">
|
||||
<separator colspan="2" string="Advantages"/>
|
||||
<field name="advantages_net"/>
|
||||
@@ -205,13 +211,14 @@
|
||||
<tree string="Contracts">
|
||||
<field name="name"/>
|
||||
<field name="employee_id"/>
|
||||
<field name="type_id"/>
|
||||
<field name="job_id"/>
|
||||
<field name="department_id"/>
|
||||
<field name="working_hours"/>
|
||||
<field name="date_start"/>
|
||||
<field name="date_end"/>
|
||||
<field name="working_hours"/>
|
||||
<field name="wage_type_id"/>
|
||||
<field name="wage"/>
|
||||
<field name="wage_type_id" invisible="1"/>
|
||||
<field name="wage" invisible="1"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
@@ -268,8 +275,8 @@
|
||||
<field name="search_view_id" ref="hr_contract_type_view_search"/>
|
||||
</record>
|
||||
|
||||
<menuitem action="action_hr_contract_type" id="hr_menu_contract_type" parent="next_id_56"/>
|
||||
<menuitem action="action_hr_contract" id="hr_menu_contract" parent="hr.menu_hr_main" name="Contracts" sequence="4"/>
|
||||
<menuitem action="action_hr_contract_type" id="hr_menu_contract_type" parent="next_id_56" sequence="6"/>
|
||||
<menuitem action="action_hr_contract" id="hr_menu_contract" parent="hr.menu_hr_main" name="Contracts" sequence="4" groups="base.group_system,base.group_hr_manager,base.group_hr_contract"/>
|
||||
|
||||
<!-- Contracts Button on Employee Form -->
|
||||
<act_window domain="[('employee_id', '=', active_id)]" id="act_hr_employee_2_hr_contract" name="Contracts" res_model="hr.contract" src_model="hr.employee"/>
|
||||
|
||||
@@ -12,7 +12,9 @@
|
||||
"access_hr_contract_wage_type_system","hr.contract.wage.type.system","model_hr_contract_wage_type","base.group_system",1,1,1,1
|
||||
"access_hr_contract_wage_type_period_system","hr.contract.wage.type.period.system","model_hr_contract_wage_type_period","base.group_system",1,1,1,1
|
||||
"access_hr_contract_type_system","hr.contract.type.system","model_hr_contract_type","base.group_system",1,1,1,1
|
||||
"access_hr_contract_system","hr.contract.system","model_hr_contract","base.group_system",1,0,0,0
|
||||
"access_hr_contract_system","hr.contract.system","model_hr_contract","base.group_system",1,1,1,1
|
||||
"access_hr_employee_category_contract","hr.employee.category.contract","hr.model_hr_employee_category","base.group_hr_contract",1,1,1,1
|
||||
"access_hr_department_contract","hr.department.contract","hr.model_hr_department","base.group_hr_contract",1,1,1,1
|
||||
"access_hr_contract_manager","hr.contract.manager","model_hr_contract","base.group_hr_manager",1,0,0,0
|
||||
"access_hr_contract_manager","hr.contract.manager","model_hr_contract","base.group_hr_manager",1,1,1,1
|
||||
"access_hr_contract_employee","hr.contract.employee","model_hr_contract","base.group_user",1,0,0,0
|
||||
"access_hr_contract_type_manager","hr.contract.type.manager","model_hr_contract_type","base.group_hr_manager",1,1,1,1
|
||||
|
||||
|
@@ -41,7 +41,10 @@
|
||||
advantages_net: 0.0
|
||||
date_end: '2011-05-18'
|
||||
date_start: '2010-05-18'
|
||||
trial_date_end: '2010-03-01'
|
||||
trial_date_start: '2010-04-30'
|
||||
name: contract1
|
||||
wage: 1.0
|
||||
wage_type_id: hr_contract_wage_type_monthlygrosswage0
|
||||
type_id: hr_contract_type_emp
|
||||
working_hours: resource.timesheet_group1
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
in which various surveys can be created and it can be defined which
|
||||
level of employee hierarchy fills what and final review and evaluation
|
||||
is done by the manager.Every evaluation filled by the employees can be viewed
|
||||
in the form of.Implements a dashboard for My Current Evaluations
|
||||
in the form of.Implements a dashboard for My Current Evaluations
|
||||
""",
|
||||
"init_xml": [],
|
||||
"demo_xml": ["hr_evaluation_demo.xml",
|
||||
@@ -43,7 +43,8 @@
|
||||
"security/hr_evaluation_security.xml",
|
||||
"wizard/hr_evaluation_mail_view.xml",
|
||||
"hr_evaluation_view.xml",
|
||||
"report/hr_evaluation_report_view.xml"
|
||||
"report/hr_evaluation_report_view.xml",
|
||||
"board_hr_evaluation_view.xml"
|
||||
],
|
||||
"test": ["test/test_hr_evaluation.yml"],
|
||||
"active": False,
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
<openerp>
|
||||
<data>
|
||||
<record id="act_hr_evaluation_tree" model="ir.actions.act_window">
|
||||
<field name="name">My Current Evaluations</field>
|
||||
<field name="name">My Evaluation Remaining</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">hr_evaluation.evaluation</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_id" eval="False"/>
|
||||
<field name="domain">[('state','!=','done'),('create_uid','=',uid)]</field>
|
||||
<field name="domain">[('state','in',('wait', 'progress')),('create_uid','=',uid)]</field>
|
||||
<field name="search_view_id" ref="hr_evaluation.view_hr_evaluation_tree"/>
|
||||
</record>
|
||||
|
||||
@@ -18,9 +18,15 @@
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="/form/hpaned/child1" position="inside">
|
||||
<action colspan="4" height="220" name="%(act_hr_evaluation_tree)d" string="My Current Evaluations" width="510"/>
|
||||
<action colspan="4" height="220" name="%(act_hr_evaluation_tree)d" string="My Evaluation Remaining" width="510"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
<menuitem
|
||||
action="hr.open_board_hr"
|
||||
icon="terp-graph"
|
||||
id="base.menu_hr_project"
|
||||
parent="base.menu_hr_dasboard"
|
||||
sequence="4"/>
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -34,7 +34,7 @@ class hr_evaluation_plan(osv.osv):
|
||||
'company_id': fields.many2one('res.company', 'Company', required=True),
|
||||
'phase_ids': fields.one2many('hr_evaluation.plan.phase', 'plan_id', 'Evaluation Phases'),
|
||||
'month_first': fields.integer('First Evaluation After'),
|
||||
'month_next': fields.integer('Next Evaluation After'),
|
||||
'month_next': fields.integer('After the Date of Start'),
|
||||
'active': fields.boolean('Active')
|
||||
}
|
||||
_defaults = {
|
||||
@@ -67,10 +67,10 @@ class hr_evaluation_plan_phase(osv.osv):
|
||||
'send_anonymous_employee': fields.boolean('Anonymous Summary',
|
||||
help="Send an anonymous summary to the employee"),
|
||||
'wait': fields.boolean('Wait Previous Phases',
|
||||
help="Check this box if you want to wait that all preceeding phases " +
|
||||
help="Check this box if you want to wait that all preceding phases " +
|
||||
"are finished before launching this phase."),
|
||||
'mail_feature': fields.boolean('Send mail for this phase', help="Check this box if you want to send mail to employees"+
|
||||
"coming under this phase"),
|
||||
" coming under this phase"),
|
||||
'mail_body': fields.text('Email'),
|
||||
'email_subject':fields.text('char')
|
||||
}
|
||||
@@ -161,13 +161,13 @@ class hr_evaluation(osv.osv):
|
||||
('2','Meet expectations'),
|
||||
('3','Exceeds expectations'),
|
||||
('4','Significantly exceeds expectations'),
|
||||
], "Overall Rating", help="This is the overall rating on that summarize the evaluation"),
|
||||
], "Appreciation", help="This is the appreciation on that summarize the evaluation"),
|
||||
'survey_request_ids': fields.one2many('hr.evaluation.interview','evaluation_id','Appraisal Forms'),
|
||||
'plan_id': fields.many2one('hr_evaluation.plan', 'Plan', required=True),
|
||||
'state': fields.selection([
|
||||
('draft','Draft'),
|
||||
('wait','Plan In Progress'),
|
||||
('progress','Final Validation'),
|
||||
('progress','Waiting Appreciation'),
|
||||
('done','Done'),
|
||||
('cancel','Cancelled'),
|
||||
], 'State', required=True, readonly=True),
|
||||
@@ -220,8 +220,8 @@ class hr_evaluation(osv.osv):
|
||||
elif phase.action == "self":
|
||||
childs = [evaluation.employee_id]
|
||||
for child in childs:
|
||||
if not child.user_id:
|
||||
continue
|
||||
# if not child.user_id:
|
||||
# continue
|
||||
|
||||
int_id = hr_eval_inter_obj.create(cr, uid, {
|
||||
'evaluation_id': evaluation.id,
|
||||
@@ -284,6 +284,7 @@ survey_request()
|
||||
class hr_evaluation_interview(osv.osv):
|
||||
_name = 'hr.evaluation.interview'
|
||||
_inherits = {'survey.request': 'request_id'}
|
||||
_rec_name = 'request_id'
|
||||
_description = 'Evaluation Interview'
|
||||
_columns = {
|
||||
'request_id': fields.many2one('survey.request','Request_id', ondelete='cascade', required=True),
|
||||
@@ -293,7 +294,19 @@ class hr_evaluation_interview(osv.osv):
|
||||
_defaults = {
|
||||
'is_evaluation': True,
|
||||
}
|
||||
|
||||
|
||||
def name_get(self, cr, uid, ids, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
if not len(ids):
|
||||
return []
|
||||
reads = self.browse(cr, uid, ids, context=context)
|
||||
res = []
|
||||
for record in reads:
|
||||
name = record.request_id.survey_id.title
|
||||
res.append((record['id'], name))
|
||||
return res
|
||||
|
||||
def survey_req_waiting_answer(self, cr, uid, ids, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
<field name="type" ref="survey.survey_type1"/>
|
||||
<field name="responsible_id" ref="base.user_demo"/>
|
||||
<field name="response_user">5</field>
|
||||
<field name="state">open</field>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
@@ -1610,6 +1611,19 @@ Once the form had been filled, the employee send it to his supervisor.
|
||||
<field eval="'run_employee_evaluation'" name="function" />
|
||||
<field eval="'(False,)'" name="args" />
|
||||
</record>
|
||||
|
||||
<record id="property_rule_evaluation" model="ir.rule">
|
||||
<field name="name">Employee Evaluation</field>
|
||||
<field model="ir.model" name="model_id" ref="model_hr_evaluation_evaluation"/>
|
||||
<field name="domain_force">[('employee_id.user_id','=',user.id)]</field>
|
||||
<field name="groups" eval="[(6,0,[ref('base.group_user')])]"/>
|
||||
</record>
|
||||
<record id="property_rule_evaluation_manager" model="ir.rule">
|
||||
<field name="name">Manager Evaluation</field>
|
||||
<field model="ir.model" name="model_id" ref="model_hr_evaluation_evaluation"/>
|
||||
<field name="domain_force">['|',('employee_id.user_id','=',user.id),('employee_id.parent_id.user_id','=',user.id )]</field>
|
||||
<field name="groups" eval="[(6,0,[ref('base.group_hr_user'),ref('base.group_hr_manager')])]"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
</openerp>
|
||||
|
||||
@@ -26,13 +26,14 @@
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Evaluation Plan">
|
||||
<group col="6" colspan="4">
|
||||
<group col="8" colspan="4">
|
||||
<field name="name" select="1"/>
|
||||
<field name="company_id" select="1" widget="selection" groups="base.group_multi_company"/>
|
||||
<field name="active"/>
|
||||
<field name="month_first"/>
|
||||
<field name="month_next"/>
|
||||
<label string="(months)" align="0.0"/>
|
||||
<newline/>
|
||||
<field name="active"/>
|
||||
</group>
|
||||
<notebook colspan="4">
|
||||
<page string="Evaluation Phases">
|
||||
@@ -72,7 +73,7 @@
|
||||
<field name="model">hr_evaluation.plan.phase</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Evaluation Plan Phase">
|
||||
<form string="Evaluation Plan Phases">
|
||||
<notebook>
|
||||
<page string="General">
|
||||
<field name="plan_id" invisible="1"/>
|
||||
@@ -84,7 +85,7 @@
|
||||
<group col="4" colspan="4">
|
||||
<separator string="Action to Perform" colspan="4"/>
|
||||
<field name="action"/>
|
||||
<field name="survey_id"/>
|
||||
<field name="survey_id" domain="[('state','=','open')]"/>
|
||||
</group>
|
||||
<group col="4" colspan="4">
|
||||
<group col="4" colspan="2">
|
||||
@@ -125,7 +126,7 @@
|
||||
<field name="model">hr_evaluation.plan.phase</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Evaluation Plan Phase" editable="bottom" >
|
||||
<tree string="Evaluation Plan Phases" editable="bottom" >
|
||||
<field name="sequence"/>
|
||||
<field name="name"/>
|
||||
<field name="action"/>
|
||||
@@ -184,7 +185,7 @@
|
||||
<field name="state"/>
|
||||
<button name="button_plan_in_progress" string="Start Evaluation" states="draft" type="object"
|
||||
icon="gtk-execute"/>
|
||||
<button name="button_final_validation" string="Final Validation" states="wait" type="object"
|
||||
<button name="button_final_validation" string="Validate Evaluation" states="wait" type="object"
|
||||
icon="gtk-execute"/>
|
||||
<button name="button_done" string="Done" states="progress" type="object"
|
||||
icon="gtk-jump-to"/>
|
||||
@@ -204,7 +205,7 @@
|
||||
<field name="employee_id"/>
|
||||
<field name="plan_id"/>
|
||||
<field name="date"/>
|
||||
<field name="progress" widget="progressbar"/>
|
||||
<!--field name="progress" widget="progressbar"/-->
|
||||
<field name="rating"/>
|
||||
<field name="state"/>
|
||||
</tree>
|
||||
@@ -230,40 +231,40 @@
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search Evaluation">
|
||||
<group col='10' colspan='4'>
|
||||
<filter icon="terp-document-new" string="Draft" domain="[('state','=','draft')]"/>
|
||||
<filter icon="terp-check" string="In progress" domain="[('state','=','wait')]"/>
|
||||
<filter icon="terp-dialog-close" string="Final Step" domain="[('state','=','progress')]"/>
|
||||
<filter icon="terp-check" string="Current" domain="[('state','=','wait'))]" help="Evaluations that are in waiting state"/>
|
||||
<filter icon="terp-camera_test" string="In progress" domain="[('state','=','progress')]" help="Evaluations that are in progress state"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter icon="terp-go-week" string="7 Days" help="Evaluations to close within the next 7 days"
|
||||
domain="[('date', '>=', (datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]" />
|
||||
<filter icon="terp-gnome-cpu-frequency-applet+" string="Overpassed"
|
||||
help="Evaluations that overpassed the deadline" domain="[('date','>=',str(datetime.date.today()))]" />
|
||||
<separator orientation="vertical"/>
|
||||
<field name="employee_id" />
|
||||
<field name="plan_id" widget="selection" />
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand='0' string='Group by...'>
|
||||
<filter string='Employee' icon="terp-personal" domain="[]" context="{'group_by' : 'employee_id'}" />
|
||||
<filter string='Plan' icon="terp-stock_align_left_24" domain="[]" context="{'group_by' : 'plan_id'}" />
|
||||
<filter string='State' icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by' : 'state'}" />
|
||||
<separator orientation="vertical"/>
|
||||
<filter string='Date' icon="terp-go-month" domain="[]" context="{'group_by' : 'date'}" />
|
||||
<separator orientation="vertical"/>
|
||||
<filter icon="terp-gnome-cpu-frequency-applet+" string="Overpassed Deadline"
|
||||
help="Evaluations that overpassed the deadline" domain="[('date','<=',(datetime.date.today()).strftime('%%Y-%%m-%%d'))]" />
|
||||
<separator orientation="vertical"/>
|
||||
<field name="employee_id" />
|
||||
<field name="plan_id" widget="selection" />
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand='0' string='Group by...'>
|
||||
<filter string='Employee' icon="terp-personal" domain="[]" context="{'group_by' : 'employee_id'}" />
|
||||
<filter string='Plan' icon="terp-stock_align_left_24" domain="[]" context="{'group_by' : 'plan_id'}" />
|
||||
<filter string='State' icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by' : 'state'}" />
|
||||
<separator orientation="vertical"/>
|
||||
<filter string='Date' icon="terp-go-month" domain="[]" context="{'group_by' : 'date'}" />
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window" id="open_view_hr_evaluation_tree">
|
||||
<field name="name">Evaluation</field>
|
||||
<field name="name">Evaluations</field>
|
||||
<field name="res_model">hr_evaluation.evaluation</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form,graph</field>
|
||||
<field name="search_view_id" ref="hr_evaluation.evaluation_search"/>
|
||||
<field name="help">Each employee can be assigned to an evaluation plan. These plans define the frequency and the way you manage your periodic personnal evalautions. You will be able to define steps and attach interview forms to each step. OpenERP manages all kind of evaluations: bottom-up, top-down, self evaluation and final evaluation by the manager.</field>
|
||||
<field name="help">Each employee can be assigned to an evaluation plan. These plans define the frequency and the way you manage your periodic personnal evaluation. You will be able to define steps and attach interview forms to each step. OpenERP manages all kind of evaluations: bottom-up, top-down, self evaluation and final evaluation by the manager.</field>
|
||||
</record>
|
||||
|
||||
<menuitem name="Evaluation" parent="menu_eval_hr" id="menu_open_view_hr_evaluation_tree"
|
||||
<menuitem name="Evaluations" parent="menu_eval_hr" id="menu_open_view_hr_evaluation_tree"
|
||||
action="open_view_hr_evaluation_tree"/>
|
||||
|
||||
<record model="ir.ui.view" id="view_hr_evaluation_interview_form">
|
||||
@@ -299,7 +300,7 @@
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Interview Evaluation">
|
||||
<field name="date_deadline"/>
|
||||
<field name="date_deadline" string="Deadline Date"/>
|
||||
<field name="survey_id"/>
|
||||
<field name="user_id" string="Interviewer"/>
|
||||
<field name="user_to_review_id"/>
|
||||
@@ -327,26 +328,57 @@
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Group By...">
|
||||
<filter string="Survey" icon="terp-personal" domain="[]" context="{'group_by':'survey_id'}"/>
|
||||
<filter string="Interviewer" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Survey" icon="terp-stock_align_left_24" domain="[]" context="{'group_by':'survey_id'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="State" name="group_state" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_evaluation_calendar" model="ir.ui.view">
|
||||
<field name="name">Interview Request</field>
|
||||
<field name="model">hr.evaluation.interview</field>
|
||||
<field name="type">calendar</field>
|
||||
<field name="arch" type="xml">
|
||||
<calendar string="Interview Request" color="user_to_review_id" date_start="date_deadline">
|
||||
<field name="request_id"/>
|
||||
</calendar>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window" id="action_hr_evaluation_interview_tree">
|
||||
<field name="name">Interview Requests</field>
|
||||
<field name="res_model">hr.evaluation.interview</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_id" ref="view_hr_evaluation_interview_form"/>
|
||||
<field name="domain">[('is_evaluation' ,'=', True)]</field>
|
||||
<field name="context">{"search_default_todo":1,"search_default_user_id":uid}</field>
|
||||
<field name="search_view_id" ref="view_hr_evaluation_interview_search"/>
|
||||
<field name="help">Interview Requests are generated automatically by OpenERP according to employees evaluation plan. Each user receives automatic emails and requests to perform evaluation of their collegues periodically.</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window.view" id="hr_evaluation_interview_tree">
|
||||
<field name="sequence" eval="1"/>
|
||||
<field name="view_mode">tree</field>
|
||||
<field name="view_id" ref="view_hr_evaluation_interview_tree"/>
|
||||
<field name="act_window_id" ref="action_hr_evaluation_interview_tree"/>
|
||||
</record>
|
||||
<record model="ir.actions.act_window.view" id="hr_evaluation_interview_form">
|
||||
<field name="sequence" eval="2"/>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="view_id" ref="view_hr_evaluation_interview_form"/>
|
||||
<field name="act_window_id" ref="action_hr_evaluation_interview_tree"/>
|
||||
</record>
|
||||
<record model="ir.actions.act_window.view" id="action_view_evaluation_calendar">
|
||||
<field name="sequence" eval="3"/>
|
||||
<field name="view_mode">calendar</field>
|
||||
<field name="view_id" ref="view_evaluation_calendar"/>
|
||||
<field name="act_window_id" ref="action_hr_evaluation_interview_tree"/>
|
||||
</record>
|
||||
|
||||
<menuitem name="Interview Requests" parent="menu_eval_hr" id="menu_open_hr_evaluation_interview_requests"
|
||||
action="action_hr_evaluation_interview_tree"/>
|
||||
<menuitem name="Evaluation Reminders" parent="menu_eval_hr" id="menu_eval_send_mail"
|
||||
|
||||
@@ -29,6 +29,9 @@ class hr_evaluation_report(osv.osv):
|
||||
_rec_name = 'date'
|
||||
_columns = {
|
||||
'create_date': fields.date('Create Date', readonly=True),
|
||||
'delay_date':fields.float('Delay to Start', digits=(16,2),readonly=True),
|
||||
'overpass_delay':fields.float('Overpassed Deadline', digits=(16,2), readonly=True),
|
||||
'progress_bar' : fields.float("Progress"),
|
||||
'day': fields.char('Day', size=128, readonly=True),
|
||||
'deadline': fields.date("Deadline", readonly=True),
|
||||
'request_id': fields.many2one('survey.request', 'Request_id', readonly=True),
|
||||
@@ -73,7 +76,10 @@ class hr_evaluation_report(osv.osv):
|
||||
to_char(s.create_date, 'YYYY') as year,
|
||||
to_char(s.create_date, 'MM') as month,
|
||||
count(l.*) as nbr,
|
||||
s.state
|
||||
s.state,
|
||||
s.progress as progress_bar,
|
||||
avg(extract('epoch' from age(s.create_date,CURRENT_DATE)))/(3600*24) as delay_date,
|
||||
avg(extract('epoch' from age(s.date,CURRENT_DATE)))/(3600*24) as overpass_delay
|
||||
from
|
||||
hr_evaluation_interview l
|
||||
LEFT JOIN
|
||||
@@ -90,6 +96,7 @@ class hr_evaluation_report(osv.osv):
|
||||
s.date_close,
|
||||
l.request_id,
|
||||
s.rating,
|
||||
s.progress,
|
||||
s.plan_id
|
||||
)
|
||||
""")
|
||||
|
||||
@@ -19,6 +19,9 @@
|
||||
<field name="month" invisible="1"/>
|
||||
<field name="rating" invisible="1"/>
|
||||
<field name="nbr" sum="# of Requests"/>
|
||||
<field name="progress_bar" widget="progressbar"/>
|
||||
<field name="delay_date"/>
|
||||
<field name="overpass_delay"/>
|
||||
<field name="state" invisible="1"/>
|
||||
</tree>
|
||||
</field>
|
||||
@@ -44,15 +47,13 @@
|
||||
<field name="arch" type="xml">
|
||||
<search string="Evaluations Analysis">
|
||||
<group>
|
||||
<filter icon="terp-go-year" string="365 Days"
|
||||
domain="[('create_date','<=', time.strftime('%%Y-%%m-%%d')), ('create_date', '>',(datetime.date.today()-datetime.timedelta(days=365)).strftime('%%Y-%%m-%%d'))]" help="Tasks performed in last 365 days"/>
|
||||
<filter icon="terp-go-month" string="30 Days" name="month" domain="[('create_date','<=', time.strftime('%%Y-%%m-%%d')), ('create_date','>',(datetime.date.today()-datetime.timedelta(days=30)).strftime('%%Y-%%m-%%d'))]" help="Tasks performed in last 30 days"/>
|
||||
<filter icon="terp-go-week" string=" 7 Days " separator="1"
|
||||
domain="[('create_date','<=', time.strftime('%%Y-%%m-%%d')), ('create_date','>',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]" help="Tasks during last 7 days"/>
|
||||
<filter icon="terp-go-year" string=" Year "
|
||||
domain="[('create_date','<=', time.strftime('%%Y-%%m-%%d')),('create_date','>=',time.strftime('%%Y-01-01'))]" help="Evaluation done in current year"/>
|
||||
<filter icon="terp-go-month" string=" Month " name="month" domain="[('create_date','<=', time.strftime('%%Y-%%m-%%d')),('create_date','>=',time.strftime('%%Y-%%m-01'))]" help="Evaluation done in current month"/>
|
||||
<filter icon="terp-go-month" string=" Month-1 " separator="1"
|
||||
domain="[('create_date','<=', (datetime.date (int(time.strftime('%%Y')), datetime.date.today().month, 1) - datetime.timedelta (days = 1)).strftime('%%Y-%%m-%%d')),('create_date','>=',(datetime.date (int(time.strftime('%%Y')), datetime.date.today().month-1, 1)).strftime('%%Y-%%m-%%d'))]" help="Evaluation done in last month"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Draft" icon="terp-document-new" domain="[('state','=','draft')]"
|
||||
help = "Draft Evaluations"/>
|
||||
<filter string="Plan In Progress" icon="terp-camera_test" domain="[('state', '=' ,'wait')]"
|
||||
<filter string="In Progress" icon="terp-camera_test" domain="[('state', '=' ,'wait')]"
|
||||
help = "In progress Evaluations"/>
|
||||
<filter string="Final Validation" icon="terp-check" domain="[('state','=','progress')]"
|
||||
help = "Final Validation Evaluations"/>
|
||||
@@ -62,24 +63,25 @@
|
||||
<field name="plan_id" widget="selection"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Group By...">
|
||||
<filter string="Employee" name="employee" icon="terp-personal" context="{'group_by':'employee_id'}"/>
|
||||
<filter string="Rating" icon="terp-rating-rated" context="{'group_by':'rating'}"/>
|
||||
<group expand="0" string="Extended Filters..." groups="base.group_extended">
|
||||
<field name="rating"/>
|
||||
<newline/>
|
||||
<field name="deadline"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Plan" icon="terp-stock_align_left_24" context="{'group_by':'plan_id'}"/>
|
||||
<filter string="State" icon="terp-stock_effects-object-colorize" context="{'group_by':'state'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Day" icon="terp-go-today" context="{'group_by':'day'}"/>
|
||||
<filter string="Month" icon="terp-go-month" context="{'group_by':'create_date'}"/>
|
||||
<filter string="Year" icon="terp-go-month" context="{'group_by':'year'}"/>
|
||||
<field name="state"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Extended Filters..." groups="base.group_extended">
|
||||
<field name="rating"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="deadline"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="state"/>
|
||||
<group expand="1" string="Group By...">
|
||||
<filter string="Employee" name="employee" icon="terp-personal" context="{'group_by':'employee_id'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Plan" icon="terp-stock_align_left_24" context="{'group_by':'plan_id'}"/>
|
||||
<filter string="Appreciation" icon="terp-rating-rated" context="{'group_by':'rating'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="State" icon="terp-stock_effects-object-colorize" context="{'group_by':'state'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Day" icon="terp-go-today" context="{'group_by':'day'}" help="Group by create Date"/>
|
||||
<filter string="Month" icon="terp-go-month" context="{'group_by':'create_date'}" help="Group by month of create Date"/>
|
||||
<filter string="Year" icon="terp-go-month" context="{'group_by':'year'}" help="Group by year of create Date"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
"access_hr_evaluation_evaluation_user","hr_evaluation.evaluation.user","model_hr_evaluation_evaluation","base.group_hr_user",1,1,1,1
|
||||
"access_hr_evaluation_evaluation_manager","hr_evaluation.evaluation.manager","model_hr_evaluation_evaluation","base.group_hr_manager",1,1,1,1
|
||||
"access_hr_evaluation_plan_user","hr_evaluation.plan.user","model_hr_evaluation_evaluation","base.group_hr_user",1,0,0,0
|
||||
"access_hr_evaluation_plan_manager","hr_evaluation.plan.manager","model_hr_evaluation_plan","base.group_hr_manager",1,0,0,0
|
||||
"access_hr_evaluation_plan_manager","hr_evaluation.plan.manager","model_hr_evaluation_plan","base.group_hr_manager",1,1,1,1
|
||||
"access_hr_evaluation_plan_phase_user","hr_evaluation.plan.phase.user","model_hr_evaluation_plan_phase","base.group_hr_user",1,0,0,0
|
||||
"access_hr_evaluation_plan_phase_manager","hr_evaluation.plan.phase.manager","model_hr_evaluation_plan_phase","base.group_hr_manager",1,0,0,0
|
||||
"access_hr_evaluation_plan_phase_manager","hr_evaluation.plan.phase.manager","model_hr_evaluation_plan_phase","base.group_hr_manager",1,1,1,1
|
||||
"access_hr_evaluation_interview_user","hr.evaluation.interview.user","model_hr_evaluation_interview","base.group_hr_user",1,1,1,1
|
||||
"access_hr_evaluation_interview_manager","hr.evaluation.interview.manager","model_hr_evaluation_interview","base.group_hr_manager",1,1,1,1
|
||||
"access_hr_evaluation_report","hr.evaluation.report","model_hr_evaluation_report","base.group_hr_manager",1,1,1,1
|
||||
@@ -12,6 +12,10 @@
|
||||
"access_hr_evaluation_plan_phase_system","hr_evaluation.plan.phase.system","model_hr_evaluation_plan_phase","base.group_system",1,1,1,1
|
||||
"access_hr_evaluation_evaluation_system","hr_evaluation.evaluation.system","model_hr_evaluation_evaluation","base.group_system",1,0,0,0
|
||||
"access_hr_evaluation_interview_system","hr.evaluation.interview.system","model_hr_evaluation_interview","base.group_system",1,0,0,0
|
||||
"access_hr_evaluation_evaluation_employee","hr_evaluation.evaluation.employee","model_hr_evaluation_evaluation","base.group_user",1,0,0,0
|
||||
"access_hr_evaluation_interview_employee","hr.evaluation.interview.employee","model_hr_evaluation_interview","base.group_user",1,0,0,0
|
||||
"access_hr_evaluation_user","hr_evaluation.user","model_hr_evaluation_plan","base.group_hr_user",1,1,1,1
|
||||
"access_hr_evaluation_employee","hr_evaluation.employee","model_hr_evaluation_plan","base.group_user",1,0,0,0
|
||||
"access_survey_type_hr_manager","survey.type","survey.model_survey_type","base.group_hr_manager",1,1,1,1
|
||||
"access_survey_hr_manager","survey.hr.manager","survey.model_survey","base.group_hr_manager",1,1,1,1
|
||||
"access_survey_history_manager","survey.history","survey.model_survey_history","base.group_hr_manager",1,1,1,1
|
||||
@@ -28,4 +32,11 @@
|
||||
"access_survey_answer_hr_user","survey.answer.hr.user","survey.model_survey_answer","base.group_hr_user",1,1,1,0
|
||||
"access_survey_response_answer_hr_user","survey.response.answer.hr.user","survey.model_survey_response_answer","base.group_hr_user",1,1,1,0
|
||||
"access_survey_type_hr_user","survey.type.hr.user","survey.model_survey_type","base.group_hr_user",1,1,1,0
|
||||
"access_survey_question_hr_user","survey.question.hr.user","survey.model_survey_question","base.group_hr_user",1,1,1,0
|
||||
"access_survey_question_hr_user","survey.question.hr.user","survey.model_survey_question","base.group_hr_user",1,1,1,0
|
||||
"access_survey_page_hr_user","survey.page.hr.user","survey.model_survey_page","base.group_hr_user",1,1,1,1
|
||||
"access_survey_response_hr_user","survey.response.hr.user","survey.model_survey_response","base.group_hr_user",1,1,1,0
|
||||
"access_survey_history_hr_user","survey.history.hr.user","survey.model_survey_history","base.group_hr_user",1,1,1,0
|
||||
"access_survey_request_hr_user","survey.request.hr.user","survey.model_survey_request","base.group_hr_user",1,1,1,0
|
||||
"access_survey_question_column_heading_hr_user","survey.question.column.heading.hr.user","survey.model_survey_question_column_heading","base.group_hr_user",1,0,0,0
|
||||
"access_survey_response_line_hr_user","survey.response.line.hr.user","survey.model_survey_response_line","base.group_hr_user",1,1,1,0
|
||||
"access_survey_tbl_column_heading_hr_user","survey.tbl.column.heading.hr.user","survey.model_survey_tbl_column_heading","base.group_hr_user",1,1,1,0
|
||||
|
||||
|
@@ -25,7 +25,7 @@ class hr_evaluation_reminder(osv.osv_memory):
|
||||
_name = "hr.evaluation.reminder"
|
||||
_description = "Sends Reminders to employess to fill the evaluations"
|
||||
_columns = {
|
||||
'evaluation_id': fields.many2one('hr_evaluation.evaluation', 'Evaluations', required=True)
|
||||
'evaluation_id': fields.many2one('hr.evaluation.interview', 'Interview', required=True)
|
||||
}
|
||||
|
||||
def send_mail(self, cr, uid, ids, context=None):
|
||||
|
||||
@@ -51,6 +51,7 @@
|
||||
'process/hr_expense_process.xml',
|
||||
'report/hr_expense_report_view.xml',
|
||||
'board_hr_expense_view.xml',
|
||||
'board_hr_expense_manager_view.xml'
|
||||
],
|
||||
'demo_xml': [
|
||||
'hr_expense_demo.xml',
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<record id="action_employee_expense" model="ir.actions.act_window">
|
||||
<field name="name">All Employee Expenses</field>
|
||||
<field name="res_model">hr.expense.expense</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="domain">[('state','in',('confirm', 'accepted'))]</field>
|
||||
<field name="view_id" ref="hr_expense.view_editable_expenses_tree"/>
|
||||
</record>
|
||||
|
||||
<record id="board_hr_manager_expense_form" model="ir.ui.view">
|
||||
<field name="name">board.hr.manager.expense.form</field>
|
||||
<field name="model">board.board</field>
|
||||
<field name="inherit_id" ref="hr.board_hr_manager_form"/>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="/form/hpaned/child1" position="inside">
|
||||
<action colspan="4" height="220" name="%(action_employee_expense)d" string="All Employee Expenses" />
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
<menuitem
|
||||
action="hr.open_board_hr_manager"
|
||||
icon="terp-graph"
|
||||
id="base.menu_hr_manager"
|
||||
parent="base.menu_hr_dasboard"
|
||||
groups = "base.group_hr_manager"
|
||||
sequence="5"/>
|
||||
</data>
|
||||
</openerp>
|
||||
@@ -13,7 +13,7 @@
|
||||
<field name="name">My Expenses</field>
|
||||
<field name="res_model">hr.expense.expense</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="domain">[('state','in',('draft', 'confirm')),('user_id','=',uid)]</field>
|
||||
<field name="domain">[('state','in',('confirm', 'accepted')),('user_id','=',uid)]</field>
|
||||
<field name="view_id" ref="hr_expense.view_editable_expenses_tree"/>
|
||||
</record>
|
||||
|
||||
|
||||
@@ -61,12 +61,12 @@ class hr_expense_expense(osv.osv):
|
||||
_name = "hr.expense.expense"
|
||||
_description = "Expense"
|
||||
_columns = {
|
||||
'name': fields.char('Expense Sheet', size=128, required=True),
|
||||
'name': fields.char('Description', size=128, required=True),
|
||||
'id': fields.integer('Sheet ID', readonly=True),
|
||||
'ref': fields.char('Reference', size=32),
|
||||
'date': fields.date('Date'),
|
||||
'journal_id': fields.many2one('account.journal', 'Force Journal', help = "The journal used when the expense is invoiced"),
|
||||
'employee_id': fields.many2one('hr.employee', "Employee's Name", required=True),
|
||||
'employee_id': fields.many2one('hr.employee', "Employee", required=True),
|
||||
'user_id': fields.many2one('res.users', 'User', required=True),
|
||||
'date_confirm': fields.date('Confirmation Date', help = "Date of the confirmation of the sheet expense. It's filled when the button Confirm is pressed."),
|
||||
'date_valid': fields.date('Validation Date', help = "Date of the acceptation of the sheet expense. It's filled when the button Accept is pressed."),
|
||||
@@ -81,11 +81,11 @@ class hr_expense_expense(osv.osv):
|
||||
'company_id': fields.many2one('res.company', 'Company', required=True),
|
||||
'state': fields.selection([
|
||||
('draft', 'Draft'),
|
||||
('confirm', 'Waiting confirmation'),
|
||||
('accepted', 'Accepted'),
|
||||
('confirm', 'Waiting Approval'),
|
||||
('accepted', 'Approved'),
|
||||
('invoiced', 'Invoiced'),
|
||||
('paid', 'Reimbursed'),
|
||||
('cancelled', 'Cancelled')],
|
||||
('cancelled', 'Refused')],
|
||||
'State', readonly=True, help='When the expense request is created the state is \'Draft\'.\n It is confirmed by the user and request is sent to admin, the state is \'Waiting Confirmation\'.\
|
||||
\nIf the admin accepts it, the state is \'Accepted\'.\n If an invoice is made for the expense request, the state is \'Invoiced\'.\n If the expense is paid to user, the state is \'Reimbursed\'.'),
|
||||
}
|
||||
|
||||
@@ -104,6 +104,17 @@
|
||||
<field name="uom_id" ref="product.product_uom_km"/>
|
||||
<field eval="622.0" name="unit_quantity"/>
|
||||
</record>
|
||||
|
||||
<record id="property_rule_expense" model="ir.rule">
|
||||
<field name="name">Employee Expense</field>
|
||||
<field model="ir.model" name="model_id" ref="model_hr_expense_expense"/>
|
||||
<field name="domain_force">[('employee_id.user_id','=',user.id)]</field>
|
||||
<field name="groups" eval="[(6,0,[ref('base.group_user')])]"/>
|
||||
</record>
|
||||
<record id="property_rule_expense_manager" model="ir.rule">
|
||||
<field name="name">Manager Expense</field>
|
||||
<field model="ir.model" name="model_id" ref="model_hr_expense_expense"/>
|
||||
<field name="domain_force">['|',('employee_id.user_id','=',user.id),('employee_id.parent_id.user_id','=',user.id )]</field>
|
||||
<field name="groups" eval="[(6,0,[ref('base.group_hr_user'),ref('base.group_hr_manager')])]"/>
|
||||
</record>
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -27,12 +27,12 @@
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Expenses" colors="blue:state=='draft'">
|
||||
<field name="date"/>
|
||||
<field name="employee_id"/>
|
||||
<field name="user_id" invisible="1"/>
|
||||
<field name="department_id" groups="base.group_extended"/>
|
||||
<field name="name"/>
|
||||
<field name="date"/>
|
||||
<field name="ref"/>
|
||||
<field name="name"/>
|
||||
<field name="amount"/>
|
||||
<field name="state"/>
|
||||
<button name="confirm" states="draft" string="Confirm" type="workflow" icon="gtk-apply"/>
|
||||
@@ -77,7 +77,7 @@
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
</group>
|
||||
<notebook colspan="4">
|
||||
<page string="Expense Sheet">
|
||||
<page string="Description">
|
||||
<newline/>
|
||||
<field colspan="4" name="line_ids" nolabel="1">
|
||||
<form string="Expense Lines">
|
||||
@@ -98,10 +98,10 @@
|
||||
<group col="6" colspan="2">
|
||||
<button name="confirm" states="draft" string="Confirm" type="workflow" icon="gtk-apply"/>
|
||||
<button name="cancel" states="cancel" string="Cancel" type="workflow" icon="gtk-cancel"/>
|
||||
<button name="validate" states="confirm" string="Accept" type="workflow" icon="gtk-ok"/>
|
||||
<button name="draft" states="confirm,cancelled" string="Set to Draft" type="workflow" icon="gtk-convert"/>
|
||||
<button name="validate" states="confirm" string="Approve" type="workflow" icon="terp-camera_test"/>
|
||||
<button name="invoice" states="accepted" string="Invoice" type="workflow" icon="gtk-execute"/>
|
||||
<button name="draft" states="confirm,cancelled" string="Set to Draft" type="workflow" icon="gtk-convert"/>
|
||||
<button name="refuse" states="confirm,draft,accepted" string="Refuse" type="workflow" icon="gtk-no"/>
|
||||
<button name="refuse" states="confirm,draft,accepted" string="Refuse" type="workflow" icon="gtk-no" groups="base.group_hr_manager" />
|
||||
</group>
|
||||
</page>
|
||||
<page string="Other Info" groups="base.group_extended">
|
||||
@@ -134,14 +134,16 @@
|
||||
<group>
|
||||
<filter icon="terp-document-new" domain="[('state','=','draft')]" string="Draft" help="Draft Expense"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter icon="terp-gtk-go-back-rtl" domain="[('state','=','confirm')]" string="To Approve"
|
||||
<filter icon="terp-camera_test" domain="[('state','=','confirm')]" string="To Approve"
|
||||
help="Confirmed Expense"/>
|
||||
<filter icon="terp-gtk-go-back-rtl" domain="[('state','=','accepted')]" string="To Pay"
|
||||
<filter icon="terp-check" domain="[('state','=','accepted')]" string="To Pay"
|
||||
help="Expenses to Invoice"/>
|
||||
<filter icon="terp-go-month" string="This Month" name="this"
|
||||
domain="[('date','<=', time.strftime('%%Y-%%m-%%d')), ('date','>',(datetime.date.today()-datetime.timedelta(days=30)).strftime('%%Y-%%m-%%d'))]"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="name" select='1'/>
|
||||
<field name="date" select='1'/>
|
||||
<field name="user_id" string="User">
|
||||
<field name="user_id" string="User" invisible="True">
|
||||
<filter icon="terp-personal+" domain="[('department_id','=',context.get('department_id',False))]"
|
||||
string="Expenses of My Department"/>
|
||||
</field>
|
||||
@@ -149,8 +151,9 @@
|
||||
</group>
|
||||
<newline />
|
||||
<group expand="0" string="Group By...">
|
||||
<filter string="Employee" icon="terp-personal" domain="[]" context="{'group_by':'employee_id'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Department" icon="terp-personal+" domain="[]" context="{'group_by':'department_id'}"/>
|
||||
<filter string="User" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Month" icon="terp-go-month" domain="[]" context="{'group_by':'date'}"/>
|
||||
</group>
|
||||
@@ -162,7 +165,7 @@
|
||||
<field name="name">Expenses</field>
|
||||
<field name="res_model">hr.expense.expense</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="context">{"search_default_user_id":uid}</field>
|
||||
<field name="context">{"search_default_user_id":uid,'search_default_this':1}</field>
|
||||
<field name="search_view_id" ref="view_hr_expense_filter"/>
|
||||
<field name="help">The OpenERP expenses management module allows you to track the full flow. Every month, the employees record their expenses. At the end of the month, their managers validates the expenses sheets which creates costs on projects/analytic accounts. The accountant validates the proposed entries and the employee can be reimbursed. You can also reinvoice the customer at the end of the flow.</field>
|
||||
</record>
|
||||
|
||||
@@ -181,7 +181,7 @@
|
||||
<blockTable colWidths="49.0,204.0,46.0,79.0,53.0,92.0" style="Table_expense_line">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ formatLang(line.date_value,date=True) ]]</para>
|
||||
<para style="terp_default_9">[[ formatLang(line.date_value,date = True) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ line.name or '' ]] [[ line.description or '' ]]</para>
|
||||
@@ -273,4 +273,4 @@
|
||||
</para>
|
||||
<para style="terp_default_9">This document must be dated and signed for reimbursement</para>
|
||||
</story>
|
||||
</document>
|
||||
</document>
|
||||
|
||||
@@ -48,8 +48,8 @@ class hr_expense_report(osv.osv):
|
||||
'user_id':fields.many2one('res.users', 'Validation User', readonly=True),
|
||||
'currency_id': fields.many2one('res.currency', 'Currency', readonly=True),
|
||||
'price_total':fields.float('Total Price', readonly=True),
|
||||
'delay_valid':fields.float('Delay Valid', readonly=True),
|
||||
'delay_confirm':fields.float('Delay Confirm', readonly=True),
|
||||
'delay_valid':fields.float('Delay to Valid', readonly=True),
|
||||
'delay_confirm':fields.float('Delay to Confirm', readonly=True),
|
||||
'analytic_account': fields.many2one('account.analytic.account','Analytic account',readonly=True),
|
||||
'price_average':fields.float('Average Price', readonly=True),
|
||||
'nbr':fields.integer('# of Lines', readonly=True),
|
||||
@@ -71,7 +71,7 @@ class hr_expense_report(osv.osv):
|
||||
create or replace view hr_expense_report as (
|
||||
select
|
||||
min(l.id) as id,
|
||||
date_trunc('day',s.create_date) as date,
|
||||
date_trunc('day',s.date) as date,
|
||||
s.employee_id,
|
||||
s.journal_id,
|
||||
s.currency_id,
|
||||
@@ -100,7 +100,7 @@ class hr_expense_report(osv.osv):
|
||||
left join hr_expense_expense s on (s.id=l.expense_id)
|
||||
left join product_uom u on (u.id=l.uom_id)
|
||||
group by
|
||||
date_trunc('day',s.create_date),
|
||||
date_trunc('day',s.date),
|
||||
to_char(date_trunc('day',s.create_date), 'YYYY'),
|
||||
to_char(date_trunc('day',s.create_date), 'MM'),
|
||||
to_char(date_trunc('day',s.create_date), 'YYYY-MM-DD'),
|
||||
|
||||
@@ -22,9 +22,9 @@
|
||||
<field name="product_id" invisible="1"/>
|
||||
<field name="product_qty" invisible="1"/>
|
||||
<field name="state" invisible="1"/>
|
||||
<field name="invoiced" sum="Total Invoiced Lines"/>
|
||||
<field name="nbr" sum="# of Lines"/>
|
||||
<field name="no_of_products" sum="# of Products"/>
|
||||
<field name="invoiced" sum="Total Invoiced Lines"/>
|
||||
<field name="price_average" avg="Average Price"/>
|
||||
<field name="price_total" sum="Total Price"/>
|
||||
<field name="delay_confirm"/>
|
||||
@@ -53,46 +53,29 @@
|
||||
<field name="arch" type="xml">
|
||||
<search string="Expenses Analysis">
|
||||
<group>
|
||||
<filter icon="terp-go-year" string=" 365 Days "
|
||||
domain="[('date','<=', time.strftime('%%Y-%%m-%%d')),('date','>',(datetime.date.today()-datetime.timedelta(days=365)).strftime('%%Y-%%m-%%d'))]"
|
||||
help="Expenses during last 7 year"/>
|
||||
<filter icon="terp-go-month" string=" 30 Days "
|
||||
<filter icon="terp-go-year" string=" Year "
|
||||
domain="[('date','<=', time.strftime('%%Y-%%m-%%d')),('date','>=',time.strftime('%%Y-01-01'))]"
|
||||
help="Expenses during current year"/>
|
||||
<filter icon="terp-go-month" string=" Month "
|
||||
name="month"
|
||||
domain="[('date','<=', time.strftime('%%Y-%%m-%%d')), ('date','>',(datetime.date.today()-datetime.timedelta(days=30)).strftime('%%Y-%%m-%%d'))]"
|
||||
help="Expenses during last month"/>
|
||||
<filter icon="terp-go-week" string=" 7 Days " separator="1"
|
||||
domain="[('date','<=', time.strftime('%%Y-%%m-%%d')), ('date','>',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]" help="Expenses during last 7 days"/>
|
||||
domain="[('date','<=', time.strftime('%%Y-%%m-%%d')),('date','>=',time.strftime('%%Y-%%m-01'))]"
|
||||
help="Expenses during current month"/>
|
||||
<filter icon="terp-go-month" string=" Month-1 " separator="1"
|
||||
domain="[('date','<=', (datetime.date (int(time.strftime('%%Y')), datetime.date.today().month, 1) - datetime.timedelta (days = 1)).strftime('%%Y-%%m-%%d')),('date','>',(datetime.date (int(time.strftime('%%Y')), datetime.date.today().month-1, 1)).strftime('%%Y-%%m-%%d'))]" help="Expenses during last month"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Draft" icon="terp-document-new" domain="[('state','=','draft')]" help = "Draft Expenses"/>
|
||||
<filter string="Waiting" icon="terp-gtk-media-pause" domain="[('state', '=' ,'confirm')]"
|
||||
help = "Confirm Expenses"/>
|
||||
<filter string="Accepted" icon="terp-camera_test" domain="[('state','=','accepted')]"
|
||||
help = "Accepted Expenses"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Invoiced" icon="terp-dolar" domain="[('state','=','invoiced')]"
|
||||
help = "Invoiced Expenses"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="employee_id"/>
|
||||
<field name="department_id"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Group By...">
|
||||
<filter string="Employee" name="employee" icon="terp-personal" context="{'group_by':'employee_id'}"/>
|
||||
<filter string="Department" icon="terp-personal+" context="{'group_by':'department_id'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Product" icon="terp-accessories-archiver" context="{'group_by':'product_id'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Analytic account" icon="terp-folder-green" context="{'group_by':'analytic_account'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="State" icon="terp-stock_effects-object-colorize" context="{'group_by':'state'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Validation User" name="User" icon="terp-personal" context="{'group_by':'user_id'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Company" icon="terp-go-home" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Day" icon="terp-go-today" context="{'group_by':'day'}"/>
|
||||
<filter string="Month" icon="terp-go-month" context="{'group_by':'month'}"/>
|
||||
<filter string="Year" icon="terp-go-year" context="{'group_by':'year'}"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Extended filters..." groups="base.group_extended">
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Extended filters..." groups="base.group_extended">
|
||||
<field name="product_id"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="user_id"/>
|
||||
@@ -102,7 +85,24 @@
|
||||
<field name="date"/>
|
||||
<field name="date_confirm"/>
|
||||
<field name="date_valid"/>
|
||||
</group>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="1" string="Group By...">
|
||||
<filter string="Employee" name="employee" icon="terp-personal" context="{'group_by':'employee_id'}"/>
|
||||
<filter string="Validation User" name="User" icon="terp-personal" context="{'group_by':'user_id'}"/>
|
||||
<filter string="Department" icon="terp-personal+" context="{'group_by':'department_id'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Product" icon="terp-accessories-archiver" context="{'group_by':'product_id'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Analytic account" icon="terp-folder-green" context="{'group_by':'analytic_account'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="State" icon="terp-stock_effects-object-colorize" context="{'group_by':'state'}"/>
|
||||
<filter string="Company" icon="terp-go-home" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Day" icon="terp-go-today" context="{'group_by':'day'}" help="Group by Create Date"/>
|
||||
<filter string="Month" icon="terp-go-month" context="{'group_by':'month'}" help="Group by month of Create Date"/>
|
||||
<filter string="Year" icon="terp-go-year" context="{'group_by':'year'}" help="Group by year of Create Date"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -1,10 +1,18 @@
|
||||
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
|
||||
"access_hr_expense_expense_user","hr.expense.expense.user","model_hr_expense_expense","base.group_hr_user",1,1,1,1
|
||||
"access_hr_expense_line","hr.expense.line","model_hr_expense_line","base.group_hr_user",1,1,1,1
|
||||
"access_hr_expense_report","hr.expense.report","model_hr_expense_report","base.group_hr_manager",1,0,0,0
|
||||
"access_hr_expense_report","hr.expense.report","model_hr_expense_report","base.group_hr_manager",1,1,1,1
|
||||
"access_product_product_hr_expense","product.product.hr.expense","product.model_product_product","base.group_hr_user",1,0,0,0
|
||||
"access_product_template_hr_expense","product.template.hr.expense","product.model_product_template","base.group_hr_user",1,0,0,0
|
||||
"access_product_uom_hr_expense","product.uom.hr.expense","product.model_product_uom","base.group_hr_user",1,0,0,0
|
||||
"access_product_price_type","product.price.type","product.model_product_price_type","base.group_hr_user",1,1,1,1
|
||||
"access_hr_expense_expense_manager","hr.expense.expense.manager","model_hr_expense_expense","base.group_hr_manager",1,0,0,0
|
||||
"access_hr_expense_expense_manager","hr.expense.expense.manager","model_hr_expense_expense","base.group_hr_manager",1,1,1,1
|
||||
"access_hr_expense_expense_system","hr.expense.expense.system","model_hr_expense_expense","base.group_system",1,0,0,0
|
||||
"access_hr_expense_line_manager","hr.expense.line.manager","model_hr_expense_line","base.group_hr_manager",1,1,1,1
|
||||
"access_product_product_hr_expense_manager","product.product.hr.expense.manager","product.model_product_product","base.group_hr_manager",1,1,1,1
|
||||
"access_product_template_hr_expense_manager","product.template.hr.expense.manager","product.model_product_template","base.group_hr_manager",1,1,1,1
|
||||
"access_product_uom_hr_expense_manager","product.uom.hr.expense.manager","product.model_product_uom","base.group_hr_manager",1,1,1,1
|
||||
"access_product_price_type_manager","product.price.type.manager","product.model_product_price_type","base.group_hr_manager",1,1,1,1
|
||||
"access_hr_expense_expense_employee","hr.expense.expense.employee","model_hr_expense_expense","base.group_user",1,0,0,0
|
||||
"access_hr_employee_employee","hr.employee.employee","hr.model_hr_employee","base.group_user",1,0,0,0
|
||||
"access_hr_expense_line_employee","hr.expense.line.employee","model_hr_expense_line","base.group_user",1,0,0,0
|
||||
|
||||
|
@@ -63,6 +63,7 @@
|
||||
'wizard/hr_holidays_summary_department_view.xml',
|
||||
'wizard/hr_holidays_summary_employees_view.xml',
|
||||
'board_hr_holidays_view.xml',
|
||||
'board_hr_manager_holidays_view.xml',
|
||||
],
|
||||
'demo_xml': ['hr_holidays_demo.xml',],
|
||||
'test': ['test/test_hr_holiday.yml',
|
||||
|
||||
@@ -15,20 +15,10 @@
|
||||
<field name="res_model">hr.holidays</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="domain">[('user_id','=',uid)]</field>
|
||||
<field name="domain">[('state','in',('confirm', 'validate')),('user_id','=',uid)]</field>
|
||||
<field name="view_id" ref="hr_holidays.open_allocation_holidays"/>
|
||||
</record>
|
||||
|
||||
<record id="action_hr_holidays_remaining_leaves_user_all" model="ir.actions.act_window">
|
||||
<field name="name">Remaining Leaves by User</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">hr.holidays.remaining.leaves.user</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">graph,tree</field>
|
||||
<field name="domain">[('user_id','=',uid)]</field>
|
||||
<field name="view_id" ref="hr_holidays.view_hr_holidays_remaining_leaves_user_graph"/>
|
||||
</record>
|
||||
|
||||
<record id="board_hr_holidays_form" model="ir.ui.view">
|
||||
<field name="name">board.hr.holidays.form</field>
|
||||
<field name="model">board.board</field>
|
||||
@@ -42,17 +32,27 @@
|
||||
</record>
|
||||
|
||||
<!-- Need to merge in above view -->
|
||||
<record id="board_hr_holidays_remaining_form" model="ir.ui.view">
|
||||
<field name="name">board.hr.holidays.remaining.form</field>
|
||||
|
||||
<record id="action_hr_holidays_leaves_by_month" model="ir.actions.act_window">
|
||||
<field name="name">Leaves by Month</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">available.holidays.report</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">graph,tree</field>
|
||||
<field name="domain">[('user_id','=',uid)]</field>
|
||||
<field name="context">{'group_by_no_leaf':1,'group_by':['month']}</field>
|
||||
<field name="view_id" ref="hr_holidays.view_hr_available_holidays_report_graph"/>
|
||||
</record>
|
||||
<record id="board_hr_holidays_leave_by_month_form" model="ir.ui.view">
|
||||
<field name="name">board.hr.holidays.leave.month.form</field>
|
||||
<field name="model">board.board</field>
|
||||
<field name="type">form</field>
|
||||
<field name="inherit_id" ref="hr.board_hr_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="/form/hpaned/child2" position="inside">
|
||||
<action colspan="4" height="220" name="%(action_hr_holidays_remaining_leaves_user_all)d" string="Reamining Leaves by Type and User" />
|
||||
<action colspan="4" height="220" name="%(action_hr_holidays_leaves_by_month)d" string="Leaves by Month" />
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<record id="action_view_holiday_status_manager_board" model="ir.actions.act_window">
|
||||
<field name="name">All Employee Leaves</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">hr.holidays</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="domain">[('state','in',('confirm', 'validate'))]</field>
|
||||
<field name="view_id" ref="hr_holidays.view_holiday_allocation_tree"/>
|
||||
</record>
|
||||
|
||||
<record id="action_hr_holidays_remaining_leaves_empoloyee_all" model="ir.actions.act_window">
|
||||
<field name="name">Remaining Leaves by User</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">hr.holidays.remaining.leaves.user</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">graph,tree</field>
|
||||
<field name="view_id" ref="hr_holidays.view_hr_holidays_remaining_leaves_user_graph"/>
|
||||
</record>
|
||||
|
||||
<record id="board_hr_holidays_manager_form" model="ir.ui.view">
|
||||
<field name="name">board.hr.holidays.manager.form</field>
|
||||
<field name="model">board.board</field>
|
||||
<field name="inherit_id" ref="hr.board_hr_manager_form"/>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="/form/hpaned/child1" position="inside">
|
||||
<action colspan="4" height="220" name="%(action_view_holiday_status_manager_board)d" string="All Employee Leaves"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="board_hr_holidays_manager_remaining_form" model="ir.ui.view">
|
||||
<field name="name">board.hr.holidays.manager.remaining.form</field>
|
||||
<field name="model">board.board</field>
|
||||
<field name="type">form</field>
|
||||
<field name="inherit_id" ref="hr.board_hr_manager_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="/form/hpaned/child2" position="inside">
|
||||
<action colspan="4" height="220" name="%(action_hr_holidays_remaining_leaves_empoloyee_all)d" string="Remaining Leave by Type and User" />
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
<menuitem
|
||||
action="hr.open_board_hr_manager"
|
||||
icon="terp-graph"
|
||||
id="base.menu_hr_manager"
|
||||
parent="base.menu_hr_dasboard"
|
||||
groups = "base.group_hr_manager"
|
||||
sequence="5"/>
|
||||
</data>
|
||||
</openerp>
|
||||
@@ -142,15 +142,17 @@ class hr_holidays(osv.osv):
|
||||
|
||||
_columns = {
|
||||
'name': fields.char('Description', required=True, readonly=True, size=64, states={'draft':[('readonly',False)]}),
|
||||
'state': fields.selection([('draft', 'Draft'), ('confirm', 'Waiting Validation'), ('refuse', 'Refused'), ('validate1', 'Waiting Second Validation'), ('validate', 'Validated'), ('cancel', 'Cancelled')], 'State', readonly=True, help='When the holiday request is created the state is \'Draft\'.\n It is confirmed by the user and request is sent to admin, the state is \'Waiting Validation\'.\
|
||||
If the admin accepts it, the state is \'Validated\'. If it is refused, the state is \'Refused\'.'),
|
||||
'state': fields.selection([('draft', 'Draft'), ('confirm', 'Waiting Approval'), ('refuse', 'Refused'), ('validate1', 'Waiting Second Approval'), ('validate', 'Approved'), ('cancel', 'Cancelled')], 'State', readonly=True, help='When the holiday request is created the state is \'Draft\'.\n It is confirmed by the user and request is sent to admin, the state is \'Waiting Approval\'.\
|
||||
If the admin accepts it, the state is \'Approved\'. If it is refused, the state is \'Refused\'.'),
|
||||
'date_from': fields.datetime('Start Date', readonly=True, states={'draft':[('readonly',False)]}),
|
||||
'user_id':fields.many2one('res.users', 'User', states={'draft':[('readonly',False)]}, select=True, readonly=True),
|
||||
'date_to': fields.datetime('End Date', readonly=True, states={'draft':[('readonly',False)]}),
|
||||
'holiday_status_id' : fields.many2one("hr.holidays.status", " Leave Type", required=True,readonly=True, states={'draft':[('readonly',False)]}),
|
||||
'holiday_status_id' : fields.many2one("hr.holidays.status", " Leave Type", required=True,readonly=True, states={'draft':[('readonly',False)]}),
|
||||
'employee_id' : fields.many2one('hr.employee', "Employee", select=True, invisible=False, readonly=True, states={'draft':[('readonly',False)]}, help='Leave Manager can let this field empty if this leave request/allocation is for every employee'),
|
||||
'manager_id': fields.many2one('hr.employee', 'Leave Manager', invisible=False, readonly=True, help='This area is automaticly filled by the user who validate the leave'),
|
||||
'notes': fields.text('Notes',readonly=True, states={'draft':[('readonly',False)]}),
|
||||
#'manager_id': fields.many2one('hr.employee', 'Leave Manager', invisible=False, readonly=True, help='This area is automaticly filled by the user who validate the leave'),
|
||||
#'notes': fields.text('Notes',readonly=True, states={'draft':[('readonly',False)]}),
|
||||
'manager_id': fields.many2one('hr.employee', 'First Approval', invisible=False, readonly=True, help='This area is automaticly filled by the user who validate the leave'),
|
||||
'notes': fields.text('Reasons',readonly=True, states={'draft':[('readonly',False)]}),
|
||||
'number_of_days': fields.float('Number of Days', readonly=True, states={'draft':[('readonly',False)]}),
|
||||
'number_of_days_temp': fields.float('Number of Days', readonly=True, states={'draft':[('readonly',False)]}),
|
||||
'case_id': fields.many2one('crm.meeting', 'Case'),
|
||||
@@ -160,8 +162,8 @@ class hr_holidays(osv.osv):
|
||||
'linked_request_ids': fields.one2many('hr.holidays', 'parent_id', 'Linked Requests',),
|
||||
'department_id':fields.related('employee_id', 'department_id', string='Department', type='many2one', relation='hr.department', readonly=True, store=True),
|
||||
'category_id': fields.many2one('hr.employee.category', "Category", help='Category Of employee'),
|
||||
'holiday_type': fields.selection([('employee','By Employee'),('category','By Employee Category')], 'Holiday Type', help='By Employee: Allocation/Request for individual Employee, By Employee Category: Allocation/Request for group of employees in category'),
|
||||
'manager_id2': fields.many2one('hr.employee', 'Second Validator', readonly=True, help='This area is automaticly filled by the user who validate the leave with second level (If Leave type need second validation)')
|
||||
'holiday_type': fields.selection([('employee','By Employee'),('category','By Employee Category')], 'Allocation Type', help='By Employee: Allocation/Request for individual Employee, By Employee Category: Allocation/Request for group of employees in category'),
|
||||
'manager_id2': fields.many2one('hr.employee', 'Second Approval', readonly=True, help='This area is automaticly filled by the user who validate the leave with second level (If Leave type need second validation)')
|
||||
}
|
||||
|
||||
_defaults = {
|
||||
|
||||
@@ -48,5 +48,18 @@
|
||||
<workflow action="confirm" model="hr.holidays" ref="hr_holidays_employee1_sl"/>
|
||||
<workflow action="validate" model="hr.holidays" ref="hr_holidays_employee1_sl"/>
|
||||
|
||||
<record id="property_rule_holidays" model="ir.rule">
|
||||
<field name="name">Employee Holidays</field>
|
||||
<field model="ir.model" name="model_id" ref="model_hr_holidays"/>
|
||||
<field name="domain_force">[('employee_id.user_id','=',user.id)]</field>
|
||||
<field name="groups" eval="[(6,0,[ref('base.group_user')])]"/>
|
||||
</record>
|
||||
<record id="property_rule_holidays_manager" model="ir.rule">
|
||||
<field name="name">Manager Holidays</field>
|
||||
<field model="ir.model" name="model_id" ref="model_hr_holidays"/>
|
||||
<field name="domain_force">['|',('employee_id.user_id','=',user.id),('employee_id.parent_id.user_id','=',user.id )]</field>
|
||||
<field name="groups" eval="[(6,0,[ref('base.group_hr_user'),ref('base.group_hr_manager')])]"/>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -9,27 +9,37 @@
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search Leave">
|
||||
<group col='8' colspan='4'>
|
||||
<filter icon="terp-gtk-go-back-rtl" domain="[('state','=','draft')]" string="To Confirm"/>
|
||||
<filter icon="terp-gtk-go-back-rtl" domain="[('state','=','confirm')]" string="To Approve"/>
|
||||
<filter icon="terp-camera_test" domain="[('state','=','validate')]" string="Validated"
|
||||
default="context.get('report', False)"/>
|
||||
default="context.get('report', False)"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter icon="terp-check" domain="[('state','=','draft')]" string="To Confirm"/>
|
||||
<filter icon="terp-camera_test" domain="[('state','=','confirm')]" string="To Approve"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="user_id"/>
|
||||
<filter string="This Month" icon="terp-go-month" name="This Month"
|
||||
domain="[('date_from','<=', time.strftime('%%Y-%%m-%%d')), ('date_from','>',(datetime.date.today()-datetime.timedelta(days=30)).strftime('%%Y-%%m-%%d'))]"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="employee_id"/>
|
||||
<field name="department_id" widget="selection">
|
||||
<filter icon="terp-personal+" help="My Department Holidays"
|
||||
domain="[('department_id.manager_id','=',uid)]" />
|
||||
</field>
|
||||
<field name="holiday_status_id" widget="selection"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Extended options...">
|
||||
<field name="date_from"/>
|
||||
<field name="date_to"/>
|
||||
</group>
|
||||
<newline />
|
||||
<group expand="0" string="Group By...">
|
||||
<filter string="Department" icon="terp-personal+" domain="[]" context="{'group_by':'department_id'}"/>
|
||||
<filter string="Manager" icon="terp-personal" domain="[]" context="{'group_by':'manager_id'}"/>
|
||||
<filter string="User" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
|
||||
<filter string="Employee" icon="terp-personal" domain="[]" context="{'group_by':'employee_id'}"/>
|
||||
<filter string="Manager" icon="terp-personal" domain="[]" context="{'group_by':'manager_id'}"/>
|
||||
<filter string="Department" icon="terp-personal+" domain="[]" context="{'group_by':'department_id','set_visible':True}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Type" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'holiday_status_id'}"
|
||||
default="context.get('report', False)"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
@@ -57,7 +67,7 @@
|
||||
<form string="Leave Request">
|
||||
<group col="8" colspan="4">
|
||||
<field name="name" />
|
||||
<field name="holiday_type" on_change="onchange_type(holiday_type)" attrs="{'readonly':[('state','!=','draft')]}" width="130"/>
|
||||
<field name="holiday_type" on_change="onchange_type(holiday_type)" attrs="{'readonly':[('state','!=','draft')]}" width="130" groups="base.group_hr_manager"/>
|
||||
<group attrs="{'invisible':[('holiday_type','=','employee')]}">
|
||||
<field name="category_id" attrs="{'required':[('holiday_type','=','category')], 'readonly':[('state','!=','draft')]}"/>
|
||||
</group>
|
||||
@@ -75,17 +85,17 @@
|
||||
<newline/>
|
||||
<field name="manager_id"/>
|
||||
<field name="manager_id2"/>
|
||||
<separator string="Notes" colspan="4"/>
|
||||
<separator string="Reasons" colspan="4"/>
|
||||
<field name="notes" nolabel="1" colspan="4"/>
|
||||
<newline/>
|
||||
<field name="state" colspan="2"/>
|
||||
<group colspan="2">
|
||||
<button string="Confirm" name="confirm" states="draft" type="workflow" icon="gtk-yes"/>
|
||||
<button string="Approve" name="validate" states="confirm" type="workflow" icon="gtk-apply"/>
|
||||
<button string="Approved" name="second_validate" states="validate1" type="workflow" icon="gtk-apply"/>
|
||||
<button string="Refuse" name="refuse" states="confirm,validate1" type="workflow" icon="gtk-no"/>
|
||||
<button string="Cancel" name="cancel" states="validate,refuse" type="workflow" icon="gtk-cancel"/>
|
||||
<button string="Set to Draft" name="set_to_draft" states="cancel" type="object" icon="gtk-convert"/>
|
||||
<button string="Confirm" name="confirm" states="draft" type="workflow" icon="gtk-yes" groups="base.group_hr_user,base.group_hr_manager"/>
|
||||
<button string="Approve" name="validate" states="confirm" type="workflow" icon="gtk-apply" groups="base.group_hr_manager"/>
|
||||
<button string="Approved" name="second_validate" states="validate1" type="workflow" icon="gtk-apply" groups="base.group_hr_manager"/>
|
||||
<button string="Refuse" name="refuse" states="confirm,validate1" type="workflow" icon="gtk-no" groups="base.group_hr_manager"/>
|
||||
<button string="Cancel" name="cancel" states="validate,refuse" type="workflow" icon="gtk-cancel" groups="base.group_hr_manager"/>
|
||||
<button string="Set to Draft" name="set_to_draft" states="cancel" type="object" icon="gtk-convert" groups="base.group_hr_manager"/>
|
||||
</group>
|
||||
</page>
|
||||
</notebook>
|
||||
@@ -100,36 +110,35 @@
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Allocation Request">
|
||||
<group col="4" colspan="4">
|
||||
<group col="8" colspan="4">
|
||||
<field name="name" />
|
||||
<field name="holiday_status_id" />
|
||||
<field name="holiday_type" on_change="onchange_type(holiday_type)" attrs="{'readonly':[('state','!=','draft')]}" string="Allocation Type"/>
|
||||
<group col="2" colspan="2">
|
||||
<group attrs="{'invisible':[('holiday_type','=','category')]}">
|
||||
<field name="employee_id" attrs="{'required':[('holiday_type','=','employee')]}"/>
|
||||
</group>
|
||||
<group attrs="{'invisible':[('holiday_type','=','employee')]}">
|
||||
<field name="category_id" attrs="{'required':[('holiday_type','=','category')], 'readonly':[('state','!=','draft')]}"/>
|
||||
</group>
|
||||
</group>
|
||||
</group>
|
||||
<notebook colspan="4">
|
||||
<page string="General">
|
||||
<field name="holiday_status_id" on_change="onchange_sec_id(holiday_status_id)" context="{'employee_id':employee_id}" />
|
||||
<field name="department_id"/>
|
||||
<field name="number_of_days_temp"/>
|
||||
<field name="department_id"/>
|
||||
<newline/>
|
||||
<field name="manager_id"/>
|
||||
<field name="manager_id2"/>
|
||||
<separator string="Notes" colspan="4"/>
|
||||
<separator string="Reasons" colspan="4"/>
|
||||
<field name="notes" nolabel="1" colspan="4" />
|
||||
<newline/>
|
||||
<field name="state" colspan="2"/>
|
||||
<group colspan="2">
|
||||
<button string="Confirm" name="confirm" states="draft" type="workflow" icon="gtk-yes"/>
|
||||
<button string="To Approve" name="validate" states="confirm" type="workflow" icon="gtk-apply"/>
|
||||
<button string="Approved" name="second_validate" states="validate1" type="workflow" icon="gtk-apply"/>
|
||||
<button string="Refuse" name="refuse" states="confirm,validate1" type="workflow" icon="gtk-no"/>
|
||||
<button string="Cancel" name="cancel" states="validate,refuse" type="workflow" icon="gtk-cancel"/>
|
||||
<button string="Set to Draft" name="set_to_draft" states="cancel" type="object" icon="gtk-convert"/>
|
||||
<button string="Confirm" name="confirm" states="draft" type="workflow" icon="gtk-yes" groups="base.group_hr_user,base.group_hr_manager"/>
|
||||
<button string="Approve" name="validate" states="confirm" type="workflow" icon="gtk-apply" groups="base.group_hr_manager"/>
|
||||
<button string="Approved" name="second_validate" states="validate1" type="workflow" icon="gtk-apply" groups="base.group_hr_manager"/>
|
||||
<button string="Refuse" name="refuse" states="confirm,validate1" type="workflow" icon="gtk-no" groups="base.group_hr_manager"/>
|
||||
<button string="Cancel" name="cancel" states="validate,refuse" type="workflow" icon="gtk-cancel" groups="base.group_hr_manager"/>
|
||||
<button string="Set to Draft" name="set_to_draft" states="cancel" type="object" icon="gtk-convert" groups="base.group_hr_manager"/>
|
||||
</group>
|
||||
</page>
|
||||
</notebook>
|
||||
@@ -144,14 +153,20 @@
|
||||
<field name="arch" type="xml">
|
||||
<tree colors="red:state in ('refuse');blue:state in (' draft');black:state in ('confirm','validate','validate1');gray:state in ('cancel') " string="Leaves" >
|
||||
<field name="employee_id"/>
|
||||
<field name="department_id"/>
|
||||
<field name="number_of_days" string="Number of Days" sum='Remaining Days'/>
|
||||
<field name="name"/>
|
||||
<field name="department_id" invisible="1"/>
|
||||
<field name="holiday_status_id"/>
|
||||
<field name="name"/>
|
||||
<field name="number_of_days" string="Number of Days" sum='Remaining Days'/>
|
||||
<field name="manager_id" invisible="1"/>
|
||||
<field name="user_id" invisible="1"/>
|
||||
<field name="type"/>
|
||||
<!--field name="type"/-->
|
||||
<field name="state"/>
|
||||
<button string="Confirm" name="confirm" states="draft" type="workflow" icon="gtk-yes" groups="base.group_hr_user,base.group_hr_manager"/>
|
||||
<button string="Approve" name="validate" states="confirm" type="workflow" icon="gtk-apply" groups="base.group_hr_manager"/>
|
||||
<button string="Approved" name="second_validate" states="validate1" type="workflow" icon="gtk-apply" groups="base.group_hr_manager"/>
|
||||
<button string="Refuse" name="refuse" states="confirm,validate1" type="workflow" icon="gtk-no" groups="base.group_hr_manager"/>
|
||||
<button string="Cancel" name="cancel" states="validate,refuse" type="workflow" icon="gtk-cancel" groups="base.group_hr_manager"/>
|
||||
<button string="Set to Draft" name="set_to_draft" states="cancel" type="object" icon="gtk-convert" groups="base.group_hr_manager"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
@@ -197,15 +212,20 @@
|
||||
<tree colors="red:state in ('refuse');blue:state in (' draft');black:state in ('confirm','validate','validate1');gray:state in ('cancel')" string="Leaves Summary">
|
||||
<field name="employee_id"/>
|
||||
<field name="department_id" invisible="1"/>
|
||||
<field name="type"/>
|
||||
<field name="name"/>
|
||||
<field name="number_of_days" string="Number of Days" sum='Remaining Days'/>
|
||||
<field name="date_from" invisible="1"/>
|
||||
<field name="date_to" invisible="1"/>
|
||||
<field name="name" invisible="1"/>
|
||||
<field name="date_from"/>
|
||||
<field name="date_to"/>
|
||||
<field name="holiday_status_id"/>
|
||||
<field name="manager_id" invisible="1"/>
|
||||
<field name="user_id" invisible="1"/>
|
||||
<field name="type" invisible="1"/>
|
||||
<field name="state" invisible="1"/>
|
||||
<field name="state"/>
|
||||
<button string="Confirm" name="confirm" states="draft" type="workflow" icon="gtk-yes" groups="base.group_hr_user,base.group_hr_manager"/>
|
||||
<button string="Approve" name="validate" states="confirm" type="workflow" icon="gtk-apply" groups="base.group_hr_manager"/>
|
||||
<button string="Refuse" name="refuse" states="confirm" type="workflow" icon="gtk-no" groups="base.group_hr_manager"/>
|
||||
<button string="Cancel" name="cancel" states="validate,refuse,validate1" type="workflow" icon="gtk-cancel" groups="base.group_hr_manager"/>
|
||||
<button string="Set to Draft" name="set_to_draft" states="cancel" type="object" icon="gtk-convert" groups="base.group_hr_manager"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
@@ -218,16 +238,21 @@
|
||||
<field name="arch" type="xml">
|
||||
<tree colors="red:state in ('refuse');blue:state in (' draft');black:state in ('confirm','validate','validate1');gray:state in ('cancel')">
|
||||
<field name="employee_id"/>
|
||||
<field name="department_id"/>
|
||||
<field name="department_id" invisible="not context.get('set_visible',False)"/>
|
||||
<field name="holiday_status_id"/>
|
||||
<field name="name"/>
|
||||
<field name="number_of_days" string="Number of Days" sum='Remaining Days'/>
|
||||
<field name="date_from"/>
|
||||
<field name="date_to"/>
|
||||
<field name="name"/>
|
||||
<field name="holiday_status_id"/>
|
||||
<field name="manager_id" invisible="1"/>
|
||||
<field name="user_id" invisible="1"/>
|
||||
<field name="type"/>
|
||||
<!--field name="type"/-->
|
||||
<field name="state"/>
|
||||
<button string="Confirm" name="confirm" states="draft" type="workflow" icon="gtk-yes" groups="base.group_hr_user,base.group_hr_manager"/>
|
||||
<button string="Approve" name="validate" states="confirm" type="workflow" icon="gtk-apply" groups="base.group_hr_manager"/>
|
||||
<button string="Refuse" name="refuse" states="confirm" type="workflow" icon="gtk-no" groups="base.group_hr_manager"/>
|
||||
<button string="Cancel" name="cancel" states="validate,refuse,validate1" type="workflow" icon="gtk-cancel" groups="base.group_hr_manager"/>
|
||||
<button string="Set to Draft" name="set_to_draft" states="cancel" type="object" icon="gtk-convert" groups="base.group_hr_manager"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
@@ -245,7 +270,6 @@
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_id" ref="edit_holiday_new"/>
|
||||
<field name="domain">[('type','=','remove')]</field>
|
||||
<field name="context">{'search_default_user_id':uid}</field>
|
||||
<field name="search_view_id" ref="view_hr_holidays_filter"/>
|
||||
<field name="help">Leaves requests can be recorded by employees and validated by their managers. Once a leave request is validated it appears automatically in the agenda of the employee. You can define several allowance types (paid holidays, sickness, etc) and manage allowances per type.</field>
|
||||
</record>
|
||||
@@ -306,7 +330,7 @@
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_id" eval="view_holiday_simple"/>
|
||||
<field name="context">{'search_default_user_id':uid,'allocation_type':'company', 'report':True}</field>
|
||||
<field name="context">{'allocation_type':'company', 'report':True}</field>
|
||||
<field name="search_view_id" ref="view_hr_holidays_filter"/>
|
||||
</record>
|
||||
|
||||
@@ -355,7 +379,7 @@
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
|
||||
<menuitem sequence="3" id="hr.menu_open_view_attendance_reason_config" parent="hr.menu_hr_configuration" name="Leaves" groups="base.group_system"/>
|
||||
<menuitem sequence="3" id="hr.menu_open_view_attendance_reason_config" parent="hr.menu_hr_configuration" name="Holidays" groups="base.group_system"/>
|
||||
<menuitem name="Leave Type"
|
||||
action="open_view_holiday_status"
|
||||
id="menu_open_view_holiday_status"
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
id="menu_hr_reporting_holidays"
|
||||
name="Holidays"
|
||||
parent="hr.menu_hr_reporting"
|
||||
sequence="6" />
|
||||
sequence="6"
|
||||
groups="base.group_hr_manager" />
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
<field name="max_leave" operator="+"/>
|
||||
<field name="taken_leaves" operator="+"/>
|
||||
<field name="remaining_leave" operator="+"/>
|
||||
<field name="month" group = "True" operator="+" invisible="1"/>
|
||||
<field group="True" name="holiday_status_id"/>
|
||||
</graph>
|
||||
</field>
|
||||
@@ -57,24 +58,24 @@
|
||||
<separator orientation="vertical"/>
|
||||
<field name="employee_id"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Group By..." colspan="10" col="12">
|
||||
<filter string="Department" icon="terp-personal+" context="{'group_by':'department_id'}"/>
|
||||
<filter icon="terp-personal" string="Employee"
|
||||
name="user" context="{'group_by':'employee_id'}"
|
||||
help="Leaves by employee"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Type" icon="terp-stock_symbol-selection" context="{'group_by':'holiday_status_id'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Day" icon="terp-go-today" context="{'group_by':'day'}"/>
|
||||
<filter string="Month" icon="terp-go-month" context="{'group_by':'month'}"/>
|
||||
<filter string="Year" icon="terp-go-year" context="{'group_by':'year'}"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Extended Filters..." colspan="10" col="12">
|
||||
<field name="holiday_status_id" widget="selection"/>
|
||||
<field name="department_id" widget="selection"/>
|
||||
<field name="holiday_status_id" widget="selection"/>
|
||||
<field name="department_id" widget="selection"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="1" string="Group By..." colspan="10" col="12">
|
||||
<filter string="Department" icon="terp-personal+" context="{'group_by':'department_id'}"/>
|
||||
<filter icon="terp-personal" string="Employee"
|
||||
name="user" context="{'group_by':'employee_id'}"
|
||||
help="Leaves by employee"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Type" icon="terp-stock_symbol-selection" context="{'group_by':'holiday_status_id'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Day" icon="terp-go-today" context="{'group_by':'day'}"/>
|
||||
<filter string="Month" icon="terp-go-month" context="{'group_by':'month'}"/>
|
||||
<filter string="Year" icon="terp-go-year" context="{'group_by':'year'}"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -29,6 +29,7 @@ class hr_holidays_report(osv.osv):
|
||||
_rec_name = 'date'
|
||||
_columns = {
|
||||
'date': fields.date('Date', readonly=True),
|
||||
'delay_approve': fields.float('Delay to Approve', digits=(16,2),readonly=True),
|
||||
'year': fields.char('Year', size=4, readonly=True),
|
||||
'day': fields.char('Day', size=15, readonly=True),
|
||||
'month':fields.selection([('01','January'), ('02','February'), ('03','March'), ('04','April'),
|
||||
@@ -68,7 +69,8 @@ class hr_holidays_report(osv.osv):
|
||||
to_char(s.create_date, 'YYYY-MM-DD') as day,
|
||||
s.holiday_status_id,
|
||||
s.department_id,
|
||||
s.state
|
||||
s.state,
|
||||
avg(extract('epoch' from age(s.create_date,CURRENT_DATE)))/(3600*24) as delay_approve
|
||||
from
|
||||
hr_holidays s
|
||||
WHERE type='remove'
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
<field name="date_from" invisible="1"/>
|
||||
<field name="date_to" invisible="1"/>
|
||||
<field name="number_of_days_temp" sum="#Days"/>
|
||||
<field name="delay_approve"/>
|
||||
<field name="holiday_status_id" invisible="1"/>
|
||||
<field name="department_id" invisible="1"/>
|
||||
<field name="year" invisible="1"/>
|
||||
@@ -45,12 +46,11 @@
|
||||
<field name="arch" type="xml">
|
||||
<search string="Leaves">
|
||||
<group>
|
||||
<filter icon="terp-go-year" string="This Year"
|
||||
domain="[('date','<=', time.strftime('%%Y-%%m-%%d')),('date','>',(datetime.date.today()-datetime.timedelta(days=365)).strftime('%%Y-%%m-%%d'))]" help="Leaves in this year"/>
|
||||
<filter icon="terp-go-month" string="This Month" name="month"
|
||||
domain="[('date','<=', time.strftime('%%Y-%%m-%%d')), ('date','>',(datetime.date.today()-datetime.timedelta(days=30)).strftime('%%Y-%%m-%%d'))]" help="Leaves in this month"/>
|
||||
<filter icon="terp-go-week" string=" 7 Days " separator="1"
|
||||
domain="[('date','<=', time.strftime('%%Y-%%m-%%d')), ('date','>',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]" help="Leaves during last 7 days"/>
|
||||
<filter icon="terp-go-year" string=" Year "
|
||||
domain="[('date','<=', time.strftime('%%Y-%%m-%%d')),('date','>=',time.strftime('%%Y-01-01'))]" help="Leaves taken in current year"/>
|
||||
<filter icon="terp-go-month" string=" Month " name="month" domain="[('date','<=', time.strftime('%%Y-%%m-%%d')),('date','>=',time.strftime('%%Y-%%m-01'))]" help="Leaves taken in current month"/>
|
||||
<filter icon="terp-go-month" string=" Month-1 " separator="1"
|
||||
domain="[('date','<=', (datetime.date (int(time.strftime('%%Y')), datetime.date.today().month, 1) - datetime.timedelta (days = 1)).strftime('%%Y-%%m-%%d')),('date','>',(datetime.date (int(time.strftime('%%Y')), datetime.date.today().month-1, 1)).strftime('%%Y-%%m-%%d'))]" help="Leaves taken in last month"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Future Leaves" icon="terp-gtk-media-pause" domain="[('state', 'in' ,('draft','confirm'))]"
|
||||
help = "Draft and Confirmed leaves"/>
|
||||
@@ -61,25 +61,7 @@
|
||||
<field name="department_id"/>
|
||||
<field name="employee_id"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Group By..." colspan="10" col="12">
|
||||
<filter string="Department" name="department" icon="terp-personal+" context="{'group_by':'department_id'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter icon="terp-personal" string="Employee" name="Employee" context="{'group_by':'employee_id'}"
|
||||
help="Leaves by empolyee"/>
|
||||
<filter string="User" name="User" icon="terp-personal" context="{'group_by':'user_id'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter icon="terp-stock_symbol-selection" string="Category" context="{'group_by':'category_id'}"
|
||||
help="Leaves by category"/>
|
||||
<filter string="Type" icon="terp-stock_symbol-selection" context="{'group_by':'holiday_status_id'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="State" icon="terp-stock_effects-object-colorize" context="{'group_by':'state'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Day" icon="terp-go-today" context="{'group_by':'day'}"/>
|
||||
<filter string="Month" icon="terp-go-month" context="{'group_by':'month'}"/>
|
||||
<filter string="Year" icon="terp-go-year" context="{'group_by':'year'}"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<newline/>
|
||||
<group expand="0" string="Extended Filters..." colspan="10" col="12">
|
||||
<field name="holiday_status_id"/>
|
||||
<field name="category_id"/>
|
||||
@@ -89,6 +71,24 @@
|
||||
<field name="date_from"/>
|
||||
<field name="date_to"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="1" string="Group By..." colspan="10" col="12">
|
||||
<filter icon="terp-personal" string="Employee" name="Employee" context="{'group_by':'employee_id'}"
|
||||
help="Leaves by empolyee"/>
|
||||
<filter string="User" name="User" icon="terp-personal" context="{'group_by':'user_id'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Department" name="department" icon="terp-personal+" context="{'group_by':'department_id'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter icon="terp-stock_symbol-selection" string="Category" context="{'group_by':'category_id'}"
|
||||
help="Leaves by category"/>
|
||||
<filter string="Type" icon="terp-stock_symbol-selection" context="{'group_by':'holiday_status_id'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="State" icon="terp-stock_effects-object-colorize" context="{'group_by':'state'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Day" icon="terp-go-today" context="{'group_by':'day'}" help="Group by create date"/>
|
||||
<filter string="Month" icon="terp-go-month" context="{'group_by':'month'}" help="Group by month of create date"/>
|
||||
<filter string="Year" icon="terp-go-year" context="{'group_by':'year'}" help="Group by year of create date"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
|
||||
"access_hr_holydays_status_user","hr.holidays.status user","model_hr_holidays_status","base.group_hr_user",1,0,0,0
|
||||
"access_hr_holidays_user","hr.holidays.user","model_hr_holidays","base.group_hr_user",1,1,1,0
|
||||
"access_hr_holydays_status_manager","hr.holidays.status.manager","model_hr_holidays_status","base.group_hr_manager",1,0,0,0
|
||||
"access_hr_holidays_manager","hr.holidays.manager","model_hr_holidays","base.group_hr_manager",1,0,0,0
|
||||
"access_hr_holydays_status_manager","hr.holidays.status.manager","model_hr_holidays_status","base.group_hr_manager",1,1,1,1
|
||||
"access_hr_holidays_manager","hr.holidays.manager","model_hr_holidays","base.group_hr_manager",1,1,1,1
|
||||
"access_hr_holidays_remain_user","hr.holidays.ramain.user","model_hr_holidays_remaining_leaves_user","base.group_hr_user",1,0,0,0
|
||||
"access_hr_holidays_report","hr.holidays.report","model_hr_holidays_report","base.group_hr_manager",1,0,0,0
|
||||
"access_hr_holidays_remaining_leaves_manager","hr.hr.holidays.remaining.leaves.manager","model_hr_holidays_remaining_leaves_user","base.group_hr_manager",1,0,0,0
|
||||
"access_available_holidays_report","hr.available.holidays.report","model_available_holidays_report","base.group_hr_manager",1,0,0,0
|
||||
"access_hr_holidays_report","hr.holidays.report","model_hr_holidays_report","base.group_hr_manager",1,1,1,1
|
||||
"access_hr_holidays_remaining_leaves_manager","hr.hr.holidays.remaining.leaves.manager","model_hr_holidays_remaining_leaves_user","base.group_hr_manager",1,1,1,1
|
||||
"access_available_holidays_report","hr.available.holidays.report","model_available_holidays_report","base.group_hr_manager",1,1,1,1
|
||||
"access_hr_holydays_status_system","hr.holidays.status.system","model_hr_holidays_status","base.group_system",1,1,1,1
|
||||
"access_hr_holidays_system","hr.holidays.system","model_hr_holidays","base.group_system",1,0,0,0
|
||||
"access_hr_holidays_employee","hr.holidays.employee","model_hr_holidays","base.group_user",1,0,0,0
|
||||
"access_hr_holydays_status_employee","hr.holidays.status.employee","model_hr_holidays_status","base.group_user",1,0,0,0
|
||||
"access_resource_calendar_leaves_manager","resource_calendar_leaves_manager","resource.model_resource_calendar_leaves","base.group_hr_manager",1,1,1,1
|
||||
"access_available_holidays_report_user","hr.available.holidays.report.user","model_available_holidays_report","base.group_hr_user",1,1,1,0
|
||||
|
||||
|
@@ -136,7 +136,8 @@ class hr_contract(osv.osv):
|
||||
|
||||
_columns = {
|
||||
'permit_no':fields.char('Work Permit No', size=256, required=False, readonly=False),
|
||||
'passport_id':fields.many2one('hr.passport', 'Passport', required=False),
|
||||
# 'passport_id':fields.many2one('hr.passport', 'Passport', required=False),
|
||||
'passport_id':fields.char('Passport',size=64, required=False),
|
||||
'visa_no':fields.char('Visa No', size=64, required=False, readonly=False),
|
||||
'visa_expire': fields.date('Visa Expire Date'),
|
||||
'struct_id' : fields.many2one('hr.payroll.structure', 'Salary Structure'),
|
||||
@@ -145,6 +146,14 @@ class hr_contract(osv.osv):
|
||||
_defaults = {
|
||||
'working_days_per_week': lambda *a: 5,
|
||||
}
|
||||
|
||||
def on_change_employee_id(self, cr, uid, ids, employee_id):
|
||||
v = {}
|
||||
passport = self.pool.get('hr.employee').browse(cr, uid, employee_id).passport_id
|
||||
if passport:
|
||||
v['passport_id'] = passport
|
||||
return {'value': v}
|
||||
|
||||
hr_contract()
|
||||
|
||||
class payroll_register(osv.osv):
|
||||
@@ -293,7 +302,7 @@ class payroll_register(osv.osv):
|
||||
|
||||
pline = {
|
||||
'advice_id':pid,
|
||||
'name':slip.employee_id.otherid,
|
||||
'name':slip.employee_id.identification_id,
|
||||
'employee_id':slip.employee_id.id,
|
||||
'amount':slip.other_pay + slip.net,
|
||||
'bysal':slip.net
|
||||
@@ -423,7 +432,7 @@ class payroll_advice_line(osv.osv):
|
||||
sids = slip_pool.search(cr, uid, [('paid','=',False),('state','=','confirm'),('date','>=',dates[0]), ('employee_id','=',employee_id), ('date','<=',dates[1])], context=context)
|
||||
if sids:
|
||||
slip = slip_pool.browse(cr, uid, sids[0], context=context)
|
||||
vals['name'] = slip.employee_id.otherid
|
||||
vals['name'] = slip.employee_id.identification_id
|
||||
vals['amount'] = slip.net + slip.other_pay
|
||||
vals['bysal'] = slip.net
|
||||
return {
|
||||
@@ -1306,13 +1315,13 @@ class hr_employee(osv.osv):
|
||||
_description = 'Employee'
|
||||
|
||||
_columns = {
|
||||
'pan_no':fields.char('PAN No', size=64, required=False, readonly=False),
|
||||
# 'pan_no':fields.char('PAN No', size=64, required=False, readonly=False),
|
||||
'esp_account':fields.char('EPS Account', size=64, required=False, readonly=False, help="EPS Account"),
|
||||
'pf_account':fields.char('PF Account', size=64, required=False, readonly=False, help="Providend Fund Account"),
|
||||
'pg_joining': fields.date('PF Join Date'),
|
||||
'esi_account':fields.char('ESI Account', size=64, required=False, readonly=False, help="ESI Account"),
|
||||
'hospital_id':fields.many2one('res.partner.address', 'ESI Hospital', required=False),
|
||||
'passport_id':fields.many2one('hr.passport', 'Passport', required=False),
|
||||
'passport_id':fields.char('Passport', size=64),
|
||||
'otherid':fields.char('Other Id', size=64, required=False),
|
||||
'bank_account_id':fields.many2one('res.partner.bank', 'Bank Account', required=False, readonly=False),
|
||||
'line_ids':fields.one2many('hr.payslip.line', 'employee_id', 'Salary Structure', required=False),
|
||||
|
||||
@@ -71,6 +71,7 @@
|
||||
<record id="hr_contract_firstcontract1" model="hr.contract">
|
||||
<field name="wage_type_id" ref="hr_contract.hr_contract_monthly_gross"/>
|
||||
<field name="name">First Contract</field>
|
||||
<field name="type_id" ref="hr_contract.hr_contract_type_emp"/>
|
||||
<field name="date_start" eval="time.strftime('%Y-%m')+'-1'"/>
|
||||
<field name="date_end" eval="time.strftime('%Y')+'-12-31'"/>
|
||||
<field name="struct_id" ref="hr_payroll.structure_001"/>
|
||||
@@ -93,5 +94,112 @@
|
||||
<field name="name">Salary Slip of Bonamy for June-2010</field>
|
||||
</record>
|
||||
|
||||
<record id="ir_property_salaryaccount0" model="ir.property">
|
||||
<field name="name">salary_account</field>
|
||||
<field name="res_id">hr.employee,1</field>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
<field name="fields_id" ref="hr_payroll.field_hr_employee_salary_account"/>
|
||||
<field name="value_reference">account.account,27</field>
|
||||
<field name="type">many2one</field>
|
||||
</record>
|
||||
|
||||
<record id="ir_property_employeeaccount0" model="ir.property">
|
||||
<field name="name">employee_account</field>
|
||||
<field name="res_id">hr.employee,1</field>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
<field name="fields_id" ref="hr_payroll.field_hr_employee_employee_account"/>
|
||||
<field name="value_reference">account.account,22</field>
|
||||
<field name="type">many2one</field>
|
||||
</record>
|
||||
|
||||
<record id="ir_property_propertybankaccount0" model="ir.property">
|
||||
<field name="name">property_bank_account</field>
|
||||
<field name="res_id">hr.employee,1</field>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
<field name="fields_id" ref="hr_payroll.field_hr_employee_property_bank_account"/>
|
||||
<field name="value_reference">account.account,11</field>
|
||||
<field name="type">many2one</field>
|
||||
</record>
|
||||
|
||||
<record id="ir_property_salaryaccount2" model="ir.property">
|
||||
<field name="name">salary_account</field>
|
||||
<field name="res_id">hr.employee,2</field>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
<field name="fields_id" ref="hr_payroll.field_hr_employee_salary_account"/>
|
||||
<field name="value_reference">account.account,27</field>
|
||||
<field name="type">many2one</field>
|
||||
</record>
|
||||
|
||||
<record id="ir_property_employeeaccount2" model="ir.property">
|
||||
<field name="name">employee_account</field>
|
||||
<field name="res_id">hr.employee,2</field>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
<field name="fields_id" ref="hr_payroll.field_hr_employee_employee_account"/>
|
||||
<field name="value_reference">account.account,22</field>
|
||||
<field name="type">many2one</field>
|
||||
</record>
|
||||
|
||||
<record id="ir_property_propertybankaccount2" model="ir.property">
|
||||
<field name="name">property_bank_account</field>
|
||||
<field name="res_id">hr.employee,2</field>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
<field name="fields_id" ref="hr_payroll.field_hr_employee_property_bank_account"/>
|
||||
<field name="value_reference">account.account,11</field>
|
||||
<field name="type">many2one</field>
|
||||
</record>
|
||||
|
||||
<record id="ir_property_salaryaccount3" model="ir.property">
|
||||
<field name="name">salary_account</field>
|
||||
<field name="res_id">hr.employee,3</field>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
<field name="fields_id" ref="hr_payroll.field_hr_employee_salary_account"/>
|
||||
<field name="value_reference">account.account,27</field>
|
||||
<field name="type">many2one</field>
|
||||
</record>
|
||||
|
||||
<record id="ir_property_employeeaccount3" model="ir.property">
|
||||
<field name="name">employee_account</field>
|
||||
<field name="res_id">hr.employee,3</field>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
<field name="fields_id" ref="hr_payroll.field_hr_employee_employee_account"/>
|
||||
<field name="value_reference">account.account,22</field>
|
||||
<field name="type">many2one</field>
|
||||
</record>
|
||||
|
||||
<record id="ir_property_propertybankaccount3" model="ir.property">
|
||||
<field name="name">property_bank_account</field>
|
||||
<field name="res_id">hr.employee,3</field>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
<field name="fields_id" ref="hr_payroll.field_hr_employee_property_bank_account"/>
|
||||
<field name="value_reference">account.account,11</field>
|
||||
<field name="type">many2one</field>
|
||||
</record>
|
||||
|
||||
<record id="ir_property_salaryaccount4" model="ir.property">
|
||||
<field name="name">salary_account</field>
|
||||
<field name="res_id">hr.employee,10</field>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
<field name="fields_id" ref="hr_payroll.field_hr_employee_salary_account"/>
|
||||
<field name="value_reference">account.account,27</field>
|
||||
<field name="type">many2one</field>
|
||||
</record>
|
||||
|
||||
<record id="ir_property_employeeaccount4" model="ir.property">
|
||||
<field name="name">employee_account</field>
|
||||
<field name="res_id">hr.employee,10</field>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
<field name="fields_id" ref="hr_payroll.field_hr_employee_employee_account"/>
|
||||
<field name="value_reference">account.account,22</field>
|
||||
<field name="type">many2one</field>
|
||||
</record>
|
||||
|
||||
<record id="ir_property_propertybankaccount4" model="ir.property">
|
||||
<field name="name">property_bank_account</field>
|
||||
<field name="res_id">hr.employee,10</field>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
<field name="fields_id" ref="hr_payroll.field_hr_employee_property_bank_account"/>
|
||||
<field name="value_reference">account.account,11</field>
|
||||
<field name="type">many2one</field>
|
||||
</record>
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<openerp>
|
||||
<data>
|
||||
<!-- Root Menus -->
|
||||
<menuitem id="menu_hr_root_payroll" parent="hr.menu_hr_root" name="Payroll"/>
|
||||
<menuitem id="menu_hr_root_payroll" parent="hr.menu_hr_root" name="Payroll" groups="base.group_system,group_hr_payroll" sequence="9"/>
|
||||
<menuitem id="payroll_configure" parent="hr.menu_hr_configuration" name="Payroll" groups="base.group_system"/>
|
||||
<menuitem id="menu_hr_payroll_reporting" parent="hr.menu_hr_reporting" name="Payroll" groups="base.group_hr_manager"/>
|
||||
|
||||
@@ -84,12 +84,6 @@
|
||||
<field name="view_id" ref="hr_passport_tree"/>
|
||||
<field name="search_view_id" ref="view_hr_passport_filter"/>
|
||||
</record>
|
||||
<menuitem id="passport_configure" parent="hr.menu_hr_configuration" name="Passport"/>
|
||||
<menuitem
|
||||
id="menu_action_hr_passport_tree"
|
||||
action="action_hr_passport_tree"
|
||||
parent="passport_configure"
|
||||
/>
|
||||
<!-- End Passport Views -->
|
||||
|
||||
<!-- Employee View -->
|
||||
@@ -98,7 +92,35 @@
|
||||
<field name="model">hr.employee</field>
|
||||
<field name="inherit_id" ref="hr.view_employee_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<page string="Notes" position="before">
|
||||
<data>
|
||||
<xpath expr="/form/notebook/page[@string='Personal Information']" position="after">
|
||||
<page string="Miscellaneous">
|
||||
<group colspan="2" col="2">
|
||||
<separator string="Personal Info" colspan="2"/>
|
||||
<field name="otherid" select="1"/>
|
||||
<field name="bank_account_id"/>
|
||||
<field name="place_of_birth"/>
|
||||
<field name="children"/>
|
||||
</group>
|
||||
<group colspan="2" col="2">
|
||||
<separator string="Job Info" colspan="2"/>
|
||||
<field name="manager" select="1"/>
|
||||
<field name="vehicle" select="1"/>
|
||||
<field name="vehicle_distance" select="1"/>
|
||||
</group>
|
||||
<group col="2" colspan="2">
|
||||
<separator colspan="2" string="ESI Information"/>
|
||||
<field name="esi_account" string="Account"/>
|
||||
<field name="hospital_id" string="Hospital"/>
|
||||
<field name="medic_exam" select="1" string="Medical Examination"/>
|
||||
<field name="esp_account" select="1"/>
|
||||
</group>
|
||||
<group col="2" colspan="2">
|
||||
<separator colspan="2" string="Providend Fund"/>
|
||||
<field name="pf_account" string="Account"/>
|
||||
<field name="pg_joining" string="Join Date"/>
|
||||
</group>
|
||||
</page>
|
||||
<page string="Contracts">
|
||||
<field colspan="4" mode="form,tree" name="contract_ids" nolabel="1">
|
||||
<tree string="Contracts">
|
||||
@@ -153,33 +175,8 @@
|
||||
</form>
|
||||
</field>
|
||||
</page>
|
||||
<page string="Miscellaneous">
|
||||
<group colspan="2" col="2">
|
||||
<separator string="Personal Info" colspan="2"/>
|
||||
<field name="pan_no" select="1"/>
|
||||
<field name="bank_account_id"/>
|
||||
<field name="place_of_birth"/>
|
||||
<field name="children"/>
|
||||
</group>
|
||||
<group colspan="2" col="2">
|
||||
<separator string="Job Info" colspan="2"/>
|
||||
<field name="manager" select="1"/>
|
||||
<field name="vehicle" select="1"/>
|
||||
<field name="vehicle_distance" select="1"/>
|
||||
</group>
|
||||
<group col="2" colspan="2">
|
||||
<separator colspan="2" string="ESI Information"/>
|
||||
<field name="esi_account" string="Account"/>
|
||||
<field name="hospital_id" string="Hospital"/>
|
||||
<field name="medic_exam" select="1" string="Medical Examination"/>
|
||||
<field name="esp_account" select="1"/>
|
||||
</group>
|
||||
<group col="2" colspan="2">
|
||||
<separator colspan="2" string="Providend Fund"/>
|
||||
<field name="pf_account" string="Account"/>
|
||||
<field name="pg_joining" string="Join Date"/>
|
||||
</group>
|
||||
</page>
|
||||
</xpath>
|
||||
<xpath expr="/form/notebook/page[@string='Notes']" position="before">
|
||||
<page string="Salary Structure">
|
||||
<field name="line_ids" nolabel="1" colspan="4" string="Salary Structure">
|
||||
<tree string="Salary Structure" editable="bottom">
|
||||
@@ -202,7 +199,8 @@
|
||||
<field name="analytic_account" groups="base.group_extended"/>
|
||||
<field name="slip_ids" colspan="4" nolabel="1"/>
|
||||
</page>
|
||||
</page>
|
||||
</xpath>
|
||||
</data>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -212,13 +210,12 @@
|
||||
<field name="type">form</field>
|
||||
<field name="inherit_id" ref="hr.view_employee_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="otherid" position="after">
|
||||
<field name="identification_id" position="after">
|
||||
<field name="passport_id"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
<!-- End Employee View -->
|
||||
|
||||
<!-- Contract View -->
|
||||
<record id="hr_contract.hr_contract_view_form" model="ir.ui.view">
|
||||
<field name="name">hr.contract.view.form</field>
|
||||
@@ -228,7 +225,7 @@
|
||||
<form string="Contract">
|
||||
<group colspan="4" col="6">
|
||||
<field name="name" select="1"/>
|
||||
<field name="employee_id" select="1"/>
|
||||
<field name="employee_id" select="1" on_change="on_change_employee_id(employee_id)"/>
|
||||
<field name="job_id"/>
|
||||
<field name="wage"/>
|
||||
<field name="wage_type_id" widget="selection"/>
|
||||
@@ -242,6 +239,9 @@
|
||||
<field name="date_end" select="1"/>
|
||||
<field name="working_hours"/>
|
||||
<field name="working_days_per_week" select="1"/>
|
||||
<separator colspan="2" string="Trial Period"/>
|
||||
<field name="trial_date_start" />
|
||||
<field name="trial_date_end" />
|
||||
</group>
|
||||
<group col="2" colspan="2">
|
||||
<separator colspan="2" string="Advantages"/>
|
||||
|
||||
@@ -25,10 +25,32 @@
|
||||
"access_account_journal_column_payroll","account.journal.column.payroll","account.model_account_journal_column","group_hr_payroll",1,0,0,0
|
||||
"access_account_fiscalyear_payroll","account.fiscalyear.payroll","account.model_account_fiscalyear","group_hr_payroll",1,0,0,0
|
||||
"access_hr_payslip_contract","hr.payslip.contract","model_hr_payslip","base.group_hr_contract",1,0,0,0
|
||||
"access_hr_payroll_structure","hr.payroll.structure","model_hr_payroll_structure","base.group_system",1,1,1,1
|
||||
"access_hr_payroll_structure_system","hr.payroll.structure.system","model_hr_payroll_structure","base.group_system",1,1,1,1
|
||||
"access_company_contribution","company.contribution","model_company_contribution","base.group_system",1,1,1,1
|
||||
"access_hr_passport_sys","hr.passport","model_hr_passport","base.group_system",1,1,1,1
|
||||
"access_res_partner_payroll","res.partner.payroll","base.model_res_partner","group_hr_payroll",1,1,1,1
|
||||
"access_hr_contibution_register_system","hr.contibution.register.system","model_hr_contibution_register","base.group_system",1,1,1,1
|
||||
"access_hr_contibution_register_line_system","hr.contibution.register.line.system","model_hr_contibution_register_line","base.group_system",1,1,1,1
|
||||
"access_hr_allounce_deduction_category_system","hr.allounce.deduction.category.system","model_hr_allounce_deduction_categoty","base.group_system",1,1,1,1
|
||||
"access_account_fiscalyear_manager","account.fiscalyear.payroll.manager","account.model_account_fiscalyear","base.group_hr_manager",1,1,1,1
|
||||
"access_hr_payslip_manager","hr.payslip.manager","model_hr_payslip","base.group_hr_manager",1,1,1,1
|
||||
"access_hr_payslip_line_manager","hr.payslip.line.manager","model_hr_payslip_line","base.group_hr_manager",1,1,1,1
|
||||
"access_hr_payroll_structure_manager","hr.payroll.structure.manager","model_hr_payroll_structure","base.group_hr_manager",1,1,1,1
|
||||
"access_hr_allounce_deduction_category_manager","hr.allounce.deduction.category.manager","model_hr_allounce_deduction_categoty","base.group_hr_manager",1,1,1,1
|
||||
"access_hr_passport_manager","hr.passport.manager","model_hr_passport","base.group_hr_manager",1,1,1,1
|
||||
"access_account_journal_manager","account.journal.manager","account.model_account_journal","base.group_hr_manager",1,1,1,1
|
||||
"access_account_journal_column_manager","account.journal.column.manager","account.model_account_journal_column","base.group_hr_manager",1,1,1,1
|
||||
"access_account_journal_view_manager","account.journal.view.manager","account.model_account_journal_view","base.group_hr_manager",1,1,1,1
|
||||
"access_hr_payslip_employee","hr.payslip.employee","model_hr_payslip","base.group_user",1,0,0,0
|
||||
"access_hr_payroll_register_system","hr.payroll.register.system","model_hr_payroll_register","base.group_system",1,0,0,0
|
||||
"access_hr_payroll_advice_system","hr.payroll.advice.system","model_hr_payroll_advice","base.group_system",1,0,0,0
|
||||
"access_hr_payslip_line_system","hr.payslip.line.system","model_hr_payslip_line","base.group_system",1,1,1,1
|
||||
"access_hr_payslip_account_move_system","hr.payslip.account.move.system","model_hr_payslip_account_move","base.group_system",1,0,0,0
|
||||
"access_hr_payroll_structure_contract","hr.payroll.structure.contract","model_hr_payroll_structure","base.group_hr_contract",1,1,1,1
|
||||
"access_hr_payslip_line_user","hr.payslip.line.user","model_hr_payslip_line","base.group_hr_user",1,1,1,0
|
||||
"access_hr_allounce_deduction_category_hr_user","hr.allounce.deduction.category.hr.user","model_hr_allounce_deduction_categoty","base.group_hr_user",1,1,1,0
|
||||
"access_hr_payroll_structure_hr_user","hr.payroll.structure.hr.user","model_hr_payroll_structure","base.group_hr_user",1,1,1,0
|
||||
"access_hr_payslip_line_line_hr_user","hr.payslip.line.line.hr.user","model_hr_payslip_line_line","base.group_hr_user",1,1,1,0
|
||||
"access_hr_payslip_line_line_hr_manager","hr.payslip.line.line.hr.manager","model_hr_payslip_line_line","base.group_hr_manager",1,1,1,1
|
||||
"access_hr_payslip_line_line_system","hr.payslip.line.line.system","model_hr_payslip_line_line","base.group_system",1,0,0,0
|
||||
"access_hr_payroll_advice_line_system","hr.payroll.advice.line.system","model_hr_payroll_advice_line","base.group_system",1,0,0,0
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user