Odoo Help


Amount in account_voucher

on 8/18/15, 5:43 AM 445 views

Hi everyone,

I want to get the field amount in account_voucher and display it in a tree view so I had do as follow:

class reporting_checks(osv.osv):




'voucher_id': fields.many2one('account.voucher', 'Journal'),

'input':fields.related('voucher_id','amount',type="float",relation="account.voucher",string="Input amount",store=True),


xml file:

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

<field name="name">Caisse</field>

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

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

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

<field name="view_id" ref="view_voucher_caisse_tree"/>


<record id="view_voucher_caisse_tree" model="ir.ui.view">

<field name="name">Caisse</field>

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

<field name="arch" type="xml">

<form string="Caisse">

<field name="input"/>




But all I get in the tree view is a zero any suggestion how can I get the amount field from the account_voucher.


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: 8/18/15, 5:43 AM
Seen: 445 times
Last updated: 8/18/15, 5:43 AM