Skip to content
Snippets Groups Projects
Commit 69b503f9 authored by Romain Estievenart's avatar Romain Estievenart
Browse files

[FIX] sale_management: add missing view on sale_order_option_ids field


We added the form view to remove no needed fields.
It's now use the same fields used by the editable list.
We also added the Kanban view to improve the layout "Optionnal Product"
tabs on mobile device.

Task: 1945006

closes odoo/odoo#31596

Signed-off-by: default avatar=?utf-8?q?Adrien_Dieudonn=C3=A9_=28adr=29?= <adr@odoo.com>
parent df7fcfb3
No related branches found
No related tags found
No related merge requests found
......@@ -8,7 +8,58 @@
<xpath expr="//page/field[@name='order_line']/.." position="after">
<page string="Optional Products" name="optional_products">
<field name="sale_order_option_ids">
<field name="sale_order_option_ids" mode="tree,form,kanban">
<form string="Optional Products">
<group>
<field name="product_id"/>
<field name="name"/>
<field name="quantity"/>
<field name="uom_id" groups="uom.group_uom"/>
<field name="price_unit"/>
<field name="discount" groups="sale.group_discount_per_so_line"/>
</group>
</form>
<kanban class="o_kanban_mobile">
<field name="product_id"/>
<field name="quantity"/>
<field name="uom_id" groups="uom.group_uom"/>
<field name="price_unit"/>
<templates>
<t t-name="kanban-box">
<div class="oe_kanban_card oe_kanban_global_click">
<div class="row">
<div class="col-10">
<strong>
<span>
<t t-esc="record.product_id.value"/>
</span>
</strong>
</div>
<div class="col-2">
<button name="button_add_to_order" class="btn btn-link oe_link fa fa-shopping-cart" string="Add to order lines" type="object"/>
</div>
</div>
<div class="row">
<div class="col-12 text-muted">
<span>
Quantity:
<t t-esc="record.quantity.value"/>
<t t-esc="record.uom_id.value"/>
</span>
</div>
</div>
<div class="row">
<div class="col-12 text-muted">
<span>
Unit Price:
<t t-esc="record.price_unit.value"/>
</span>
</div>
</div>
</div>
</t>
</templates>
</kanban>
<tree string="Sales Quotation Template Lines" editable="bottom">
<control>
<create name="add_product_control" string="Add a product"/>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment