mirror of
https://github.com/OCA/stock-logistics-warehouse.git
synced 2025-01-21 14:27:28 +02:00
run pre-commit -a with new prettiers
This commit is contained in:
committed by
Hai Lang
parent
d1100c489d
commit
41c0581390
@@ -1,6 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo noupdate="1">
|
||||
|
||||
<record id="stock_location_tray_demo" model="stock.location">
|
||||
<field name="name">Tray</field>
|
||||
<field name="barcode">TRAY</field>
|
||||
@@ -8,14 +7,16 @@
|
||||
<field name="tray_type_id" ref="stock_location_tray_type_small_8x" />
|
||||
<field name="usage">internal</field>
|
||||
</record>
|
||||
|
||||
<!-- When the trays are created, they will create their 'cell' locations.
|
||||
This method will add xmlids on them to be able to reference them in
|
||||
other demo data and tests.
|
||||
-->
|
||||
<function model="stock.location" name="_create_tray_xmlids">
|
||||
<function eval="[[('cell_in_tray_type_id', '!=', False)]]" model="stock.location" name="search" />
|
||||
<function
|
||||
eval="[[('cell_in_tray_type_id', '!=', False)]]"
|
||||
model="stock.location"
|
||||
name="search"
|
||||
/>
|
||||
<value>stock_location_tray</value>
|
||||
</function>
|
||||
|
||||
</odoo>
|
||||
|
||||
@@ -1,74 +1,63 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo noupdate="1">
|
||||
|
||||
<record model="stock.location.tray.type" id="stock_location_tray_type_small_32x">
|
||||
<field name="name">Small 32x</field>
|
||||
<field name="code">B10804</field>
|
||||
<field name="rows">4</field>
|
||||
<field name="cols">8</field>
|
||||
</record>
|
||||
|
||||
<record model="stock.location.tray.type" id="stock_location_tray_type_small_16x">
|
||||
<field name="name">Small 16x</field>
|
||||
<field name="code">B20802</field>
|
||||
<field name="rows">2</field>
|
||||
<field name="cols">8</field>
|
||||
</record>
|
||||
|
||||
<record model="stock.location.tray.type" id="stock_location_tray_type_small_8x">
|
||||
<field name="name">Small 8x</field>
|
||||
<field name="code">B20402</field>
|
||||
<field name="rows">2</field>
|
||||
<field name="cols">4</field>
|
||||
</record>
|
||||
|
||||
<record model="stock.location.tray.type" id="stock_location_tray_type_small_16x_2">
|
||||
<field name="name">Small 16x</field>
|
||||
<field name="code">B40802</field>
|
||||
<field name="rows">2</field>
|
||||
<field name="cols">8</field>
|
||||
</record>
|
||||
|
||||
<record model="stock.location.tray.type" id="stock_location_tray_type_small_16x_3">
|
||||
<field name="name">Small 16x</field>
|
||||
<field name="code">B30404</field>
|
||||
<field name="rows">4</field>
|
||||
<field name="cols">4</field>
|
||||
</record>
|
||||
|
||||
<record model="stock.location.tray.type" id="stock_location_tray_type_large_32x">
|
||||
<field name="name">Large 32x</field>
|
||||
<field name="code">B20804</field>
|
||||
<field name="rows">4</field>
|
||||
<field name="cols">8</field>
|
||||
</record>
|
||||
|
||||
<record model="stock.location.tray.type" id="stock_location_tray_type_large_16x">
|
||||
<field name="name">Large 16x</field>
|
||||
<field name="code">B30802</field>
|
||||
<field name="rows">2</field>
|
||||
<field name="cols">8</field>
|
||||
</record>
|
||||
|
||||
<record model="stock.location.tray.type" id="stock_location_tray_type_large_8x">
|
||||
<field name="name">Large 8x</field>
|
||||
<field name="code">B30402</field>
|
||||
<field name="rows">2</field>
|
||||
<field name="cols">4</field>
|
||||
</record>
|
||||
|
||||
<record model="stock.location.tray.type" id="stock_location_tray_type_large_4x">
|
||||
<field name="name">Large 4x</field>
|
||||
<field name="code">B30401</field>
|
||||
<field name="rows">1</field>
|
||||
<field name="cols">4</field>
|
||||
</record>
|
||||
|
||||
<record model="stock.location.tray.type" id="stock_location_tray_type_large_16x_2">
|
||||
<field name="name">Large 16x</field>
|
||||
<field name="code">B30404</field>
|
||||
<field name="rows">4</field>
|
||||
<field name="cols">4</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
|
||||
319
stock_location_tray/i18n/stock_location_tray.pot
Normal file
319
stock_location_tray/i18n/stock_location_tray.pot
Normal file
@@ -0,0 +1,319 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * stock_location_tray
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 13.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Plural-Forms: \n"
|
||||
|
||||
#. module: stock_location_tray
|
||||
#: model:ir.model.fields,field_description:stock_location_tray.field_stock_location_tray_type__active
|
||||
msgid "Active"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_location_tray
|
||||
#: model_terms:ir.actions.act_window,help:stock_location_tray.action_stock_location_tray_type
|
||||
msgid "Add a Location Tray Type"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_location_tray
|
||||
#: model_terms:ir.ui.view,arch_db:stock_location_tray.view_stock_location_tray_type_form
|
||||
#: model_terms:ir.ui.view,arch_db:stock_location_tray.view_stock_location_tray_type_search
|
||||
msgid "Archived"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_location_tray
|
||||
#: model:ir.model.fields,field_description:stock_location_tray.field_stock_location__cell_in_tray_type_id
|
||||
msgid "Cell Tray Type"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_location_tray
|
||||
#: model:ir.model.fields,field_description:stock_location_tray.field_stock_location__tray_matrix
|
||||
msgid "Cells"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_location_tray
|
||||
#: model:ir.model.fields,help:stock_location_tray.field_stock_location__cell_name_format
|
||||
msgid ""
|
||||
"Cells sub-locations generated in a tray will be named after this format. "
|
||||
"Replacement fields between curly braces are used to inject positions. {x}, "
|
||||
"{y}, and {z} will be replaced by their corresponding position. Complex "
|
||||
"formatting (such as padding, ...) can be done using the format specification"
|
||||
" at https://docs.python.org/3/library/string.html#formatstrings"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_location_tray
|
||||
#: model_terms:ir.ui.view,arch_db:stock_location_tray.view_stock_move_line_tray
|
||||
msgid "Close"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_location_tray
|
||||
#: model:ir.model.fields,field_description:stock_location_tray.field_stock_location_tray_type__code
|
||||
msgid "Code"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_location_tray
|
||||
#: model:ir.model.fields,field_description:stock_location_tray.field_stock_location_tray_type__cols
|
||||
msgid "Cols"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_location_tray
|
||||
#: model:ir.model.fields,field_description:stock_location_tray.field_stock_location_tray_type__create_uid
|
||||
msgid "Created by"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_location_tray
|
||||
#: model:ir.model.fields,field_description:stock_location_tray.field_stock_location_tray_type__create_date
|
||||
msgid "Created on"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_location_tray
|
||||
#: model_terms:ir.actions.act_window,help:stock_location_tray.action_stock_location_tray_type
|
||||
msgid ""
|
||||
"Define the number of rows and cols on a tray, depending of the boxes\n"
|
||||
"size."
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_location_tray
|
||||
#: model:ir.model.fields,field_description:stock_location_tray.field_stock_location_tray_type__depth
|
||||
msgid "Depth"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_location_tray
|
||||
#: model:ir.model.fields,field_description:stock_location_tray.field_stock_location_tray_type__depth_per_cell
|
||||
msgid "Depth Per Cell"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_location_tray
|
||||
#: model:ir.model.fields,help:stock_location_tray.field_stock_location_tray_type__depth
|
||||
msgid "Depth of the tray in mm"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_location_tray
|
||||
#: model:ir.model.fields,field_description:stock_location_tray.field_stock_move_line__tray_dest_matrix
|
||||
msgid "Destination Cell"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_location_tray
|
||||
#: code:addons/stock_location_tray/models/stock_move_line.py:0
|
||||
#, python-format
|
||||
msgid "Destination Tray"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_location_tray
|
||||
#: model:ir.model.fields,field_description:stock_location_tray.field_stock_location_tray_type__display_name
|
||||
msgid "Display Name"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_location_tray
|
||||
#: model_terms:ir.ui.view,arch_db:stock_location_tray.view_stock_location_tray_type_form
|
||||
msgid "Disposition"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_location_tray
|
||||
#: model:ir.model.fields,field_description:stock_location_tray.field_stock_location_tray_type__height
|
||||
msgid "Height"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_location_tray
|
||||
#: model:ir.model.fields,help:stock_location_tray.field_stock_location_tray_type__height
|
||||
msgid "Height of the tray in mm"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_location_tray
|
||||
#: model:ir.model.fields,field_description:stock_location_tray.field_stock_location_tray_type__id
|
||||
msgid "ID"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_location_tray
|
||||
#: model:ir.model,name:stock_location_tray.model_stock_location
|
||||
msgid "Inventory Locations"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_location_tray
|
||||
#: model:ir.model.fields,field_description:stock_location_tray.field_stock_location_tray_type____last_update
|
||||
msgid "Last Modified on"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_location_tray
|
||||
#: model:ir.model.fields,field_description:stock_location_tray.field_stock_location_tray_type__write_uid
|
||||
msgid "Last Updated by"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_location_tray
|
||||
#: model:ir.model.fields,field_description:stock_location_tray.field_stock_location_tray_type__write_date
|
||||
msgid "Last Updated on"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_location_tray
|
||||
#: model:ir.model.fields,field_description:stock_location_tray.field_stock_location_tray_type__location_ids
|
||||
msgid "Location"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_location_tray
|
||||
#: code:addons/stock_location_tray/models/stock_location.py:0
|
||||
#, python-format
|
||||
msgid "Location %s has sub-locations, it cannot be converted to a tray."
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_location_tray
|
||||
#: model_terms:ir.ui.view,arch_db:stock_location_tray.view_stock_location_tray_type_form
|
||||
#: model_terms:ir.ui.view,arch_db:stock_location_tray.view_stock_location_tray_type_search
|
||||
#: model_terms:ir.ui.view,arch_db:stock_location_tray.view_stock_location_tray_type_tree
|
||||
msgid "Location Tray Type"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_location_tray
|
||||
#: model:ir.actions.act_window,name:stock_location_tray.action_stock_location_tray_type
|
||||
#: model:ir.ui.menu,name:stock_location_tray.menu_stock_location_tray_type
|
||||
msgid "Location Tray Types"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_location_tray
|
||||
#: model_terms:ir.ui.view,arch_db:stock_location_tray.view_stock_location_tray_type_form
|
||||
msgid "Locations"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_location_tray
|
||||
#: model:ir.model.fields,field_description:stock_location_tray.field_stock_location_tray_type__name
|
||||
msgid "Name"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_location_tray
|
||||
#: model:ir.model.fields,field_description:stock_location_tray.field_stock_location__cell_name_format
|
||||
msgid "Name Format for Cells"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_location_tray
|
||||
#: model:ir.model,name:stock_location_tray.model_stock_move_line
|
||||
msgid "Product Moves (Stock Move Line)"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_location_tray
|
||||
#: model:ir.model.fields,field_description:stock_location_tray.field_stock_location_tray_type__rows
|
||||
msgid "Rows"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_location_tray
|
||||
#: model_terms:ir.ui.view,arch_db:stock_location_tray.view_stock_move_line_operation_tree
|
||||
msgid "Show Destination Tray"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_location_tray
|
||||
#: model_terms:ir.ui.view,arch_db:stock_location_tray.view_stock_move_line_operation_tree
|
||||
msgid "Show Source Tray"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_location_tray
|
||||
#: model_terms:ir.ui.view,arch_db:stock_location_tray.view_stock_location_tray_type_form
|
||||
msgid "Sizes"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_location_tray
|
||||
#: model:ir.model.fields,field_description:stock_location_tray.field_stock_move_line__tray_source_matrix
|
||||
msgid "Source Cell"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_location_tray
|
||||
#: code:addons/stock_location_tray/models/stock_move_line.py:0
|
||||
#, python-format
|
||||
msgid "Source Tray"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_location_tray
|
||||
#: model:ir.model,name:stock_location_tray.model_stock_location_tray_type
|
||||
msgid "Stock Location Tray Type"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_location_tray
|
||||
#: code:addons/stock_location_tray/models/stock_location_tray_type.py:0
|
||||
#, python-format
|
||||
msgid ""
|
||||
"The tray type {} is used by the following locations and cannot be archived:\n"
|
||||
"\n"
|
||||
"{}"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_location_tray
|
||||
#: code:addons/stock_location_tray/models/stock_location_tray_type.py:0
|
||||
#, python-format
|
||||
msgid ""
|
||||
"The tray type {} is used by the following locations, it's size cannot be changed:\n"
|
||||
"\n"
|
||||
"{}"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_location_tray
|
||||
#: model_terms:ir.ui.view,arch_db:stock_location_tray.view_location_form
|
||||
#: model_terms:ir.ui.view,arch_db:stock_location_tray.view_stock_move_line_tray
|
||||
msgid "Tray"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_location_tray
|
||||
#: model:ir.model.fields,field_description:stock_location_tray.field_stock_location__tray_cell_contains_stock
|
||||
msgid "Tray Cell Contains Stock"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_location_tray
|
||||
#: model_terms:ir.ui.view,arch_db:stock_location_tray.view_stock_location_tray_type_form
|
||||
msgid "Tray Configuration"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_location_tray
|
||||
#: model:ir.model.fields,field_description:stock_location_tray.field_stock_location_tray_type__tray_matrix
|
||||
msgid "Tray Matrix"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_location_tray
|
||||
#: model:ir.model.fields,field_description:stock_location_tray.field_stock_location__tray_type_id
|
||||
msgid "Tray Type"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_location_tray
|
||||
#: code:addons/stock_location_tray/models/stock_location.py:0
|
||||
#, python-format
|
||||
msgid "Tray locations cannot be archived when they contain products."
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_location_tray
|
||||
#: code:addons/stock_location_tray/models/stock_location.py:0
|
||||
#, python-format
|
||||
msgid "Trays cannot be modified when they contain products."
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_location_tray
|
||||
#: model:ir.model.fields,help:stock_location_tray.field_stock_location__tray_cell_contains_stock
|
||||
msgid "Used to know if a cell of a Tray location is empty."
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_location_tray
|
||||
#: model:ir.model.fields,field_description:stock_location_tray.field_stock_location_tray_type__width
|
||||
msgid "Width"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_location_tray
|
||||
#: model:ir.model.fields,field_description:stock_location_tray.field_stock_location_tray_type__width_per_cell
|
||||
msgid "Width Per Cell"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_location_tray
|
||||
#: model:ir.model.fields,help:stock_location_tray.field_stock_location_tray_type__width
|
||||
msgid "Width of the tray in mm"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_location_tray
|
||||
#: model_terms:ir.ui.view,arch_db:stock_location_tray.view_stock_location_tray_type_form
|
||||
msgid "mm /"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_location_tray
|
||||
#: model_terms:ir.ui.view,arch_db:stock_location_tray.view_stock_location_tray_type_form
|
||||
msgid "mm per cell"
|
||||
msgstr ""
|
||||
BIN
stock_location_tray/static/description/icon.png
Normal file
BIN
stock_location_tray/static/description/icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.2 KiB |
@@ -3,7 +3,7 @@
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta name="generator" content="Docutils 0.14: http://docutils.sourceforge.net/" />
|
||||
<meta name="generator" content="Docutils 0.15.1: http://docutils.sourceforge.net/" />
|
||||
<title>Location Trays</title>
|
||||
<style type="text/css">
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
odoo.define('stock_location_tray.tray', function (require) {
|
||||
odoo.define("stock_location_tray.tray", function(require) {
|
||||
"use strict";
|
||||
|
||||
var basicFields = require('web.basic_fields');
|
||||
var field_registry = require('web.field_registry');
|
||||
var basicFields = require("web.basic_fields");
|
||||
var field_registry = require("web.field_registry");
|
||||
var DebouncedField = basicFields.DebouncedField;
|
||||
|
||||
/**
|
||||
@@ -20,16 +20,16 @@ odoo.define('stock_location_tray.tray', function (require) {
|
||||
*
|
||||
*/
|
||||
var LocationTrayMatrixField = DebouncedField.extend({
|
||||
className: 'o_field_location_tray_matrix',
|
||||
tagName: 'canvas',
|
||||
supportedFieldTypes: ['serialized'],
|
||||
className: "o_field_location_tray_matrix",
|
||||
tagName: "canvas",
|
||||
supportedFieldTypes: ["serialized"],
|
||||
events: {
|
||||
'click': '_onClick',
|
||||
click: "_onClick",
|
||||
},
|
||||
|
||||
cellColorEmpty: '#ffffff',
|
||||
cellColorNotEmpty: '#4e6bfd',
|
||||
selectedColor: '#08f46b',
|
||||
cellColorEmpty: "#ffffff",
|
||||
cellColorNotEmpty: "#4e6bfd",
|
||||
selectedColor: "#08f46b",
|
||||
selectedLineWidth: 5,
|
||||
globalAlpha: 0.8,
|
||||
cellPadding: 2,
|
||||
@@ -37,7 +37,7 @@ odoo.define('stock_location_tray.tray', function (require) {
|
||||
init: function(parent, name, record, options) {
|
||||
this._super.apply(this, arguments);
|
||||
this.nodeOptions = _.defaults(this.nodeOptions, {});
|
||||
if ('clickAction' in (options || {})) {
|
||||
if ("clickAction" in (options || {})) {
|
||||
this.clickAction = options.clickAction;
|
||||
} else {
|
||||
this.clickAction = this.nodeOptions.click_action;
|
||||
@@ -58,12 +58,12 @@ odoo.define('stock_location_tray.tray', function (require) {
|
||||
// Setup resize events to redraw the canvas
|
||||
this._resizeDebounce = this._resizeDebounce.bind(this);
|
||||
this._resizePromise = null;
|
||||
$(window).on('resize', this._resizeDebounce);
|
||||
$(window).on("resize", this._resizeDebounce);
|
||||
|
||||
var self = this;
|
||||
return this._super.apply(this, arguments).then(function() {
|
||||
if (self.clickAction) {
|
||||
self.$el.css('cursor', 'pointer');
|
||||
self.$el.css("cursor", "pointer");
|
||||
}
|
||||
// _super calls _render(), but the function
|
||||
// resizeCanvasToDisplaySize would resize the canvas
|
||||
@@ -94,8 +94,8 @@ odoo.define('stock_location_tray.tray', function (require) {
|
||||
rows = cells.length;
|
||||
|
||||
// We remove 1 to start counting from 0
|
||||
var coordX = Math.ceil(clickX * cols / width) - 1,
|
||||
coordY = Math.ceil(clickY * rows / height) - 1;
|
||||
var coordX = Math.ceil((clickX * cols) / width) - 1,
|
||||
coordY = Math.ceil((clickY * rows) / height) - 1;
|
||||
// If we click on the last pixel on the bottom or the right
|
||||
// we would get an offset index
|
||||
if (coordX >= cols) {
|
||||
@@ -115,9 +115,8 @@ odoo.define('stock_location_tray.tray', function (require) {
|
||||
model: this.model,
|
||||
method: this.clickAction,
|
||||
args: [[this.res_id], coordX, coordY],
|
||||
})
|
||||
.then(function (action) {
|
||||
self.trigger_up('do_action', {action: action});
|
||||
}).then(function(action) {
|
||||
self.trigger_up("do_action", {action: action});
|
||||
});
|
||||
},
|
||||
|
||||
@@ -135,7 +134,7 @@ odoo.define('stock_location_tray.tray', function (require) {
|
||||
},
|
||||
|
||||
destroy: function() {
|
||||
$(window).off('resize', this._resizeDebounce);
|
||||
$(window).off("resize", this._resizeDebounce);
|
||||
this._super.apply(this, arguments);
|
||||
},
|
||||
|
||||
@@ -183,7 +182,7 @@ odoo.define('stock_location_tray.tray', function (require) {
|
||||
_renderInDOM: function() {
|
||||
this.canvas = this.$el[0];
|
||||
var canvas = this.canvas;
|
||||
var ctx = canvas.getContext('2d');
|
||||
var ctx = canvas.getContext("2d");
|
||||
this.resizeCanvasToDisplaySize(ctx.canvas);
|
||||
ctx.clearRect(0, 0, canvas.width, canvas.height);
|
||||
ctx.save();
|
||||
@@ -244,8 +243,10 @@ odoo.define('stock_location_tray.tray', function (require) {
|
||||
fillHeight += padding;
|
||||
}
|
||||
ctx.fillRect(
|
||||
x * (w + padding), y * (h + padding),
|
||||
fillWidth, fillHeight,
|
||||
x * (w + padding),
|
||||
y * (h + padding),
|
||||
fillWidth,
|
||||
fillHeight
|
||||
);
|
||||
if (selected && selectedX === x && selectedY === y) {
|
||||
ctx.globalAlpha = 1.0;
|
||||
@@ -260,11 +261,9 @@ odoo.define('stock_location_tray.tray', function (require) {
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
field_registry.add('location_tray_matrix', LocationTrayMatrixField);
|
||||
field_registry.add("location_tray_matrix", LocationTrayMatrixField);
|
||||
|
||||
return {
|
||||
LocationTrayMatrixField: LocationTrayMatrixField,
|
||||
};
|
||||
|
||||
});
|
||||
|
||||
@@ -1,11 +1,20 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
|
||||
<template id="stock_location_tray_assets" name="stock.location.tray.assets" inherit_id="web.assets_backend">
|
||||
<template
|
||||
id="stock_location_tray_assets"
|
||||
name="stock.location.tray.assets"
|
||||
inherit_id="web.assets_backend"
|
||||
>
|
||||
<xpath expr="." position="inside">
|
||||
<link rel="stylesheet" type="text/scss" href="/stock_location_tray/static/src/scss/stock_location_tray.scss"/>
|
||||
<script type="text/javascript" src="/stock_location_tray/static/src/js/stock_location_tray.js"></script>
|
||||
<link
|
||||
rel="stylesheet"
|
||||
type="text/scss"
|
||||
href="/stock_location_tray/static/src/scss/stock_location_tray.scss"
|
||||
/>
|
||||
<script
|
||||
type="text/javascript"
|
||||
src="/stock_location_tray/static/src/js/stock_location_tray.js"
|
||||
/>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
</odoo>
|
||||
|
||||
@@ -1,21 +1,29 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
|
||||
<record id="view_stock_location_tray_type_form" model="ir.ui.view">
|
||||
<field name="name">stock.location.tray.type.form</field>
|
||||
<field name="model">stock.location.tray.type</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Location Tray Type">
|
||||
<div class="oe_button_box" name="button_box">
|
||||
<button string="Locations"
|
||||
<button
|
||||
string="Locations"
|
||||
class="oe_stat_button"
|
||||
icon="fa-filter" name="open_locations"
|
||||
icon="fa-filter"
|
||||
name="open_locations"
|
||||
type="object"
|
||||
/>
|
||||
</div>
|
||||
<widget name="web_ribbon" title="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
|
||||
<widget
|
||||
name="web_ribbon"
|
||||
title="Archived"
|
||||
bg_color="bg-danger"
|
||||
attrs="{'invisible': [('active', '=', True)]}"
|
||||
/>
|
||||
<label for="name" class="oe_edit_only" />
|
||||
<h1><field name="name"/></h1>
|
||||
<h1>
|
||||
<field name="name" />
|
||||
</h1>
|
||||
<group>
|
||||
<group string="Tray Configuration" name="settings">
|
||||
<field name="active" invisible="1" />
|
||||
@@ -37,15 +45,16 @@
|
||||
<field name="height" />
|
||||
</group>
|
||||
<group string="Disposition" name="disposition">
|
||||
<field name="tray_matrix"
|
||||
<field
|
||||
name="tray_matrix"
|
||||
widget="location_tray_matrix"
|
||||
nolabel="1"/>
|
||||
nolabel="1"
|
||||
/>
|
||||
</group>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_stock_location_tray_type_search" model="ir.ui.view">
|
||||
<field name="name">stock.location.tray.type.search</field>
|
||||
<field name="model">stock.location.tray.type</field>
|
||||
@@ -54,11 +63,14 @@
|
||||
<field name="name" />
|
||||
<field name="code" />
|
||||
<separator />
|
||||
<filter string="Archived" name="inactive" domain="[('active','=',False)]"/>
|
||||
<filter
|
||||
string="Archived"
|
||||
name="inactive"
|
||||
domain="[('active','=',False)]"
|
||||
/>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_stock_location_tray_type_tree" model="ir.ui.view">
|
||||
<field name="name">stock.location.tray.type</field>
|
||||
<field name="model">stock.location.tray.type</field>
|
||||
@@ -71,26 +83,27 @@
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_stock_location_tray_type" model="ir.actions.act_window">
|
||||
<field name="name">Location Tray Types</field>
|
||||
<field name="res_model">stock.location.tray.type</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="view_id" ref="view_stock_location_tray_type_tree" />
|
||||
<field name="search_view_id" ref="view_stock_location_tray_type_search" />
|
||||
<field name="context"></field>
|
||||
<field name="context" />
|
||||
<field name="help" type="html">
|
||||
<p class="o_view_nocontent_smiling_face">
|
||||
Add a Location Tray Type
|
||||
</p><p>
|
||||
</p>
|
||||
<p>
|
||||
Define the number of rows and cols on a tray, depending of the boxes
|
||||
size.
|
||||
</p>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<menuitem action="action_stock_location_tray_type"
|
||||
<menuitem
|
||||
action="action_stock_location_tray_type"
|
||||
id="menu_stock_location_tray_type"
|
||||
parent="stock.menu_warehouse_config" sequence="10"/>
|
||||
|
||||
parent="stock.menu_warehouse_config"
|
||||
sequence="10"
|
||||
/>
|
||||
</odoo>
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
|
||||
<record id="view_location_form" model="ir.ui.view">
|
||||
<field name="name">stock.location.form.tray.type</field>
|
||||
<field name="model">stock.location</field>
|
||||
@@ -8,24 +7,40 @@
|
||||
<field name="arch" type="xml">
|
||||
<group name="additional_info" position="after">
|
||||
<group string="Tray" name="tray">
|
||||
<field name="tray_type_id"
|
||||
attrs="{'invisible': [('cell_in_tray_type_id', '!=', False)]}"/>
|
||||
<field name="cell_name_format" attrs="{'invisible': [('tray_type_id', '=', False)]}"/>
|
||||
<field name="cell_in_tray_type_id"
|
||||
attrs="{'invisible': [('cell_in_tray_type_id', '=', False)]}"/>
|
||||
<field name="tray_matrix"
|
||||
<field
|
||||
name="tray_type_id"
|
||||
attrs="{'invisible': [('cell_in_tray_type_id', '!=', False)]}"
|
||||
/>
|
||||
<field
|
||||
name="cell_name_format"
|
||||
attrs="{'invisible': [('tray_type_id', '=', False)]}"
|
||||
/>
|
||||
<field
|
||||
name="cell_in_tray_type_id"
|
||||
attrs="{'invisible': [('cell_in_tray_type_id', '=', False)]}"
|
||||
/>
|
||||
<field
|
||||
name="tray_matrix"
|
||||
widget="location_tray_matrix"
|
||||
attrs="{'invisible': [('tray_type_id', '=', False), ('cell_in_tray_type_id', '=', False)]}"
|
||||
options="{'click_action': 'action_tray_matrix_click'}"
|
||||
/>
|
||||
<field name="posx" attrs="{'readonly': [('cell_in_tray_type_id', '!=', False)], 'invisible': ['|', ('cell_in_tray_type_id', '=', False), ('tray_type_id', '=', True)]}" />
|
||||
<field name="posy" attrs="{'readonly': [('cell_in_tray_type_id', '!=', False)], 'invisible': ['|', ('cell_in_tray_type_id', '=', False), ('tray_type_id', '=', True)]}" />
|
||||
<field name="posz" attrs="{'readonly': [('cell_in_tray_type_id', '!=', False)], 'invisible': ['|', ('cell_in_tray_type_id', '=', False), ('tray_type_id', '=', True)]}" />
|
||||
<field
|
||||
name="posx"
|
||||
attrs="{'readonly': [('cell_in_tray_type_id', '!=', False)], 'invisible': ['|', ('cell_in_tray_type_id', '=', False), ('tray_type_id', '=', True)]}"
|
||||
/>
|
||||
<field
|
||||
name="posy"
|
||||
attrs="{'readonly': [('cell_in_tray_type_id', '!=', False)], 'invisible': ['|', ('cell_in_tray_type_id', '=', False), ('tray_type_id', '=', True)]}"
|
||||
/>
|
||||
<field
|
||||
name="posz"
|
||||
attrs="{'readonly': [('cell_in_tray_type_id', '!=', False)], 'invisible': ['|', ('cell_in_tray_type_id', '=', False), ('tray_type_id', '=', True)]}"
|
||||
/>
|
||||
</group>
|
||||
</group>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_location_search" model="ir.ui.view">
|
||||
<field name="name">stock.location.search.tray.type</field>
|
||||
<field name="model">stock.location</field>
|
||||
@@ -37,5 +52,4 @@
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
|
||||
<record id="view_stock_move_line_operation_tree" model="ir.ui.view">
|
||||
<field name="name">stock.move.line.operations.tree.tray.type</field>
|
||||
<field name="model">stock.move.line</field>
|
||||
@@ -8,9 +7,11 @@
|
||||
<field name="arch" type="xml">
|
||||
<field name="location_id" position="after">
|
||||
<field name="tray_source_matrix" invisible="1" />
|
||||
<button name="action_show_source_tray"
|
||||
<button
|
||||
name="action_show_source_tray"
|
||||
string="Show Source Tray"
|
||||
type="object" icon="fa-th"
|
||||
type="object"
|
||||
icon="fa-th"
|
||||
attrs="{'invisible': [('tray_source_matrix', '=', {})]}"
|
||||
invisible="not context.get('show_source_location')"
|
||||
groups="stock.group_stock_multi_locations"
|
||||
@@ -18,9 +19,11 @@
|
||||
</field>
|
||||
<field name="location_dest_id" position="after">
|
||||
<field name="tray_dest_matrix" invisible="1" />
|
||||
<button name="action_show_dest_tray"
|
||||
<button
|
||||
name="action_show_dest_tray"
|
||||
string="Show Destination Tray"
|
||||
type="object" icon="fa-th"
|
||||
type="object"
|
||||
icon="fa-th"
|
||||
attrs="{'invisible': [('tray_dest_matrix', '=', {})]}"
|
||||
invisible="not context.get('show_destination_location')"
|
||||
groups="stock.group_stock_multi_locations"
|
||||
@@ -28,32 +31,30 @@
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_stock_move_line_tray" model="ir.ui.view">
|
||||
<field name="name">stock.move.line.tray</field>
|
||||
<field name="model">stock.move.line</field>
|
||||
<field name="priority">1000</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Tray" create="0" edit="0" delete="0">
|
||||
<group name="source_tray"
|
||||
invisible="not context.get('show_source_tray')">
|
||||
<group
|
||||
name="source_tray"
|
||||
invisible="not context.get('show_source_tray')"
|
||||
>
|
||||
<field name="location_id" readonly="1" />
|
||||
<field name="tray_source_matrix"
|
||||
widget="location_tray_matrix" />
|
||||
<field name="tray_source_matrix" widget="location_tray_matrix" />
|
||||
</group>
|
||||
<group name="destination_tray"
|
||||
invisible="not context.get('show_dest_tray')">
|
||||
<group
|
||||
name="destination_tray"
|
||||
invisible="not context.get('show_dest_tray')"
|
||||
>
|
||||
<field name="location_dest_id" readonly="1" />
|
||||
<field name="tray_dest_matrix"
|
||||
widget="location_tray_matrix" />
|
||||
<field name="tray_dest_matrix" widget="location_tray_matrix" />
|
||||
</group>
|
||||
<footer>
|
||||
<button string="Close"
|
||||
class="btn-secondary"
|
||||
special="cancel" />
|
||||
<button string="Close" class="btn-secondary" special="cancel" />
|
||||
</footer>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
|
||||
Reference in New Issue
Block a user