[REF]account_voucher: code cleaning.

bzr revid: vra@tinyerp.com-20101015060140-qf1fcqh2jr53gvbi
This commit is contained in:
vra
2010-10-15 11:31:40 +05:30
parent 90e27fd366
commit a124c15f32
8 changed files with 38 additions and 27 deletions
+2
View File
@@ -60,3 +60,5 @@
"active": False,
"installable": True,
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+3 -1
View File
@@ -916,4 +916,6 @@ class account_bank_statement_line(osv.osv):
self.pool.get('account.voucher').unlink(cr, uid, unlink_ids, context=context)
return super(account_bank_statement_line, self).unlink(cr, uid, ids, context=context)
account_bank_statement_line()
account_bank_statement_line()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
@@ -1,29 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<openerp>
<data>
<record id="view_invoice_customer" model="ir.ui.view">
<field name="name">account.invoice.customer.pay</field>
<field name="model">account.invoice</field>
<field name="type">form</field>
<field name="inherit_id" ref="account.invoice_form"/>
<field name="arch" type="xml">
<button name="invoice_open" position="after">
<button name="invoice_pay_customer" type="object" string="Payment" states="open" icon="gtk-go-forward"/>
</button>
</field>
</record>
<record id="view_invoice_supplier" model="ir.ui.view">
<field name="name">account.invoice.supplier.pay</field>
<field name="model">account.invoice</field>
<field name="type">form</field>
<field name="inherit_id" ref="account.invoice_supplier_form"/>
<field name="arch" type="xml">
<button name="invoice_open" position="after">
<button name="invoice_pay_customer" type="object" string="Pay Invoice" states="open" icon="gtk-go-forward"/>
</button>
</field>
</record>
<record id="view_invoice_customer" model="ir.ui.view">
<field name="name">account.invoice.customer.pay</field>
<field name="model">account.invoice</field>
<field name="type">form</field>
<field name="inherit_id" ref="account.invoice_form"/>
<field name="arch" type="xml">
<button name="invoice_open" position="after">
<button name="invoice_pay_customer" type="object" string="Payment" states="open" icon="gtk-go-forward"/>
</button>
</field>
</record>
<record id="view_invoice_supplier" model="ir.ui.view">
<field name="name">account.invoice.supplier.pay</field>
<field name="model">account.invoice</field>
<field name="type">form</field>
<field name="inherit_id" ref="account.invoice_supplier_form"/>
<field name="arch" type="xml">
<button name="invoice_open" position="after">
<button name="invoice_pay_customer" type="object" string="Pay Invoice" states="open" icon="gtk-go-forward"/>
</button>
</field>
</record>
</data>
</openerp>
@@ -19,6 +19,5 @@
auto="False"
header = "False"
menu="True"/>
</data>
</openerp>
+3
View File
@@ -24,6 +24,7 @@ from tools.translate import _
class invoice(osv.osv):
_inherit = 'account.invoice'
def invoice_pay_customer(self, cr, uid, ids, context={}):
if not ids: return []
inv = self.browse(cr, uid, ids[0], context=context)
@@ -49,3 +50,5 @@ class invoice(osv.osv):
}
invoice()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
@@ -21,3 +21,5 @@
import account_voucher
import account_voucher_print
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
@@ -69,4 +69,6 @@ report_sxw.report_sxw(
'account.voucher',
'addons/account_voucher/report/account_voucher.rml',
parser=report_voucher,header="external"
)
)
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
@@ -92,3 +92,5 @@ report_sxw.report_sxw(
'addons/account_voucher/report/account_voucher_print.rml',
parser=report_voucher_print,header="external"
)
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: