[IMP]: usability Improvement for auction wizard.

bzr revid: atp@tinyerp.co.in-20100802124234-79gv2pkn69hjafp4
This commit is contained in:
atp (Open ERP) 2010-08-02 18:12:34 +05:30
parent 736371f155
commit a2b6d72e29
6 changed files with 17 additions and 11 deletions

View File

@ -14,7 +14,7 @@
<separator string="" colspan="4" />
<group colspan="4" col="4">
<label string=" " colspan="2"/>
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
<button icon="gtk-close" special="cancel" string="Close"/>
<button icon="gtk-redo" string="Move to Auction date" name="auction_move_set" type="object"/>
</group>
</form>

View File

@ -53,7 +53,7 @@ class wiz_auc_lots_buyer_map(osv.osv_memory):
res.update(self._start(cr, uid, context.get('active_ids', []), context))
return res
def _start(self, cr, uid, ids, context):
def _start(self, cr, uid, ids, context=None):
"""
Returns login if already there in the selected record.
@param self: The object pointer.
@ -63,6 +63,8 @@ class wiz_auc_lots_buyer_map(osv.osv_memory):
@param context: A standard dictionary
@return: login field from current record.
"""
if not context:
context={}
lots_obj = self.pool.get('auction.lots')
for rec in lots_obj.browse(cr, uid, ids, context):
if (len(ids)==1) and (not rec.ach_uid and not rec.ach_login):
@ -71,7 +73,7 @@ class wiz_auc_lots_buyer_map(osv.osv_memory):
return {'ach_login': rec.ach_login}
return {}
def buyer_map_set(self, cr, uid, ids, context):
def buyer_map_set(self, cr, uid, ids, context=None):
"""
To map the buyer and login name.
@param self: The object pointer.
@ -80,6 +82,8 @@ class wiz_auc_lots_buyer_map(osv.osv_memory):
@param ids: List of ids
@param context: A standard dictionary
"""
if not context:
context={}
rec_ids = context and context.get('active_ids',[]) or []
assert rec_ids, _('Active IDs not Found')
lots_obj = self.pool.get('auction.lots')

View File

@ -16,8 +16,9 @@
<field name="ach_uid" colspan="4"/>
<separator colspan="4"/>
<group col="4" colspan="4">
<button icon='gtk-cancel' special="cancel"
string="Exit" />
<label string="" colspan="2"/>
<button icon='gtk-close' special="cancel"
string="Close" />
<button name="buyer_map_set" string="Update"
colspan="2" type="object" icon="gtk-go-forward" />
</group>

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=None):
"""
To cancel the auction lot
@ -40,10 +40,11 @@ class auction_lots_cancel(osv.osv):
@param context: A standard dictionary
@return:
"""
if not context:
context={}
lots_obj = self.pool.get('auction.lots')
invoice_obj = self.pool.get('account.invoice')
lot = lots_obj.browse(cr, uid, context['active_id'], context)
lot = lots_obj.browse(cr, uid, context.get('active_id', False), context)
if lot.ach_inv_id:
supplier_refund_inv_id = invoice_obj.refund(cr, uid, [lot.ach_inv_id.id])
if lot.sel_inv_id:

View File

@ -8,8 +8,8 @@
<field name="arch" type="xml">
<form string="Cancel Payment">
<label string="Are you sure you want to refund this invoice ?"/>
<button icon='gtk-cancel' special="cancel"
string="Cancel" />
<button icon='gtk-close' special="cancel"
string="Close" />
<button name="cancel" string="Cancel Payment"
colspan="1" type="object" icon="gtk-ok" />
</form>

View File

@ -20,7 +20,7 @@
</group>
<separator string="" colspan="4" />
<group colspan="4" col="6">
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
<button icon="gtk-close" special="cancel" string="Close"/>
<button icon="gtk-yes" string="Pay" name="pay_and_reconcile" type="object"/>
</group>
</form>