hi,
I'm trying to create a report which is called by wizard in which I put three
fields say
name,from_date,to_date.all are created succesfully now I want apply some
conditions such as name[say employee name] should be in some category wise or
which name I select it prints only these records....& one more thing I have
fields from_date,to_date I want report should be between these two dates...such
as if i want report between 10/10/08 to 17/10/08.....then it shold be between
these dates......
can any one help me to create such report??
here is my wizard....
mport time
import wizard
dates_form = '''<xml>
<form>
<field>
<field>
<field>
</form>'''
dates_fields = {
'date1': {'string':'Start of period', 'type':'date', 'required':True,
'default': lambda *a: time.strftime('%Y-01-01')},
'date2': {'string':'End of period', 'type':'date', 'required':True,
'default': lambda *a: time.strftime('%Y-%m-%d')},
'name' : {'string':'Name', 'type':'many2many',
'relation':'employee.employee', 'required':True},
}
class wizard_report(wizard.interface):
states = {
'init': {
'actions': [],
'result': {'type':'form', 'arch':dates_form, 'fields':dates_fields,
'state':[('end','Cancel'), ('report','Print')]}
},
'report': {
'actions': [],
'result': {'type':'print', 'report':'employee_report',
'state':'end'}
}
}
wizard_report('employee.employee_report')
------------------------
jitu
-------------------- m2f --------------------
--
http://www.openerp.com/forum/viewtopic.php?p=25459#25459
-------------------- m2f --------------------
_______________________________________________
Tinyerp-users mailing list
http://tiny.be/mailman/listinfo/tinyerp-users