Exemple #1
0
            price=workcenter.product_id.standard_price
   
        return price 
    # hpusa configures 27-05-2015
     
wizard_hpusa_report()

# openoffice_report.openoffice_report(
#     'report.manufacturing_summary',
#     'wizard.hpusa.report',
#     parser=wizard_hpusa_report
# )

openoffice_report.openoffice_report(
    'report.manufacturing_detail',
    'wizard.hpusa.report',
    parser=wizard_hpusa_report
)

openoffice_report.openoffice_report(
    'report.material_repair_summay',
    'wizard.hpusa.report',
    parser=wizard_hpusa_report
)

openoffice_report.openoffice_report(
    'report.manufacturing_v_invoice',
    'wizard.hpusa.report',
    parser=wizard_hpusa_report
)
#
Exemple #2
0
    def create(self, cr, uid, vals, context=None):
        res = super(sale_order, self).create(cr, uid, vals, context)
        template = self.pool.get('email.template').search(cr, uid, [('name','=','New Sale Order')])
        if template:
            self.pool.get('email.template').send_mail(cr, uid, template[0], int(res), True, context=context)
        return res

    def action_refuse(self, cr, uid, ids, context=None):
        self.write(cr, uid, ids, {'state': 'draft'})


sale_order()

openoffice_report.openoffice_report(
    'report.report_so_manufacturing',
    'sale.order',
    parser=sale_order
)
class sale_order_line(osv.osv):
    _inherit = "sale.order.line"

    def _get_mo(self, cr, uid, ids, field_name, arg, context=None):
        result = {}
        for record in self.browse(cr, uid, ids, context=context):
            wo_id = None
            state = ''
            wo_state = ''
            wo_name ='' # hpusa configure
            production_id = self.pool.get('mrp.production').search(cr, uid, [('so_id','=',record.order_id.id),('so_line_id','=',record.id)])
            if production_id:
                i = 0
                                            'qty': result['qty'],
                                             'qly':result['qly'],
                                            })
                    if result ['hp_type'] =='diamonds':
                     
                            arr.append({
                                            'p_code':result['p_code'],
                                            'p_name': result['p_name'],
                                            'unit':  result['unit'],
                                            'qty': result['qty'],
                                             'qly':result['qly'],
                                            })
        return arr


openoffice_report.openoffice_report(
    'report.material_request_detail',
    'wizard.hpusa.material.request.report',
    parser=wizard_hpusa_material_request_report
) 

openoffice_report.openoffice_report(
    'report.material_request_summary',
    'wizard.hpusa.material.request.report',
    parser=wizard_hpusa_material_request_report
) 



# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
Exemple #4
0
        #                     LEFT JOIN product_template p ON(p.id = line.product_id)
        #                     LEFT JOIN stock_picking pk ON(pk.id = st.picking_id)
        #                     LEFT JOIN product_uom uom ON(uom.id = st.product_uom)
        #                     LEFT JOIN res_currency cu ON(cu.id = po.currency_id)
        #                     WHERE st.state = 'done' AND po.partner_id = %s AND st.date >= '%s' AND st.date <= '%s' '''%(form['partner_id'][0],form['date_from'],form['date_to'])
        #         cr.execute(sql)
        #         print sql
        result = cr.dictfetchall()
        for i in result:
            res.append({
                'po_name': 's',
                'product_name': 'ssss',
                'picking_name': 'sdsd',
                'uom': 'sssss',
                'cu_name': 'sssss',
                'product_quantity': 'sssss',
                'input_quantity': 'ssas',
                'date': 'sa',
                'price_unit': 'sdsdsd',
                'total': '0',
            })

        return res


report_report_picking_wizard()

openoffice_report.openoffice_report('report.report_picking_in',
                                    'report.picking.in',
                                    parser=report_report_picking_wizard)
#         cr.execute(sql)     
#         print sql   
        result = cr.dictfetchall()  
        for i in result:     
            res.append({
                        'po_name': 's',
                        'product_name' : 'ssss',
                        'picking_name' : 'sdsd',
                        'uom' : 'sssss',
                        'cu_name' : 'sssss',
                        'product_quantity': 'sssss',
                        'input_quantity' : 'ssas',
                        'date': 'sa',
                        'price_unit': 'sdsdsd',
                        'total': '0',
                        })       
        
        return res
report_report_picking_wizard()

openoffice_report.openoffice_report(
    'report.report_picking_in',
    'report.picking.in',
    parser=report_report_picking_wizard
) 





Exemple #6
0
# -*- encoding: utf-8 -*-
##############################################################################
#
#    Copyright (C) 2014 Vision Software (<http://visoftware.com>). All Rights Reserved
#
##############################################################################
from dateutil import relativedelta 
import time
from datetime import datetime
from datetime import timedelta
from openerp.osv import fields, osv, orm
from openerp.addons.pxgo_openoffice_reports import openoffice_report
from openerp.report import report_sxw
  


openoffice_report.openoffice_report(
    'report.notify_commission',
    'commission.worksheet',
) 





            'wt_first': sum_wt_first,
            'qty_out': sum_qty_out,
            'wt_out': sum_wt_out,
            'qty_lost': sum_qty_lost,
            'wt_lost': sum_wt_lost,
            'qty_ship': sum_qty_ship,
            'wt_ship': sum_wt_ship,
            'qty_stock': sum_qty_stock,
            'wt_stock': sum_wt_stock,
        })
        # hpusa 13-07-2015

        print 'End get information'
        return arr

openoffice_report.openoffice_report('report.stock_picking_detail',
                                    'wizard.hpusa.product.list.report',
                                    parser=wizard_hpusa_product_list_report)

openoffice_report.openoffice_report('report.stock_in_out',
                                    'wizard.hpusa.report',
                                    parser=wizard_hpusa_product_list_report)

# hpusa 08-07-2015
openoffice_report.openoffice_report('report.stock_in_out_diamond',
                                    'wizard.hpusa.report',
                                    parser=wizard_hpusa_product_list_report)
# hpusa 08-07-2015

# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
            'qty_lost': sum_qty_lost,
            'wt_lost': sum_wt_lost,
            'qty_ship': sum_qty_ship,
            'wt_ship': sum_wt_ship,
            'qty_stock':  sum_qty_stock,
            'wt_stock':  sum_wt_stock,
                        })    
        # hpusa 13-07-2015               
            
        print 'End get information'    
        return arr

    
openoffice_report.openoffice_report(
    'report.stock_picking_detail',
    'wizard.hpusa.product.list.report',
    parser=wizard_hpusa_product_list_report
) 

openoffice_report.openoffice_report(
    'report.stock_in_out',
    'wizard.hpusa.report',
    parser=wizard_hpusa_product_list_report
) 

# hpusa 08-07-2015
openoffice_report.openoffice_report(
    'report.stock_in_out_diamond',
    'wizard.hpusa.report',
    parser=wizard_hpusa_product_list_report
) 
                        'stt': stt,
                        'name': i['name'],
                        'amount' : i['amount'],
                        'payment' : i['payment'],
                        'remain':  remain ,
                        'limit': i['credit_limit'],
                        'str_limit': str_limit,
                        }) 
                
        return {'line1':res, 'line2': res_1, 'total_pay1': total_pay1, 'pay_1': pay_1, 'debit1': debit1, 'total_pay2': total_pay2, 'pay_2': pay_2, 'debit2': debit2}

        
       
openoffice_report.openoffice_report(
    'report.commission_summary',
    'sale.order',
    parser=agent_detail_report
) 

openoffice_report.openoffice_report(
    'report.liabilities',
    'sale.order',
    parser=agent_detail_report
) 

openoffice_report.openoffice_report(
    'report.commission_detail',
    'sale.order',
    parser=agent_detail_report
)