@@ -80,6 +80,7 @@
|
||||
<record id="survey_job_0" model="survey">
|
||||
<field name="title">Job Survey</field>
|
||||
<field name="state">draft</field>
|
||||
<field name="max_response_limit">20</field>
|
||||
<field eval="[(6,0,[])]" name="users"/>
|
||||
</record>
|
||||
</data>
|
||||
@@ -92,7 +93,7 @@
|
||||
</data>
|
||||
<data>
|
||||
<record id="survey_page_job_1" model="survey.page">
|
||||
<field name="title">Education &amp; Activities</field>
|
||||
<field name="title">Education & Activities</field>
|
||||
<field name="survey_id" ref="survey_job_0"/>
|
||||
<field eval="2" name="sequence"/>
|
||||
</record>
|
||||
|
||||
@@ -140,7 +140,7 @@ class document_file(osv.osv):
|
||||
if not len(res):
|
||||
return False
|
||||
if not self._check_duplication(cr,uid,vals,ids,'write'):
|
||||
raise except_orm(_('ValidateError'), _('File name must be unique!'))
|
||||
raise osv.except_osv(_('ValidateError'), _('File name must be unique!'))
|
||||
result = super(document_file,self).write(cr,uid,ids,vals,context=context)
|
||||
cr.commit()
|
||||
return result
|
||||
@@ -185,7 +185,7 @@ class document_file(osv.osv):
|
||||
datas=vals.get('datas',False)
|
||||
vals['file_size']= datas and len(datas) or 0
|
||||
if not self._check_duplication(cr,uid,vals):
|
||||
raise except_orm(_('ValidateError'), _('File name must be unique!'))
|
||||
raise osv.except_osv(_('ValidateError'), _('File name must be unique!'))
|
||||
result = super(document_file,self).create(cr, uid, vals, context)
|
||||
cr.commit()
|
||||
return result
|
||||
|
||||
@@ -26,7 +26,7 @@ import netsvc
|
||||
from tools.translate import _
|
||||
|
||||
class doucment_change_process_phase_type(osv.osv):
|
||||
_name = "document.change.process.phase.type"
|
||||
_name = "document.change.process.phase.type"
|
||||
doucment_change_process_phase_type()
|
||||
|
||||
class document_change_type(osv.osv):
|
||||
@@ -144,19 +144,19 @@ class doucment_change_process(osv.osv):
|
||||
'process_type_id' :fields.many2one('document.change.process.type','Type Change'),
|
||||
'description': fields.char("Small Description", size=64),
|
||||
'change_description':fields.text('Changed Description'),
|
||||
'structure_id' :fields.many2one('document.directory','Structure ID'),
|
||||
'structure_id' :fields.many2one('document.directory','Structure Directory'),
|
||||
'process_model_id':fields.many2one('document.change.process.model','Process Model'),
|
||||
'user_id':fields.many2one('res.users','Change Owner'),
|
||||
'create_date':fields.datetime('Creation',readonly=True),
|
||||
'latest_modified_date':fields.function(_latestmodification, method=True, type='date', string="Lastest Modification"), #TODO no year!
|
||||
'date_expected':fields.datetime('Expected Production'),
|
||||
'state':fields.selection([('draft', 'Draft'),('in_progress', 'In Progress'),('to_validate', 'To Validate'), ('pending', 'Pending'), ('done', 'Done'),('cancel','Cancelled')], 'state', readonly=True),
|
||||
'process_phase_ids':fields.one2many('document.change.process.phase','process_id','Phase'),
|
||||
'pending_directory_id' :fields.many2one('document.directory','Pending Directory ID'),
|
||||
'process_phase_ids':fields.one2many('document.change.process.phase','process_id','Phase'),
|
||||
'date_control': fields.date('Control Date'), #TODO: make relate field with current_phase_id.date_control
|
||||
'progress': fields.float('Progress'), #TODO : functio field: calculate progress
|
||||
'current_phase_id': fields.many2one('document.change.process.phase','Current Phase'), # TODO: function field. find out in process phase
|
||||
'process_document_ids': fields.many2many('ir.attachment','document_changed_process_rel','process_id','change_id','Document To Change'),
|
||||
'pending_directory_id' :fields.many2one('document.directory','Pending Directory'),
|
||||
}
|
||||
_defaults = {
|
||||
'name': lambda obj, cr, uid, context: obj.pool.get('ir.sequence').get(cr, uid, 'document.change.process'),
|
||||
|
||||
@@ -445,7 +445,7 @@
|
||||
</record>
|
||||
<menuitem action="action_process_phase_form_validate" id="menu_phases_to_validate_form" parent="menu_change_control"/>
|
||||
|
||||
<act_window domain="[('change_type_id', '=', active_id)]"
|
||||
<act_window domain="[('process_phase_id', '=', active_id)]"
|
||||
id="act_documents_phases"
|
||||
name="Documents"
|
||||
res_model="ir.attachment"
|
||||
@@ -459,19 +459,21 @@
|
||||
<field name="model">document.change.process</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Process Change">
|
||||
<group colspan="4" col="6">
|
||||
<field name="name" select="1"/>
|
||||
<field name="process_type_id" widget="selection" select="1"/>
|
||||
<field name="structure_id" select="1"/>
|
||||
<newline/>
|
||||
<field name="description"/>
|
||||
<group colspan="2" col="3">
|
||||
<field name="process_model_id" widget="selection"/>
|
||||
<button name="generate_phases" string="Generate Phases" type="object" icon="gtk-convert"/>
|
||||
</group>
|
||||
<field name="pending_directory_id"/>
|
||||
</group>
|
||||
<form string="Process Change">
|
||||
<group colspan="4" col="6">
|
||||
<field name="name"/>
|
||||
<field name="structure_id"/>
|
||||
<field name="pending_directory_id"/>
|
||||
</group>
|
||||
<group colspan="4" col="5">
|
||||
<field name="process_type_id" widget="selection"/>
|
||||
<field name="process_model_id" widget="selection"/>
|
||||
<button name="generate_phases" string="Generate Phases" type="object" icon="gtk-convert"/>
|
||||
</group>
|
||||
<group colspan="4">
|
||||
<field name="description" colspan="4"/>
|
||||
</group>
|
||||
|
||||
<notebook colspan="4">
|
||||
<page string="Process Definition">
|
||||
<group col="2" colspan="2">
|
||||
@@ -594,13 +596,13 @@
|
||||
</record>
|
||||
<menuitem action="action_process_change_form_validate" id="menu_process_to_validate_form" parent="menu_change_control"/>
|
||||
|
||||
<act_window domain="[('phase_ids', '=', active_id)]"
|
||||
<act_window domain="[('process_id', '=', active_id)]"
|
||||
id="act_phase_change_process"
|
||||
name="Phases"
|
||||
res_model="document.change.process.phase"
|
||||
src_model="document.change.process"/>
|
||||
|
||||
<act_window domain="[('change_type_id', '=', active_id)]"
|
||||
<act_window domain="[('change_process_id', '=', active_id)]"
|
||||
id="act_documents_change_process"
|
||||
name="Documents"
|
||||
res_model="ir.attachment"
|
||||
|
||||
@@ -24,6 +24,7 @@ import pooler
|
||||
from report.interface import report_rml
|
||||
from tools import to_xml
|
||||
import tools
|
||||
import time
|
||||
|
||||
class survey_browse_response(report_rml):
|
||||
def create(self, cr, uid, ids, datas, context):
|
||||
@@ -162,7 +163,7 @@ class survey_browse_response(report_rml):
|
||||
<para style="terp_default_Centre_8">""" + to_xml(tools.ustr(survey.title)) + """</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Centre_8">""" + to_xml(response.date_create) + """</para>
|
||||
<para style="terp_default_Centre_8">""" + to_xml(time.strftime('%d-%m-%Y %I:%M:%S %p', time.strptime(response.date_create.split('.')[0], '%Y-%m-%d %H:%M:%S'))) + """</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Centre_8">""" + to_xml(response.user_id.name) + """</para>
|
||||
|
||||
Reference in New Issue
Block a user