diff --git a/cor_custom/__manifest__.py b/cor_custom/__manifest__.py index 174941e..d7f7409 100755 --- a/cor_custom/__manifest__.py +++ b/cor_custom/__manifest__.py @@ -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': [ diff --git a/cor_custom/models/__init__.py b/cor_custom/models/__init__.py index 1bcbe44..899e0e4 100755 --- a/cor_custom/models/__init__.py +++ b/cor_custom/models/__init__.py @@ -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 diff --git a/cor_custom/models/project.py b/cor_custom/models/project.py index cf9d5a1..f5d3a15 100755 --- a/cor_custom/models/project.py +++ b/cor_custom/models/project.py @@ -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): diff --git a/cor_custom/security/ir.model.access.csv b/cor_custom/security/ir.model.access.csv index 03fae5d..371580d 100755 --- a/cor_custom/security/ir.model.access.csv +++ b/cor_custom/security/ir.model.access.csv @@ -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 \ No newline at end of file +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 \ No newline at end of file diff --git a/cor_custom/views/project_view.xml b/cor_custom/views/project_view.xml index c7bcf75..cebca74 100755 --- a/cor_custom/views/project_view.xml +++ b/cor_custom/views/project_view.xml @@ -17,8 +17,23 @@ - - + + + + + + + + + + + + + + + + + diff --git a/cor_custom/wizard/__init__.py b/cor_custom/wizard/__init__.py index 169f7b9..57b8bbc 100755 --- a/cor_custom/wizard/__init__.py +++ b/cor_custom/wizard/__init__.py @@ -3,3 +3,4 @@ from . import project_create_sale_order from . import crm_opportunity_to_quotation +from . import project_multi_budget_assign