mirror of
https://github.com/OCA/stock-logistics-reporting.git
synced 2025-02-16 17:13:21 +02:00
@@ -9,4 +9,4 @@ line_length=88
|
||||
known_odoo=odoo
|
||||
known_odoo_addons=odoo.addons
|
||||
sections=FUTURE,STDLIB,THIRDPARTY,ODOO,ODOO_ADDONS,FIRSTPARTY,LOCALFOLDER
|
||||
known_third_party=
|
||||
known_third_party=setuptools
|
||||
|
||||
@@ -6,6 +6,8 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 13.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-12-24 10:24+0000\n"
|
||||
"PO-Revision-Date: 2019-12-24 10:24+0000\n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
@@ -18,6 +20,13 @@ msgstr ""
|
||||
msgid "Include child locations"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_quantity_history_location
|
||||
#. openerp-web
|
||||
#: code:addons/stock_quantity_history_location/static/src/js/inventory_report.js:0
|
||||
#, python-format
|
||||
msgid "Inventory at Date & Location"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_quantity_history_location
|
||||
#: model:ir.model.fields,field_description:stock_quantity_history_location.field_stock_quantity_history__location_id
|
||||
msgid "Location"
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
odoo.define('stock.InventoryReportLocationListController', function (require) {
|
||||
"use strict";
|
||||
|
||||
var core = require('web.core');
|
||||
var InventoryReportListController = require('stock.InventoryReportListController');
|
||||
|
||||
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"))
|
||||
}
|
||||
},
|
||||
});
|
||||
});
|
||||
@@ -1,8 +1,6 @@
|
||||
# Copyright 2019 ForgeFlow S.L.
|
||||
# Copyright 2019 Aleph Objects, Inc.
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
import ast
|
||||
|
||||
from odoo import fields, models
|
||||
|
||||
|
||||
@@ -17,9 +15,6 @@ class StockQuantityHistory(models.TransientModel):
|
||||
def open_at_date(self):
|
||||
action = super(StockQuantityHistory, self).open_at_date()
|
||||
ctx = action["context"]
|
||||
if isinstance(ctx, str):
|
||||
ctx = ast.literal_eval(ctx)
|
||||
# If we are opening the current quants, filter by domain
|
||||
if self.location_id:
|
||||
ctx["location"] = self.location_id.id
|
||||
ctx["compute_child"] = self.include_child_locations
|
||||
|
||||
@@ -1,12 +1,20 @@
|
||||
<?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">
|
||||
<xpath expr="." position="inside">
|
||||
<script type="text/javascript" src="/stock_quantity_history_location/static/src/js/inventory_report.js"></script>
|
||||
</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="arch" type="xml">
|
||||
<field name="inventory_datetime" position="before">
|
||||
<field name="location_id"/>
|
||||
<field name="location_id"
|
||||
invisible="context.get('active_model') == 'stock.valuation.layer'"/>
|
||||
<field name="include_child_locations"
|
||||
attrs="{'invisible': [('location_id', '=', False)]}"/>
|
||||
</field>
|
||||
|
||||
Reference in New Issue
Block a user