[IMP] project_plannning : YML test for report and demo data added
bzr revid: ach@tinyerp.com-20100917094757-8ro6i925et0osp0w
This commit is contained in:
@@ -55,6 +55,7 @@ At the end of the month, the planning manager can also check if the encoded time
|
||||
],
|
||||
'test': [
|
||||
'test/planning_states.yml'
|
||||
'test/planning_report.yml'
|
||||
],
|
||||
'installable': True,
|
||||
'active': False,
|
||||
|
||||
@@ -8,5 +8,13 @@
|
||||
<field name="manager_id" ref="base.user_root"/>
|
||||
<field name="member_ids" eval="[(6,0,[ref('base.user_demo')])]"/>
|
||||
</record>
|
||||
<record id="project_plannning_1" model="report_account_analytic.planning">
|
||||
<field name="name">Project_Planning</field>
|
||||
<field name="business_days">20</field>
|
||||
<field name="date_from">2010-01-01'</field>
|
||||
<field name="date_to">2010-12-31</field>
|
||||
<field name="state">draft</field>
|
||||
<field name="member_ids" ref="base.user_demo"/>
|
||||
</record>
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
-
|
||||
In order to test the PDF reports defined on a Project Planning, we will print Project Planning report
|
||||
-
|
||||
!python {model: report_account_analytic.planning}: |
|
||||
import netsvc, tools, os
|
||||
(data, format) = netsvc.LocalService('report.report_account_analytic.planning.print').create(cr, uid, [ref('project_planning.project_plannning_1')], {}, {})
|
||||
if tools.config['test_report_directory']:
|
||||
file(os.path.join(tools.config['test_report_directory'], 'project_planning-project_planning_report'+format), 'wb+').write(data)
|
||||
Reference in New Issue
Block a user