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

How to get partial payment in a variable?

By
Arjun Khode
on 3/23/15, 4:39 AM 364 views

I have inherited the 'account_voucher.view_vendor_receipt_form' view. I have set an action to a button as follows.

When I click the button, a receipt dialog opens up and I enter an amount to be paid. This amount need not be the same as the total amount payable because I want to make a custom partial payment. So I enter my own amount in the view.

I want this amount, after hitting validate, to be stored in my own custom variable called 'amount_paid'

Can someone tell me how to get that value in a variable?


Code:


<record id="register_payment_button_action" model="ir.actions.act_window">

<field name="name">Register Payment</field>

<field name="res_model">account.voucher</field>

<field name="view_type">form</field>

<field name="view_mode">form</field>

<field name="domain">[('journal_id.type', 'in', ['bank', 'cash']), ('type','=','receipt')]</field>

<field name="context">{'type':'receipt'}</field>

<field name="view_id" ref="account_voucher.view_vendor_receipt_form"/>

<!-- <field name="view_id" ref="account_voucher.view_vendor_receipt_dialog_form"/> -->

<field name="target">new</field>

</record>

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: 3/23/15, 4:39 AM
Seen: 364 times
Last updated: 3/23/15, 4:39 AM