document_change: reindent code and modify the view
bzr revid: sbh@tinyerp.com-20100121095711-p51t2wb3b8t46vbe
This commit is contained in:
@@ -32,6 +32,7 @@ doucment_change_process_phase_type()
|
||||
class document_change_type(osv.osv):
|
||||
_name = "document.change.type"
|
||||
_description = "Document Change Type"
|
||||
|
||||
_columns = {
|
||||
'name': fields.char("Document Change Type", size=64),
|
||||
'phase_type_ids': fields.many2many('document.change.process.phase.type','document_process__rel','type_id','change_id','Phase Type'),
|
||||
@@ -42,6 +43,7 @@ document_change_type()
|
||||
class doucment_change_process_phase_type(osv.osv):
|
||||
_name = "document.change.process.phase.type"
|
||||
_description = "Document Change Process Phase Type"
|
||||
|
||||
_columns = {
|
||||
'name': fields.char("Document Changed Process Type", size=64),
|
||||
'sequence': fields.integer('Sequence'),
|
||||
@@ -57,6 +59,7 @@ doucment_change_process()
|
||||
class doucment_change_process_phase(osv.osv):
|
||||
_name = "document.change.process.phase"
|
||||
_description = "Document Change Process Phase"
|
||||
|
||||
_columns = {
|
||||
'name': fields.char("Name", size=64),
|
||||
'process_id':fields.many2one('document.change.process','Process Change'),
|
||||
@@ -73,6 +76,7 @@ doucment_change_process_phase()
|
||||
class document_change_process_model(osv.osv):
|
||||
_name = "document.change.process.model"
|
||||
_description = "Document Change Process model"
|
||||
|
||||
_columns = {
|
||||
'name': fields.char("Changed Process Model", size=64,required=True),
|
||||
'sequence': fields.integer('Sequence'),
|
||||
@@ -84,6 +88,7 @@ document_change_process_model()
|
||||
|
||||
class document_file(osv.osv):
|
||||
_inherit = 'ir.attachment'
|
||||
|
||||
_columns = {
|
||||
'type_id':fields.many2one('document.change.type','Document Type'),
|
||||
'state': fields.selection([('change_request', 'Change Request'),('change_proposed', 'Change Proposed'), ('in_production', 'In Production'), ('to_update', 'To Update'), ('validate', 'To Validate'), ('cancel', 'Cancel')], 'Status', readonly=True),
|
||||
@@ -95,6 +100,7 @@ document_file()
|
||||
class document_change_process_type(osv.osv):
|
||||
_name = "document.change.process.type"
|
||||
_description = "Document Change Process Type"
|
||||
|
||||
_columns = {
|
||||
'name': fields.char("Changed Process Type", size=64),
|
||||
}
|
||||
@@ -104,6 +110,7 @@ class doucment_change_process(osv.osv):
|
||||
|
||||
_name = "document.change.process"
|
||||
_description = "Document Change Process"
|
||||
|
||||
def _latestmodification(self, cr, uid, ids, field_name, arg, context={}):
|
||||
res = {}
|
||||
#TODOto calculate latest modified date from all related documents
|
||||
@@ -111,7 +118,6 @@ class doucment_change_process(osv.osv):
|
||||
|
||||
_columns = {
|
||||
'name': fields.char("Process Change", size=64),
|
||||
'sequence': fields.integer('Sequence'),
|
||||
'process_type_id' :fields.many2one('document.change.process.type','Type Change'),
|
||||
'description': fields.char("Small Description", size=64),
|
||||
'change_description':fields.text('Changed Description'),
|
||||
|
||||
@@ -258,9 +258,9 @@
|
||||
</record>
|
||||
<menuitem action="action_process_phase_form" id="menu_phases_form" parent="menu_document_process_changes"/>
|
||||
|
||||
<!--
|
||||
Process Change
|
||||
|
||||
|
||||
<!--Process Change-->
|
||||
<!--
|
||||
<record model="ir.ui.view" id="view_process_form">
|
||||
<field name="name">document.change.process.form</field>
|
||||
<field name="model">document.change.process</field>
|
||||
@@ -268,17 +268,24 @@
|
||||
<field name="arch" type="xml">
|
||||
<form string="Process Change">
|
||||
<field name="name" select="1"/>
|
||||
<field name="process_type_id" select="1"/>
|
||||
<field name="structure_id" select="1"/>
|
||||
<field name="description"/>
|
||||
<field name="process_model_id"/>
|
||||
<notebook>
|
||||
<page string="Process Definition">
|
||||
<field name="user_id"/>
|
||||
<field name="create_date"/>
|
||||
<field name="latest_modified_date"/>
|
||||
<field name="date_expected"/>
|
||||
</page>
|
||||
<field name="change_description" colspan="4" select="2"/>
|
||||
<field name="state"/>
|
||||
<page string="Phases">
|
||||
<field name="process_id"/>
|
||||
<field name="process_phase_ids"/>
|
||||
</page>
|
||||
<page string="Documents">
|
||||
m2m
|
||||
</page>
|
||||
<page string="Notifications">
|
||||
editable o2m
|
||||
<field name="process_document_ids"/>
|
||||
</page>
|
||||
</notebook>
|
||||
</form>
|
||||
|
||||
Reference in New Issue
Block a user