[IMP] event: improve view
bzr revid: hmo@tinyerp.com-20100720064023-qsgpbzl1ay7nh021
This commit is contained in:
parent
040e21b628
commit
bddf312603
|
@ -632,6 +632,8 @@ class event_registration(osv.osv):
|
|||
partner = res_obj.browse(cr, uid, partner_invoice_id, context=context)
|
||||
pricelist_id = pricelist_id or partner.property_product_pricelist.id
|
||||
unit_price = prod_obj._product_price(cr, uid, [data_event.product_id.id], False, False, {'pricelist': pricelist_id})[data_event.product_id.id]
|
||||
if not unit_price:
|
||||
unit_price = data_event.unit_price
|
||||
res['value'].update({'unit_price': unit_price, 'event_product': data_event.product_id.name})
|
||||
return res
|
||||
|
||||
|
@ -692,7 +694,10 @@ class event_registration(osv.osv):
|
|||
if partner_invoice_id:
|
||||
partner = res_obj.browse(cr, uid, partner_invoice_id, context=context)
|
||||
pricelist_id = pricelist_id or partner.property_product_pricelist.id
|
||||
data['unit_price'] = prod_obj._product_price(cr, uid, [data_event.product_id.id], False, False, {'pricelist': pricelist_id})[data_event.product_id.id]
|
||||
unit_price = prod_obj._product_price(cr, uid, [data_event.product_id.id], False, False, {'pricelist': pricelist_id})[data_event.product_id.id]
|
||||
if not unit_price:
|
||||
unit_price = data_event.unit_price
|
||||
data['unit_price'] = unit_price
|
||||
return {'value': data}
|
||||
|
||||
event_registration()
|
||||
|
|
|
@ -332,10 +332,9 @@
|
|||
</group>
|
||||
<separator string="Description" colspan="4"/>
|
||||
<field name="description" colspan="4" nolabel="1"/>
|
||||
<group col="8" colspan="4">
|
||||
<separator string="" colspan="4"/>
|
||||
<newline/>
|
||||
<field name="state" select="1" colspan="4"/>
|
||||
<separator string="" colspan="4"/>
|
||||
<group col="8" colspan="4">
|
||||
<field name="state" select="1" colspan="2"/>
|
||||
<button name="button_reg_close" string="Close Registration" states="open" type="object" icon="gtk-close"/>
|
||||
<button name="check_confirm" string="Confirm Registration" states="draft" type="object" icon="gtk-apply"/>
|
||||
<button name="button_reg_cancel" string="Cancel Registration" states="draft,open" type="object" icon="gtk-cancel"/>
|
||||
|
|
Loading…
Reference in New Issue