[IMP]: use browse method for chane auction date wizard
bzr revid: atp@tinyerp.co.in-20100802123753-4rk7zpfrt4nd46uc
This commit is contained in:
parent
deaeed15cc
commit
736371f155
|
@ -28,14 +28,14 @@ import tools
|
|||
import wizard
|
||||
|
||||
class auction_lots_auction_move(osv.osv_memory):
|
||||
|
||||
"""Auction Move"""
|
||||
_name = "auction.lots.auction.move"
|
||||
_description = "Auction move "
|
||||
_description = __doc__
|
||||
_columns= {
|
||||
'auction_id':fields.many2one('auction.dates', 'Auction Date', required=True),
|
||||
}
|
||||
|
||||
def auction_move_set(self, cr, uid, ids, context={}):
|
||||
def auction_move_set(self, cr, uid, ids, context=None):
|
||||
"""
|
||||
This Function update auction date on auction lots to given auction date.
|
||||
erase the auction lots's object adjudication price and its buyer and change state to draft.
|
||||
|
@ -44,12 +44,14 @@ class auction_lots_auction_move(osv.osv_memory):
|
|||
@param uid: the current user’s ID for security checks,
|
||||
@param ids: List of auction lots auction move’s IDs.
|
||||
"""
|
||||
if not context:
|
||||
context={}
|
||||
auction_bid_line_obj = self.pool.get('auction.bid_line')
|
||||
auction_lot_history_obj = self.pool.get('auction.lot.history')
|
||||
auction_lots_obj = self.pool.get('auction.lots')
|
||||
rec_ids = auction_lots_obj.browse(cr, uid, context.get('active_ids', []))
|
||||
for datas in self.read(cr, uid, ids):
|
||||
if not (datas['auction_id'] and len(context.get('active_ids', []))):
|
||||
for current in self.browse(cr, uid, ids, context):
|
||||
if not (current.auction_id and len(context.get('active_ids', []))):
|
||||
return {}
|
||||
|
||||
# line_ids = auction_bid_line_obj.search(cr, uid, [('lot_id', 'in', context['active_ids'])])
|
||||
|
@ -61,7 +63,7 @@ class auction_lots_auction_move(osv.osv_memory):
|
|||
'price': rec.obj_ret
|
||||
})
|
||||
up_auction = auction_lots_obj.write(cr, uid, [rec.id], {
|
||||
'auction_id':datas['auction_id'],
|
||||
'auction_id': current.auction_id.id,
|
||||
'obj_ret': None,
|
||||
'obj_price': None,
|
||||
'ach_login': None,
|
||||
|
|
Loading…
Reference in New Issue