[ADD]project:sequence file added for task stage

bzr revid: kbh@tinyerp.com-20121122131222-3u3rybnfpfr1ajw8
This commit is contained in:
Khushboo Bhatt (Open ERP)
2012-11-22 18:42:22 +05:30
parent fc9c15b160
commit 76c13d1e21
3 changed files with 20 additions and 3 deletions
+1
View File
@@ -73,6 +73,7 @@ Dashboard / Reports for Project Management will include:
'report/project_cumulative.xml',
'board_project_view.xml',
'res_config_view.xml',
'project_sequence.xml',
],
'demo': ['project_demo.xml'],
'test': [
+2 -3
View File
@@ -39,7 +39,7 @@ class project_task_type(osv.osv):
_columns = {
'name': fields.char('Stage Name', required=True, size=64, translate=True),
'description': fields.text('Description'),
'sequence': fields.integer('Sequence'),
'sequence': fields.char('Sequence'),
'case_default': fields.boolean('Common to All Projects',
help="If you check this field, this stage will be proposed by default on each new project. It will not assign this stage to existing projects."),
'project_ids': fields.many2many('project.project', 'project_task_type_rel', 'type_id', 'project_id', 'Projects'),
@@ -50,12 +50,11 @@ class project_task_type(osv.osv):
help="This stage is not visible, for example in status bar or kanban view, when there are no records in that stage to display."),
}
_defaults = {
'sequence': 1,
'sequence': lambda obj, cr, uid, context: obj.pool.get('ir.sequence').get(cr, uid, 'project.task.type'),
'state': 'open',
'fold': False,
'case_default': True,
}
_order = 'sequence'
def short_name(name):
"""Keep first word(s) of name to make it small enough
+17
View File
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data noupdate="1">
<record id="seq_project_task_type" model="ir.sequence.type">
<field name="name">Project Task Type"</field>
<field name="code">project.task.type</field>
</record>
<record id="seq_task_type" model="ir.sequence">
<field name="name">Project Task Type</field>
<field name="code">project.task.type</field>
<field name="padding">1</field>
</record>
</data>
</openerp>