[FIX] auction: auction_transfer_unsold_object issues has been fixed
bzr revid: mso@mso-20100329094025-a257jp1j5blet6ua
This commit is contained in:
parent
c4b7a902cb
commit
a8aadf5b4e
|
@ -38,6 +38,8 @@
|
|||
'init_xml': ['auction_sequence.xml'],
|
||||
'update_xml': [
|
||||
'security/ir.model.access.csv',
|
||||
'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',
|
||||
'wizard/auction_lots_make_invoice_buyer_view.xml',
|
||||
|
|
|
@ -29,7 +29,8 @@ import auction_pay_buy
|
|||
import auction_payer_sel
|
||||
import auction_lots_sms_send
|
||||
import auction_catalog_flagey_report
|
||||
|
||||
import auction_lots_cancel
|
||||
#import auction_transfer_unsold_object
|
||||
#import auction_aie_send_result
|
||||
import auction_lots_buyer_map
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ class auction_transfer_unsold_object(osv.osv):
|
|||
_name = 'auction.transfer.unsold.object'
|
||||
_description = 'To transfer unsold objects'
|
||||
|
||||
def _start(self, cr, uid, ids, context):
|
||||
def _start(self, cr, uid, context):
|
||||
"""
|
||||
To initialize auction_id_from
|
||||
|
||||
|
@ -43,7 +43,7 @@ class auction_transfer_unsold_object(osv.osv):
|
|||
lots_obj = self.pool.get('auction.lots')
|
||||
rec = lots_obj.browse(cr, uid, context['active_id'], context)
|
||||
auction_from = rec and rec.auction_id.id or False
|
||||
return {'auction_id_from': auction_from}
|
||||
return auction_from
|
||||
|
||||
def transfer_unsold_object(self, cr, uid, ids, context):
|
||||
"""
|
||||
|
@ -64,11 +64,10 @@ class auction_transfer_unsold_object(osv.osv):
|
|||
bid_line_obj.unlink(cr, uid, line_ids)
|
||||
|
||||
res = self.browse(cr, uid, ids)
|
||||
|
||||
unsold_ids = lots_obj.search(cr,uid,[('auction_id','=',res[0].auction_id_from),('state','=','unsold')])
|
||||
unsold_ids = lots_obj.search(cr,uid,[('auction_id','=',res[0].auction_id_from.id),('state','=','unsold')])
|
||||
for rec in lots_obj.browse(cr, uid, unsold_ids, context):
|
||||
new_id = lot_history_obj.create(cr,uid,{'auction_id':rec.auction_id.id,'lot_id':rec.id,'price': rec.obj_ret, 'name': 'reasons'+rec.auction_id.auction1})
|
||||
up_auction = lots_obj.write(cr,uid,[rec.id],{'auction_id': res[0].auction_id_to,
|
||||
new_id = lot_history_obj.create(cr,uid,{'auction_id':rec.auction_id.id,'lot_id':rec.id,'price': rec.obj_ret, 'name': rec.auction_id.auction1})
|
||||
up_auction = lots_obj.write(cr,uid,[rec.id],{'auction_id': res[0].auction_id_to.id,
|
||||
'obj_ret':None,
|
||||
'obj_price':None,
|
||||
'ach_login':None,
|
||||
|
@ -76,7 +75,6 @@ class auction_transfer_unsold_object(osv.osv):
|
|||
'ach_inv_id':None,
|
||||
'sel_inv_id':None,
|
||||
'state':'draft'})
|
||||
|
||||
return {}
|
||||
|
||||
_columns = {
|
||||
|
@ -85,6 +83,6 @@ class auction_transfer_unsold_object(osv.osv):
|
|||
}
|
||||
|
||||
_defaults = {
|
||||
'auction_id_from': lambda *a: _start,
|
||||
'auction_id_from': _start,
|
||||
}
|
||||
auction_transfer_unsold_object()
|
|
@ -21,13 +21,6 @@
|
|||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<act_window name="Draft To Posted"
|
||||
res_model="auction.transfer.unsold.object"
|
||||
src_model=""
|
||||
view_mode="form"
|
||||
target="new"
|
||||
key2="client_action_multi"
|
||||
id="act_auction_lots_cancel"/>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
Loading…
Reference in New Issue