# -*- coding:utf-8 -*- from addons.pxgo_openoffice_reports.openoffice_report import openoffice_report,OOReport class customer_activity_report(OOReport): def get_report_context(self): res = super(customer_activity_report, self).get_report_context() res.update({ 'lines':self.data['form'], 'condition':self.data['condition'] }) # print 'lines:%s'%res['lines'] return res openoffice_report('report.customer.activity','res.partner',parser=customer_activity_report)
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. # ############################################################################## """Add dummy function to context, it prints Hi! when you call it""" from addons.pxgo_openoffice_reports.openoffice_report import openoffice_report, OOReport class report_parser(OOReport): """Add dummy function to context, it prints Hi! when you call it""" def get_report_context(self): """Add dummy function to context, it prints Hi! when you call it""" res = super(report_parser, self).get_report_context() res.update({ 'print_hi': self.print_hi, }) return res def print_hi(self): """Print Hi!""" res = "Hi !" return res openoffice_report('report.pxgo_openoffice_reports.partner_demo_ods_not_auto', 'res.partner', parser=report_parser)
# This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. # ############################################################################## """Add dummy function to context, it prints Hi! when you call it""" from addons.pxgo_openoffice_reports.openoffice_report import openoffice_report, OOReport class report_parser(OOReport): """Add dummy function to context, it prints Hi! when you call it""" def get_report_context(self): """Add dummy function to context, it prints Hi! when you call it""" res = super(report_parser, self).get_report_context() res.update({ 'print_hi': self.print_hi, }) return res def print_hi(self): """Print Hi!""" res = "Hi !" return res openoffice_report('report.pxgo_openoffice_reports.partner_demo_ods_not_auto', 'res.partner', parser=report_parser)