Skip to content

Commit 2a7f444

Browse files
committed
[IMP]website_sale_ux: internal reference in shop
closes #394 Signed-off-by: augusto-weiss <awe@adhoc.com.ar>
1 parent 6646ccb commit 2a7f444

3 files changed

Lines changed: 34 additions & 1 deletion

File tree

website_sale_ux/__manifest__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
{
2121
"name": "Website Sale UX",
2222
"category": "base.module_category_knowledge_management",
23-
"version": "18.0.2.0.0",
23+
"version": "18.0.2.1.0",
2424
"author": "ADHOC SA",
2525
"website": "www.adhoc.com.ar",
2626
"license": "AGPL-3",
@@ -35,6 +35,7 @@
3535
"views/res_config_settings_views.xml",
3636
"views/products.xml",
3737
"views/ecommerce_fields.xml",
38+
"views/view_mega_menu_backend_editor.xml",
3839
],
3940
"installable": True,
4041
}

website_sale_ux/views/products.xml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,23 @@
99
</xpath>
1010
</field>
1111
</record>
12+
<record model="ir.ui.view" id="products_item">
13+
<field name="name">website.sale.ux.products</field>
14+
<field name="inherit_id" ref="website_sale.products_item"/>
15+
<field name="arch" type="xml">
16+
<xpath expr="//div[hasclass('o_wsale_product_sub')]" position="before">
17+
<t t-if="any([product[field.name] for field in website.shop_extra_field_ids])">
18+
<p class="text-muted small">
19+
<t t-foreach="website.shop_extra_field_ids" t-as="field" t-if="product[field.name]">
20+
<t t-if="field.name == 'default_code'">
21+
<span>Ref. interna: </span><span t-esc='product[field.name]'/>
22+
</t>
23+
</t>
24+
</p>
25+
</t>
26+
</xpath>
27+
</field>
28+
</record>
1229
<record model="ir.ui.view" id="products_mobile">
1330
<field name="name">website.sale.ux.products.mobile</field>
1431
<field name="inherit_id" ref="website_sale.o_wsale_offcanvas"/>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<odoo>
3+
<record model="ir.ui.view" id="view_mega_menu_backend_editor">
4+
<field name="name">mega.menu.backend.editor</field>
5+
<field name="model">website.menu</field>
6+
<field name="inherit_id" ref="website.website_menus_form_view"/>
7+
<field name="arch" type="xml">
8+
<field name="child_id" position="after">
9+
<group>
10+
<field name="mega_menu_content" widget="ace" invisible="not is_mega_menu"/>
11+
</group>
12+
</field>
13+
</field>
14+
</record>
15+
</odoo>

0 commit comments

Comments
 (0)