<?xml version="1.0" encoding="UTF-8"?>
<templates xml:space="preserve">
<t t-name="odoometer_price_extn.Orderline"
t-inherit="point_of_sale.OrderReceiptLine"
t-inherit-mode="extension"
owl="1">
<xpath expr="//li[hasclass('orderline')]"
position="inside">
<!-- Add MRP display inside the order line -->
<div class="price-per-unit"
style="font-size:10px; color:#666; margin-top:2px;">
<span style="text-decoration:line-through;">
<t t-esc="props.line.mrp"/>
</span>
<span style="margin:0 4px;">→</span>
<span style="font-weight:bold;">
<t t-esc="props.line.price"/>
</span>
<span>/unit</span>
</div>
</xpath>
</t>
</templates>
/** @odoo-module **/
import { patch } from "@web/core/utils/patch";
import { Orderline } from "@point_of_sale/app/store/models";
patch(Orderline.prototype, {
getDisplayData() {
const result = super.getDisplayData(...arguments);
// Add MRP to the display data
result.mrp = this.product.mrp || 0;
return result;
},
});
from odoo import api, models
class ProductProduct(models.Model):
_inherit = 'product.product'
@api.depends('name', 'mrp')
def _compute_display_name(self):
for product in self:
mrp = product.mrp or ''
name = product.name or ''
if mrp:
product.display_name = f"[{mrp}] {name}"
else:
product.display_name = name
def _load_pos_data_fields(self, config_id):
fields = super()._load_pos_data_fields(config_id)
fields.append('mrp')
return fields
{
'name': 'Odoo Meter Price Customizations',
'version': '1.0',
'depends': ['base', 'product', 'account', 'stock_account', 'tradelite_common', 'zl_thermal_invoice_print','point_of_sale'],
'data': [
'views/account_move_view.xml',
'views/product_template_view.xml',
'views/product_product_view.xml',
'report/thermal_invoice_template.xml',
],
'assets': {
'point_of_sale._assets_pos': [
'odoometer_price_extn/static/src/xml/pos_receipt.xml',
'odoometer_price_extn/static/src/js/pos_orderline.js',
],
},
'installable': True,
'application': False,
'auto_install': False,
}i want replace unitprice/unit by my custom mrp field.
Thanks in advance.




I've tested in my Odoo 19 DB and after that I pasted the code here.
May be the issue is in your import statement.Replace with below
import { Orderline } from "@point_of_sale/app/components/orderline/orderline";
maybe database issue,i will recheck after creting new db,thankyou for your support.
thankyou it worked after replacing import statment ,but i need one modification,i want list_price(like mrp:60 @list_price)
It is already displaying list_price but with tax included.