[WIP] rev me
bzr revid: chm@openerp.com-20140318153456-gwz47zs8il23rwii
This commit is contained in:
parent
5b722a036a
commit
42ba805cc8
|
@ -5,6 +5,7 @@ inject = [
|
||||||
"./../../../website_event_sale/static/src/js/website.tour.event_sale.js",
|
"./../../../website_event_sale/static/src/js/website.tour.event_sale.js",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@openerp.tests.common.at_install(False)
|
||||||
@openerp.tests.common.post_install(True)
|
@openerp.tests.common.post_install(True)
|
||||||
class TestUi(openerp.tests.HttpCase):
|
class TestUi(openerp.tests.HttpCase):
|
||||||
def test_admin(self):
|
def test_admin(self):
|
||||||
|
|
|
@ -293,8 +293,28 @@ class Ecommerce(http.Controller):
|
||||||
if category:
|
if category:
|
||||||
category_obj = request.registry.get('product.public.category')
|
category_obj = request.registry.get('product.public.category')
|
||||||
category = category_obj.browse(request.cr, request.uid, int(category), context=request.context)
|
category = category_obj.browse(request.cr, request.uid, int(category), context=request.context)
|
||||||
|
|
||||||
|
print ""
|
||||||
|
print "############################"
|
||||||
|
print "############################"
|
||||||
|
print "############################"
|
||||||
|
print "############################"
|
||||||
|
print product.id
|
||||||
|
|
||||||
|
request.cr.execute("select id from product_product where product_tmpl_id = %s", (product.id,))
|
||||||
|
print "FETCH ",request.cr.fetchall()
|
||||||
|
request.cr.execute("select id from note_note where id = 99")
|
||||||
|
print "FETCH ",request.cr.fetchall()
|
||||||
|
print "TEST cr => IDDDDDDDDDD" ,id(request.cr)
|
||||||
|
print product.name
|
||||||
|
|
||||||
|
print product.product_variant_ids
|
||||||
|
|
||||||
|
|
||||||
request.context['pricelist'] = self.get_pricelist()
|
request.context['pricelist'] = self.get_pricelist()
|
||||||
|
print product.product_variant_ids
|
||||||
|
import time
|
||||||
|
time.sleep(5)
|
||||||
|
|
||||||
values = {
|
values = {
|
||||||
'Ecommerce': self,
|
'Ecommerce': self,
|
||||||
|
@ -307,6 +327,12 @@ class Ecommerce(http.Controller):
|
||||||
'filters': filters,
|
'filters': filters,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
print product.product_variant_ids
|
||||||
|
print ""
|
||||||
|
print ""
|
||||||
|
print ""
|
||||||
|
print ""
|
||||||
|
print ""
|
||||||
return request.website.render("website_sale.product", values)
|
return request.website.render("website_sale.product", values)
|
||||||
|
|
||||||
@http.route(['/shop/product/<int:product_template_id>/comment'], type='http', auth="public", methods=['POST'], website=True)
|
@http.route(['/shop/product/<int:product_template_id>/comment'], type='http', auth="public", methods=['POST'], website=True)
|
||||||
|
@ -330,7 +356,22 @@ class Ecommerce(http.Controller):
|
||||||
'name': name, 'public_categ_id': category
|
'name': name, 'public_categ_id': category
|
||||||
}, context=request.context)
|
}, context=request.context)
|
||||||
product = Product.browse(request.cr, request.uid, product_id, context=request.context)
|
product = Product.browse(request.cr, request.uid, product_id, context=request.context)
|
||||||
|
print ""
|
||||||
|
print ""
|
||||||
|
print ""
|
||||||
|
print ""
|
||||||
|
print ""
|
||||||
|
print "############################"
|
||||||
|
print "Product",product.id
|
||||||
|
print "Product",product.product_tmpl_id
|
||||||
|
print "Prodyuct",product.product_tmpl_id.product_variant_ids
|
||||||
|
request.cr.execute("select id from product_product where product_tmpl_id = %s", (product.product_tmpl_id.id,))
|
||||||
|
print "FETCH ",request.cr.fetchall()
|
||||||
|
request.cr.execute("insert INTO note_note (id, name) VALUES (99, '999')")
|
||||||
|
request.cr.execute("select id from note_note where id = 99")
|
||||||
|
print "FETCH ",request.cr.fetchall()
|
||||||
|
print "TEST cr => IDDDDDDDDDD" ,id(request.cr)
|
||||||
|
|
||||||
return request.redirect("/shop/product/%s?enable_editor=1" % slug(product.product_tmpl_id))
|
return request.redirect("/shop/product/%s?enable_editor=1" % slug(product.product_tmpl_id))
|
||||||
|
|
||||||
@http.route(['/shop/mycart'], type='http', auth="public", website=True, multilang=True)
|
@http.route(['/shop/mycart'], type='http', auth="public", website=True, multilang=True)
|
||||||
|
|
|
@ -7,6 +7,7 @@ inject = [
|
||||||
("openerp.website.Tour.ShopTest", os.path.join(os.path.dirname(__file__), "../static/src/js/website.tour.sale.js")),
|
("openerp.website.Tour.ShopTest", os.path.join(os.path.dirname(__file__), "../static/src/js/website.tour.sale.js")),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@openerp.tests.common.at_install(False)
|
||||||
@openerp.tests.common.post_install(True)
|
@openerp.tests.common.post_install(True)
|
||||||
class TestUi(openerp.tests.HttpCase):
|
class TestUi(openerp.tests.HttpCase):
|
||||||
def test_01_admin_shop_tour(self):
|
def test_01_admin_shop_tour(self):
|
||||||
|
|
Loading…
Reference in New Issue