python - Is it possible to print report from only a specific tree in OpenERP7? -


i did report using rml. created next reports.xml file:

<?xml version="1.0" encoding="utf-8"?> <openerp>     <data>         <report auto="false"             id="event_extended_meeting_attendance_checking"             model="event.meeting.registration"             name="event_extended.meeting_attendance_checking"             rml="event_extended/report/event_meeting_attendance_checking.rml"             string="meeting attendance list" />     </data> </openerp> 

now, when open event.meeting.registration view (tree or form), option print > meeting attendance list appears there. problem don't want print report form view, , more, model has 2 different tree views, , i'd print 1 of them.

how can achieve that? if wasn't possible, how can show orm exception message when user clicks on option , stop process?

any appreciated. thank you!

when creating report model link particular model, not specific view. doesn't matter tree view or form view printing report.

now in case, can achieve in 1 way per suggestion.

  • create wizard , link model (event.meeting.registration)
  • these wizard has 2 button print , cancel
  • on print button click, need call method , logic

    if len(context.get(active_ids)) > 1:     raise osv.except_osv(_('error!'),_('you not allowed print report.')) else:     #return report_name, type, datas, etc 

note: when it's breakdown, if user select 1 record tree view fire exception. hope got basic idea on these.


Comments

Popular posts from this blog

java - Plugin org.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be resolved -

Round ImageView Android -

How can I utilize Yahoo Weather API in android -