Hi Friend,
Am a novice in odoo.
1. I created a field call margin on Pos.order.line to store compute selling price less cost price.
I would like to add margin column on report_salesdetails.xml ( under point of sale/view).
Below is the exerpt of it(ODOO 11).
Below is the exerpt of it(ODOO 11).
<!-- Orderlines -->
<h3>Products</h3>
<table class="table table-condensed">
<thead><tr>
<th>Product</th>
<th>Quantity</th>
<th>Price Unit</th>
<th>Margin</th> <----- i added this column header
</tr></thead>
<tbody>
<tr t-foreach='products' t-as='line'> <----i dont where to find this so as to see its fields
<t t-set="internal_reference" t-value="line['code'] and '[%s] ' % line['code'] or ''" />
<td><t t-esc="internal_reference" /><t t-esc="line['product_name']" /></td>
<td>
<t t-esc="line['quantity']" />
<t t-if='line["uom"] != "Unit(s)"'>
<t t-esc='line["uom"]' />
</t>
</td>
<td>
<t t-esc='line["price_unit"]' />
<t t-if='line["discount"] != 0'>
Disc: <t t-esc='line["discount"]' />%
</t>
</td>
<td>
<t t-esc="line['margin']" /> <---- i added this to print the data. i have verify the existence of this field in setting/database structure/ model/lines of point of sale Orders. But got an error.
</td>
Hope you can enligthen me on this.
regards,
Gain Charlie
Odoo User