Odoo Help


How to customize the checks journal process?(odoov8)

on 6/23/15, 6:50 AM 767 views

hello,I'm working on a custom module that allowed me to maintain the checks journals,so what i need is, when i click on the payments method (one2many) on the "Register payment" choose the option "checks journal", other fields , that i create will appears (checks journal options).Is there a way to do that?help please!

this is my code:

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

<field name="name">Accounts.inherit</field>

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

<field name="inherit_id" ref="account_voucher.view_vendor_receipt_dialog_form"/>

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

<xpath expr="//group[@name='journal_id']" position="inside">

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

invisible="context.get('line_type', False)" widget="selection"

on_change="onchange_journal1(journal_id, line_cr_ids, False, partner_id, date, amount, type, company_id, context)"

attrs="{'invisible': [('journal_id','!=','bank')]}"/>

<label for="Number_check" attrs="{'invisible': [('journal_id', 'not in', ('bank','cash'))]}"/>

/> </xpath> </field> </record>

and .py :

from openerp.osv import fields, osv

from bsddb.dbtables import _columns

class cheque_cheque(osv.osv):



_columns = {

'num_chk':fields.integer('Num Chèque'),

'bank':fields.char('Nom de Banque',size=100),




def onchange_journal1(self, cr, uid, ids, journal_id, line_ids, tax_id, partner_id, date, amount, ttype, company_id, context=None):

if journal_id == 'bank':

return {'value': {'num_chk':1, 'journal_id':False }}

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: 6/23/15, 6:50 AM
Seen: 767 times
Last updated: 6/23/15, 6:56 AM