Odoo Help


problem with subflow

on 7/2/13, 2:09 PM 1,417 views


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)
        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)
            idPaiement = self.pool.get('account.voucher').browse(cr, uid, id).invoice_ids[0].payment_ids[0].id
        return {}

About This Community

This platform 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.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


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