[REF] web: 'web.Field' template

X-original-commit: 60c7b65f7f8efd5209b9fb0166a69035fb92e911
Part-of: odoo/odoo#102153
This commit is contained in:
Mathieu Duckerts-Antoine
2022-10-04 20:57:58 +02:00
committed by Lucas Perais
parent 36385e736d
commit d21634c394
2 changed files with 11 additions and 4 deletions
+1 -4
View File
@@ -196,10 +196,7 @@ export class Field extends Component {
return false;
}
}
Field.template = xml/* xml */ `
<div t-att-name="props.name" t-att-class="classNames" t-att-style="props.style" t-att-data-tooltip-template="tooltip and 'web.FieldTooltip'" t-att-data-tooltip-info="tooltip">
<t t-component="FieldComponent" t-props="fieldComponentProps"/>
</div>`;
Field.template = "web.Field";
Field.parseFieldNode = function (node, models, modelName, viewType, jsClass) {
const name = node.getAttribute("name");
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<templates xml:space="preserve">
<t t-name="web.Field" owl="1">
<div t-att-name="props.name" t-att-class="classNames" t-att-style="props.style" t-att-data-tooltip-template="tooltip and 'web.FieldTooltip'" t-att-data-tooltip-info="tooltip">
<t t-component="FieldComponent" t-props="fieldComponentProps"/>
</div>
</t>
</templates>