hey guys! I have a problem inheriting owl template and an qweb from 'mrp_workorder' module in my custom module...
this is my code:
import { registry } from "@web/core/registry";
import { MrpDisplayRecord } from "@mrp_workorder/mrp_display/mrp_display_record";
export class MrpDisplayRecordInherited extends MrpDisplayRecord {
// New Inherit template
static template = "mrp_workorder.MrpDisplayRecordInherited";
setup() {
// call original setup
super.setup();
// New field
const numOt = this.props.production?.data?.num_ot || null;
this.numOt = numOt;
console.log("numero de ot:", numOt);
}}
// registry
registry.category("components").add("mrp_display_record", MrpDisplayRecordInherited);
num_ot is the field I need to add... so it can be shown in the qweb
this is the original one...
< templates xml:space="preserve">
< t t-name="mrp_workorder.MrpDisplayRecordInherited">
< t t-call="mrp_workorder.MrpDisplayRecord"/>
HERE SHOULD GO NEW DIV
< /t>
< /t>
< /templates>
but nothing happenss....
please guys is someone knows something I will be really grateful for the help!