changes
This commit is contained in:
BIN
fusion_inventory/static/description/icon.png
Normal file
BIN
fusion_inventory/static/description/icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 65 KiB |
17
fusion_inventory/static/src/js/margin_widget.js
Normal file
17
fusion_inventory/static/src/js/margin_widget.js
Normal file
@@ -0,0 +1,17 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { registry } from "@web/core/registry";
|
||||
import { FloatField, floatField } from "@web/views/fields/float/float_field";
|
||||
|
||||
export class MarginPercentField extends FloatField {
|
||||
static template = "fusion_inventory.MarginPercentField";
|
||||
}
|
||||
|
||||
export const marginPercentField = {
|
||||
...floatField,
|
||||
component: MarginPercentField,
|
||||
displayName: "Margin %",
|
||||
supportedTypes: ["float"],
|
||||
};
|
||||
|
||||
registry.category("fields").add("fi_margin_pct", marginPercentField);
|
||||
10
fusion_inventory/static/src/xml/margin_widget.xml
Normal file
10
fusion_inventory/static/src/xml/margin_widget.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<templates xml:space="preserve">
|
||||
|
||||
<t t-name="fusion_inventory.MarginPercentField" t-inherit="web.FloatField" t-inherit-mode="extension">
|
||||
<xpath expr="//span[hasclass('o_field_float')]" position="after">
|
||||
<span class="ms-1 text-muted fw-normal">%</span>
|
||||
</xpath>
|
||||
</t>
|
||||
|
||||
</templates>
|
||||
Reference in New Issue
Block a user