Consultant hours budgeted and actual project
This commit is contained in:
parent
3598e23e74
commit
02847d5215
|
@ -29,6 +29,7 @@
|
|||
'views/crm_view.xml',
|
||||
'views/sale_views.xml',
|
||||
'views/project_view.xml',
|
||||
'views/project_hours_view.xml',
|
||||
'views/hr_employee_views.xml',
|
||||
'views/hr_timesheet_templates.xml',
|
||||
'views/analytic_view.xml',
|
||||
|
@ -37,6 +38,7 @@
|
|||
'views/templates.xml',
|
||||
#'views/menu_show_view.xml',
|
||||
'wizard/project_create_sale_order_views.xml',
|
||||
'wizard/project_multi_budget_assign_view.xml',
|
||||
],
|
||||
# only loaded in demonstration mode
|
||||
'demo': [
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
from . import crm_lead
|
||||
from . import models
|
||||
from . import project
|
||||
from . import project_hours
|
||||
from . import project_overview
|
||||
from . import analytic
|
||||
from . import product
|
||||
|
|
|
@ -39,8 +39,8 @@ class Project(models.Model):
|
|||
" them or by someone of their company.")
|
||||
allow_billable = fields.Boolean("Billable", default=True, help="Invoice your time and material from tasks.")
|
||||
|
||||
start_date = fields.Date(string='Start Date')
|
||||
end_date = fields.Date(string='End Date')
|
||||
date_start = fields.Date(string='Start Date')
|
||||
date = fields.Date(string='End Date', index=True, tracking=True)
|
||||
budgeted_hours = fields.Float(string='Total Budgeted Hours', compute='_compute_calc')
|
||||
budgeted_hours2 = fields.Float(string='Total Budgeted Hours')
|
||||
budgeted_revenue = fields.Float(string='Budgeted Revenue', digits=(16, 2))
|
||||
|
@ -67,6 +67,7 @@ class Project(models.Model):
|
|||
|
||||
consultant_timesheet_hrs = fields.One2many('consultant.timesheet.hrs', 'project_id', "Timesheet Hrs",
|
||||
copy=False, help="Consultant timesheet hours")
|
||||
project_cons_hrs = fields.One2many('project.consultant.hrs', 'project_id', 'Consultant Allocation', copy=False)
|
||||
|
||||
def _onchange_calculate_timesheet_hours(self):
|
||||
self.consultant_timesheet_hrs = [(6, 0, False)]
|
||||
|
@ -117,11 +118,6 @@ class Project(models.Model):
|
|||
# if self.manager_per > 100:
|
||||
# raise ValidationError(_("Percentage should be less than or equal to 100"))
|
||||
|
||||
_sql_constraints = [
|
||||
(
|
||||
'end_date_greater', 'check(end_date >= start_date)',
|
||||
'Error ! Ending Date cannot be set before Beginning Date.')
|
||||
]
|
||||
|
||||
@api.onchange('budgeted_revenue', 'expenses_per')
|
||||
def onchange_expenses_per(self):
|
||||
|
|
|
@ -1,3 +1,10 @@
|
|||
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
|
||||
access_consultant_timesheet_hrs_puser,consultant.timesheet.hrs,model_consultant_timesheet_hrs,project.group_project_user,1,0,0,0
|
||||
access_consultant_timesheet_hrs_pmanager,consultant.timesheet.hrs,model_consultant_timesheet_hrs,project.group_project_manager,1,1,1,1
|
||||
access_consultant_timesheet_hrs_pmanager,consultant.timesheet.hrs,model_consultant_timesheet_hrs,project.group_project_manager,1,1,1,1
|
||||
access_consultant_timesheet_hrs_pmanager,consultant.timesheet.hrs,model_consultant_timesheet_hrs,project.group_project_manager,1,1,1,1
|
||||
access_project_consultant_hrs_puser,project.consultant.hrs,model_project_consultant_hrs,project.group_project_user,1,0,0,0
|
||||
access_project_consultant_hrs_pmanager,project.consultant.hrs,model_project_consultant_hrs,project.group_project_manager,1,1,1,1
|
||||
access_model_project_multi_budget_assign_puser,project.multi.budget.assign,model_project_multi_budget_assign,project.group_project_user,1,0,0,0
|
||||
access_model_project_multi_budget_assign_pmanager,project.multi.budget.assign,model_project_multi_budget_assign,project.group_project_manager,1,1,1,1
|
||||
access_model_project_multi_budget_assign_line_puser,project.multi.budget.assign.line,model_project_multi_budget_assign_line,project.group_project_user,1,0,0,0
|
||||
access_model_project_multi_budget_assign_line_pmanager,project.multi.budget.assign.line,model_project_multi_budget_assign_line,project.group_project_manager,1,1,1,1
|
|
|
@ -17,8 +17,23 @@
|
|||
</xpath>
|
||||
<xpath expr="//field[@name='partner_id']" position="replace">
|
||||
<field name="partner_id" string="Client" required="0"/>
|
||||
<field name="start_date"/>
|
||||
<field name="end_date"/>
|
||||
<field name="date_start"/>
|
||||
<field name="date"/>
|
||||
</xpath>
|
||||
<xpath expr="//page[@name='settings']" position="after">
|
||||
<page string="Consultant Allocation" attrs="{'invisible':['|',('pricing_type','!=','employee_rate'),('project_type','!=','hours_in_consultant')]}">
|
||||
<field name="project_cons_hrs">
|
||||
<tree editable="top">
|
||||
<field name="project_id" invisible="1"/>
|
||||
<field name="employee_id" options="{'no_create_edit': True, 'no_quick_create': True}"/>
|
||||
<field name="start_date"/>
|
||||
<field name="end_date"/>
|
||||
<field name="percentage"/>
|
||||
<field name="budgeted_hours"/>
|
||||
<field name="actual_hours"/>
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
|
|
@ -3,3 +3,4 @@
|
|||
|
||||
from . import project_create_sale_order
|
||||
from . import crm_opportunity_to_quotation
|
||||
from . import project_multi_budget_assign
|
||||
|
|
Loading…
Reference in New Issue