first push message
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
from . import project_project
|
||||
from . import project_task
|
||||
from . import project_task_type
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,10 @@
|
||||
from odoo import models, fields
|
||||
|
||||
class ProjectProject(models.Model):
|
||||
_inherit = 'project.project'
|
||||
|
||||
gantt_enable_dynamic_text = fields.Boolean(string="Dynamic Text", default=True)
|
||||
gantt_enable_dynamic_progress = fields.Boolean(string="Dynamic Progress", default=True)
|
||||
gantt_hide_holidays = fields.Boolean(string="Hide Holiday Day")
|
||||
gantt_days_off = fields.Char(string="Days Off (e.g., 5,6 for Sat,Sun)", default="5,6")
|
||||
gantt_mail_timesheet_user = fields.Many2many('res.users', string="Mail Timesheet Users")
|
||||
@@ -0,0 +1,31 @@
|
||||
from odoo import models, fields, api
|
||||
|
||||
|
||||
class ProjectTask(models.Model):
|
||||
_inherit = 'project.task'
|
||||
|
||||
gantt_start_date = fields.Date(string="Start Date", default=fields.Date.today)
|
||||
gantt_end_date = fields.Date(string="End Date")
|
||||
task_progress = fields.Float(string="Progress (%)", default=0.0)
|
||||
constraint_type = fields.Selection([
|
||||
('asap', 'As Soon As Possible'),
|
||||
('snet', 'Start No Earlier Than'),
|
||||
('snlt', 'Start No Later Than'),
|
||||
('fnet', 'Finish No Earlier Than'),
|
||||
('fnlt', 'Finish No Later Than'),
|
||||
], string="Constraint Type", default='asap')
|
||||
constraint_date = fields.Datetime(string="Constraint Date")
|
||||
is_milestone = fields.Boolean(string="Milestone")
|
||||
unschedule = fields.Boolean(string="Unschedule")
|
||||
schedule_mode = fields.Selection([
|
||||
('auto', 'Auto'),
|
||||
('manual', 'Manual')
|
||||
], string="Schedule Mode", default='manual')
|
||||
|
||||
# Computed color based on task stage
|
||||
stage_color = fields.Char(string="Stage Color", compute='_compute_stage_color', store=True)
|
||||
|
||||
@api.depends('stage_id.gantt_stage_color')
|
||||
def _compute_stage_color(self):
|
||||
for task in self:
|
||||
task.stage_color = task.stage_id.gantt_stage_color or '#17a2b8'
|
||||
@@ -0,0 +1,11 @@
|
||||
from odoo import models, fields
|
||||
|
||||
class ProjectTaskType(models.Model):
|
||||
_inherit = 'project.task.type'
|
||||
|
||||
gantt_stage_color = fields.Selection([
|
||||
('#28a745', 'Green (Completed)'),
|
||||
('#dc3545', 'Red (Not Started)'),
|
||||
('#ffc107', 'Yellow (In Progress)'),
|
||||
('#17a2b8', 'Blue (Default)'),
|
||||
], string="Gantt Stage Color", default='#17a2b8')
|
||||
Reference in New Issue
Block a user