Apply pre-commit

This commit is contained in:
João Marques
2021-02-17 15:45:37 +00:00
committed by GuillemCForgeFlow
parent d8463099d4
commit b71ba581f1
2 changed files with 40 additions and 27 deletions

View File

@@ -1,23 +1,25 @@
odoo.define('stock.InventoryReportLocationListController', function (require) {
"use strict";
/* eslint-disable no-unused-vars */
odoo.define("stock.InventoryReportLocationListController", function(require) {
"use strict";
var core = require('web.core');
var InventoryReportListController = require('stock.InventoryReportListController');
var core = require("web.core");
var InventoryReportListController = require("stock.InventoryReportListController");
var qweb = core.qweb;
var _t = core._t;
var qweb = core.qweb;
var _t = core._t;
var InventoryReportLocationListController = InventoryReportListController.include({
renderButtons: function ($node) {
this._super.apply(this, arguments);
if (this.context.no_at_date) {
return;
}
if (this.modelName === "stock.quant") {
$node.find('.o_list_buttons').find(".btn-primary").html(_t("Inventory at Date & Location"))
}
},
});
var InventoryReportLocationListController = InventoryReportListController.include({
renderButtons: function($node) {
this._super.apply(this, arguments);
if (this.context.no_at_date) {
return;
}
if (this.modelName === "stock.quant") {
$node
.find(".o_list_buttons")
.find(".btn-primary")
.html(_t("Inventory at Date & Location"));
}
},
});
});

View File

@@ -1,22 +1,33 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<template id="stock_quantity_history_location_assets_backend" name="mrp_workorder assets" inherit_id="web.assets_backend">
<template
id="stock_quantity_history_location_assets_backend"
name="mrp_workorder assets"
inherit_id="web.assets_backend"
>
<xpath expr="." position="inside">
<script type="text/javascript" src="/stock_quantity_history_location/static/src/js/inventory_report.js"></script>
<script
type="text/javascript"
src="/stock_quantity_history_location/static/src/js/inventory_report.js"
/>
</xpath>
</template>
<record id="view_stock_quantity_history_location" model="ir.ui.view">
<field name="name">Inventory Report</field>
<field name="model">stock.quantity.history</field>
<field name="inherit_id" ref="stock.view_stock_quantity_history"/>
<field name="inherit_id" ref="stock.view_stock_quantity_history" />
<field name="arch" type="xml">
<field name="inventory_datetime" position="before">
<field name="location_id"
invisible="context.get('active_model') == 'stock.valuation.layer'"/>
<field name="include_child_locations"
attrs="{'invisible': [('location_id', '=', False)]}"/>
<field
name="location_id"
invisible="context.get('active_model') == 'stock.valuation.layer'"
/>
<field
name="include_child_locations"
attrs="{'invisible': [('location_id', '=', False)]}"
/>
</field>
</field>
</record>