0
1 答案
0
最佳答案
Make a custom view that overrides how the default view works:
Thee lines in BOLD UNDERLINE are what were added, these are the magic pieces!
<td t-att-colspan="td_product['x'] != 1 and td_product['x']" position="replace">
<t t-set="combination_info" t-value="product._get_combination_info(only_template=True, add_qty=add_qty or 1, pricelist=pricelist)"/>
<t t-if="combination_info['price'] and combination_info['price'] > 0">
<td t-att-colspan="td_product['x'] != 1 and td_product['x']"
t-att-rowspan="td_product['y'] != 1 and td_product['y']"
t-attf-class="oe_product #{td_product['class']}">
<div t-attf-class="o_wsale_product_grid_wrapper o_wsale_product_grid_wrapper_#{td_product['x']}_#{td_product['y']}">
<t t-call="website_sale.products_item">
<t t-set="product_image_big" t-value="td_product['x'] + td_product['y'] > 2"/>
</t>
</div>
</td>
</t>
</td>
Then you get this: