I want to inherit from
t-name="point_of_sale.PaymentScreenButtons"
<button class="button partner-button btn btn-light py-3 text-start rounded-0 border-bottom"
t-att-class="{ 'highlight text-bg-primary': currentOrder.get_partner() }"
t-on-click="() => this.selectPartner(false, [])">
<i class="fa fa-user me-2" role="img" title="Customer" />
<span class="partner-name">
<t t-if="currentOrder.get_partner()" t-esc="currentOrder.get_partner().name"/>
<t t-else="">Customer</t>
</span>
</button>
and i want to add rfid_balance field from my custom res.partner module
here is my attempt to inherit the view and js
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<templates id="mq_canteen_template" xml:space="preserve">
<t t-name="mq_canteen_pos_order.MQPaymentScreenExtension"
t-inherit="point_of_sale.PaymentScreenButtons" t-inherit-mode="extension" owl="1">
<xpath expr="//div[@class='payment-buttons d-flex flex-column flex-wrap']" position="inside">
<div class="rfid-balance py-2 px-3 text-end text-muted">
<span>RFID Balance:</span>
<span t-esc="currentOrder.get_partner() ? currentOrder.get_partner().rfid_balance : 'N/A'" />
</div>
</xpath>
</t>
</templates>
</odoo>
/** @odoo-module **/
import { PaymentScreen } from "../../../../../../../../odoo/addons/point_of_sale/static/src/app/screens/payment_screen/payment_screen";
import { patch } from "@web/core/utils/patch";
// Patch the PaymentScreen component
patch(PaymentScreen.prototype, "mq_canteen_pos_order.PaymentScreen", {
getPartnerRFIDBalance() {
const partner = this.currentOrder.get_partner();
return partner ? partner.rfid_balance : "N/A";
},
});
and i got this error from debug console
2024-12-09 13:04:17,400 16192 WARNING mq_test17 odoo.addons.web.controllers.binary: Parsing asset bundle point_of_sale.assets_prod.min.js has failed: Template name is missing in file '/mq_canteen_pos_order/static/src/xml/payment_screen/payment_screen.xml'.