[IMP] bugfixes
bzr revid: fp@tinyerp.com-20100126201247-dghp0xeudic5ux6r
This commit is contained in:
parent
f09a07529d
commit
2c3a66ee07
|
@ -100,13 +100,14 @@ class document_directory(osv.osv):
|
|||
('no_selfparent', 'check(parent_id <> id)', 'Directory cannot be parent of itself!')
|
||||
]
|
||||
def name_get(self, cr, uid, ids, context={}):
|
||||
res = {}
|
||||
res = []
|
||||
for d in self.browse(cr, uid, ids, context=context):
|
||||
s = d.name
|
||||
while d:
|
||||
s = d.name + (s and ('/' + s) or '')
|
||||
d = d.parent_id
|
||||
res[d] = s
|
||||
s = ''
|
||||
d2 = d
|
||||
while d2:
|
||||
s = d2.name + (s and ('/' + s) or '')
|
||||
d2 = d2.parent_id
|
||||
res.append((d.id, s))
|
||||
return res
|
||||
|
||||
def ol_get_resource_path(self,cr,uid,dir_id,res_model,res_id):
|
||||
|
|
|
@ -27,9 +27,9 @@ from tools.translate import _
|
|||
import time
|
||||
import datetime
|
||||
|
||||
class doucment_change_process_phase_type(osv.osv):
|
||||
class document_change_process_phase_type(osv.osv):
|
||||
_name = "document.change.process.phase.type"
|
||||
doucment_change_process_phase_type()
|
||||
document_change_process_phase_type()
|
||||
|
||||
class document_change_type(osv.osv):
|
||||
_name = "document.change.type"
|
||||
|
@ -42,7 +42,7 @@ class document_change_type(osv.osv):
|
|||
}
|
||||
document_change_type()
|
||||
|
||||
class doucment_change_process_phase_type(osv.osv):
|
||||
class document_change_process_phase_type(osv.osv):
|
||||
_name = "document.change.process.phase.type"
|
||||
_description = "Document Change Process Phase Type"
|
||||
_columns = {
|
||||
|
@ -54,13 +54,13 @@ class doucment_change_process_phase_type(osv.osv):
|
|||
_defaults = {
|
||||
'active': lambda *a:1,
|
||||
}
|
||||
doucment_change_process_phase_type()
|
||||
document_change_process_phase_type()
|
||||
|
||||
class doucment_change_process(osv.osv):
|
||||
class document_change_process(osv.osv):
|
||||
_name = "document.change.process"
|
||||
doucment_change_process()
|
||||
document_change_process()
|
||||
|
||||
class doucment_change_process_phase(osv.osv):
|
||||
class document_change_process_phase(osv.osv):
|
||||
_name = "document.change.process.phase"
|
||||
_description = "Document Change Process Phase"
|
||||
_columns = {
|
||||
|
@ -100,7 +100,7 @@ class doucment_change_process_phase(osv.osv):
|
|||
def test_nocontrol_request(self, cr, uid, ids, context=None):
|
||||
return all(bool(process.type) =='no_control' for process in self.browse(cr, uid, ids, context=context))
|
||||
|
||||
doucment_change_process_phase()
|
||||
document_change_process_phase()
|
||||
|
||||
class document_change_process_model(osv.osv):
|
||||
_name = "document.change.process.model"
|
||||
|
@ -133,7 +133,7 @@ class document_change_process_email(osv.osv):
|
|||
}
|
||||
document_change_process_email()
|
||||
|
||||
class doucment_change_process(osv.osv):
|
||||
class document_change_process(osv.osv):
|
||||
|
||||
_name = "document.change.process"
|
||||
_description = "Document Change Process"
|
||||
|
@ -142,6 +142,7 @@ class doucment_change_process(osv.osv):
|
|||
res = {}
|
||||
#TODOto calculate latest modified date from all related documents
|
||||
return res
|
||||
|
||||
def _get_document(self, cr, uid, ids, context={}, *arg):
|
||||
if not ids:
|
||||
return {}
|
||||
|
@ -155,7 +156,6 @@ class doucment_change_process(osv.osv):
|
|||
res[process_change.id] = res1
|
||||
return res
|
||||
|
||||
|
||||
def _get_progress(self, cr, uid, ids, field_name, arg, context={}):
|
||||
result = {}
|
||||
progress = 0.0
|
||||
|
@ -181,7 +181,7 @@ class doucment_change_process(osv.osv):
|
|||
_columns = {
|
||||
'name': fields.char("Process Change", size=64, required=True, select=True),
|
||||
'process_type_id' :fields.many2one('document.change.process.type','Type Change'),
|
||||
'description': fields.char("Small Description", size=64),
|
||||
'description': fields.char("Small Description", size=64, required=True),
|
||||
'change_description':fields.text('Changed Description'),
|
||||
'structure_id' :fields.many2one('document.directory','Structure Directory'),
|
||||
'process_model_id':fields.many2one('document.change.process.model','Process Model'),
|
||||
|
@ -249,7 +249,7 @@ class doucment_change_process(osv.osv):
|
|||
|
||||
return True
|
||||
|
||||
doucment_change_process()
|
||||
document_change_process()
|
||||
|
||||
class document_file(osv.osv):
|
||||
_inherit = 'ir.attachment'
|
||||
|
|
|
@ -61,34 +61,39 @@
|
|||
</record>
|
||||
|
||||
<record model="document.directory" id="dir_vsm">
|
||||
<field name="name">VSM</field>
|
||||
<field name="name">MQ Section 2</field>
|
||||
<field name="parent_id" ref="dir_bat_z"/>
|
||||
</record>
|
||||
<record model="document.directory" id="dir_takt_time">
|
||||
<field name="name">Takt Time</field>
|
||||
<field name="name">MQ Section 3</field>
|
||||
<field name="parent_id" ref="dir_bat_z"/>
|
||||
</record>
|
||||
|
||||
<record model="document.directory" id="dir_template">
|
||||
<field name="name">Templates</field>
|
||||
<field name="parent_id" ref="dir_root"/>
|
||||
</record>
|
||||
|
||||
<!-- Document Templates -->
|
||||
<record model="ir.attachment" id="doc_FIE_template">
|
||||
<field name="name">FIE_template</field>
|
||||
<field name="datas_fname">FIE_template.xls</field>
|
||||
<field name="parent_id" ref="dir_root"/>
|
||||
<field name="parent_id" ref="dir_template"/>
|
||||
</record>
|
||||
<record model="ir.attachment" id="doc_SFMEA_template">
|
||||
<field name="name">SFMEA_template</field>
|
||||
<field name="datas_fname">SFMEA_template.xls</field>
|
||||
<field name="parent_id" ref="dir_root"/>
|
||||
<field name="parent_id" ref="dir_template"/>
|
||||
</record>
|
||||
<record model="ir.attachment" id="doc_ProjectCharter_Template">
|
||||
<field name="name">ProjectCharter_Template</field>
|
||||
<field name="datas_fname">ProjectCharter_Template.ppt</field>
|
||||
<field name="parent_id" ref="dir_root"/>
|
||||
<field name="parent_id" ref="dir_template"/>
|
||||
</record>
|
||||
<record model="ir.attachment" id="doc_TaktTime_template">
|
||||
<field name="name">TaktTime_template</field>
|
||||
<field name="datas_fname">TaktTime_template.xls</field>
|
||||
<field name="parent_id" ref="dir_takt_time"/>
|
||||
<field name="parent_id" ref="dir_template"/>
|
||||
</record>
|
||||
|
||||
<!-- Document Change Types -->
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
|
||||
<menuitem name="Process Changes" icon="terp-stock" id="menu_process_changes"/>
|
||||
|
||||
<menuitem name="Process Changes" id="menu_document_process_changes" parent="menu_process_changes"/>
|
||||
<menuitem name="Change Control" id="menu_change_control" parent="menu_process_changes"/>
|
||||
<menuitem name="Reporting" id="menu_reporting" parent="menu_process_changes"/>
|
||||
<menuitem name="Configuration" id="menu_configuration" parent="menu_process_changes"/>
|
||||
<menuitem name="Process Changes" id="menu_document_process_changes" parent="menu_process_changes" sequence="1"/>
|
||||
<menuitem name="Change Control" id="menu_change_control" parent="menu_process_changes" sequence="5"/>
|
||||
<menuitem name="Reporting" id="menu_reporting" parent="menu_process_changes" sequence="10"/>
|
||||
<menuitem name="Configuration" id="menu_configuration" parent="menu_process_changes" sequence="15"/>
|
||||
|
||||
<record model="ir.ui.view" id="view_document_structure_form">
|
||||
<field name="name">document.directory</field>
|
||||
|
@ -37,22 +37,12 @@
|
|||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">document.directory</field>
|
||||
<field name="name">Structure</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_type">tree</field>
|
||||
<field name="domain">[('parent_id','=',False)]</field>
|
||||
<field name="view_id" ref="view_document_structure_tree"/>
|
||||
</record>
|
||||
<record id="action_document_structure_tree_view" model="ir.actions.act_window.view">
|
||||
<field eval="1" name="sequence"/>
|
||||
<field name="view_mode">tree</field>
|
||||
<field name="act_window_id" ref="action_document_structure_form"/>
|
||||
</record>
|
||||
<record id="action_document_structure_form_view" model="ir.actions.act_window.view">
|
||||
<field eval="2" name="sequence"/>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="view_id" ref="view_document_structure_form"/>
|
||||
<field name="act_window_id" ref="action_document_structure_form"/>
|
||||
</record>
|
||||
<menuitem name="Structure" id="menu_document_structure_config" parent="menu_configuration"/>
|
||||
|
||||
<menuitem action="action_document_structure_form" id="menu_structure_form" parent="menu_document_structure_config"/>
|
||||
|
||||
<act_window domain="[('structure_id', '=', active_id)]"
|
||||
|
@ -102,9 +92,6 @@
|
|||
<menuitem name="Documents" id="menu_document_type_config" parent="menu_configuration"/>
|
||||
<menuitem action="action_document_type_form" id="menu_document_type_form" parent="menu_document_type_config"/>
|
||||
|
||||
<!--
|
||||
Phase Types
|
||||
-->
|
||||
<record model="ir.ui.view" id="view_process_phase_type_form">
|
||||
<field name="name">document.change.process.phase.type.form</field>
|
||||
<field name="model">document.change.process.phase.type</field>
|
||||
|
@ -143,8 +130,15 @@
|
|||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
|
||||
<menuitem name="Process Changes" id="menu_process_changes_config" parent="menu_configuration"/>
|
||||
<menuitem action="action_process_phase_type_form" id="menu_phase_type_form" parent="menu_process_changes_config"/>
|
||||
<menuitem name="Process Changes"
|
||||
id="menu_process_changes_config"
|
||||
parent="menu_configuration"
|
||||
sequence="1"/>
|
||||
<menuitem
|
||||
action="action_process_phase_type_form"
|
||||
id="menu_phase_type_form"
|
||||
parent="menu_process_changes_config"
|
||||
sequence="4"/>
|
||||
|
||||
<!-- Document Change Process Type -->
|
||||
<record model="ir.ui.view" id="view_change_process_type_form">
|
||||
|
@ -555,9 +549,12 @@
|
|||
<field name="arch" type="xml">
|
||||
<search string="Process Changes">
|
||||
<group col="8" colspan="4">
|
||||
<filter domain="[('user_id','=',uid)]" string="My Process Changes" icon="gtk-execute" help="My Process Changes"/>
|
||||
<filter domain="[('user_id','=',uid)]" string="My Process" icon="gtk-execute" help="My Process Changes"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter domain="[('state','=','to_validate')]" string="To Validate" icon="gtk-apply" help="Process Changes to be validated"/>
|
||||
<filter domain="[('state','=','in_progress')]" string="Late" icon="gtk-execute" help="Process changes having the next Phase to validate that is late"/>
|
||||
|
||||
<separator orientation="vertical"/>
|
||||
<field name="name" string="Process Change Title" select="1"/>
|
||||
<field name="process_type_id" select="1"/>
|
||||
<field name="structure_id" select="1"/>
|
||||
|
|
Loading…
Reference in New Issue