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

Customise Payment User Flow

By
Praveen
on 4/15/13, 9:44 AM 556 views

Hi ,

We had a requirement to improve the user experience on moving to the payment page after invoice validation. I need to customise the invoice to payment page navigation so that on validation of an account invoice, the user can be taken directly to customer payment page (Customers/Customer Payments/Create), instead of making multiple clicks by going to "Customer Payments",click on 'create' and then search for customer

I tried to override the invoice_validate method in account_invoice which does seem to forward but throw up some UI errors:

 def invoice_validate(self, cr, uid, ids, context=None):
    self.write(cr, uid, ids, {'state':'open'}, context=context)
    mod_obj = self.pool.get('ir.model.data')
    res = mod_obj.get_object_reference(cr, uid, 'account_voucher', 'view_vendor_receipt_form')
    res_id = res and res[1] or False,
    return {
        'view_type': 'form',
        'view_mode': 'form',
        'view_id': res_id,
        'res_model': 'account.voucher',
        'type': 'ir.actions.act_window',
        'target': 'current',
        }

Was curious to know if Iam in the right path or is there a better way to do this ?(using workflow or other mechanisms) . Any help is appreciated

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

0 follower(s)

Stats

Asked: 4/15/13, 9:44 AM
Seen: 556 times
Last updated: 3/16/15, 8:10 AM