[FIX]: fix
authorMantavya Gajjar <mga@tinyerp.com>
Wed, 15 Sep 2010 15:49:28 +0000 (21:19 +0530)
committerMantavya Gajjar <mga@tinyerp.com>
Wed, 15 Sep 2010 15:49:28 +0000 (21:19 +0530)
bzr revid: mga@tinyerp.com-20100915154928-j80f1blzjc43j1c5

addons/account_voucher/voucher.py
addons/account_voucher/voucher_sales_purchase_view.xml

index 083247b..f59bd73 100644 (file)
@@ -59,7 +59,7 @@ class account_voucher(osv.osv):
             return context.get('journal_id')
         if not context.get('journal_id', False) and context.get('search_default_journal_id', False):
             return context.get('search_default_journal_id')
-            
+        
         ttype = context.get('type', 'bank')
         res = journal_pool.search(cr, uid, [('type', '=', ttype)], limit=1)
         return res and res[0] or False
index ddb74c5..7dd79c2 100644 (file)
                         <button name="cancel_voucher" string="Cancel" states="draft,proforma"  icon="gtk-cancel"/>
                         <button name="cancel_voucher" string="Cancel" type="object" states="posted" icon="terp-stock_effects-object-colorize" confirm="Are you sure to confirm this record ?"/>
                         <button name="proforma_voucher" string="Post" states="draft" icon="terp-camera_test"/>
-                        <button icon="terp-dolar_ok!" name="%(act_pay_voucher)d" context="{'narration':narration, 'title':'Sales Payment', 'type':'receipt', 'partner_id': partner_id, 'reference':reference}" type="action" string="Pay" attrs="{'invisible':['|', ('pay_now','!=','pay_now'), ('state','!=','posted')]}"/>
+                        <button icon="terp-dolar_ok!" name="%(act_pay_voucher)d" context="{'narration':narration, 'title':'Sales Payment', 'type':'receipt', 'partner_id': partner_id, 'reference':reference}" type="action" string="Pay" attrs="{'invisible':[('pay_now','!=','pay_now'), ('state','!=','posted')]}"/>
                         <button name="action_cancel_draft" type="object" states="cancel" string="Set to Draft" icon="terp-stock_effects-object-colorize"/>
                     </group>
                 </form>
                         <button name="cancel_voucher" string="Cancel" states="draft,proforma"  icon="gtk-cancel"/>
                         <button name="cancel_voucher" string="Cancel" type="object" states="posted" icon="terp-stock_effects-object-colorize" confirm="Are you sure to confirm this record ?"/>
                         <button name="proforma_voucher" string="Post" states="draft" icon="terp-camera_test"/>
-                        <button icon="terp-dolar_ok!" name="%(act_pay_bills)d" context="{'narration':narration, 'title':'Bill Payment', 'type':'payment', 'partner_id': partner_id, 'reference':reference}" type="action" string="Pay Bill" attrs="{'invisible':['|', ('pay_now','!=','pay_now'), ('state','!=','posted')]}"/>
+                        <button icon="terp-dolar_ok!" name="%(act_pay_bills)d" context="{'narration':narration, 'title':'Bill Payment', 'type':'payment', 'partner_id': partner_id, 'reference':reference}" type="action" string="Pay Bill" attrs="{'invisible':[('pay_now','!=','pay_now'), ('state','!=','posted')]}"/>
                         <button name="action_cancel_draft" type="object" states="cancel" string="Set to Draft" icon="terp-stock_effects-object-colorize"/>
                     </group>
                 </form>