[IMP] website_event: on_change product
bzr revid: chm@openerp.com-20130806144536-6l2g1glui1cout2q
This commit is contained in:
@@ -25,6 +25,9 @@ class event_product(osv.osv):
|
||||
'qty': fields.integer('Current Registrations', readonly=True),
|
||||
'max_qty': fields.integer('Maximum Registrations'),
|
||||
}
|
||||
def onchange_product_id(self, cr, uid, ids, product_id=False, context=None):
|
||||
return {'value': {'price': self.pool.get("product.product").browse(cr, uid, product_id).list_price or 0}}
|
||||
|
||||
|
||||
class product(osv.osv):
|
||||
_inherit = 'product.product'
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<page string="Tarifs">
|
||||
<field name="product_ids">
|
||||
<tree string="Payments" editable="bottom">
|
||||
<field name="product_id"/>
|
||||
<field name="product_id" on_change='onchange_product_id(product_id)'/>
|
||||
<field name="deadline"/>
|
||||
<field name="price"/>
|
||||
<field name="max_qty"/>
|
||||
|
||||
@@ -200,7 +200,6 @@ class Ecommerce(http.Controller):
|
||||
values = website.get_rendering_context()
|
||||
context = {}
|
||||
|
||||
order_obj = request.registry.get('sale.order')
|
||||
order_line_obj = request.registry.get('sale.order.line')
|
||||
user_obj = request.registry.get('res.users')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user