[REM] website_event_sale: remove sale_order.py

bzr revid: chm@openerp.com-20140225130201-3fu69q8tsbb9fdbu
This commit is contained in:
Christophe Matthieu 2014-02-25 14:02:01 +01:00
parent 07b5cb38a0
commit 8f7c96d5be
2 changed files with 0 additions and 23 deletions

View File

@ -1,3 +1,2 @@
import product
import sale_order
import website

View File

@ -1,22 +0,0 @@
# -*- coding: utf-8 -*-
from openerp.osv import osv
from openerp import SUPERUSER_ID
from openerp.addons.web.http import request
class sale_order_line(osv.osv):
_inherit = "sale.order.line"
def _recalculate_product_values(self, cr, uid, ids, product_id=0, context=None):
if not ids:
return super(sale_order_line, self)._recalculate_product_values(cr, uid, ids, product_id, context=context)
order_line = self.browse(cr, SUPERUSER_ID, ids[0], context=context)
assert order_line.order_id.id == request.session.get('sale_last_order_id')
product = product_id and self.pool.get('product.product').browse(cr, uid, product_id, context=context) or order_line.product_id
res = super(sale_order_line, self)._recalculate_product_values(cr, uid, ids, product.id, context=context)
if product.event_type_id and order_line.event_ticket_id and order_line.event_ticket_id.price != product.lst_price:
res.update({'price_unit': order_line.event_ticket_id.price})
return res