# You should have received a copy of the GNU Affero General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. # ############################################################################## import jasper_reports from osv import osv,fields import pooler import datetime def form_parser( cr, uid, ids, data, context ): #import pdb #pdb.set_trace() return { 'parameters': { #'type': data['form']['type'], 'date_from': data['form']['date_from'], 'date_to': data['form']['date_to'], 'category_ids': data['form']['category_ids'], 'sql_where': data['form']['sql_where'], 'sql_order_by': data['form']['sql_order_by'], #'from_account': data['form']['from_account'], #'to_account': data['form']['to_account'], #'lingua': data['lang'], }, } jasper_reports.report_jasper( 'report.account_asset_registro_beni_ammortizzabili_report', 'account.asset.asset', parser=form_parser )
import jasper_reports from osv import osv,fields import pooler import datetime from mx import DateTime def liste_factures_clients( cr, uid, ids, data, context ): return { 'ids': data['form']['ids'], 'parameters': {'title':data['form']['title'] , 'mode':data['form']['period'], 'year':int(data['form']['year']) }, } jasper_reports.report_jasper( 'report.ns_sales_reports.liste_factures_clients', 'account.invoice', parser=liste_factures_clients ) def liste_factures_clients_produits( cr, uid, ids, data, context ): return { 'ids': data['form']['ids'], 'parameters': {'title':data['form']['title'] , 'mode':data['form']['period'], 'year':int(data['form']['year']) }, } jasper_reports.report_jasper( 'report.ns_sales_reports.liste_factures_clients_produits', 'account.invoice.line', parser=liste_factures_clients_produits )
'date_invoice_to': data['form']['date_invoice_to'], 'bank_configuration_ids': data['form']['bank_configuration_ids'], 'report_type': data['form']['report_type'], 'sql_where': data['form']['sql_where'], 'sql_select': data['form']['sql_select'], 'sql_group_by': data['form']['sql_group_by'], 'sql_order_by': data['form']['sql_order_by'], #'from_account': data['form']['from_account'], #'to_account': data['form']['to_account'], #'lingua': data['lang'], }, } jasper_reports.report_jasper( 'report.openforce_bank_riba_report_partner', 'account.move.line', parser=form_parser ) jasper_reports.report_jasper( 'report.openforce_bank_riba_report_partner_riepilogo_banche', 'account.move.line', parser=form_parser ) jasper_reports.report_jasper( 'report.openforce_bank_riba_report_portafoglio', 'account.move.line', parser=form_parser ) jasper_reports.report_jasper( 'report.openforce_bank_riba_report_da_presentare', 'account.move.line',
# 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/>. # ############################################################################## import jasper_reports from osv import osv,fields import pooler import datetime from mx import DateTime def orders_detail_sheet( cr, uid, ids, data, context): # fo=open("/home/openerp/Desktop/a.txt","w") # fo.write(str(data)) # fo.write("In Order Detail") # fo.close() try: tmp_id=data['form']['ids'] except: tmp_id=[data['id']] return { 'ids': tmp_id } jasper_reports.report_jasper( 'report.orders.detail', 'purchase.order', parser=orders_detail_sheet )
# -*- encoding: utf-8 -*- ############################################################################## # # ############################################################################## import jasper_reports from osv import osv,fields import pooler import datetime def jasper_order_fornit( cr, uid, ids, data, context ): return { 'parameters': { 'from_date': data['form']['from_date'], 'to_date': data['form']['to_date'], 'lingua': data['lang'], 'company_id': data['form']['company_id'], 'company_name': data['form']['company_name'], }, } jasper_reports.report_jasper( 'report.ordinef', 'purchase.order', parser=jasper_order_fornit )
# -*- encoding: utf-8 -*- ############################################################################## # # ############################################################################## import jasper_reports def sqp_report_production_status_parser( cr, uid, ids, data, context ): return { 'parameters': { 'partner_id': data['form']['partner_id'], }, } jasper_reports.report_jasper( 'report.sqp_report_production_status', 'mrp.production', parser=sqp_report_production_status_parser ) jasper_reports.report_jasper( 'report.sqp_report_production_status_excel', 'mrp.production', parser=sqp_report_production_status_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 Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. # ############################################################################## import jasper_reports from openerp import pooler def kderp_summary_cable_talking_from_stock(cr, uid, ids, data, context): if not context: context={} #Check if print from Purchase find Job IDs in Purchase if context.get('active_model','')=='kderp.prepaid.purchase.order': ids = pooler.get_pool(cr.dbname).get('kderp.prepaid.purchase.order.line.detail').search(cr, uid, [('prepaid_order_id','in',ids)]) return {'ids': ids, } jasper_reports.report_jasper( 'report.kderp.summary.of.cable.quantity.talking.from.storage.xls', 'kderp.prepaid.purchase.order.line.detail', parser = kderp_summary_cable_talking_from_stock ) # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
#from osv import osv from jasper_reports import report_jasper from pprint import pprint def parse(cr, uid, ids, datas, context=None): records = [] no = 1 for rec in range(10): record = {} record['no'] = rec record['id'] = rec record['name'] = "name %s" % (rec) no += 1 records.append(record) pprint(records) return { 'data_source': 'records', 'records': records, } report_jasper('report.ex10.obj1_1', 'ex10.obj1', parse)
'pawn_shop_id': data['form']['pawn_shop_id'], 'stk1_journal_id': data['form']['stk1_journal_id'], 'stk2_journal_id': data['form']['stk2_journal_id'], 'report_from_date': data['form']['report_from_date'], 'report_to_date': data['form']['report_to_date'], # Accounts 'accrued_interest_account_id': data['form']['accrued_interest_account_id'], 'interest_account_id': data['form']['interest_account_id'], 'interest_disc_account_id': data['form']['interest_disc_account_id'], 'interest_add_account_id': data['form']['interest_add_account_id'], 'sale_account_id': data['form']['sale_account_id'], 'refund_account_id': data['form']['refund_account_id'], }, } jasper_reports.report_jasper('report.pawn_daily_report', 'pawn.order', parser=pawn_daily_parser)
# -*- encoding: utf-8 -*- ############################################################################## # # ############################################################################## import jasper_reports def pawn_daily_parser( cr, uid, ids, data, context ): return { 'parameters': { 'pawn_shop_id': data['form']['pawn_shop_id'], 'stk1_journal_id': data['form']['stk1_journal_id'], 'stk2_journal_id': data['form']['stk2_journal_id'], 'report_from_date': data['form']['report_from_date'], 'report_to_date': data['form']['report_to_date'], # Accounts 'accrued_interest_account_id': data['form']['accrued_interest_account_id'], 'interest_account_id': data['form']['interest_account_id'], 'interest_disc_account_id': data['form']['interest_disc_account_id'], 'interest_add_account_id': data['form']['interest_add_account_id'], 'sale_account_id': data['form']['sale_account_id'], 'refund_account_id': data['form']['refund_account_id'], }, } jasper_reports.report_jasper( 'report.pawn_daily_report', 'pawn.order', parser=pawn_daily_parser )
# -*- encoding: utf-8 -*- ############################################################################## # # ############################################################################## import jasper_reports from openerp.osv import fields, osv import pooler import datetime def report_thai_tax_old_parser( cr, uid, ids, data, context ): return { 'parameters': { 'company_id': data['form']['company_id'], 'period_id': data['form']['period_id'], 'tax_id': data['form']['tax_id'], 'base_code_id': data['form']['base_code_id'], 'tax_code_id': data['form']['tax_code_id'], 'type_tax_use': data['form']['type_tax_use'], }, } jasper_reports.report_jasper( 'report.report_thai_tax_old', 'account.move', parser=report_thai_tax_old_parser )
# but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. # ############################################################################## import jasper_reports from osv import osv,fields import pooler import datetime def delivery_partner_product_report_parser( cr, uid, ids, data, context ): return { 'parameters': { 'from_date': data['form']['from_date'], 'to_date': data['form']['to_date'], 'commercial_name': data['form']['commercial_name'], 'sql_where': data['form']['sql_where'], #'from_account': data['form']['from_account'], #'to_account': data['form']['to_account'], #'lingua': data['lang'], }, } jasper_reports.report_jasper( 'report.delivery_partner_product_report', 'account.invoice', parser=delivery_partner_product_report_parser )
# 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/>. # ############################################################################## import jasper_reports from osv import osv,fields import pooler import datetime from mx import DateTime def kdvn_list_of_receiveable_pdf( cr, uid, ids, data, context ): try: tmp_id=data['form']['ids'] #New la tu form except: try: tmp_id=ids except: tmp_id=[data['id']] return { 'ids': tmp_id } jasper_reports.report_jasper( 'report.list.of.receivable.items.pdf.hidden', 'kdvn.payment.from.client', parser=kdvn_list_of_receiveable_pdf )
# # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # 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/>. # ############################################################################## import jasper_reports from osv import osv,fields import pooler import datetime from mx import DateTime def kerp_ar_3_months( cr, uid, ids, data, context): quarter_id = int(data['form']['quarter_lists']) return { 'parameters': {'quarter_id':quarter_id} } jasper_reports.report_jasper( 'report.kderp.report.account.receivable.three.months.hidden', 'kdvn.payment.from.client', parser=kerp_ar_3_months )
context = {} if not ids: raise osv.except_osv(('Warining'), ('No data to print')) records = [] date_print = datas.get('parameters')['date_print'] cr.execute(""" select id, name, score from ex4_obj1 where id in %s """, (tuple(ids),)) no = 1 for rec in cr.dictfetchall(): record = {} record['no'] = no record['id'] = rec['id'] record['name'] = rec['name'] record['score'] = rec['score'] no += 1 records.append(record) return { 'data_source': 'records', 'records': records, 'parameters': { 'date_print': date_print, } } #report_jasper('report.<report_name>', '<object_name>', <parser_function>) -> see report.xml report_jasper('report.ex4.wizard.obj1', 'ex4.obj1', parse)
'report_to_date': data['form']['report_to_date'], # Accounts 'redeem_account_id': data['form']['redeem_account_id'], 'expire_account_id': data['form']['expire_account_id'], 'accrued_interest_account_id': data['form']['accrued_interest_account_id'], 'interest_account_id': data['form']['interest_account_id'], 'interest_disc_account_id': data['form']['interest_disc_account_id'], 'interest_add_account_id': data['form']['interest_add_account_id'], 'sale_account_id': data['form']['sale_account_id'], 'refund_account_id': data['form']['refund_account_id'], 'cost_account_id': data['form']['cost_account_id'], 'op_cash_account_id': data['form']['op_cash_account_id'], }, } jasper_reports.report_jasper('report.pawn_op_cash_report', 'pawn.order', parser=pawn_op_cash_parser)
# 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/>. # ############################################################################## import jasper_reports from osv import osv,fields import pooler import datetime from mx import DateTime def kerp_contract_list_uncompleted( cr, uid, ids, data, context): #kerpfc_ids=pooler.get_pool(cr.dbname).get("kdvn.contract.client").search(cr,uid,[('state','=','u')]) cr.execute("Select id from kderp_contract_summary where not (contracted_amount=claimed_amount and claimed_amount=received_amount and coalesce(received_amount,0)>0)") kderpfc_ids = [] for idss in cr.fetchall(): kderpfc_ids.append(idss[0]) data['ids']=kderpfc_ids data['id'] = kderpfc_ids[0] return {'ids':kderpfc_ids} jasper_reports.report_jasper( 'report.kderp.report.contract.list.uncompleted.pdf', 'kdvn.contract.client', parser=kerp_contract_list_uncompleted )
# -*- encoding: utf-8 -*- ############################################################################## # # ############################################################################## import jasper_reports def pawn_jor6_parser(cr, uid, ids, data, context): return { 'parameters': { 'pawn_shop_id': data['form']['pawn_shop_id'], 'journal_id': data['form']['journal_id'], 'pawn_rule_id': data['form']['pawn_rule_id'], 'report_date': data['form']['report_date'], }, } jasper_reports.report_jasper('report.pawn_jor6_report', 'pawn.order', parser=pawn_jor6_parser)
# -*- encoding: utf-8 -*- ############################################################################## # # ############################################################################## import jasper_reports def pawn_wh_cash_parser( cr, uid, ids, data, context ): return { 'parameters': { 'pawn_shop_id': data['form']['pawn_shop_id'], 'journal_id': data['form']['journal_id'], 'report_from_date': data['form']['report_from_date'], 'report_to_date': data['form']['report_to_date'], }, } jasper_reports.report_jasper( 'report.pawn_wh_cash_report', 'pawn.order', parser=pawn_wh_cash_parser )
# -*- encoding: utf-8 -*- ############################################################################## # # ############################################################################## import jasper_reports def sqp_report_production_daily_parser( cr, uid, ids, data, context ): return { 'parameters': { 'report_date': data['form']['report_date'], 'dept': data['form']['dept'], }, } jasper_reports.report_jasper( 'report.sqp_report_production_daily', 'mrp.production', parser=sqp_report_production_daily_parser ) jasper_reports.report_jasper( 'report.sqp_report_production_daily_excel', 'mrp.production', parser=sqp_report_production_daily_parser )
import jasper_reports from osv import osv,fields import pooler import datetime from mx import DateTime def liste_stock_move( cr, uid, ids, data, context ): return { 'ids': data['form']['ids'], 'parameters': {'partner_id':data['form']['partner_id'],'title':data['form']['title'] , 'mode':data['form']['period'], 'year':int(data['form']['year']),'stock_start':data['form']['stock_start'],'location_id':data['form']['location_id'] }, } jasper_reports.report_jasper( 'report.ns_sales_reports.stock_move', 'stock.move', parser=liste_stock_move ) def situation_mfi( cr, uid, ids, data, context ): return { 'ids': data['form']['ids'], 'parameters': { 'title':data['form']['title'], 'detail':data['form']['detail'], 'clients':data['form']['clients'], 'stock':data['form']['stock'], 'portefeuile':data['form']['portefeuille'] }, } jasper_reports.report_jasper(
# 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/>. # ############################################################################## import jasper_reports from osv import osv,fields import pooler import datetime from mx import DateTime def progress_contract_to_client_excel( cr, uid, ids, data, context ): try: tmp_id=data['form']['ids'] #New la tu form except: try: tmp_id=ids except: tmp_id=[data['id']] return { 'ids': tmp_id } jasper_reports.report_jasper( 'report.kdvn.contract.to.client.report.excel', 'kdvn.report.contract.to.client', parser=progress_contract_to_client_excel )
domain = [] if start_date: domain += [("date_invoice", ">=", start_date)] if end_date: domain += [("date_invoice", "<=", end_date)] if periods: domain += [("period_id", "in", periods)] if partner_type == "customers": domain += [("type", "in", ("out_invoice", "out_refund"))] else: domain += [("type", "in", ("in_invoice", "in_refund"))] ids = pool.get("account.invoice").search(cr, uid, domain, context=context) return { "ids": ids, "name": name, "model": model, "records": records, "data_source": data_source, "parameters": parameters, } jasper_reports.report_jasper("report.account.journal", "account.move.line", parser) jasper_reports.report_jasper("report.account.trial.balance", "account.account", parser) jasper_reports.report_jasper("report.account.general.ledger", "account.move.line", parser) jasper_reports.report_jasper("report.account.taxes.by.invoice", "account.invoice", parser)
# -*- encoding: utf-8 -*- ############################################################################## # # ############################################################################## import jasper_reports def sqp_report_production_status_parser(cr, uid, ids, data, context): return { 'parameters': { 'partner_id': data['form']['partner_id'], }, } jasper_reports.report_jasper('report.sqp_report_production_status', 'mrp.production', parser=sqp_report_production_status_parser) jasper_reports.report_jasper('report.sqp_report_production_status_excel', 'mrp.production', parser=sqp_report_production_status_parser)
# -*- encoding: utf-8 -*- ############################################################################## # # ############################################################################## import jasper_reports from osv import osv, fields import pooler import datetime def sqp_report_thai_tax_parser(cr, uid, ids, data, context): return { 'parameters': { 'company_id': data['form']['company_id'], 'period_id': data['form']['period_id'], 'tax_id': data['form']['tax_id'], 'base_code_id': data['form']['base_code_id'], 'tax_code_id': data['form']['tax_code_id'], 'type_tax_use': data['form']['type_tax_use'], }, } jasper_reports.report_jasper('report.sqp_report_thai_tax', 'account.move', parser=sqp_report_thai_tax_parser)
############################################################################## import jasper_reports from osv import osv,fields import pooler import datetime from tools.translate import _ def form_parser( cr, uid, ids, data, context ): return { 'parameters': { #'type': data['form']['type'], #'sale_order_ids': data['form']['sale_order_ids'], #'sql_where': data['form']['sql_where'], }, } jasper_reports.report_jasper( 'report.openforce_sale_fattura_accompagnatoria_report', 'account.invoice', parser=form_parser ) jasper_reports.report_jasper( 'report.openforce_sale_ddt_report', 'stock.picking', parser=form_parser ) jasper_reports.report_jasper( 'report.openforce_sale_fattura_report', 'account.invoice', parser=form_parser )
# 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/>. # ############################################################################## import jasper_reports from osv import osv,fields import pooler import datetime from mx import DateTime def kdvn_report_job_list_from_to( cr, uid, ids, data, context): #cr.execute('alter SEQUENCE new_id_job_list_from_to RESTART;') try: tmp_id=data['form']['ids'] #New la tu form except: try: tmp_id=data['form']['id'] except: tmp_id=[data['id']] return {'ids': tmp_id, 'parameters': {'from_job':data['form']['from_job'],'to_job':data['form']['to_job'],'job_type':data['form']['job_type']} } jasper_reports.report_jasper( 'report.Job.List', 'kdvn.job.list.from.to.report', parser=kdvn_report_job_list_from_to )
# License, or (at your option) any later version. # # 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 Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. # ############################################################################## import jasper_reports from osv import osv,fields import pooler import datetime from tools.translate import _ def form_parser( cr, uid, ids, data, context ): return { 'parameters': { #'type': data['form']['type'], 'sale_order_ids': data['form']['sale_order_ids'], 'sql_where': data['form']['sql_where'], }, } jasper_reports.report_jasper( 'report.distinta_riba_report', 'riba.distinta', parser=form_parser )
domain += [('date_invoice','<=',end_date)] if periods: domain += [('period_id','in',periods)] if partner_type == 'customers': domain += [('type','in',('out_invoice','out_refund'))] else: domain += [('type','in',('in_invoice','in_refund'))] ids = pool.get('account.invoice').search(cr, uid, domain, context=context) if data['form']['end_date']: parameters['end_date']=data['form']['end_date'] else: parameters['end_date']=datetime.today().strftime( '%Y-%m-%d' ) return { 'ids': ids, 'name': name, 'model': model, 'records': records, 'data_source': data_source, 'parameters': parameters, } jasper_reports.report_jasper( 'report.account.journal', 'account.move.line', parser ) jasper_reports.report_jasper( 'report.account.trial.balance', 'account.account', parser ) jasper_reports.report_jasper( 'report.account.general.ledger', 'account.move.line', parser ) jasper_reports.report_jasper( 'report.account.taxes.by.invoice', 'account.invoice', parser )
# License, or (at your option) any later version. # # 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 Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. # ############################################################################## import jasper_reports from osv import osv,fields import pooler import datetime from tools.translate import _ def form_parser( cr, uid, ids, data, context ): return { 'parameters': { #'type': data['form']['type'], 'sale_order_ids': data['form']['sale_order_ids'], 'sql_where': data['form']['sql_where'], }, } jasper_reports.report_jasper( 'report.openforce_purchase_order_report', 'purchase.order', parser=form_parser )
else: domain += [('type', 'in', ('in_invoice', 'in_refund'))] ids = pool.get('account.invoice').search(cr, uid, domain, context=context) if data['form']['end_date']: parameters['end_date'] = data['form']['end_date'] else: parameters['end_date'] = datetime.today().strftime('%Y-%m-%d') return { 'ids': ids, 'name': name, 'model': model, 'records': records, 'data_source': data_source, 'parameters': parameters, } jasper_reports.report_jasper('report.account.journal', 'account.move.line', parser) jasper_reports.report_jasper('report.account.trial.balance', 'account.account', parser) jasper_reports.report_jasper('report.account.general.ledger', 'account.move.line', parser) jasper_reports.report_jasper('report.account.taxes.by.invoice', 'account.invoice', parser)
# -*- encoding: utf-8 -*- ############################################################################## # # ############################################################################## import jasper_reports def pawn_jor72_parser( cr, uid, ids, data, context ): return { 'parameters': { 'journal_id': data['form']['journal_id'], 'pawn_shop_id': data['form']['pawn_shop_id'], 'period_id': data['form']['period_id'], }, } jasper_reports.report_jasper( 'report.pawn_jor72_report', 'pawn.order', parser=pawn_jor72_parser )
def liste_stock_move(cr, uid, ids, data, context): return { 'ids': data['form']['ids'], 'parameters': { 'partner_id': data['form']['partner_id'], 'title': data['form']['title'], 'mode': data['form']['period'], 'year': int(data['form']['year']), 'stock_start': data['form']['stock_start'], 'location_id': data['form']['location_id'] }, } jasper_reports.report_jasper('report.ns_sales_reports.stock_move', 'stock.move', parser=liste_stock_move) def situation_mfi(cr, uid, ids, data, context): return { 'ids': data['form']['ids'], 'parameters': { 'title': data['form']['title'], 'detail': data['form']['detail'], 'clients': data['form']['clients'], 'stock': data['form']['stock'], 'portefeuile': data['form']['portefeuille'] }, }
def liste_stock_move(cr, uid, ids, data, context): return { 'ids': data['form']['ids'], 'parameters': { 'partner_id': data['form']['partner_id'], 'title': data['form']['title'], 'mode': data['form']['period'], 'year': int(data['form']['year']) }, } jasper_reports.report_jasper('report.ns_sales_reports.stock_move', 'stock.move', parser=liste_stock_move) def liste_factures_clients(cr, uid, ids, data, context): return { 'ids': data['form']['ids'], 'parameters': { 'title': data['form']['title'], 'mode': data['form']['period'], 'year': int(data['form']['year']) }, } jasper_reports.report_jasper('report.ns_sales_reports.liste_factures_clients',
# -*- encoding: utf-8 -*- ############################################################################## # # ############################################################################## import jasper_reports from osv import osv, fields import pooler import datetime def mh_daily_customer_payment_parser(cr, uid, ids, data, context): return { 'parameters': { 'date': data['form']['date'], 'user_id': data['form']['user_id'], 'prepared_by': data['form']['prepared_by'], }, } jasper_reports.report_jasper('report.mh_daily_customer_payment', 'account.voucher', parser=mh_daily_customer_payment_parser)
# GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. # ############################################################################## import jasper_reports from osv import osv,fields import pooler import datetime from tools.translate import _ def form_parser( cr, uid, ids, data, context ): return { 'parameters': { #'type': data['form']['type'], #'sale_order_ids': data['form']['sale_order_ids'], #'sql_where': data['form']['sql_where'], }, } jasper_reports.report_jasper( 'report.openforce_sale_quote_report', 'sale.order', parser=form_parser ) jasper_reports.report_jasper( 'report.openforce_sale_quote_report2', 'sale.order', parser=form_parser )
data_source = 'records' parameters = {} line_obj = pool.get('print.label.moves') user = pool.get('res.users').browse(cr, uid, uid) company_name = user.company_id.name if data['form'].get('move_ids', []): for move in line_obj.browse(cr, uid, data['form']['move_ids'], context): label_qty = int(math.ceil(move.qty / (move.qty_box or 1.0))) ctx = context.copy() ctx['lang'] = move.language.code move = line_obj.browse(cr, uid, move.id, ctx) for rec in range(0, label_qty): records.append({ 'product': move.product_id.name, 'lang': move.language.code, 'lot': move.lot_id.name, 'use_date': move.lot_id.use_date, 'ean13': move.product_id.ean13, 'qty': move.qty_box, 'company': company_name}) return { 'ids': ids, 'name': name, 'model': model, 'records': records, 'data_source': data_source, 'parameters': parameters, } jasper_reports.report_jasper( 'report.mrp.production.label', 'mrp.production', parser )
# (at your option) any later version. # # 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/>. # ############################################################################## import jasper_reports from osv import osv,fields import pooler import datetime from mx import DateTime def progress_evaluation_sheet( cr, uid, ids, data, context ): try: tmp_id=data['form']['ids'] except: tmp_id=[data['id']] return { 'ids': tmp_id } jasper_reports.report_jasper( 'report.kdvn.progress.evaluation.sheet.hidden', 'kdvn.contract.client', parser=progress_evaluation_sheet )
# -*- encoding: utf-8 -*- ############################################################################## # # ############################################################################## import sys sys.path.insert(0, '/home/kittiu/workspace/common/common') sys.path.insert(0, '/opt/odoo/common') import jasper_reports from openerp.osv import fields, osv import datetime def report_thai_tax_parser( cr, uid, ids, data, context ): return { 'parameters': { 'company_id': data['form']['company_id'], 'period_id': data['form']['period_id'], 'tax_id': data['form']['tax_id'], 'base_code_id': data['form']['base_code_id'], 'tax_code_id': data['form']['tax_code_id'], 'type_tax_use': data['form']['type_tax_use'], }, } jasper_reports.report_jasper( 'report.report_thai_tax', 'account.move', parser=report_thai_tax_parser )
# -*- encoding: utf-8 -*- ############################################################################## # # ############################################################################## import jasper_reports from osv import osv,fields import pooler import datetime def mh_daily_customer_payment_parser( cr, uid, ids, data, context ): return { 'parameters': { 'date': data['form']['date'], 'user_id': data['form']['user_id'], 'prepared_by': data['form']['prepared_by'], }, } jasper_reports.report_jasper( 'report.mh_daily_customer_payment', 'account.voucher', parser=mh_daily_customer_payment_parser )
# -*- encoding: utf-8 -*- ############################################################################## # # ############################################################################## import jasper_reports def sqp_report_production_daily_parser(cr, uid, ids, data, context): return { 'parameters': { 'report_date': data['form']['report_date'], 'dept': data['form']['dept'], }, } jasper_reports.report_jasper('report.sqp_report_production_daily', 'mrp.production', parser=sqp_report_production_daily_parser) jasper_reports.report_jasper('report.sqp_report_production_daily_excel', 'mrp.production', parser=sqp_report_production_daily_parser)