Title: How to customize journal vouchers form in odoo?
Tags: openerp;openerp-7;odoo-8
Question: In the accounts module(Journal vouchers column) I want to create a separate button for credit and debit entry instead of making a selection from the drop down.I am not getting in which file can I edit this.Instead of create button I want create debit entry and create credit entry buttons.


Here is another answer: This require to develop an extension in the template and javascript widget, like this:
You need to include a template that insert the button like:
<?xml version="1.0" encoding="UTF-8"?&gt;
<template&gt;
<t t-extend="ListView.buttons"&gt;
<t t-jquery="button.oe_list_add" t-operation="after"&gt;
<button class="oe_button oe_new_button oe_highlight" type="button"&gt;New Button</button&gt;
</t&gt;
</t&gt;
</template&gt;
Next you need to extend the widget ListView like this:
instance.web.ListView.include({
load_list: function(data) {
if (this.$buttons) {
this.$buttons.find('.oe_new_button').click(this.proxy('do_new_button')) ;
}
},
do_new_button: function () {
//implement your clic logic here
May be this is useful...
Comment for this answer: your_module/static/src/xml/your_xml.xml and create one template tag and put this code in .xml file
Comment for this answer: you create in your own custome module
Comment for this answer: in accounts voucher module there is no xml folder inside static folder
Comment for this answer: I am getting this error, XMLSyntaxError: Extra content at the end of the document, line 10, column 1 for adding your 2nd para of code(instance.web)                    Should i write it in separate file?

{'source': 'StackExchangeDataset', 'subset': 'stackoverflow.com', 'metadata': {'AnswerCount': 1, 'CommentCount': 0, 'ContentLicense': 'CC BY-SA 3.0', 'CreationDate': '2015:00:12/30/15', 'FavoriteCount': None, 'PostTypeId': 1, 'Tags': '<openerp><openerp-7><odoo-8>', 'Title': 'How to customize journal vouchers form in odoo?', 'ViewCount': 594, 'id': 34528035, 'user_AboutMe': '<p>Software Developer</p>\n', 'user_AccountId': 5016927.0, 'user_DisplayName': 'Kiran', 'user_Reputation': 1471.0, 'user_Views': 300.0, 'user_id': 4031564.0}}