[IMP] website_sale: change css and demo data
bzr revid: chm@openerp.com-20130924152639-v6hr0laatjcbxe39
This commit is contained in:
@@ -311,7 +311,8 @@ FaceTime HD Camera, 1.2 MP Photos</field>
|
||||
<field name="uom_id" ref="product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
</record>
|
||||
<record id="product_product_11" model="product.product">
|
||||
|
||||
<record id="product_product_11_temp" model="product.template">
|
||||
<field name="name">iPod</field>
|
||||
<field name="default_code">M-Las</field>
|
||||
<field name="categ_id" ref="product_category_8"/>
|
||||
@@ -322,6 +323,24 @@ FaceTime HD Camera, 1.2 MP Photos</field>
|
||||
<field name="uom_id" ref="product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
</record>
|
||||
<record id="product_product_11" model="product.product">
|
||||
<field name="name">iPod</field>
|
||||
<field name="default_code">M-Las</field>
|
||||
<field name="categ_id" ref="product_category_8"/>
|
||||
<field name="public_categ_id" ref="Keyboard_Mouse"/>
|
||||
<field name="standard_price">14</field>
|
||||
<field name="list_price">16.50</field>
|
||||
<field name="type">consu</field>
|
||||
<field name="uom_id" ref="product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
<field name="product_tmpl_id" ref="product_product_11_temp"/>
|
||||
</record>
|
||||
<record id="product_product_11_b" model="product.product">
|
||||
<field name="variants">32 Gb</field>
|
||||
<field name="price_extra">12</field>
|
||||
<field name="product_tmpl_id" ref="product_product_11_temp"/>
|
||||
</record>
|
||||
|
||||
<record id="product_product_12" model="product.product">
|
||||
<field name="name">Mouse, Wireless</field>
|
||||
<field name="default_code">M-Wir</field>
|
||||
@@ -1023,12 +1042,12 @@ QWERTY keyboard</field>
|
||||
<field name="min_qty">1</field>
|
||||
</record>
|
||||
|
||||
<record id="product_supplierinfo_38" model="product.supplierinfo">
|
||||
<!--record id="product_supplierinfo_38" model="product.supplierinfo">
|
||||
<field name="product_id" ref="product_product_48"/>
|
||||
<field name="name" ref="base.res_partner_8"/>
|
||||
<field name="delay">7</field>
|
||||
<field name="min_qty">1</field>
|
||||
</record>
|
||||
</record-->
|
||||
|
||||
<record id="product_supplierinfo_39" model="product.supplierinfo">
|
||||
<field name="product_id" ref="product_product_18"/>
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -88,4 +88,5 @@ class product_product(osv.Model):
|
||||
}
|
||||
|
||||
def img(self, cr, uid, ids, field='image_small', context=None):
|
||||
return "/website/image?model=%s&field=%s&id=%s" % (self._name, field, ids[0])
|
||||
temp_id = self.browse(cr, uid, ids[0], context=context).product_tmpl_id.id
|
||||
return "/website/image?model=product.template&field=%s&id=%s" % (field, temp_id)
|
||||
|
||||
@@ -1,5 +1,19 @@
|
||||
@charset "utf-8";
|
||||
/* ---- Default Styles Description ---- */
|
||||
.oe_product_image {
|
||||
position: absolute;
|
||||
}
|
||||
.oe_product_image img {
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
margin: auto;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.oe_product .oe_product_image {
|
||||
position: absolute;
|
||||
left: 15px;
|
||||
@@ -72,16 +86,16 @@
|
||||
|
||||
/* ---- Product Sizes ---- */
|
||||
.col-md-12 .oe-height-1 {
|
||||
height: 170px;
|
||||
height: 125px;
|
||||
}
|
||||
.col-md-12 .oe-height-2 {
|
||||
height: 255px;
|
||||
height: 250px;
|
||||
}
|
||||
.col-md-12 .oe-height-3 {
|
||||
height: 340px;
|
||||
height: 375px;
|
||||
}
|
||||
.col-md-12 .oe-height-4 {
|
||||
height: 510px;
|
||||
height: 499.9px;
|
||||
}
|
||||
|
||||
.col-md-9 .oe-height-1 {
|
||||
@@ -98,22 +112,33 @@
|
||||
}
|
||||
|
||||
/* ---- Product list style ---- */
|
||||
.oe_products {
|
||||
.oe_list_products {
|
||||
border: 1px solid rgba(100, 100, 100, 0.2);
|
||||
max-width: 100%;
|
||||
max-height: 140px;
|
||||
}
|
||||
.oe_products .oe_product_image {
|
||||
.oe_list_products .oe_product_image {
|
||||
position: absolute;
|
||||
left: 15px;
|
||||
right: 15px;
|
||||
top: 15px;
|
||||
bottom: 50px;
|
||||
width: 200px;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
width: 150px;
|
||||
}
|
||||
.oe_products .oe_product_description {
|
||||
.oe_list_products .oe_product_image img {
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
margin: auto;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
}
|
||||
.oe_list_products .oe_product_description {
|
||||
bottom: 0;
|
||||
position: absolute;
|
||||
left: 240px;
|
||||
right: 240px;
|
||||
left: 180px;
|
||||
right: 0;
|
||||
border-top: 1px solid #dddddd;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,19 @@
|
||||
@charset "utf-8"
|
||||
|
||||
/* ---- Default Styles Description ---- */
|
||||
|
||||
.oe_product_image
|
||||
position: absolute
|
||||
img
|
||||
max-width: 100%
|
||||
max-height: 100%
|
||||
margin: auto
|
||||
position: absolute
|
||||
top: 0
|
||||
left: 0
|
||||
bottom: 0
|
||||
right: 0
|
||||
|
||||
.oe_product
|
||||
.oe_product_image
|
||||
position: absolute
|
||||
@@ -74,13 +87,13 @@
|
||||
|
||||
.col-md-12
|
||||
.oe-height-1
|
||||
height: 170px
|
||||
height: 125px
|
||||
.oe-height-2
|
||||
height: 255px
|
||||
height: 250px
|
||||
.oe-height-3
|
||||
height: 340px
|
||||
height: 375px
|
||||
.oe-height-4
|
||||
height: 510px
|
||||
height: 499.9px
|
||||
.col-md-9
|
||||
.oe-height-1
|
||||
height: 95px
|
||||
@@ -93,19 +106,29 @@
|
||||
|
||||
|
||||
/* ---- Product list style ---- */
|
||||
.oe_products
|
||||
.oe_list_products
|
||||
border: 1px solid rgba(100, 100, 100, 0.2)
|
||||
max-width: 100%
|
||||
max-height: 140px
|
||||
.oe_product_image
|
||||
position: absolute
|
||||
left: 15px
|
||||
right: 15px
|
||||
top: 15px
|
||||
bottom: 50px
|
||||
width: 200px
|
||||
top: 0
|
||||
bottom: 0
|
||||
width: 150px
|
||||
img
|
||||
max-width: 100%
|
||||
max-height: 100%
|
||||
margin: auto
|
||||
position: absolute
|
||||
top: 0
|
||||
left: 0
|
||||
bottom: 0
|
||||
right: 0
|
||||
.oe_product_description
|
||||
bottom: 0
|
||||
position: absolute
|
||||
left: 240px
|
||||
right: 240px
|
||||
left: 180px
|
||||
right: 0
|
||||
border-top: 1px solid #dddddd
|
||||
|
||||
@@ -113,7 +113,7 @@
|
||||
<div class='row style_default'>
|
||||
<div class="col-md-12" id="products_grid">
|
||||
<t t-foreach="products" t-as="product">
|
||||
<div t-attf-class="col-md-#{ search and 3 or product.website_sizex } oe_product oe-height-#{ search and 2 or product.website_sizey } #{ product.website_product_class}" t-att-data-publish="product.website_published and 'on' or 'off'" id="products_layout">
|
||||
<div t-attf-class="col-md-#{ search and 3 or product.website_sizex } oe_product oe-height-#{ search and 2 or product.website_sizey } #{ product.website_product_class}" t-att-data-publish="product.website_published and 'on' or 'off'" data-name="products_layout">
|
||||
|
||||
<div class="oe_product_description">
|
||||
<a t-attf-href="/shop/product/#{ product.id }/?#{ search and ('search=%s' % search) or ''}#{ category_id and ('&category_id=%s' % category_id) or ''}">
|
||||
@@ -178,10 +178,9 @@
|
||||
<!-- List view of products -->
|
||||
|
||||
<template id="list_view" inherit_option_id="website_sale.products" name="List View">
|
||||
<xpath expr="//div[@id='products_layout']" position="attributes">
|
||||
<attribute name="class">col-md-12 oe_products oe-height-1</attribute>
|
||||
<xpath expr="//div[@data-name='products_layout']" position="attributes">
|
||||
<attribute name="class">col-md-12 oe_list_products oe-height-1</attribute>
|
||||
</xpath>
|
||||
|
||||
</template>
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user