[IMP] account_check_writing : Improved the code.
bzr revid: mdi@tinyerp.com-20121123125023-oqkzividb5lct287
This commit is contained in:
@@ -39,7 +39,7 @@ class account_check_write(osv.osv_memory):
|
||||
voucher_ids = context.get('active_ids', [])
|
||||
number = int(self.browse(cr, uid, ids[0], context=context).check_number)
|
||||
if voucher_ids:
|
||||
checks = voucher_obj.browse(cr, uid, context['active_ids'], context=context)
|
||||
checks = voucher_obj.browse(cr, uid, voucher_ids, context=context)
|
||||
for check in checks:
|
||||
voucher_obj.write(cr, uid, [check.id], {'number': str(number)}, context=context)
|
||||
number += 1
|
||||
|
||||
@@ -6,15 +6,15 @@
|
||||
<field name="name">account.check.form</field>
|
||||
<field name="model">account.check.write</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Check" version="7.0">
|
||||
<group col="4">
|
||||
<field name="check_number"/>
|
||||
</group>
|
||||
<footer>
|
||||
<button name="print_check_write" string="Print Check" type="object" class="oe_highlight"/> or
|
||||
<button string="Cancel" class="oe_link" special="cancel"/>
|
||||
</footer>
|
||||
</form>
|
||||
<form string="Check" version="7.0">
|
||||
<group col="4">
|
||||
<field name="check_number"/>
|
||||
</group>
|
||||
<footer>
|
||||
<button name="print_check_write" string="Print Check" type="object" class="oe_highlight"/> or
|
||||
<button string="Cancel" class="oe_link" special="cancel"/>
|
||||
</footer>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user