document_change: set the default state and modify the view
bzr revid: sbh@tinyerp.com-20100121115307-ewjpix35gj7k9fbq
This commit is contained in:
@@ -71,6 +71,9 @@ class doucment_change_process_phase(osv.osv):
|
||||
'state': fields.selection([('draft', 'Draft'),('started', 'Started'),('validate', 'To Validate'), ('end', 'End')], 'Status', readonly=True),
|
||||
'phase_document_ids':fields.many2many('ir.attachment','phase_document_rel','phase_id','document_id','Document'),
|
||||
}
|
||||
_defaults = {
|
||||
'state': lambda *a: 'draft',
|
||||
}
|
||||
doucment_change_process_phase()
|
||||
|
||||
class document_change_process_model(osv.osv):
|
||||
@@ -145,6 +148,7 @@ class doucment_change_process(osv.osv):
|
||||
}
|
||||
_defaults = {
|
||||
'name': lambda obj, cr, uid, context: obj.pool.get('ir.sequence').get(cr, uid, 'document.change.process'),
|
||||
'state': lambda *a: 'draft',
|
||||
}
|
||||
|
||||
doucment_change_process()
|
||||
@@ -268,8 +268,8 @@
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_id" ref="view_document_tree"/>
|
||||
<field name="domain">[]</field>
|
||||
</record>
|
||||
<field name="domain">[('state','=','change_proposed')]</field>
|
||||
</record>
|
||||
<menuitem action="action_document_to_update_form" id="menu_documents_to_update_form" parent="menu_change_control"/>
|
||||
|
||||
<!--
|
||||
@@ -358,7 +358,10 @@
|
||||
<field name="latest_modified_date"/>
|
||||
<field name="date_expected"/>
|
||||
</group>
|
||||
<field name="change_description" colspan="4"/>
|
||||
<newline />
|
||||
<separator colspan="4" string="Change Description"/>
|
||||
<field name="change_description" colspan="4" nolabel="1"/>
|
||||
<newline />
|
||||
<field name="state"/>
|
||||
</page>
|
||||
<page string="Phases">
|
||||
|
||||
Reference in New Issue
Block a user