Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

problem with subflow

By
vgze
on 7/2/13, 2:09 PM 1,002 views

Hello,

I imported all the purchase of my company. Now, I try to create a wizard who can confirm theim but also take the shipping, the invoicing and the payment. And, it works for the fisrt and the second. But, I can't lauch the payement subflow, I don't see how lauch it and give the information (method payement).

class purchase_order_confirm(osv.osv_memory):
    _name = "purchase.order.confirm"

    def makePo(self, cr, uid, data, context):
        wf_service = netsvc.LocalService("workflow")
        pp = pprint.PrettyPrinter(indent=2)
        pp.pprint(context.get('active_model',''))
        for id in context['active_ids']:
            wf_service.trg_validate(uid, 'purchase.order', id, 'purchase_confirm', cr)
            wf_service.trg_validate(uid, 'purchase.order', id, 'purchase_approve', cr)
            idLivraison = self.pool.get('purchase.order').browse(cr, uid, id).picking_ids[0].id
            wf_service.trg_validate(uid, 'stock.picking', idLivraison, 'button_done', cr)
            idFacture = self.pool.get('purchase.order').browse(cr, uid, id).invoice_ids[0].id
            wf_service.trg_validate(uid, 'account.invoice', idFacture, 'invoice_open', cr)
            wf_service.trg_validate(uid, 'account.invoice', idFacture, 'confirm_paid()', cr)
            pdb.set_trace()
            idPaiement = self.pool.get('account.voucher').browse(cr, uid, id).invoice_ids[0].payment_ids[0].id
        return {}
purchase_order_confirm()

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 7/2/13, 2:09 PM
Seen: 1002 times
Last updated: 3/16/15, 8:10 AM