[FIX] auction: auction_lot_cancel issues has been fixed

bzr revid: mso@mso-20100329111422-2phkxy7w3f3fz5wx
This commit is contained in:
mso 2010-03-29 16:44:22 +05:30
parent a8aadf5b4e
commit d598aac66f
4 changed files with 14 additions and 10 deletions

View File

@ -38,7 +38,7 @@
'init_xml': ['auction_sequence.xml'],
'update_xml': [
'security/ir.model.access.csv',
'wizard/auction_lots_cancel_view.xml',
# 'wizard/auction_lots_cancel_view.xml',
# 'wizard/auction_transfer_unsold_object_view.xml',
'wizard/auction_lots_able_view.xml',
'wizard/auction_lots_enable_view.xml',

View File

@ -29,7 +29,7 @@ import auction_pay_buy
import auction_payer_sel
import auction_lots_sms_send
import auction_catalog_flagey_report
import auction_lots_cancel
#import auction_lots_cancel
#import auction_transfer_unsold_object
#import auction_aie_send_result
import auction_lots_buyer_map

View File

@ -29,7 +29,7 @@ class auction_lots_cancel(osv.osv):
_name = 'auction.lots.cancel'
_description = 'To cancel auction lots.'
def _cancel(self, cr, uid, ids, context):
def cancel(self, cr, uid, ids, context):
"""
To cancel the auction lot
@ -45,13 +45,11 @@ class auction_lots_cancel(osv.osv):
invoice_obj = self.pool.get('account.invoice')
lot = lots_obj.browse(cr,uid,context['active_id'],context)
if lot.ach_inv_id:
p = invoice_obj.refund(['lot.ach_inv_id.id'],context)
if lot.vnd_inv_id:
p = invoice_obj.refund(['lot.vnd_inv_id.id'],context)
supplier_refund_inv_id = invoice_obj.refund(cr, uid,[lot.ach_inv_id.id])
if lot.sel_inv_id:
customer_refund_inv_id = invoice_obj.refund(cr, uid,[lot.sel_inv_id.id])
return {}
_columns = {
}
auction_lots_cancel()

View File

@ -10,12 +10,18 @@
<label string="Are you sure you want to refund this invoice ?"/>
<button icon='gtk-cancel' special="cancel"
string="Cancel" />
<button name="_cancel" string="Cancel Payment"
<button name="cancel" string="Cancel Payment"
colspan="1" type="object" icon="gtk-ok" />
</form>
</field>
</record>
<act_window name="Cancel ittttttt"
res_model="auction.lots.cancel"
src_model="auction.lots"
view_mode="form"
target="new"
key2="client_action_multi"
id="action_auction_lots_cancel"/>
</data>
</openerp>