Merge pull request #287 from odoo-dev/saas-5-fix-website_sale-accessory-chm
[FIX] website_sale: display accessory field in form view and display the good accessory product inside ecommerce
This commit is contained in:
commit
67bff17ecb
|
@ -114,7 +114,7 @@ class sale_order(osv.Model):
|
|||
s = set(j.id for l in (order.website_order_line or []) for j in (l.product_id.accessory_product_ids or []))
|
||||
s -= set(l.product_id.id for l in order.order_line)
|
||||
product_ids = random.sample(s, min(len(s),3))
|
||||
return self.pool['product.template'].browse(cr, uid, product_ids, context=context)
|
||||
return self.pool['product.product'].browse(cr, uid, product_ids, context=context)
|
||||
|
||||
class website(orm.Model):
|
||||
_inherit = 'website'
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
},
|
||||
{
|
||||
title: "finish",
|
||||
waitFor: 'label:contains(32 Go) input',
|
||||
waitFor: 'form[action="/shop/cart/update"] label:contains(32 Go) input',
|
||||
}
|
||||
]
|
||||
});
|
||||
|
|
|
@ -727,14 +727,14 @@
|
|||
<tr t-foreach="suggested_products" t-as="product">
|
||||
|
||||
<td>
|
||||
<a t-attf-href="/shop/product/#{ slug(product) }">
|
||||
<a t-attf-href="/shop/product/#{ slug(product.product_tmpl_id) }">
|
||||
<span t-field="product.image_small"
|
||||
t-field-options='{"widget": "image", "class": "img-rounded"}'/>
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<a t-attf-href="/shop/product/#{ slug(product) }">
|
||||
<a t-attf-href="/shop/product/#{ slug(product.product_tmpl_id) }">
|
||||
<strong t-field="product.name"/>
|
||||
</a>
|
||||
</div>
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
<field name="public_categ_ids" widget="many2many_tags"/>
|
||||
<field name="website_published" class="pull-right" widget="website_button"/>
|
||||
<field name="alternative_product_ids" widget="many2many_tags"/>
|
||||
<field name="accessory_product_ids" widget="many2many_tags"/>
|
||||
<field name="website_style_ids" widget="many2many_tags"/>
|
||||
<field name="website_sequence"/>
|
||||
</group>
|
||||
|
|
Loading…
Reference in New Issue