[IMP] hr: convert field WorkPermitUpload
This commit rewrites WorkPermitUploadField using the new framework. closes odoo/odoo#96783 Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { registry } from "@web/core/registry";
|
||||
import { BinaryField } from "@web/views/fields/binary/binary_field";
|
||||
|
||||
export class WorkPermitUploadField extends BinaryField {}
|
||||
WorkPermitUploadField.template = "hr.WorkPermitUploadField";
|
||||
|
||||
registry.category("fields").add("work_permit_upload", WorkPermitUploadField);
|
||||
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<templates id="template" xml:space="preserve">
|
||||
|
||||
<t t-name="hr.WorkPermitUploadField" t-inherit="web.BinaryField" t-inherit-mode="primary" owl="1">
|
||||
<xpath expr="//label[hasclass('o_select_file_button')]" position="attributes">
|
||||
<attribute name="class" remove="btn-primary" add="btn-secondary" separator=" " />
|
||||
</xpath>
|
||||
</t>
|
||||
|
||||
</templates>
|
||||
Reference in New Issue
Block a user