summaryrefslogtreecommitdiff
path: root/addons/website_sale/data
diff options
context:
space:
mode:
authorSamuel Degueldre <sad@odoo.com>2020-03-11 07:36:03 +0000
committerSamuel Degueldre <sad@odoo.com>2020-06-10 11:44:33 +0000
commitc058f19bfa33b510addfed314aa27d7e5c7fdb18 (patch)
treedc27563d414038ff848da560bf481de01d2aaa2e /addons/website_sale/data
parent016ed1a00f7a098ad8423235c82cee083bfa7e4d (diff)
[IMP] website_sale: let users create and edit custom product ribbons
Previously, there was only one static "Sale" ribbon. Users might want to have many types of ribbons, for different levels of sales, or to indicate that a product is sold out. This commit lets the user create custom ribbons and use them on prodcuts on the shop page. Additionally, setting a ribbon on a product used to require a reload, this is no longer the case. All ribbon modifications are stored in a cache and the RPCs to put them into effect are only done on save. task-1981170 Part of odoo/odoo#47574 Related: odoo/upgrade#1079 Related: odoo/design-themes#219 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Diffstat (limited to 'addons/website_sale/data')
-rw-r--r--addons/website_sale/data/data.xml16
1 files changed, 13 insertions, 3 deletions
diff --git a/addons/website_sale/data/data.xml b/addons/website_sale/data/data.xml
index e110dd493e6..c2fddedad54 100644
--- a/addons/website_sale/data/data.xml
+++ b/addons/website_sale/data/data.xml
@@ -18,9 +18,19 @@
<field name="state">open</field>
</record>
- <record id="website_sale.image_promo" model="product.style">
- <field name="name">Sale Ribbon</field>
- <field name="html_class">oe_ribbon_promo</field>
+ <record id="website_sale.sale_ribbon" model="product.ribbon">
+ <field name="html">Sale</field>
+ <field name="html_class">bg-success o_ribbon_left</field>
+ </record>
+
+ <record id="website_sale.sold_out_ribbon" model="product.ribbon">
+ <field name="html">Sold out</field>
+ <field name="html_class">bg-danger o_ribbon_left</field>
+ </record>
+
+ <record id="website_sale.new_ribbon" model="product.ribbon">
+ <field name="html">New!</field>
+ <field name="html_class">bg-primary o_ribbon_left</field>
</record>
<record id="sales_team.salesteam_website_sales" model="crm.team">