class InvoiceReportDemoHtml(report_sxw.rml_parse): ''' Define methods that need the report ''' def __init__(self, cr, uid, name, context=None): ''' Initialization method @param self: The object pointer. @param cr: A database cursor @param uid: ID of the user currently logged in @param name: Ids to invoice's to print ticket @param context: A standard dictionary ''' if context is None: context = {} super(InvoiceReportDemoHtml, self).__init__(cr, uid, name, context=context) self.localcontext.update({}) webkit_report.WebKitParser( 'report.invoice.report.demo.webkit', 'account.invoice', 'addons/invoice_report_per_journal/report/invoice_report_demo.mako', parser=InvoiceReportDemoHtml) # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
cr.execute(""" select get_last_currency_rate('USD','""" + date_move + """')""") if cr.fetchall(): cr.execute(""" select get_last_currency_rate('USD','""" + date_move + """')""") return [x[0] for x in cr.fetchall()] else: raise osv.except_osv('Porfavor Configure', 'el tipo de cambio a la fecha: ' + date_move) return False webkit_report.WebKitParser('report.account.ofertaproductoviguetas.webkit', 'sale.order', 'addons/poi_x_pretensa/report/oferta_producto.mako', parser=oferta_producto) webkit_report.WebKitParser( 'report.account.ofertaproductotabiplast.webkit', 'sale.order', 'addons/poi_x_pretensa/report/oferta_productotabiplast.mako', parser=oferta_producto) webkit_report.WebKitParser( 'report.account.ofertaproductoviguetassolo.webkit', 'sale.order', 'addons/poi_x_pretensa/report/oferta_productoviguetas.mako', parser=oferta_producto) webkit_report.WebKitParser( 'report.account.ofertaproductorejilla.webkit', 'sale.order',
res) # noqa return inv.date_invoice def get_num_modified(self, o): res = self.pool.get('account.invoice').search( self.cr, self.uid, [('number', '=', o.origin)], limit=1) # noqa if not res: return inv = self.pool.get('account.invoice').browse(self.cr, self.uid, res) # noqa number = '-'.join([ inv.invoice_number[:3], inv.invoice_number[3:6], inv.invoice_number[-9:] ]) # noqa return number def get_auth_modified(self, o): res = self.pool.get('account.invoice').search( self.cr, self.uid, [('number', '=', o.origin)], limit=1) # noqa if not res: return inv = self.pool.get('account.invoice').browse(self.cr, self.uid, res) # noqa return inv.numero_autorizacion webkit_report.WebKitParser('report.account_einvoice', 'account.invoice', 'l10n_ec_einvoice/views/report_envoice.mako', parser=ReportAccountInvoice)
super(account_move_report_html, self).__init__(cr, uid, name, context=context) self.localcontext.update({ 'time': time, 'get_total_debit_credit': self.get_total_debit_credit, }) def get_total_debit_credit(self, line_ids): sum_tot_debit = 0.00 sum_tot_credit = 0.00 for line in line_ids: sum_tot_debit += (line.debit) sum_tot_credit += (line.credit) return { 'sum_tot_debit': sum_tot_debit, 'sum_tot_credit': sum_tot_credit } webkit_report.WebKitParser( 'report.account.move.report.webkit', 'account.move', 'addons/report_account_move/report/account_move_report_html.mako', parser=account_move_report_html) # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
cr, uid, [('code', '=', 'incoming')]) if move_type == 'customer': picking = db_pool.get('stock.picking.type').search( cr, uid, [('code', '=', 'outgoing')]) if move_type == 'all': picking = db_pool.get('stock.picking.type').search( cr, uid, [('code', 'in', ('incoming', 'outgoing'))]) print "picking Type====================", picking # search = db_pool.get('stock.move').search( cr, uid, [('picking_type_id', 'in', picking), ('date', '>=', start), ('date', '<=', end), ('state', '=', 'done')]) results = db_pool.get('stock.move').browse(cr, uid, search) return results def convert(self, amount, cur): amt_id = amount_to_text_id.amount_to_text(amount, 'id', cur) return amt_id # webkit_report.WebKitParser( 'report.stock.report.pdf', 'stock.report', 'addons/dos_warehouse_report/report/stock_report.mako', parser=DosWebkitParser5)
header=False) report_sxw.report_sxw('report.aging_due_report', 'res.partner', 'addons/aging_due_report/report/aging_due_report.rml', parser=aging_parser, header=False) report_sxw.report_sxw( 'report.supplier_aging_due_report', 'res.partner', 'addons/aging_due_report/report/supplier_aging_due_report.rml', parser=aging_parser, header=False) webkit_report.WebKitParser( 'report.aging_due_report_webkit', 'res.partner', 'addons/aging_due_report/report/aging_due_report_html.mako', parser=aging_parser, header=True) webkit_report.WebKitParser( 'report.formal_due_report_webkit', 'res.partner', 'addons/aging_due_report/report/formal_due_report_html.mako', parser=aging_parser, header=True) webkit_report.WebKitParser( 'report.detail_due_report_webkit', 'res.partner', 'addons/aging_due_report/report/detail_due_report_html.mako', parser=aging_parser,
move_line_browse = move_line_obj.browse(self.cr, self.uid, move_line_search, context=None) return move_line_browse def convert(self, amount, cur): amt_id = amount_to_text_id.amount_to_text(amount, 'id', cur) return amt_id # webkit_report.WebKitParser( 'report.webkit.cheque', 'account.voucher', 'addons/dos_account_payment/report/print_cheque.mako', parser=DosWebkitParser) class DosWebkitParser1(report_sxw.rml_parse): def __init__(self, cr, uid, name, context): super(DosWebkitParser1, self).__init__(cr, uid, name, context=context) self.line_no = 0 self.localcontext.update({ # 'time': time, 'get_move_line': self.get_move_line, 'convert': self.convert, }) def get_move_line(self, move_id, except_move_line_id):
monto = '{:,.2f}'.format(monto) self.localcontext.update({ 'nit': nit, 'nombre_facturar': nombre_facturar, 'monto': monto, 'concepto': concepto, 'razon_social': razon_social, 'cuenta_analitica': cuenta_analitica, 'numero': numero, 'currency': currency, 'literal': literal, 'mes': mes, 'dia': dia, 'ano': ano, 'centavos': centavos, }) #webkit_report.WebKitParser('report.account.reciborepegreso.webkit', # 'account.move', # 'addons/poi_x_pretensa/report/recibo_move.mako', # parser=account_moverep) webkit_report.WebKitParser( 'report.account.recibovoucher.webkit', 'account.voucher', 'addons/poi_x_pretensa/report/recibo_move_voucher.mako', parser=account_moverep)
'literal_sus': literal_sus, 'mes': mes, 'dia': dia, 'ano': ano, 'centavos': centavos, 'centavos_sus': centavos_sus, 'efectivo': efectivo or '', 'cheque': cheque or '', 'name_bank': name_bank or '', 'number_bank': number_bank or '', 'number_transaction': number_transaction or '', 'name_bank_label': name_bank_label or '', 'number_bank_label': number_bank_label or '', 'number_transaction_label': number_transaction_label or '', 'tc': tc or '', }) webkit_report.WebKitParser('report.account.reciborepoficial.webkit', 'account.payment', 'addons/poi_x_pretensa/report/recibo_move_oficial.mako', parser=account_moverep_oficial) webkit_report.WebKitParser('report.account.reciborepoficialsus.webkit', 'account.payment', 'addons/poi_x_pretensa/report/recibo_move_oficial_sus.mako', parser=account_moverep_oficial)
from openerp.addons.report_webkit import webkit_report from openerp.addons.report_webkit.report_helper import WebKitHelper from openerp.addons.report_webkit.webkit_report import webkit_report_extender from openerp import SUPERUSER_ID class DosWebkitParser(report_sxw.rml_parse): def __init__(self, cr, uid, name, context): super(DosWebkitParser, self).__init__(cr, uid, name, context=context) self.line_no = 0 self.localcontext.update({ 'convert': self.convert, 'get_total': self.get_total, }) def convert(self, amount, cur): amt_id = amount_to_text_id.amount_to_text(amount, 'id', cur) return amt_id def get_total(self, main_product, child_line): total = main_product.salesmanager_approval_limit for line in child_line: total = total + line.product_id.salesmanager_approval_limit return total # webkit_report.WebKitParser('report.dos_new_quotation_report', 'sale.order', 'addons/dos_sale/report/print_persameds.mako', parser=DosWebkitParser)
'leyenda': leyenda, 'total_line_c': total_line_c, 'total_line_3': total_line, 'discount_line': discount_line, 'logo': logo, # 'total_filas':total_filas, 'discount_bs': discount_bs, 'numero_filas': n, 'mes': mes, 'dia': dia, 'ano': ano, }) webkit_report.WebKitParser('report.invoice.pretensa.webkit', 'account.invoice', 'addons/poi_x_pretensa/report/print_invoice_pret.mako', parser=account_invoice_pret) webkit_report.WebKitParser('report.invoice.pretensacopia.webkit', 'account.invoice', 'addons/poi_x_pretensa/report/print_invoice_pret_copia.mako', parser=account_invoice_pret) class account_invoice(osv.osv): _inherit = 'account.invoice' def invoice_print_pret(self, cr, uid, ids, context=None): datas = {} return {
'report_name': _('BORDEREAU DE REMISE DE CHEQUES'), 'additional_args': [ ('--header-font-name', 'Helvetica'), ('--footer-font-name', 'Helvetica'), ('--header-font-size', '10'), ('--footer-font-size', '6'), ('--header-left', header_report_name), ('--header-spacing', '2'), ('--footer-left', footer_date_time), ('--footer-right', ' '.join( (_('Page'), '[page]', _('of'), '[topage]'))), ('--footer-line', ), ], }) def _get_bank_statement_data(self, statement): statement_obj = self.pool.get('account.bank.statement.line') statement_line_ids = statement_obj.search( self.cr, self.uid, [('statement_id', '=', statement.id)]) statement_lines = statement_obj.browse(self.cr, self.uid, statement_line_ids) return statement_lines webkit_report.WebKitParser( 'report.bank_statement_webkit', 'account.bank.statement', 'addons/account_statement_ext/report/bank_statement_report.mako', parser=BankStatementWebkit)