lims_administrative_task: ref task scheduling
This commit is contained in:
parent
7c4b81a6d6
commit
8cde29fb2b
|
@ -15,7 +15,6 @@ def register():
|
||||||
task.AdministrativeTask,
|
task.AdministrativeTask,
|
||||||
task.EditAdministrativeTaskStart,
|
task.EditAdministrativeTaskStart,
|
||||||
task.AdministrativeTaskProgram,
|
task.AdministrativeTaskProgram,
|
||||||
task.GenerateAdministrativeTaskStart,
|
|
||||||
department.Department,
|
department.Department,
|
||||||
user.User,
|
user.User,
|
||||||
configuration.Configuration,
|
configuration.Configuration,
|
||||||
|
|
|
@ -95,38 +95,58 @@ msgctxt "field:lims.administrative.task.edit.start,responsible:"
|
||||||
msgid "Responsible User"
|
msgid "Responsible User"
|
||||||
msgstr "Usuario responsable"
|
msgstr "Usuario responsable"
|
||||||
|
|
||||||
msgctxt "field:lims.administrative.task.generate.start,end_date:"
|
|
||||||
msgid "End Date"
|
|
||||||
msgstr "Fecha de finalización"
|
|
||||||
|
|
||||||
msgctxt "field:lims.administrative.task.generate.start,start_date:"
|
|
||||||
msgid "Start Date"
|
|
||||||
msgstr "Fecha de inicio"
|
|
||||||
|
|
||||||
msgctxt "field:lims.administrative.task.generate.start,task_program:"
|
|
||||||
msgid "Administrative Task Scheduling"
|
|
||||||
msgstr "Programación de Tarea administrativa"
|
|
||||||
|
|
||||||
msgctxt "field:lims.administrative.task.generate.start,tasks:"
|
|
||||||
msgid "Tasks"
|
|
||||||
msgstr "Tareas"
|
|
||||||
|
|
||||||
msgctxt "field:lims.administrative.task.program,description:"
|
msgctxt "field:lims.administrative.task.program,description:"
|
||||||
msgid "Description"
|
msgid "Description"
|
||||||
msgstr "Descripción"
|
msgstr "Descripción"
|
||||||
|
|
||||||
msgctxt "field:lims.administrative.task.program,frequency:"
|
msgctxt "field:lims.administrative.task.program,detail_frequence:"
|
||||||
msgid "Frequency"
|
msgid "Frequence"
|
||||||
msgstr "Frecuencia"
|
msgstr "Frecuencia"
|
||||||
|
|
||||||
|
msgctxt "field:lims.administrative.task.program,detail_frequence_selection:"
|
||||||
|
msgid "Frequence"
|
||||||
|
msgstr "Frecuencia"
|
||||||
|
|
||||||
|
msgctxt "field:lims.administrative.task.program,end_date:"
|
||||||
|
msgid "End Date"
|
||||||
|
msgstr "Fecha de finalización"
|
||||||
|
|
||||||
|
msgctxt "field:lims.administrative.task.program,end_repetition:"
|
||||||
|
msgid "Repetition Qty."
|
||||||
|
msgstr "Cant. de Repeticiones"
|
||||||
|
|
||||||
|
msgctxt "field:lims.administrative.task.program,finish_selection:"
|
||||||
|
msgid "Ends on"
|
||||||
|
msgstr "Finalizar en"
|
||||||
|
|
||||||
|
msgctxt "field:lims.administrative.task.program,frequence_selection:"
|
||||||
|
msgid "Select Frequence"
|
||||||
|
msgstr "Seleccione frecuencia"
|
||||||
|
|
||||||
msgctxt "field:lims.administrative.task.program,latest_date:"
|
msgctxt "field:lims.administrative.task.program,latest_date:"
|
||||||
msgid "Latest scheduled date"
|
msgid "Latest scheduled date"
|
||||||
msgstr "Última fecha programada"
|
msgstr "Última fecha programada"
|
||||||
|
|
||||||
|
msgctxt "field:lims.administrative.task.program,only_workdays:"
|
||||||
|
msgid "Allow working days only"
|
||||||
|
msgstr "Permitir solamente días laborables"
|
||||||
|
|
||||||
msgctxt "field:lims.administrative.task.program,responsible:"
|
msgctxt "field:lims.administrative.task.program,responsible:"
|
||||||
msgid "Responsible User"
|
msgid "Responsible User"
|
||||||
msgstr "Usuario responsable"
|
msgstr "Usuario responsable"
|
||||||
|
|
||||||
|
msgctxt "field:lims.administrative.task.program,specific_day:"
|
||||||
|
msgid "Specific Day"
|
||||||
|
msgstr "Día específico"
|
||||||
|
|
||||||
|
msgctxt "field:lims.administrative.task.program,specific_time:"
|
||||||
|
msgid "Specific Time"
|
||||||
|
msgstr "Horario específico"
|
||||||
|
|
||||||
|
msgctxt "field:lims.administrative.task.program,start_date:"
|
||||||
|
msgid "Start Date"
|
||||||
|
msgstr "Fecha de inicio"
|
||||||
|
|
||||||
msgctxt "field:lims.administrative.task.program,type:"
|
msgctxt "field:lims.administrative.task.program,type:"
|
||||||
msgid "Type"
|
msgid "Type"
|
||||||
msgstr "Tipo"
|
msgstr "Tipo"
|
||||||
|
@ -286,6 +306,18 @@ msgctxt "model:ir.message,text:msg_no_task_sequence"
|
||||||
msgid "There is no task sequence configured"
|
msgid "There is no task sequence configured"
|
||||||
msgstr "No hay una secuencia de tarea configurada"
|
msgstr "No hay una secuencia de tarea configurada"
|
||||||
|
|
||||||
|
msgctxt "model:ir.model.button,confirm:task_program_create_tasks_button"
|
||||||
|
msgid "Are you sure you want to generate new administrative tasks?"
|
||||||
|
msgstr "¿Está seguro que quiere generar nuevas tareas administrativas?"
|
||||||
|
|
||||||
|
msgctxt "model:ir.model.button,help:task_program_create_tasks_button"
|
||||||
|
msgid "Generate administrative tasks"
|
||||||
|
msgstr "Generar tareas administrativas"
|
||||||
|
|
||||||
|
msgctxt "model:ir.model.button,string:task_program_create_tasks_button"
|
||||||
|
msgid "Generate"
|
||||||
|
msgstr "Generar"
|
||||||
|
|
||||||
msgctxt "model:ir.sequence,name:seq_task"
|
msgctxt "model:ir.sequence,name:seq_task"
|
||||||
msgid "Administrative Task"
|
msgid "Administrative Task"
|
||||||
msgstr "Tarea administrativa"
|
msgstr "Tarea administrativa"
|
||||||
|
@ -342,10 +374,6 @@ msgctxt "model:lims.administrative.task.edit.start,name:"
|
||||||
msgid "Edit Administrative Task"
|
msgid "Edit Administrative Task"
|
||||||
msgstr "Editar Tarea administrativa"
|
msgstr "Editar Tarea administrativa"
|
||||||
|
|
||||||
msgctxt "model:lims.administrative.task.generate.start,name:"
|
|
||||||
msgid "Generate Administrative Tasks Calendar"
|
|
||||||
msgstr "Generar Calendario de Tareas administrativas"
|
|
||||||
|
|
||||||
msgctxt "model:lims.administrative.task.program,name:"
|
msgctxt "model:lims.administrative.task.program,name:"
|
||||||
msgid "Administrative Task Scheduling"
|
msgid "Administrative Task Scheduling"
|
||||||
msgstr "Programación de Tarea administrativa"
|
msgstr "Programación de Tarea administrativa"
|
||||||
|
@ -430,22 +458,108 @@ msgctxt "selection:lims.administrative.task.edit.start,priority:"
|
||||||
msgid "Very Low"
|
msgid "Very Low"
|
||||||
msgstr "Muy baja"
|
msgstr "Muy baja"
|
||||||
|
|
||||||
msgctxt "selection:lims.administrative.task.program,frequency:"
|
msgctxt ""
|
||||||
|
"selection:lims.administrative.task.program,detail_frequence_selection:"
|
||||||
|
msgid "Days"
|
||||||
|
msgstr "Días"
|
||||||
|
|
||||||
|
msgctxt ""
|
||||||
|
"selection:lims.administrative.task.program,detail_frequence_selection:"
|
||||||
|
msgid "Hours"
|
||||||
|
msgstr "Horas"
|
||||||
|
|
||||||
|
msgctxt ""
|
||||||
|
"selection:lims.administrative.task.program,detail_frequence_selection:"
|
||||||
|
msgid "Minutes"
|
||||||
|
msgstr "Minutos"
|
||||||
|
|
||||||
|
msgctxt ""
|
||||||
|
"selection:lims.administrative.task.program,detail_frequence_selection:"
|
||||||
|
msgid "Months"
|
||||||
|
msgstr "Meses"
|
||||||
|
|
||||||
|
msgctxt ""
|
||||||
|
"selection:lims.administrative.task.program,detail_frequence_selection:"
|
||||||
|
msgid "Weeks"
|
||||||
|
msgstr "Semanas"
|
||||||
|
|
||||||
|
msgctxt ""
|
||||||
|
"selection:lims.administrative.task.program,detail_frequence_selection:"
|
||||||
|
msgid "Years"
|
||||||
|
msgstr "Años"
|
||||||
|
|
||||||
|
msgctxt "selection:lims.administrative.task.program,finish_selection:"
|
||||||
|
msgid "Date"
|
||||||
|
msgstr "Fecha"
|
||||||
|
|
||||||
|
msgctxt "selection:lims.administrative.task.program,finish_selection:"
|
||||||
|
msgid "Quantity"
|
||||||
|
msgstr "Cantidad"
|
||||||
|
|
||||||
|
msgctxt "selection:lims.administrative.task.program,frequence_selection:"
|
||||||
|
msgid "Customize"
|
||||||
|
msgstr "Personalizada"
|
||||||
|
|
||||||
|
msgctxt "selection:lims.administrative.task.program,frequence_selection:"
|
||||||
msgid "Daily"
|
msgid "Daily"
|
||||||
msgstr "Diaria"
|
msgstr "Diaria"
|
||||||
|
|
||||||
msgctxt "selection:lims.administrative.task.program,frequency:"
|
msgctxt "selection:lims.administrative.task.program,frequence_selection:"
|
||||||
|
msgid "Every 15 days"
|
||||||
|
msgstr "Cada 15 días"
|
||||||
|
|
||||||
|
msgctxt "selection:lims.administrative.task.program,frequence_selection:"
|
||||||
|
msgid "Hourly"
|
||||||
|
msgstr "Cada hora"
|
||||||
|
|
||||||
|
msgctxt "selection:lims.administrative.task.program,frequence_selection:"
|
||||||
msgid "Monthly"
|
msgid "Monthly"
|
||||||
msgstr "Mensual"
|
msgstr "Mensual"
|
||||||
|
|
||||||
msgctxt "selection:lims.administrative.task.program,frequency:"
|
msgctxt "selection:lims.administrative.task.program,frequence_selection:"
|
||||||
msgid "Weekly"
|
msgid "Weekly"
|
||||||
msgstr "Semanal"
|
msgstr "Semanal"
|
||||||
|
|
||||||
msgctxt "selection:lims.administrative.task.program,frequency:"
|
msgctxt "selection:lims.administrative.task.program,frequence_selection:"
|
||||||
msgid "Yearly"
|
msgid "Yearly"
|
||||||
msgstr "Anual"
|
msgstr "Anual"
|
||||||
|
|
||||||
|
msgctxt "selection:lims.administrative.task.program,specific_day:"
|
||||||
|
msgid "Friday"
|
||||||
|
msgstr "Viernes"
|
||||||
|
|
||||||
|
msgctxt "selection:lims.administrative.task.program,specific_day:"
|
||||||
|
msgid "Monday"
|
||||||
|
msgstr "Lunes"
|
||||||
|
|
||||||
|
msgctxt "selection:lims.administrative.task.program,specific_day:"
|
||||||
|
msgid "Saturday"
|
||||||
|
msgstr "Sábado"
|
||||||
|
|
||||||
|
msgctxt "selection:lims.administrative.task.program,specific_day:"
|
||||||
|
msgid "Sunday"
|
||||||
|
msgstr "Domingo"
|
||||||
|
|
||||||
|
msgctxt "selection:lims.administrative.task.program,specific_day:"
|
||||||
|
msgid "Thursday"
|
||||||
|
msgstr "Jueves"
|
||||||
|
|
||||||
|
msgctxt "selection:lims.administrative.task.program,specific_day:"
|
||||||
|
msgid "Tuesday"
|
||||||
|
msgstr "Martes"
|
||||||
|
|
||||||
|
msgctxt "selection:lims.administrative.task.program,specific_day:"
|
||||||
|
msgid "Wednesday"
|
||||||
|
msgstr "Miércoles"
|
||||||
|
|
||||||
|
msgctxt "view:lims.administrative.task.program:"
|
||||||
|
msgid "Frequence"
|
||||||
|
msgstr "Frecuencia"
|
||||||
|
|
||||||
|
msgctxt "view:lims.administrative.task.program:"
|
||||||
|
msgid "Generate Administrative Tasks"
|
||||||
|
msgstr "Generar tareas administrativas"
|
||||||
|
|
||||||
msgctxt "view:lims.administrative.task:"
|
msgctxt "view:lims.administrative.task:"
|
||||||
msgid "Comments"
|
msgid "Comments"
|
||||||
msgstr "Observaciones"
|
msgstr "Observaciones"
|
||||||
|
@ -481,11 +595,3 @@ msgstr "Confirmar"
|
||||||
msgctxt "wizard_button:lims.administrative.task.edit,start,end:"
|
msgctxt "wizard_button:lims.administrative.task.edit,start,end:"
|
||||||
msgid "Cancel"
|
msgid "Cancel"
|
||||||
msgstr "Cancelar"
|
msgstr "Cancelar"
|
||||||
|
|
||||||
msgctxt "wizard_button:lims.administrative.task.generate,start,end:"
|
|
||||||
msgid "Cancel"
|
|
||||||
msgstr "Cancelar"
|
|
||||||
|
|
||||||
msgctxt "wizard_button:lims.administrative.task.generate,start,generate:"
|
|
||||||
msgid "Generate"
|
|
||||||
msgstr "Generar"
|
|
||||||
|
|
|
@ -17,6 +17,7 @@ from trytond.exceptions import UserError
|
||||||
from trytond.i18n import gettext
|
from trytond.i18n import gettext
|
||||||
from trytond.config import config
|
from trytond.config import config
|
||||||
from trytond.tools import get_smtp_server
|
from trytond.tools import get_smtp_server
|
||||||
|
from trytond.modules.lims_tools.event_creator import EventCreator
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
@ -481,24 +482,33 @@ class EditAdministrativeTask(Wizard):
|
||||||
return 'end'
|
return 'end'
|
||||||
|
|
||||||
|
|
||||||
class AdministrativeTaskProgram(ModelSQL, ModelView):
|
class AdministrativeTaskProgram(EventCreator, ModelSQL, ModelView):
|
||||||
'Administrative Task Scheduling'
|
'Administrative Task Scheduling'
|
||||||
__name__ = 'lims.administrative.task.program'
|
__name__ = 'lims.administrative.task.program'
|
||||||
_rec_name = 'type'
|
_rec_name = 'description'
|
||||||
|
|
||||||
type = fields.Selection('get_types', 'Type', required=True)
|
type = fields.Selection('get_types', 'Type', required=True)
|
||||||
description = fields.Char('Description', required=True)
|
description = fields.Char('Description', required=True)
|
||||||
responsible = fields.Many2One('res.user', 'Responsible User',
|
responsible = fields.Many2One('res.user', 'Responsible User',
|
||||||
required=True)
|
required=True)
|
||||||
frequency = fields.Selection([
|
|
||||||
('daily', 'Daily'),
|
|
||||||
('weekly', 'Weekly'),
|
|
||||||
('monthly', 'Monthly'),
|
|
||||||
('yearly', 'Yearly'),
|
|
||||||
], 'Frequency', required=True, sort=False)
|
|
||||||
latest_date = fields.Function(fields.Date('Latest scheduled date'),
|
latest_date = fields.Function(fields.Date('Latest scheduled date'),
|
||||||
'get_latest_date')
|
'get_latest_date')
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def __register__(cls, module_name):
|
||||||
|
table_h = cls.__table_handler__(module_name)
|
||||||
|
super().__register__(module_name)
|
||||||
|
if table_h.column_exist('frequency'):
|
||||||
|
table_h.drop_column('frequency')
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def __setup__(cls):
|
||||||
|
super().__setup__()
|
||||||
|
cls._buttons.update({
|
||||||
|
'create_tasks': {
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def get_types(cls):
|
def get_types(cls):
|
||||||
AdministrativeTaskTemplate = Pool().get(
|
AdministrativeTaskTemplate = Pool().get(
|
||||||
|
@ -519,94 +529,48 @@ class AdministrativeTaskProgram(ModelSQL, ModelView):
|
||||||
latest_task[0].date or None)
|
latest_task[0].date or None)
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
@ModelView.button_action(
|
||||||
|
'lims_administrative_task.wizard_generate_task_calendar')
|
||||||
|
def create_tasks(cls, programs):
|
||||||
|
pass
|
||||||
|
|
||||||
class GenerateAdministrativeTaskStart(ModelView):
|
@classmethod
|
||||||
'Generate Administrative Tasks Calendar'
|
def _create_tasks(cls, program, schedule_info):
|
||||||
__name__ = 'lims.administrative.task.generate.start'
|
pool = Pool()
|
||||||
|
AdministrativeTask = pool.get('lims.administrative.task')
|
||||||
|
|
||||||
start_date = fields.Date('Start Date', required=True)
|
task = AdministrativeTask()
|
||||||
end_date = fields.Date('End Date', required=True)
|
task.type = program.type
|
||||||
task_program = fields.Many2Many(
|
task.description = program.description
|
||||||
'lims.administrative.task.program', None, None,
|
task.responsible = program.responsible
|
||||||
'Administrative Task Scheduling', required=True)
|
task.expiration_date = schedule_info['scheduled_date'].date()
|
||||||
tasks = fields.One2Many('lims.administrative.task',
|
task.priority = '3'
|
||||||
None, 'Tasks')
|
task.state = 'draft'
|
||||||
|
task.scheduled = True
|
||||||
|
return task
|
||||||
|
|
||||||
|
|
||||||
class GenerateAdministrativeTask(Wizard):
|
class GenerateAdministrativeTask(Wizard):
|
||||||
'Generate Administrative Tasks Calendar'
|
'Generate Administrative Tasks Calendar'
|
||||||
__name__ = 'lims.administrative.task.generate'
|
__name__ = 'lims.administrative.task.generate'
|
||||||
|
|
||||||
start = StateView('lims.administrative.task.generate.start',
|
start_state = 'open'
|
||||||
'lims_administrative_task.generate_task_calendar_start_view_form', [
|
|
||||||
Button('Cancel', 'end', 'tryton-cancel'),
|
|
||||||
Button('Generate', 'generate', 'tryton-ok', default=True),
|
|
||||||
])
|
|
||||||
generate = StateTransition()
|
|
||||||
open = StateAction('lims_administrative_task.act_task')
|
open = StateAction('lims_administrative_task.act_task')
|
||||||
|
|
||||||
def default_start(self, fields):
|
|
||||||
Date = Pool().get('ir.date')
|
|
||||||
|
|
||||||
today = Date.today()
|
|
||||||
programs = Transaction().context['active_ids']
|
|
||||||
defaults = {
|
|
||||||
'start_date': today,
|
|
||||||
'end_date': today,
|
|
||||||
'task_program': programs,
|
|
||||||
}
|
|
||||||
return defaults
|
|
||||||
|
|
||||||
def transition_generate(self):
|
|
||||||
AdministrativeTask = Pool().get('lims.administrative.task')
|
|
||||||
|
|
||||||
new_tasks = []
|
|
||||||
for program in self.start.task_program:
|
|
||||||
new_tasks.extend(self._get_new_tasks(program))
|
|
||||||
|
|
||||||
tasks = AdministrativeTask.create(new_tasks)
|
|
||||||
if tasks:
|
|
||||||
AdministrativeTask.pending(tasks)
|
|
||||||
self.start.tasks = tasks
|
|
||||||
return 'open'
|
|
||||||
|
|
||||||
return 'end'
|
|
||||||
|
|
||||||
def _get_new_tasks(self, program):
|
|
||||||
new_tasks = []
|
|
||||||
for date in self._get_dates(self.start.start_date,
|
|
||||||
program.frequency, self.start.end_date):
|
|
||||||
task = {
|
|
||||||
'type': program.type,
|
|
||||||
'description': program.description,
|
|
||||||
'responsible': program.responsible.id,
|
|
||||||
'expiration_date': date,
|
|
||||||
'priority': '3',
|
|
||||||
'state': 'draft',
|
|
||||||
'scheduled': True,
|
|
||||||
}
|
|
||||||
new_tasks.append(task)
|
|
||||||
return new_tasks
|
|
||||||
|
|
||||||
def _get_dates(self, start_date, frequency, end_date):
|
|
||||||
dates = []
|
|
||||||
if frequency == 'daily':
|
|
||||||
delta = relativedelta(days=1)
|
|
||||||
elif frequency == 'weekly':
|
|
||||||
delta = relativedelta(days=7)
|
|
||||||
elif frequency == 'monthly':
|
|
||||||
delta = relativedelta(months=1)
|
|
||||||
elif frequency == 'yearly':
|
|
||||||
delta = relativedelta(years=1)
|
|
||||||
date = start_date
|
|
||||||
while date <= end_date:
|
|
||||||
dates.append(date)
|
|
||||||
date += delta
|
|
||||||
return dates
|
|
||||||
|
|
||||||
def do_open(self, action):
|
def do_open(self, action):
|
||||||
|
pool = Pool()
|
||||||
|
TaskProgram = pool.get('lims.administrative.task.program')
|
||||||
|
AdministrativeTask = pool.get('lims.administrative.task')
|
||||||
|
|
||||||
|
programs = TaskProgram.browse(Transaction().context['active_ids'])
|
||||||
|
tasks = TaskProgram.create_events(programs, TaskProgram._create_tasks)
|
||||||
|
if tasks:
|
||||||
|
AdministrativeTask.save(tasks)
|
||||||
|
AdministrativeTask.pending(tasks)
|
||||||
|
|
||||||
action['pyson_domain'] = PYSONEncoder().encode([
|
action['pyson_domain'] = PYSONEncoder().encode([
|
||||||
('id', 'in', [m.id for m in self.start.tasks]),
|
('id', 'in', [t.id for t in tasks]),
|
||||||
])
|
])
|
||||||
return action, {}
|
return action, {}
|
||||||
|
|
||||||
|
|
|
@ -339,27 +339,21 @@
|
||||||
id="menu_task_program"
|
id="menu_task_program"
|
||||||
parent="menu_config" sequence="30"/>
|
parent="menu_config" sequence="30"/>
|
||||||
|
|
||||||
<!-- Wizard Generate Administrative Tasks Calendar -->
|
<record model="ir.model.button" id="task_program_create_tasks_button">
|
||||||
|
<field name="name">create_tasks</field>
|
||||||
<record model="ir.ui.view"
|
<field name="string">Generate</field>
|
||||||
id="generate_task_calendar_start_view_form">
|
<field name="confirm">Are you sure you want to generate new administrative tasks?</field>
|
||||||
<field name="model">lims.administrative.task.generate.start</field>
|
<field name="help">Generate administrative tasks</field>
|
||||||
<field name="type">form</field>
|
<field name="model" search="[('model', '=', 'lims.administrative.task.program')]"/>
|
||||||
<field name="name">generate_task_calendar_start_form</field>
|
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
<!-- Wizard Generate Administrative Tasks Calendar -->
|
||||||
|
|
||||||
<record model="ir.action.wizard" id="wizard_generate_task_calendar">
|
<record model="ir.action.wizard" id="wizard_generate_task_calendar">
|
||||||
<field name="name">Generate Administrative Tasks Calendar</field>
|
<field name="name">Generate Administrative Tasks Calendar</field>
|
||||||
<field name="wiz_name">lims.administrative.task.generate</field>
|
<field name="wiz_name">lims.administrative.task.generate</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<record model="ir.action.keyword"
|
|
||||||
id="wizard_generate_task_calendar_keyword">
|
|
||||||
<field name="keyword">form_action</field>
|
|
||||||
<field name="model">lims.administrative.task.program,-1</field>
|
|
||||||
<field name="action" ref="wizard_generate_task_calendar"/>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<!-- Administrative Tasks Calendar -->
|
<!-- Administrative Tasks Calendar -->
|
||||||
|
|
||||||
<record model="ir.ui.view" id="task_view_calendar">
|
<record model="ir.ui.view" id="task_view_calendar">
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
version=5.6.0
|
version=5.6.0
|
||||||
depends:
|
depends:
|
||||||
lims
|
lims
|
||||||
|
lims_tools
|
||||||
xml:
|
xml:
|
||||||
user.xml
|
user.xml
|
||||||
task.xml
|
task.xml
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
<?xml version="1.0"?>
|
|
||||||
<form>
|
|
||||||
<label name="start_date"/>
|
|
||||||
<field name="start_date"/>
|
|
||||||
<label name="end_date"/>
|
|
||||||
<field name="end_date"/>
|
|
||||||
<field name="task_program" colspan="4"/>
|
|
||||||
</form>
|
|
|
@ -6,8 +6,35 @@
|
||||||
<field name="description"/>
|
<field name="description"/>
|
||||||
<label name="responsible"/>
|
<label name="responsible"/>
|
||||||
<field name="responsible"/>
|
<field name="responsible"/>
|
||||||
<label name="frequency"/>
|
|
||||||
<field name="frequency"/>
|
|
||||||
<label name="latest_date"/>
|
<label name="latest_date"/>
|
||||||
<field name="latest_date"/>
|
<field name="latest_date"/>
|
||||||
|
<group id="frequence" colspan="4" string="Frequence">
|
||||||
|
<label name="frequence_selection"/>
|
||||||
|
<field name="frequence_selection"/>
|
||||||
|
<group id="detail_frequence" colspan="2" col="2">
|
||||||
|
<field name="detail_frequence" xexpand="0" width="30"/>
|
||||||
|
<field name="detail_frequence_selection" xexpand="1"/>
|
||||||
|
</group>
|
||||||
|
<label name="only_workdays"/>
|
||||||
|
<field name="only_workdays"/>
|
||||||
|
<group id="specific" colspan="2" col="2">
|
||||||
|
<label name="specific_day"/>
|
||||||
|
<field name="specific_day"/>
|
||||||
|
<label name="specific_time"/>
|
||||||
|
<field name="specific_time"/>
|
||||||
|
</group>
|
||||||
|
</group>
|
||||||
|
<group id="create_tasks" colspan="4" string="Generate Administrative Tasks">
|
||||||
|
<label name="start_date"/>
|
||||||
|
<field name="start_date"/>
|
||||||
|
<label name="finish_selection"/>
|
||||||
|
<field name="finish_selection"/>
|
||||||
|
<group id="end" colspan="2" col="2">
|
||||||
|
<label name="end_repetition"/>
|
||||||
|
<field name="end_repetition"/>
|
||||||
|
<label name="end_date"/>
|
||||||
|
<field name="end_date"/>
|
||||||
|
</group>
|
||||||
|
<button name="create_tasks" colspan="2"/>
|
||||||
|
</group>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -3,6 +3,5 @@
|
||||||
<field name="type"/>
|
<field name="type"/>
|
||||||
<field name="description"/>
|
<field name="description"/>
|
||||||
<field name="responsible"/>
|
<field name="responsible"/>
|
||||||
<field name="frequency"/>
|
|
||||||
<field name="latest_date"/>
|
<field name="latest_date"/>
|
||||||
</tree>
|
</tree>
|
||||||
|
|
Loading…
Reference in New Issue