[MERGE]
bzr revid: mra@mra-laptop-20100713134316-9e0q7ozy471c35q4
This commit is contained in:
@@ -180,7 +180,6 @@
|
||||
<form string="Contacts">
|
||||
<group colspan="4" col="4">
|
||||
<field name="sequence_partner"/>
|
||||
<field name="name"/>
|
||||
<field name="contact_id"/>
|
||||
<field name="function"/>
|
||||
</group>
|
||||
|
||||
@@ -139,9 +139,7 @@ and users"),
|
||||
],'Type', help="Type is used to separate Leads and Opportunities"),
|
||||
'priority': fields.selection(crm.AVAILABLE_PRIORITIES, 'Priority'),
|
||||
'date_closed': fields.datetime('Closed', readonly=True),
|
||||
'stage_id': fields.many2one('crm.case.stage', 'Stage', \
|
||||
domain="[('section_id','=',section_id),\
|
||||
('object_id.model', '=', 'crm.lead')]"),
|
||||
'stage_id': fields.many2one('crm.case.stage', 'Stage'),
|
||||
'user_id': fields.many2one('res.users', 'Salesman',help='By Default Salesman is Administrator when create New User'),
|
||||
'referred': fields.char('Referred By', size=64),
|
||||
'date_open': fields.datetime('Opened', readonly=True),
|
||||
|
||||
@@ -53,8 +53,8 @@
|
||||
<newline />
|
||||
<field name="section_id" widget="selection" />
|
||||
<field name="user_id" />
|
||||
<field name="stage_id" widget="selection"
|
||||
domain="[('object_id.model', '=', 'crm.lead')]" />
|
||||
<field name="stage_id"
|
||||
domain="[('section_id','=',section_id), ('object_id.model', '=', 'crm.lead')]" />
|
||||
<group col="2" colspan="1">
|
||||
<button name="stage_previous" string="Previous"
|
||||
states="open,pending" type="object"
|
||||
@@ -223,7 +223,7 @@
|
||||
<field name="type_id" invisible="1"/>
|
||||
<field name="referred" invisible="1"/>
|
||||
|
||||
<field name="stage_id"/>
|
||||
<field name="stage_id" />
|
||||
<button name="stage_previous" string="Previous Stage"
|
||||
states="open,pending" type="object" icon="gtk-go-back" />
|
||||
<button name="stage_next" string="Next Stage"
|
||||
|
||||
@@ -14,8 +14,7 @@
|
||||
<group colspan="1" col="4">
|
||||
<field name="stage_id" nolabel="1"
|
||||
on_change="onchange_stage_id(stage_id)"
|
||||
widget="selection"
|
||||
domain="[('object_id.model', '=', 'crm.lead')]" />
|
||||
domain="[('section_id','=',section_id), ('object_id.model', '=', 'crm.lead')]" />
|
||||
<button name="stage_previous"
|
||||
states="open,pending" type="object"
|
||||
icon="gtk-go-back" string="" />
|
||||
|
||||
@@ -374,7 +374,8 @@
|
||||
<page string="Current Activity" position="inside">
|
||||
<field name="context_section_id" completion="1"
|
||||
widget="selection"
|
||||
context="{'user_prefence':True}" />
|
||||
context="{'user_prefence':True}"
|
||||
readonly="0"/>
|
||||
</page>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -133,7 +133,7 @@
|
||||
<group expand="0" string="Extended options..." groups="base.group_extended">
|
||||
<field name="partner_id"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="stage_id" widget="selection" domain="[('object_id.model', '=', 'crm.lead')]"/>
|
||||
<field name="stage_id" widget="selection" domain="[('section_id','=',section_id), ('object_id.model', '=', 'crm.lead')]" />
|
||||
<field name="categ_id" widget="selection" domain="[('object_id.model', '=', 'crm.lead')]"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
|
||||
|
||||
@@ -79,9 +79,7 @@ class crm_claim(osv.osv, crm.crm_case):
|
||||
'partner_name': fields.char("Employee's Name", size=64),
|
||||
'partner_mobile': fields.char('Mobile', size=32),
|
||||
'partner_phone': fields.char('Phone', size=32),
|
||||
'stage_id': fields.many2one ('crm.case.stage', 'Stage', \
|
||||
domain="[('section_id','=',section_id),\
|
||||
('object_id.model', '=', 'crm.claim')]"),
|
||||
'stage_id': fields.many2one ('crm.case.stage', 'Stage'),
|
||||
'probability': fields.float('Probability (%)'),
|
||||
'state': fields.selection(crm.AVAILABLE_STATES, 'State', size=16, readonly=True,
|
||||
help='The state is set to \'Draft\', when a case is created.\
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
</record>
|
||||
|
||||
<menuitem action="crm_claim_resource_act" name="Resource Type"
|
||||
id="menu_crm_claim_stage_act"
|
||||
id="menu_crm_claim_type_act"
|
||||
parent="menu_config_claim" />
|
||||
|
||||
<!-- Claims -->
|
||||
@@ -125,7 +125,9 @@
|
||||
<field name="section_id" widget="selection"/>
|
||||
<label string="Stage: " align="1.0"/>
|
||||
<group colspan="1" col="3">
|
||||
<field name="stage_id" select="1" nolabel="1"/>
|
||||
<field name="stage_id" nolabel="1"
|
||||
on_change="onchange_stage_id(stage_id)"
|
||||
domain="[('section_id','=',section_id), ('object_id.model', '=', 'crm.claim')]" />
|
||||
<button name="stage_previous" string="" type="object" icon="gtk-go-back" />
|
||||
<button icon="gtk-go-forward" string="" name="stage_next" type="object"/>
|
||||
</group>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
name="Human Resources"
|
||||
parent="base.dashboard"/>
|
||||
|
||||
|
||||
<!-- This board view will be complete by other hr_* modules-->
|
||||
<record id="board_hr_form" model="ir.ui.view">
|
||||
<field name="name">board.hr.form</field>
|
||||
<field name="model">board.board</field>
|
||||
|
||||
@@ -2,6 +2,43 @@
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<!-- Employee Category -->
|
||||
|
||||
<record id="category1" model="hr.employee.category">
|
||||
<field name="name">CEO</field>
|
||||
</record>
|
||||
|
||||
<record id="category2" model="hr.employee.category">
|
||||
<field name="name">CTO</field>
|
||||
<field name="parent_id" ref="category1"/>
|
||||
</record>
|
||||
|
||||
<record id="category3" model="hr.employee.category">
|
||||
<field name="name">Managers(Tech. Heads)</field>
|
||||
<field name="parent_id" ref="category2"/>
|
||||
</record>
|
||||
|
||||
<record id="category4" model="hr.employee.category">
|
||||
<field name="name">Project Managers</field>
|
||||
<field name="parent_id" ref="category3"/>
|
||||
</record>
|
||||
|
||||
<record id="category5" model="hr.employee.category">
|
||||
<field name="name">Sr. Executives(Team Leads)</field>
|
||||
<field name="parent_id" ref="category4"/>
|
||||
</record>
|
||||
|
||||
<record id="category6" model="hr.employee.category">
|
||||
<field name="name">Jr. Executives(Developers)</field>
|
||||
<field name="parent_id" ref="category5"/>
|
||||
</record>
|
||||
|
||||
<record id="category7" model="hr.employee.category">
|
||||
<field name="name">Trainee(Intership)</field>
|
||||
<field name="parent_id" ref="category6"/>
|
||||
</record>
|
||||
|
||||
|
||||
<!-- Example employee -->
|
||||
|
||||
<record id="employee1" model="hr.employee">
|
||||
@@ -9,6 +46,7 @@
|
||||
<field name="calendar_id" ref="resource.timesheet_group1"/>
|
||||
<!--<field name="regime">45</field>-->
|
||||
<field name="user_id" ref="base.user_root"/>
|
||||
<field name="category_id" ref="hr.category1"/>
|
||||
<!--<field name="holiday_max">25</field>-->
|
||||
</record>
|
||||
|
||||
|
||||
@@ -101,7 +101,7 @@
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<page string="Current Activity" position="inside">
|
||||
<field name="context_department_id" widget="selection" />
|
||||
<field name="context_department_id" widget="selection" readonly="0"/>
|
||||
</page>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
<separator string="Position" colspan="2"/>
|
||||
<field name="job_id" widget="selection"/>
|
||||
<field name="department_id" widget="selection"/>
|
||||
<field name="category_id" />
|
||||
<field name="category_id" widget="selection"/>
|
||||
<!--<separator string="Managers" colspan="2"/>
|
||||
<field name="parent_id" />
|
||||
<field name="coach_id" />-->
|
||||
@@ -88,6 +88,7 @@
|
||||
<field name="work_email"/>
|
||||
<field name="department_id"/>
|
||||
<field name="job_id"/>
|
||||
<field name="category_id"/>
|
||||
<field name="parent_id"/>
|
||||
<field name="coach_id" invisible="1" />
|
||||
</tree>
|
||||
@@ -102,7 +103,9 @@
|
||||
<search string="Employees">
|
||||
<filter icon="terp-personal-" domain="[('active','=',False)]" string="Unactive" groups="base.group_extended"/>
|
||||
<field name="name"/>
|
||||
<field name="department_id" widget="selection"/>
|
||||
<field name="department_id" widget="selection">
|
||||
<filter icon="terp-personal+" domain="[('department_id','=',context.get('department_id',False))]" help="My Departments Employee"/>
|
||||
</field>
|
||||
<field name="job_id" widget="selection"/>
|
||||
<field name="parent_id"/>
|
||||
<newline />
|
||||
|
||||
@@ -60,7 +60,7 @@ class hr_attendance(osv.osv):
|
||||
'day': fields.function(_day_compute, method=True, type='char', string='Day', store=True, select=1, size=32),
|
||||
}
|
||||
_defaults = {
|
||||
'name': time.strftime('%Y-%m-%d %H:%M:%S'),
|
||||
'name': lambda *a: time.strftime('%Y-%m-%d %H:%M:%S'), #Don't remove the lambda, if you remove it then the current time will not change
|
||||
'employee_id': _employee_get,
|
||||
}
|
||||
|
||||
@@ -119,6 +119,7 @@ class hr_employee(osv.osv):
|
||||
def attendance_action_change(self, cr, uid, ids, type='action', context=None, dt=False, *args):
|
||||
id = False
|
||||
warning_sign = 'sign'
|
||||
res = {}
|
||||
|
||||
#Special case when button calls this method :type=context
|
||||
if isinstance(type, dict):
|
||||
@@ -127,7 +128,6 @@ class hr_employee(osv.osv):
|
||||
warning_sign = "Sign In"
|
||||
elif type == 'sign_out':
|
||||
warning_sign = "Sign Out"
|
||||
|
||||
for emp in self.read(cr, uid, ids, ['id'], context=context):
|
||||
if not self._action_check(cr, uid, emp['id'], dt, context):
|
||||
raise osv.except_osv(_('Warning'), _('You tried to %s with a date anterior to another event !\nTry to contact the administrator to correct attendances.')%(warning_sign,))
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
@@ -15,12 +15,12 @@
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
import attendance_errors
|
||||
import bymonth
|
||||
import attendance_by_month
|
||||
import timesheet
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
+2
-1
@@ -40,12 +40,13 @@ def hour2str(h):
|
||||
class report_custom(report_rml):
|
||||
|
||||
def create_xml(self, cr, uid, ids, datas, context=None):
|
||||
obj_emp = pooler.get_pool(cr.dbname).get('hr.employee')
|
||||
if context is None:
|
||||
context = {}
|
||||
month = DateTime.DateTime(datas['form']['year'], datas['form']['month'], 1)
|
||||
user_xml = ['<month>%s</month>' % month2name[month.month], '<year>%s</year>' % month.year]
|
||||
for employee_id in ids:
|
||||
emp = pooler.get_pool(cr.dbname).get('hr.employee').read(cr, uid, [employee_id], ['name'])[0]
|
||||
emp = obj_emp.read(cr, uid, [employee_id], ['name'])[0]
|
||||
stop, days_xml = False, []
|
||||
user_repr = '''
|
||||
<user>
|
||||
@@ -37,6 +37,7 @@ def to_hour(h):
|
||||
class report_custom(report_rml):
|
||||
|
||||
def create_xml(self, cr, uid, ids, datas, context=None):
|
||||
obj_emp = pooler.get_pool(cr.dbname).get('hr.employee')
|
||||
start_date = DateTime.strptime(datas['form']['init_date'], '%Y-%m-%d')
|
||||
end_date = DateTime.strptime(datas['form']['end_date'], '%Y-%m-%d')
|
||||
first_monday = start_date - DateTime.RelativeDateTime(days=start_date.day_of_week)
|
||||
@@ -47,7 +48,7 @@ class report_custom(report_rml):
|
||||
user_xml = []
|
||||
|
||||
for employee_id in ids:
|
||||
emp = pooler.get_pool(cr.dbname).get('hr.employee').read(cr, uid, [employee_id], ['id', 'name'])[0]
|
||||
emp = obj_emp.read(cr, uid, [employee_id], ['id', 'name'])[0]
|
||||
monday, n_monday = first_monday, first_monday + one_week
|
||||
stop, week_xml = False, []
|
||||
user_repr = '''
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
</record>
|
||||
|
||||
<record id="action_hr_attendance_month" model="ir.actions.act_window">
|
||||
<field name="name">Print Timesheet by month</field>
|
||||
<field name="name">Print Attendance by month</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">hr.attendance.month</field>
|
||||
<field name="view_type">form</field>
|
||||
@@ -34,7 +34,7 @@
|
||||
<record model="ir.values" id="hr_attendance_month_values">
|
||||
<field name="model_id" ref="hr.model_hr_employee" />
|
||||
<field name="object" eval="1" />
|
||||
<field name="name">Print Timesheet by month</field>
|
||||
<field name="name">Print Attendance by month</field>
|
||||
<field name="key2">client_print_multi</field>
|
||||
<field name="value" eval="'ir.actions.act_window,' + str(ref('action_hr_attendance_month'))" />
|
||||
<field name="key">action</field>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<record id="view_hr_attendance_week" model="ir.ui.view">
|
||||
<!--<record id="view_hr_attendance_week" model="ir.ui.view">
|
||||
<field name="name">Attendance Report Week</field>
|
||||
<field name="model">hr.attendance.week</field>
|
||||
<field name="type">form</field>
|
||||
@@ -40,7 +40,7 @@
|
||||
<field name="value" eval="'ir.actions.act_window,' + str(ref('action_hr_attendance_week'))" />
|
||||
<field name="key">action</field>
|
||||
<field name="model">hr.employee</field>
|
||||
</record>
|
||||
</record> -->
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -69,10 +69,10 @@
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
<menuitem action="action_hr_timesheet_my"
|
||||
<!--menuitem action="action_hr_timesheet_my"
|
||||
id="menu_hr_timesheet_my"
|
||||
parent="menu_hr_reporting_timesheet"
|
||||
groups="hr.group_hr_user" sequence="4" icon="STOCK_PRINT"/>
|
||||
groups="hr.group_hr_user" sequence="4" icon="STOCK_PRINT"/-->
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -718,9 +718,9 @@ class res_company(osv.osv):
|
||||
_inherit = 'res.company'
|
||||
_columns = {
|
||||
'timesheet_range': fields.selection(
|
||||
[('day','Day'),('week','Week'),('month','Month'),('year','Year')], 'Timeshet range'),
|
||||
'timesheet_max_difference': fields.float('Timesheet allowed difference',
|
||||
help="Allowed difference between the sign in/out and the timesheet " \
|
||||
[('day','Day'),('week','Week'),('month','Month'),('year','Year')], 'Timesheet range'),
|
||||
'timesheet_max_difference': fields.float('Timesheet allowed difference(Hours)',
|
||||
help="Allowed difference in hours between the sign in/out and the timesheet " \
|
||||
"computation for one sheet. Set this to 0 if you do not want any control."),
|
||||
}
|
||||
_defaults = {
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="action_view_task_tree" model="ir.actions.act_window">
|
||||
<field name="name">My Open Tasks</field>
|
||||
<field name="res_model">project.task</field>
|
||||
@@ -32,16 +32,16 @@
|
||||
<field name="domain">[('user_id','=',uid),('state','=','open')]</field>
|
||||
<field name="view_id" ref="view_task_tree"/>
|
||||
</record>
|
||||
|
||||
<record id="action_view_pending_task_tree" model="ir.actions.act_window">
|
||||
<field name="name">My Pending Tasks</field>
|
||||
|
||||
<record id="action_view_delegate_task_tree" model="ir.actions.act_window">
|
||||
<field name="name">My Delegated Tasks</field>
|
||||
<field name="res_model">project.task</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="domain">[('user_id','=',uid),('state','=','pending')]</field>
|
||||
<field name="view_id" ref="view_task_tree"/>
|
||||
<field name="domain">['|',('parent_ids.user_id','=',uid),('user_id','=',uid)]</field>
|
||||
<field name="view_id" ref="project.view_task_tree2"/>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="action_view_task_tree_deadline" model="ir.actions.act_window">
|
||||
<field name="name">My Task's Deadlines</field>
|
||||
<field name="res_model">project.task</field>
|
||||
@@ -87,7 +87,7 @@
|
||||
<hpaned>
|
||||
<child1>
|
||||
<action colspan="4" name="%(action_view_task_tree)d" string="My Open Tasks" width="510"/>
|
||||
<action colspan="4" name="%(action_view_pending_task_tree)d" string="My Pending Tasks" width="510"/>
|
||||
<action colspan="4" name="%(action_view_delegate_task_tree)d" string="My Delegated Tasks" width="510"/>
|
||||
</child1>
|
||||
<child2>
|
||||
<vpaned>
|
||||
@@ -95,7 +95,7 @@
|
||||
<action colspan="4" name="%(project.action_project_vs_remaining_hours_graph)d" string="Remaining Hours Per Project" />
|
||||
</child1>
|
||||
<child2>
|
||||
<action colspan="4" name="%(project.action_task_by_days_vs_planned_hours_graph)d" string="Planned Hours Per Day" />
|
||||
<action colspan="4" name="%(project.action_project_vs_planned_total_hours_graph)d" string="My Projects: Planned Vs Total Hours" />
|
||||
</child2>
|
||||
</vpaned>
|
||||
</child2>
|
||||
@@ -112,20 +112,20 @@
|
||||
<field name="usage">menu</field>
|
||||
<field name="view_id" ref="board_project_form"/>
|
||||
</record>
|
||||
|
||||
|
||||
<menuitem
|
||||
id="next_id_86"
|
||||
name="Dashboard"
|
||||
icon="terp-graph"
|
||||
sequence="0"
|
||||
parent="base.menu_project_report"/>
|
||||
|
||||
|
||||
<menuitem
|
||||
action="open_board_project"
|
||||
icon="terp-graph"
|
||||
id="menu_board_project"
|
||||
parent="next_id_86"
|
||||
sequence="1"/>
|
||||
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -571,7 +571,7 @@
|
||||
<field eval="18" name="priority"/>
|
||||
<field name="arch" type="xml">
|
||||
<page string="Current Activity" position="inside">
|
||||
<field name="context_project_id" completion="1" context="{'user_prefence':True}" widget="selection"/>
|
||||
<field name="context_project_id" completion="1" context="{'user_prefence':True}" widget="selection" readonly="0"/>
|
||||
</page>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -122,27 +122,31 @@ class report_project_task_user(osv.osv):
|
||||
report_project_task_user()
|
||||
|
||||
#This class is generated for project deshboard purpose
|
||||
class project_vs_remaining_hours(osv.osv):
|
||||
_name = "project.vs.remaining.hours"
|
||||
_description = " Project vs Remaining hours"
|
||||
class project_vs_hours(osv.osv):
|
||||
_name = "project.vs.hours"
|
||||
_description = " Project vs hours"
|
||||
_auto = False
|
||||
_columns = {
|
||||
'project': fields.char('Project', size=128, required=True),
|
||||
'remaining_hours': fields.float('Remaining Hours', readonly=True),
|
||||
'planned_hours': fields.float('Planned Hours', readonly=True),
|
||||
'total_hours': fields.float('Total Hours', readonly=True),
|
||||
'state': fields.selection([('draft','Draft'),('open','Open'), ('pending','Pending'),('cancelled', 'Cancelled'),('close','Close'),('template', 'Template')], 'State', required=True, readonly=True)
|
||||
}
|
||||
_order = 'project desc'
|
||||
|
||||
def init(self, cr):
|
||||
tools.sql.drop_view_if_exists(cr, 'project_vs_remaining_hours')
|
||||
tools.sql.drop_view_if_exists(cr, 'project_vs_hours')
|
||||
cr.execute("""
|
||||
CREATE or REPLACE view project_vs_remaining_hours as (
|
||||
CREATE or REPLACE view project_vs_hours as (
|
||||
select
|
||||
min(pt.id) as id,
|
||||
aaa.user_id as uid,
|
||||
aaa.name as project,
|
||||
aaa.state,
|
||||
sum(pt.remaining_hours) as remaining_hours
|
||||
sum(pt.remaining_hours) as remaining_hours,
|
||||
sum(pt.planned_hours) as planned_hours,
|
||||
sum(pt.total_hours) as total_hours
|
||||
FROM project_project as pp,
|
||||
account_analytic_account as aaa,
|
||||
project_task as pt
|
||||
@@ -154,7 +158,9 @@ class project_vs_remaining_hours(osv.osv):
|
||||
pur.uid as uid,
|
||||
aaa.name as project,
|
||||
aaa.state,
|
||||
sum(pt.remaining_hours) as remaining_hours
|
||||
sum(pt.remaining_hours) as remaining_hours,
|
||||
sum(pt.planned_hours) as planned_hours,
|
||||
sum(pt.total_hours) as total_hours
|
||||
FROM project_project as pp,
|
||||
project_user_rel as pur,
|
||||
account_analytic_account as aaa,
|
||||
@@ -164,7 +170,7 @@ class project_vs_remaining_hours(osv.osv):
|
||||
)
|
||||
""")
|
||||
|
||||
project_vs_remaining_hours()
|
||||
project_vs_hours()
|
||||
|
||||
class task_by_days(osv.osv):
|
||||
_name = "task.by.days"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
|
||||
<menuitem id="base.menu_project_report" name="Reporting" parent="base.menu_main_pm" sequence="50"/>
|
||||
|
||||
<record id="view_task_project_user_tree" model="ir.ui.view">
|
||||
@@ -91,7 +91,7 @@
|
||||
<field name="project_id">
|
||||
<filter icon="terp-folder-blue"
|
||||
string="My Projects"
|
||||
help="My Projects" domain="[('project_id','=',uid)]"/>
|
||||
help="My Projects" domain="[('project_id','=',uid)]"/>
|
||||
</field>
|
||||
|
||||
<field name="user_id" widget="selection">
|
||||
@@ -151,7 +151,7 @@
|
||||
<!-- Views and action for project dashboard -->
|
||||
<record id="view_project_vs_remaining_hours_tree" model="ir.ui.view">
|
||||
<field name="name">project.vs.remaining.hour.tree</field>
|
||||
<field name="model">project.vs.remaining.hours</field>
|
||||
<field name="model">project.vs.hours</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Project and remaining hours" colors="pink:state=='draft';blue:state=='pending';black:state=='open';red:state=='cancelled';grey:state=='close';yellow:state=='template'">
|
||||
@@ -164,7 +164,7 @@
|
||||
|
||||
<record id="view_project_vs_remaining_hours_graph" model="ir.ui.view">
|
||||
<field name="name">project.vs.remaining.hour.graph</field>
|
||||
<field name="model">project.vs.remaining.hours</field>
|
||||
<field name="model">project.vs.hours</field>
|
||||
<field name="type">graph</field>
|
||||
<field name="arch" type="xml">
|
||||
<graph string="Project vs remaining hours" type="bar">
|
||||
@@ -177,13 +177,25 @@
|
||||
|
||||
<record id="action_project_vs_remaining_hours_graph" model="ir.actions.act_window">
|
||||
<field name="name">Project and remaining hours</field>
|
||||
<field name="res_model">project.vs.remaining.hours</field>
|
||||
<field name="res_model">project.vs.hours</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">graph,tree</field>
|
||||
<field name="domain">[('uid','=',uid)]</field>
|
||||
<field name="domain">[('uid','=',uid),('state','=','open')]</field>
|
||||
<field name="view_id" ref="view_project_vs_remaining_hours_graph"/>
|
||||
</record>
|
||||
|
||||
<record id="open_view_project_vs_remaining_hours_tree" model="ir.actions.act_window.view">
|
||||
<field eval="1" name="sequence"/>
|
||||
<field name="view_mode">tree</field>
|
||||
<field name="view_id" ref="view_project_vs_remaining_hours_tree"/>
|
||||
<field name="act_window_id" ref="action_project_vs_remaining_hours_graph"/>
|
||||
</record>
|
||||
<record id="open_view_project_vs_remaining_hours_graph" model="ir.actions.act_window.view">
|
||||
<field eval="2" name="sequence"/>
|
||||
<field name="view_mode">graph</field>
|
||||
<field name="view_id" ref="view_project_vs_remaining_hours_graph"/>
|
||||
<field name="act_window_id" ref="action_project_vs_remaining_hours_graph"/>
|
||||
</record>
|
||||
<!-- Views and action for project issue dashboard -->
|
||||
<record id="view_task_by_days_tree" model="ir.ui.view">
|
||||
<field name="name">task.by.days.tree</field>
|
||||
@@ -222,38 +234,51 @@
|
||||
</record>
|
||||
|
||||
<!-- Views and action for project dashboard -->
|
||||
<record id="view_task_by_days_vs_planned_hours_tree" model="ir.ui.view">
|
||||
<field name="name">task.by.days.vs.planned.hours.tree</field>
|
||||
<field name="model">report.project.task.user</field>
|
||||
<record id="view_project_vs_planned_total_hours_tree" model="ir.ui.view">
|
||||
<field name="name">project.vs.planned.total.hour.tree</field>
|
||||
<field name="model">project.vs.hours</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Task By Days vs Planned Hours" >
|
||||
<field name="day"/>
|
||||
<field name="hours_planned"/>
|
||||
<tree string="Project Vs Planned and Total Hours" colors="pink:state=='draft';blue:state=='pending';black:state=='open';red:state=='cancelled';grey:state=='close';yellow:state=='template'">
|
||||
<field name="project"/>
|
||||
<field name="planned_hours"/>
|
||||
<field name="total_hours"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_task_by_days_vs_planned_hours_graph" model="ir.ui.view">
|
||||
<field name="name">task.by.days.vs.planned.hours.graph</field>
|
||||
<field name="model">report.project.task.user</field>
|
||||
<record id="view_project_vs_planned_total_hours_graph" model="ir.ui.view">
|
||||
<field name="name">project.vs.planned.total.hour.graph</field>
|
||||
<field name="model">project.vs.hours</field>
|
||||
<field name="type">graph</field>
|
||||
<field name="arch" type="xml">
|
||||
<graph string="Task By Days vs Planned Hours" type="bar">
|
||||
<field name="day"/>
|
||||
<field name="hours_planned" operator="+"/>
|
||||
<field name="project_id" group="True"/>
|
||||
<graph string="Project Vs Planned and Total Hours" type="bar">
|
||||
<field name="project"/>
|
||||
<field name="planned_hours" operator="+"/>
|
||||
<field name="total_hours" operator="+"/>
|
||||
</graph>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_task_by_days_vs_planned_hours_graph" model="ir.actions.act_window">
|
||||
<field name="name">Task By Days vs Planned Hours</field>
|
||||
<field name="res_model">report.project.task.user</field>
|
||||
<record id="action_project_vs_planned_total_hours_graph" model="ir.actions.act_window">
|
||||
<field name="name">My projects: Planned Vs Total hours</field>
|
||||
<field name="res_model">project.vs.hours</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">graph,tree</field>
|
||||
<field name="view_id" ref="view_task_by_days_vs_planned_hours_graph"/>
|
||||
<field name="view_id" ref="view_project_vs_planned_total_hours_graph"/>
|
||||
</record>
|
||||
|
||||
<record id="open_view_project_vs_planned_total_hours_tree" model="ir.actions.act_window.view">
|
||||
<field eval="1" name="sequence"/>
|
||||
<field name="view_mode">tree</field>
|
||||
<field name="view_id" ref="view_project_vs_planned_total_hours_tree"/>
|
||||
<field name="act_window_id" ref="action_project_vs_planned_total_hours_graph"/>
|
||||
</record>
|
||||
<record id="open_view_project_vs_planned_total_hours_graph" model="ir.actions.act_window.view">
|
||||
<field eval="2" name="sequence"/>
|
||||
<field name="view_mode">graph</field>
|
||||
<field name="view_id" ref="view_project_vs_planned_total_hours_graph"/>
|
||||
<field name="act_window_id" ref="action_project_vs_planned_total_hours_graph"/>
|
||||
</record>
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
"access_project_task_work_manager","project.task.work.manager","model_project_task_work","project.group_project_manager",1,1,1,1
|
||||
"access_project_message","project.message","model_project_message","project.group_project_user",1,1,1,1
|
||||
"access_report_project_task_user","report.project.task.user","model_report_project_task_user","project.group_project_manager",1,0,0,0
|
||||
"access_project_vs_remaining_hours","project.vs.remaining.hours","model_project_vs_remaining_hours","project.group_project_user",1,1,1,1
|
||||
"access_project_vs_hours","project.vs.hours","model_project_vs_hours","project.group_project_user",1,1,1,1
|
||||
"access_task_by_days","task.by.days","model_task_by_days","project.group_project_user",1,1,1,1
|
||||
"access_partner_task user","base.res.partner user","base.model_res_partner","project.group_project_user",1,0,0,0
|
||||
"access_partner_task manager","base.res.partner manager","base.model_res_partner","project.group_project_manager",1,0,0,0
|
||||
|
||||
|
Reference in New Issue
Block a user