mirror of
https://github.com/bringout/oca-technical.git
synced 2026-04-20 19:52:00 +02:00
Initial commit: OCA Technical packages (595 packages)
This commit is contained in:
commit
2cc02aac6e
24950 changed files with 2318079 additions and 0 deletions
|
|
@ -0,0 +1,29 @@
|
|||
/** @odoo-module **/
|
||||
|
||||
import {BomOverviewComponent} from "@mrp/components/bom_overview/mrp_bom_overview";
|
||||
import {patch} from "@web/core/utils/patch";
|
||||
|
||||
patch(BomOverviewComponent.prototype, "ddmrp", {
|
||||
setup() {
|
||||
this._super.apply();
|
||||
this.state.showOptions.is_buffered = true;
|
||||
this.state.showOptions.dlt = true;
|
||||
},
|
||||
|
||||
async getWarehouses() {
|
||||
await this._super.apply();
|
||||
if (this.props.action.context.warehouse_id) {
|
||||
this.state.currentWarehouse = this.warehouses.filter(
|
||||
(warehouse) => warehouse.id === this.props.action.context.warehouse_id
|
||||
)[0];
|
||||
}
|
||||
},
|
||||
|
||||
getReportName() {
|
||||
return (
|
||||
this._super.apply(this, arguments) +
|
||||
"&show_buffered=" +
|
||||
this.state.showOptions.is_buffered
|
||||
);
|
||||
},
|
||||
});
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
/** @odoo-module **/
|
||||
|
||||
import {BomOverviewDisplayFilter} from "@mrp/components/bom_overview_display_filter/mrp_bom_overview_display_filter";
|
||||
import {patch} from "@web/core/utils/patch";
|
||||
|
||||
patch(BomOverviewDisplayFilter.prototype, "ddmrp", {
|
||||
setup() {
|
||||
this._super.apply();
|
||||
this.displayOptions.is_buffered = this.env._t("Buffered");
|
||||
},
|
||||
});
|
||||
|
||||
patch(BomOverviewDisplayFilter, "ddmrp", {
|
||||
props: {
|
||||
...BomOverviewDisplayFilter.props,
|
||||
showOptions: {
|
||||
...BomOverviewDisplayFilter.showOptions,
|
||||
is_buffered: Boolean,
|
||||
},
|
||||
},
|
||||
});
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
/** @odoo-module **/
|
||||
|
||||
import {BomOverviewLine} from "@mrp/components/bom_overview_line/mrp_bom_overview_line";
|
||||
import {patch} from "@web/core/utils/patch";
|
||||
|
||||
patch(BomOverviewLine, "ddmrp", {
|
||||
props: {
|
||||
...BomOverviewLine.props,
|
||||
showOptions: {
|
||||
...BomOverviewLine.showOptions,
|
||||
is_buffered: Boolean,
|
||||
},
|
||||
},
|
||||
});
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<templates xml:space="preserve">
|
||||
|
||||
<t
|
||||
t-name="ddmrp.BomOverviewLine"
|
||||
t-inherit="mrp.BomOverviewLine"
|
||||
t-inherit-mode="extension"
|
||||
owl="1"
|
||||
>
|
||||
<xpath expr="//td[@name='td_mrp_bom']" position="before">
|
||||
<td
|
||||
t-if="props.showOptions.is_buffered and data.is_buffered"
|
||||
class="text-center"
|
||||
>
|
||||
<span>
|
||||
<img
|
||||
src='/ddmrp/static/img/is_buffered.png'
|
||||
style="width:30px;height:30px;padding:5px"
|
||||
/>
|
||||
</span>
|
||||
</td>
|
||||
<td t-if="props.showOptions.is_buffered and !data.is_buffered" />
|
||||
</xpath>
|
||||
<xpath expr="//td[@t-if='showLeadTimes']" position="after">
|
||||
<td t-if="showLeadTimes" class="text-end">
|
||||
<t
|
||||
t-esc="data.dlt"
|
||||
t-options='{"widget": "float", "decimal_precision": "Lead Time"}'
|
||||
/> Days
|
||||
</td>
|
||||
</xpath>
|
||||
</t>
|
||||
|
||||
</templates>
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
/** @odoo-module **/
|
||||
|
||||
import {BomOverviewSpecialLine} from "@mrp/components/bom_overview_special_line/mrp_bom_overview_special_line";
|
||||
import {patch} from "@web/core/utils/patch";
|
||||
|
||||
patch(BomOverviewSpecialLine, "ddmrp", {
|
||||
props: {
|
||||
...BomOverviewSpecialLine.props,
|
||||
showOptions: {
|
||||
...BomOverviewSpecialLine.showOptions,
|
||||
is_buffered: Boolean,
|
||||
},
|
||||
},
|
||||
});
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<templates xml:space="preserve">
|
||||
|
||||
<t
|
||||
t-name="ddmrp.BomOverviewSpecialLine"
|
||||
t-inherit="mrp.BomOverviewSpecialLine"
|
||||
t-inherit-mode="extension"
|
||||
owl="1"
|
||||
>
|
||||
<xpath expr="//td[@name='td_mrp_bom']" position="before">
|
||||
<td t-if="showBuffered" />
|
||||
</xpath>
|
||||
<xpath expr="//td[@t-if='showLeadTimes']" position="after">
|
||||
<td t-if="showLeadTimes" />
|
||||
</xpath>
|
||||
</t>
|
||||
|
||||
</templates>
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
/** @odoo-module **/
|
||||
|
||||
import {BomOverviewTable} from "@mrp/components/bom_overview_table/mrp_bom_overview_table";
|
||||
import {patch} from "@web/core/utils/patch";
|
||||
|
||||
patch(BomOverviewTable.prototype, "ddmrp", {
|
||||
// ---- Getters ----
|
||||
|
||||
get showBuffered() {
|
||||
return this.props.showOptions.is_buffered;
|
||||
},
|
||||
});
|
||||
|
||||
patch(BomOverviewTable, "ddmrp", {
|
||||
props: {
|
||||
...BomOverviewTable.props,
|
||||
showOptions: {
|
||||
...BomOverviewTable.showOptions,
|
||||
is_buffered: Boolean,
|
||||
},
|
||||
},
|
||||
});
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<templates xml:space="preserve">
|
||||
|
||||
<t
|
||||
t-name="ddmrp.BomOverviewTable"
|
||||
t-inherit="mrp.BomOverviewTable"
|
||||
t-inherit-mode="extension"
|
||||
owl="1"
|
||||
>
|
||||
<xpath expr="//th[@name='th_mrp_bom_h']" position="before">
|
||||
<th t-if="showBuffered" class="text-center">Buffered</th>
|
||||
</xpath>
|
||||
<xpath expr="//thead/tr/th[@t-if='showLeadTimes']" position="after">
|
||||
<th
|
||||
t-if="showLeadTimes"
|
||||
class="text-end"
|
||||
title="Decoupled Lead Time of the BoM."
|
||||
>DLT</th>
|
||||
</xpath>
|
||||
|
||||
<xpath expr="//td[@name='td_mrp_bom_f']" position="before">
|
||||
<td t-if="showBuffered" />
|
||||
</xpath>
|
||||
<xpath expr="//tfoot/tr/td[@t-if='showLeadTimes']" position="after">
|
||||
<td t-if="showLeadTimes" />
|
||||
</xpath>
|
||||
|
||||
<xpath expr="//td[@name='td_mrp_bom_b']" position="before">
|
||||
<td t-if="showBuffered" />
|
||||
</xpath>
|
||||
<xpath expr="//tfoot/t/tr/td[@t-if='showLeadTimes']" position="after">
|
||||
<td t-if="showLeadTimes" />
|
||||
</xpath>
|
||||
</t>
|
||||
|
||||
</templates>
|
||||
Loading…
Add table
Add a link
Reference in a new issue