Initial commit: Odoo 18.0-20251222 extra-addons
126
maintenance_stock/README.rst
Normal file
@@ -0,0 +1,126 @@
|
||||
.. image:: https://odoo-community.org/readme-banner-image
|
||||
:target: https://odoo-community.org/get-involved?utm_source=readme
|
||||
:alt: Odoo Community Association
|
||||
|
||||
=================
|
||||
Maintenance Stock
|
||||
=================
|
||||
|
||||
..
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
!! This file is generated by oca-gen-addon-readme !!
|
||||
!! changes will be overwritten. !!
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
!! source digest: sha256:3c75e13351d3b04da1a5646ec6fd3297366ae5088199ed3e128585025f63197b
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
|
||||
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
|
||||
:target: https://odoo-community.org/page/development-status
|
||||
:alt: Beta
|
||||
.. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png
|
||||
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||
:alt: License: AGPL-3
|
||||
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fmaintenance-lightgray.png?logo=github
|
||||
:target: https://github.com/OCA/maintenance/tree/18.0/maintenance_stock
|
||||
:alt: OCA/maintenance
|
||||
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
|
||||
:target: https://translation.odoo-community.org/projects/maintenance-18-0/maintenance-18-0-maintenance_stock
|
||||
:alt: Translate me on Weblate
|
||||
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
|
||||
:target: https://runboat.odoo-community.org/builds?repo=OCA/maintenance&target_branch=18.0
|
||||
:alt: Try me on Runboat
|
||||
|
||||
|badge1| |badge2| |badge3| |badge4| |badge5|
|
||||
|
||||
This module extends the functionality of Odoo Maintenance module by
|
||||
allowing link stock consumptions to maintenance requests.
|
||||
|
||||
**Table of contents**
|
||||
|
||||
.. contents::
|
||||
:local:
|
||||
|
||||
Usage
|
||||
=====
|
||||
|
||||
Once installed, first you should enable consumptions for a certain
|
||||
equipment and filling a default warehouse for the picking operations:
|
||||
|
||||
|image1|
|
||||
|
||||
Then, for every mainteance request of this equipment, *Picking List*
|
||||
button allows us to make consumptions, that will be picking documents
|
||||
with their own sequence:
|
||||
|
||||
|image2|
|
||||
|
||||
|image3|
|
||||
|
||||
By default, the origin location for this operations will be the stock
|
||||
location for the default warehouse, and destination a new *Consumptions*
|
||||
location, that will not compute for stock inventory, like e.g. partner
|
||||
locations:
|
||||
|
||||
|image4|
|
||||
|
||||
From both request and equipment forms these stock operations and
|
||||
*Product Moves* are available.
|
||||
|
||||
Return operations are also enabled, and will be linked to the request
|
||||
and equipment as well:
|
||||
|
||||
|image5|
|
||||
|
||||
.. |image1| image:: https://raw.githubusercontent.com/OCA/maintenance/18.0/maintenance_stock/static/description/equipment.png
|
||||
.. |image2| image:: https://raw.githubusercontent.com/OCA/maintenance/18.0/maintenance_stock/static/description/request-1.png
|
||||
.. |image3| image:: https://raw.githubusercontent.com/OCA/maintenance/18.0/maintenance_stock/static/description/pick-1.png
|
||||
.. |image4| image:: https://raw.githubusercontent.com/OCA/maintenance/18.0/maintenance_stock/static/description/move-line.png
|
||||
.. |image5| image:: https://raw.githubusercontent.com/OCA/maintenance/18.0/maintenance_stock/static/description/pick-2.png
|
||||
|
||||
Known issues / Roadmap
|
||||
======================
|
||||
|
||||
- Product standard list. Enable defining product standard lists (at
|
||||
least, product and quantity per line), and link them with equipments.
|
||||
Then, every maintenance request could select one of them and
|
||||
automatically fill the product and quantity list.
|
||||
|
||||
Bug Tracker
|
||||
===========
|
||||
|
||||
Bugs are tracked on `GitHub Issues <https://github.com/OCA/maintenance/issues>`_.
|
||||
In case of trouble, please check there if your issue has already been reported.
|
||||
If you spotted it first, help us to smash it by providing a detailed and welcomed
|
||||
`feedback <https://github.com/OCA/maintenance/issues/new?body=module:%20maintenance_stock%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
|
||||
|
||||
Do not contact contributors directly about support or help with technical issues.
|
||||
|
||||
Credits
|
||||
=======
|
||||
|
||||
Authors
|
||||
-------
|
||||
|
||||
* Solvos
|
||||
|
||||
Contributors
|
||||
------------
|
||||
|
||||
- David Alonso <david.alonso@solvos.es>
|
||||
|
||||
Maintainers
|
||||
-----------
|
||||
|
||||
This module is maintained by the OCA.
|
||||
|
||||
.. image:: https://odoo-community.org/logo.png
|
||||
:alt: Odoo Community Association
|
||||
:target: https://odoo-community.org
|
||||
|
||||
OCA, or the Odoo Community Association, is a nonprofit organization whose
|
||||
mission is to support the collaborative development of Odoo features and
|
||||
promote its widespread use.
|
||||
|
||||
This module is part of the `OCA/maintenance <https://github.com/OCA/maintenance/tree/18.0/maintenance_stock>`_ project on GitHub.
|
||||
|
||||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
|
||||
2
maintenance_stock/__init__.py
Normal file
@@ -0,0 +1,2 @@
|
||||
from . import models
|
||||
from .hooks import post_init_hook
|
||||
27
maintenance_stock/__manifest__.py
Normal file
@@ -0,0 +1,27 @@
|
||||
# © 2020 Solvos Consultoría Informática (<http://www.solvos.es>)
|
||||
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
|
||||
{
|
||||
"name": "Maintenance Stock",
|
||||
"summary": "Links maintenance requests to stock",
|
||||
"author": "Odoo Community Association (OCA), Solvos",
|
||||
"license": "AGPL-3",
|
||||
"version": "18.0.1.0.0",
|
||||
"category": "Warehouse",
|
||||
"website": "https://github.com/OCA/maintenance",
|
||||
"depends": [
|
||||
"base_maintenance",
|
||||
"stock",
|
||||
],
|
||||
"data": [
|
||||
"views/maintenance_equipment_views.xml",
|
||||
"views/maintenance_request_views.xml",
|
||||
"views/stock_move_views.xml",
|
||||
"views/stock_move_line_views.xml",
|
||||
"views/stock_picking_views.xml",
|
||||
],
|
||||
"demo": [
|
||||
"data/demo_maintenance_stock.xml",
|
||||
],
|
||||
"post_init_hook": "post_init_hook",
|
||||
"installable": True,
|
||||
}
|
||||
116
maintenance_stock/data/demo_maintenance_stock.xml
Normal file
@@ -0,0 +1,116 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo noupdate="1">
|
||||
<record id="location_inventory" model="stock.location">
|
||||
<field name="name">Inventory adjustment</field>
|
||||
<field name="usage">inventory</field>
|
||||
</record>
|
||||
<record id="stock_warehouse_maintenance" model="stock.warehouse">
|
||||
<field name="name">Maintenance Warehouse</field>
|
||||
<field name="partner_id" ref="stock.res_partner_address_41" />
|
||||
<field name="code">Main</field>
|
||||
<field name="reception_steps">one_step</field>
|
||||
<field name="delivery_steps">ship_only</field>
|
||||
</record>
|
||||
|
||||
<function model="ir.model.data" name="_update_xmlids">
|
||||
<value
|
||||
model="base"
|
||||
eval="[{
|
||||
'xml_id': 'maintenance_stock.main_picking_type_cons',
|
||||
'record': obj().env.ref('maintenance_stock.stock_warehouse_maintenance').cons_type_id,
|
||||
'noupdate': True,
|
||||
}, {
|
||||
'xml_id': 'maintenance_stock.main_location_stock',
|
||||
'record': obj().env.ref('maintenance_stock.stock_warehouse_maintenance').lot_stock_id,
|
||||
'noupdate': True,
|
||||
}, {
|
||||
'xml_id': 'maintenance_stock.main_location_cons',
|
||||
'record': obj().env.ref('maintenance_stock.stock_warehouse_maintenance').wh_cons_loc_id,
|
||||
'noupdate': True,
|
||||
}]"
|
||||
/>
|
||||
</function>
|
||||
|
||||
<record id="product_toner" model="product.product">
|
||||
<field name="default_code">TON_1234</field>
|
||||
<field name="name">Toner</field>
|
||||
<field name="type">consu</field>
|
||||
<field name="is_storable" eval="True" />
|
||||
<field name="categ_id" ref="product.product_category_5" />
|
||||
<field name="lst_price">100.0</field>
|
||||
<field name="standard_price">70.0</field>
|
||||
<field name="uom_id" ref="uom.product_uom_unit" />
|
||||
<field name="uom_po_id" ref="uom.product_uom_unit" />
|
||||
<field
|
||||
name="image_1920"
|
||||
type="base64"
|
||||
file="maintenance_stock/static/img/toner.png"
|
||||
/>
|
||||
</record>
|
||||
|
||||
<record id="maintenance.equipment_printer1" model="maintenance.equipment">
|
||||
<field name="allow_consumptions" eval="True" />
|
||||
<field
|
||||
name="default_consumption_warehouse_id"
|
||||
ref="maintenance_stock.stock_warehouse_maintenance"
|
||||
/>
|
||||
</record>
|
||||
|
||||
<record id="m_request_1" model="maintenance.request">
|
||||
<field name="name">Change toner</field>
|
||||
<field name="user_id" ref="base.user_demo" />
|
||||
<field name="owner_user_id" ref="base.user_admin" />
|
||||
<field name="equipment_id" ref="maintenance.equipment_printer1" />
|
||||
<field name="color">7</field>
|
||||
<field name="stage_id" ref="maintenance.stage_1" />
|
||||
</record>
|
||||
<record model="stock.quant" id="stock_quant_toner">
|
||||
<field name="product_id" ref="maintenance_stock.product_toner" />
|
||||
<field name="location_id" ref="maintenance_stock.main_location_stock" />
|
||||
<field name="quantity">1.0</field>
|
||||
</record>
|
||||
<record id="consuption_picking_m_request_1" model="stock.picking">
|
||||
<field name="picking_type_id" ref="maintenance_stock.main_picking_type_cons" />
|
||||
<field name="date" eval="DateTime.today() - timedelta(days=15)" />
|
||||
<field name="location_id" ref="maintenance_stock.main_location_stock" />
|
||||
<field name="location_dest_id" ref="maintenance_stock.main_location_cons" />
|
||||
<field name="maintenance_request_id" ref="maintenance_stock.m_request_1" />
|
||||
|
||||
<field
|
||||
name="move_ids"
|
||||
model="stock.move"
|
||||
eval="[(0, 0, {
|
||||
'name': obj().env.ref('maintenance_stock.product_toner').name,
|
||||
'product_id': ref('maintenance_stock.product_toner'),
|
||||
'product_uom': ref('uom.product_uom_unit'),
|
||||
'product_uom_qty': 1.0,
|
||||
'picking_type_id': ref('maintenance_stock.main_picking_type_cons'),
|
||||
'location_id': ref('maintenance_stock.main_location_stock'),
|
||||
'location_dest_id': ref('maintenance_stock.main_location_cons'),
|
||||
|
||||
})]"
|
||||
/>
|
||||
</record>
|
||||
|
||||
<function model="stock.picking" name="action_confirm">
|
||||
<value
|
||||
model="stock.picking"
|
||||
eval="[
|
||||
obj().env.ref('maintenance_stock.consuption_picking_m_request_1').id]"
|
||||
/>
|
||||
</function>
|
||||
<function model="stock.picking" name="action_assign">
|
||||
<value
|
||||
model="stock.picking"
|
||||
eval="[
|
||||
obj().env.ref('maintenance_stock.consuption_picking_m_request_1').id]"
|
||||
/>
|
||||
</function>
|
||||
<function model="stock.picking" name="button_validate">
|
||||
<value
|
||||
model="stock.picking"
|
||||
eval="[
|
||||
obj().env.ref('maintenance_stock.consuption_picking_m_request_1').id]"
|
||||
/>
|
||||
</function>
|
||||
</odoo>
|
||||
21
maintenance_stock/hooks.py
Normal file
@@ -0,0 +1,21 @@
|
||||
# © 2020 Solvos Consultoría Informática (<http://www.solvos.es>)
|
||||
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
|
||||
|
||||
import logging
|
||||
|
||||
|
||||
def post_init_hook(env):
|
||||
logging.getLogger("odoo.addons.maintenance_stock").info(
|
||||
"Adding pending locations, sequences and pìcking types to " "current warehouses"
|
||||
)
|
||||
|
||||
PickingType = env["stock.picking.type"]
|
||||
for warehouse in env["stock.warehouse"].search([]):
|
||||
warehouse._create_missing_locations(vals={})
|
||||
new_vals = warehouse._create_or_update_sequences_and_picking_types()
|
||||
warehouse.write(new_vals)
|
||||
# return picking type workaround for existing warehouses
|
||||
if "cons_type_id" in new_vals:
|
||||
PickingType.browse(new_vals["cons_type_id"]).write(
|
||||
{"return_picking_type_id": warehouse.in_type_id.id}
|
||||
)
|
||||
192
maintenance_stock/i18n/es.po
Normal file
@@ -0,0 +1,192 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * maintenance_stock
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 12.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"PO-Revision-Date: 2020-10-02 16:16+0000\n"
|
||||
"Last-Translator: David Alonso (Solvos) <david.alonso@solvos.es>\n"
|
||||
"Language-Team: none\n"
|
||||
"Language: es\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
||||
"X-Generator: Weblate 3.10\n"
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: model_terms:ir.ui.view,arch_db:maintenance_stock.equipment_request_view_form
|
||||
#: model_terms:ir.ui.view,arch_db:maintenance_stock.hr_equipment_view_form
|
||||
msgid "<span class=\"o_stat_text\">Picking list</span>"
|
||||
msgstr "<span class=\"o_stat_text\">Lista de albaranes</span>"
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: model_terms:ir.ui.view,arch_db:maintenance_stock.equipment_request_view_form
|
||||
#: model_terms:ir.ui.view,arch_db:maintenance_stock.hr_equipment_view_form
|
||||
msgid "<span class=\"o_stat_text\">Product Moves</span>"
|
||||
msgstr "<span class=\"o_stat_text\">Movimientos de producto</span>"
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: model_terms:ir.ui.view,arch_db:maintenance_stock.equipment_request_view_form
|
||||
#: model_terms:ir.ui.view,arch_db:maintenance_stock.hr_equipment_view_form
|
||||
msgid "<span class=\"o_stat_text\">Stock Moves</span>"
|
||||
msgstr "<span class=\"o_stat_text\">Movimientos de stock</span>"
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: model:ir.model.fields,field_description:maintenance_stock.field_maintenance_equipment__allow_consumptions
|
||||
#: model:ir.model.fields,field_description:maintenance_stock.field_maintenance_request__allow_consumptions
|
||||
#: model_terms:ir.ui.view,arch_db:maintenance_stock.hr_equipment_request_view_search
|
||||
#: model_terms:ir.ui.view,arch_db:maintenance_stock.hr_equipment_view_search
|
||||
msgid "Allow Consumptions"
|
||||
msgstr "Permitir consumos"
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: code:addons/maintenance_stock/models/stock_warehouse.py:42
|
||||
#: model:stock.picking.type,name:maintenance_stock.main_picking_type_cons
|
||||
#, python-format
|
||||
msgid "Consumption"
|
||||
msgstr "Consumo"
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: model:ir.model.fields,field_description:maintenance_stock.field_stock_warehouse__wh_cons_loc_id
|
||||
msgid "Consumption Location"
|
||||
msgstr "Ubicación de consumo"
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: model:ir.model.fields,field_description:maintenance_stock.field_stock_warehouse__cons_type_id
|
||||
msgid "Consumption Type"
|
||||
msgstr "Tipo de consumo"
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: code:addons/maintenance_stock/models/stock_warehouse.py:79
|
||||
#, python-format
|
||||
msgid "Consumptions"
|
||||
msgstr "Consumos"
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: model_terms:ir.actions.act_window,help:maintenance_stock.stock_move_action
|
||||
msgid "Create a new stock movement"
|
||||
msgstr "Crear nuevo movimiento de stock"
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: model:ir.model.fields,field_description:maintenance_stock.field_maintenance_equipment__default_consumption_warehouse_id
|
||||
#: model:ir.model.fields,field_description:maintenance_stock.field_maintenance_request__default_consumption_warehouse_id
|
||||
msgid "Default Consumption Warehouse"
|
||||
msgstr "Almacén de consumo por defecto"
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: model:ir.model.fields,field_description:maintenance_stock.field_stock_move__maintenance_equipment_id
|
||||
#: model:ir.model.fields,field_description:maintenance_stock.field_stock_move_line__maintenance_equipment_id
|
||||
#: model:ir.model.fields,field_description:maintenance_stock.field_stock_picking__maintenance_equipment_id
|
||||
msgid "Equipment"
|
||||
msgstr "Equipo"
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: model:ir.model,name:maintenance_stock.model_maintenance_equipment
|
||||
msgid "Maintenance Equipment"
|
||||
msgstr "Equipo de mantenimiento"
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: model_terms:ir.ui.view,arch_db:maintenance_stock.view_picking_form
|
||||
msgid "Maintenance Info"
|
||||
msgstr "Información de Mantenimiento"
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: model:ir.model,name:maintenance_stock.model_maintenance_request
|
||||
#: model:ir.model.fields,field_description:maintenance_stock.field_stock_move__maintenance_request_id
|
||||
#: model:ir.model.fields,field_description:maintenance_stock.field_stock_move_line__maintenance_request_id
|
||||
#: model:ir.model.fields,field_description:maintenance_stock.field_stock_picking__maintenance_request_id
|
||||
msgid "Maintenance Request"
|
||||
msgstr "Petición de mantenimiento"
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: model_terms:ir.ui.view,arch_db:maintenance_stock.stock_move_line_view_search
|
||||
#: model_terms:ir.ui.view,arch_db:maintenance_stock.view_move_search
|
||||
#: model_terms:ir.ui.view,arch_db:maintenance_stock.view_picking_internal_search
|
||||
msgid "Maintenance Request consumption"
|
||||
msgstr "Consumo de la petición de mantenimiento"
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: model:ir.model.fields,field_description:maintenance_stock.field_maintenance_request__stock_picking_ids
|
||||
msgid "Picking list"
|
||||
msgstr "Lista de albaranes"
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: model:ir.actions.act_window,name:maintenance_stock.stock_move_line_action
|
||||
#: model:ir.ui.menu,name:maintenance_stock.stock_move_line_menu
|
||||
msgid "Product Moves"
|
||||
msgstr "Movimientos de producto"
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: model:ir.model,name:maintenance_stock.model_stock_move_line
|
||||
msgid "Product Moves (Stock Move Line)"
|
||||
msgstr "Movimientos de producto (línea de movimiento de stock)"
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: code:addons/maintenance_stock/models/stock_warehouse.py:65
|
||||
#, python-format
|
||||
msgid "Sequence consumption"
|
||||
msgstr "Secuencia del consumo"
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: model:ir.model,name:maintenance_stock.model_stock_move
|
||||
msgid "Stock Move"
|
||||
msgstr "Movimiento de stock"
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: model:ir.actions.act_window,name:maintenance_stock.stock_move_action
|
||||
#: model:ir.ui.menu,name:maintenance_stock.stock_move_menu
|
||||
msgid "Stock Moves"
|
||||
msgstr "Movimientos de stock"
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: model:ir.model.fields,field_description:maintenance_stock.field_maintenance_equipment__stock_picking_ids
|
||||
msgid "Stock Picking"
|
||||
msgstr "Recolección de stock"
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: model_terms:ir.actions.act_window,help:maintenance_stock.stock_move_line_action
|
||||
msgid "There's no product move yet"
|
||||
msgstr "Aún no hay ningún movimiento de producto"
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: model_terms:ir.actions.act_window,help:maintenance_stock.stock_move_action
|
||||
msgid "This menu gives you the full traceability of inventory\n"
|
||||
" operations on a specific product. You can filter on the product\n"
|
||||
" to see all the past or future movements for the product."
|
||||
msgstr ""
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: model_terms:ir.ui.view,arch_db:maintenance_stock.stock_move_line_view_search
|
||||
msgid "To"
|
||||
msgstr "Destino"
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: model:product.product,name:maintenance_stock.product_toner
|
||||
#: model:product.template,name:maintenance_stock.product_toner_product_template
|
||||
msgid "Toner"
|
||||
msgstr "Tóner"
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: model:ir.model,name:maintenance_stock.model_stock_picking
|
||||
msgid "Transfer"
|
||||
msgstr "Trasferencia"
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: model:product.product,uom_name:maintenance_stock.product_toner
|
||||
#: model:product.template,uom_name:maintenance_stock.product_toner_product_template
|
||||
msgid "Unit(s)"
|
||||
msgstr "Unidad(es)"
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: model:ir.model,name:maintenance_stock.model_stock_warehouse
|
||||
msgid "Warehouse"
|
||||
msgstr "Almacén"
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: model:product.product,weight_uom_name:maintenance_stock.product_toner
|
||||
#: model:product.template,weight_uom_name:maintenance_stock.product_toner_product_template
|
||||
msgid "kg"
|
||||
msgstr "kg"
|
||||
196
maintenance_stock/i18n/it.po
Normal file
@@ -0,0 +1,196 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * maintenance_stock
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 12.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"PO-Revision-Date: 2023-05-18 13:32+0000\n"
|
||||
"Last-Translator: Francesco Foresti <francesco.foresti@ooops404.com>\n"
|
||||
"Language-Team: none\n"
|
||||
"Language: it\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
||||
"X-Generator: Weblate 4.16.4\n"
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: model_terms:ir.ui.view,arch_db:maintenance_stock.equipment_request_view_form
|
||||
#: model_terms:ir.ui.view,arch_db:maintenance_stock.hr_equipment_view_form
|
||||
msgid "<span class=\"o_stat_text\">Picking list</span>"
|
||||
msgstr "<span class=\"o_stat_text\">Lista prelievo</span>"
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: model_terms:ir.ui.view,arch_db:maintenance_stock.equipment_request_view_form
|
||||
#: model_terms:ir.ui.view,arch_db:maintenance_stock.hr_equipment_view_form
|
||||
msgid "<span class=\"o_stat_text\">Product Moves</span>"
|
||||
msgstr "<span class=\"o_stat_text\">Movimento prodotto</span>"
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: model_terms:ir.ui.view,arch_db:maintenance_stock.equipment_request_view_form
|
||||
#: model_terms:ir.ui.view,arch_db:maintenance_stock.hr_equipment_view_form
|
||||
msgid "<span class=\"o_stat_text\">Stock Moves</span>"
|
||||
msgstr "<span class=\"o_stat_text\">Movimento di magazzino</span>"
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: model:ir.model.fields,field_description:maintenance_stock.field_maintenance_equipment__allow_consumptions
|
||||
#: model:ir.model.fields,field_description:maintenance_stock.field_maintenance_request__allow_consumptions
|
||||
#: model_terms:ir.ui.view,arch_db:maintenance_stock.hr_equipment_request_view_search
|
||||
#: model_terms:ir.ui.view,arch_db:maintenance_stock.hr_equipment_view_search
|
||||
msgid "Allow Consumptions"
|
||||
msgstr "Consenti consumo"
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: code:addons/maintenance_stock/models/stock_warehouse.py:42
|
||||
#: model:stock.picking.type,name:maintenance_stock.main_picking_type_cons
|
||||
#, python-format
|
||||
msgid "Consumption"
|
||||
msgstr "Consumo"
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: model:ir.model.fields,field_description:maintenance_stock.field_stock_warehouse__wh_cons_loc_id
|
||||
msgid "Consumption Location"
|
||||
msgstr "Ubicazione di consumo"
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: model:ir.model.fields,field_description:maintenance_stock.field_stock_warehouse__cons_type_id
|
||||
msgid "Consumption Type"
|
||||
msgstr "Tipi di consumo"
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: code:addons/maintenance_stock/models/stock_warehouse.py:79
|
||||
#, python-format
|
||||
msgid "Consumptions"
|
||||
msgstr "Consumi"
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: model_terms:ir.actions.act_window,help:maintenance_stock.stock_move_action
|
||||
msgid "Create a new stock movement"
|
||||
msgstr "Crea un nuovo movimento di magazzino"
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: model:ir.model.fields,field_description:maintenance_stock.field_maintenance_equipment__default_consumption_warehouse_id
|
||||
#: model:ir.model.fields,field_description:maintenance_stock.field_maintenance_request__default_consumption_warehouse_id
|
||||
msgid "Default Consumption Warehouse"
|
||||
msgstr "Magazzino di consumo predefinito"
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: model:ir.model.fields,field_description:maintenance_stock.field_stock_move__maintenance_equipment_id
|
||||
#: model:ir.model.fields,field_description:maintenance_stock.field_stock_move_line__maintenance_equipment_id
|
||||
#: model:ir.model.fields,field_description:maintenance_stock.field_stock_picking__maintenance_equipment_id
|
||||
msgid "Equipment"
|
||||
msgstr "Attrezzatura"
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: model:ir.model,name:maintenance_stock.model_maintenance_equipment
|
||||
msgid "Maintenance Equipment"
|
||||
msgstr "Attrezzatura manutenzione"
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: model_terms:ir.ui.view,arch_db:maintenance_stock.view_picking_form
|
||||
msgid "Maintenance Info"
|
||||
msgstr "Informazioni manutenzione"
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: model:ir.model,name:maintenance_stock.model_maintenance_request
|
||||
#: model:ir.model.fields,field_description:maintenance_stock.field_stock_move__maintenance_request_id
|
||||
#: model:ir.model.fields,field_description:maintenance_stock.field_stock_move_line__maintenance_request_id
|
||||
#: model:ir.model.fields,field_description:maintenance_stock.field_stock_picking__maintenance_request_id
|
||||
msgid "Maintenance Request"
|
||||
msgstr "Richiesta manutenzione"
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: model_terms:ir.ui.view,arch_db:maintenance_stock.stock_move_line_view_search
|
||||
#: model_terms:ir.ui.view,arch_db:maintenance_stock.view_move_search
|
||||
#: model_terms:ir.ui.view,arch_db:maintenance_stock.view_picking_internal_search
|
||||
msgid "Maintenance Request consumption"
|
||||
msgstr "Consumo richiesta manutenzione"
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: model:ir.model.fields,field_description:maintenance_stock.field_maintenance_request__stock_picking_ids
|
||||
msgid "Picking list"
|
||||
msgstr "Lista prelievo"
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: model:ir.actions.act_window,name:maintenance_stock.stock_move_line_action
|
||||
#: model:ir.ui.menu,name:maintenance_stock.stock_move_line_menu
|
||||
msgid "Product Moves"
|
||||
msgstr "Movimenti prodotto"
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: model:ir.model,name:maintenance_stock.model_stock_move_line
|
||||
msgid "Product Moves (Stock Move Line)"
|
||||
msgstr "Movimenti prodotto (riga movimento di magazzino)"
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: code:addons/maintenance_stock/models/stock_warehouse.py:65
|
||||
#, python-format
|
||||
msgid "Sequence consumption"
|
||||
msgstr "Sequenza di consumo"
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: model:ir.model,name:maintenance_stock.model_stock_move
|
||||
msgid "Stock Move"
|
||||
msgstr "Movimento di magazzino"
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: model:ir.actions.act_window,name:maintenance_stock.stock_move_action
|
||||
#: model:ir.ui.menu,name:maintenance_stock.stock_move_menu
|
||||
msgid "Stock Moves"
|
||||
msgstr "Movimenti di magazzino"
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: model:ir.model.fields,field_description:maintenance_stock.field_maintenance_equipment__stock_picking_ids
|
||||
msgid "Stock Picking"
|
||||
msgstr "Prelievo di magazzino"
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: model_terms:ir.actions.act_window,help:maintenance_stock.stock_move_line_action
|
||||
msgid "There's no product move yet"
|
||||
msgstr "Non ci sono ancora movimenti di prodotto"
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: model_terms:ir.actions.act_window,help:maintenance_stock.stock_move_action
|
||||
msgid "This menu gives you the full traceability of inventory\n"
|
||||
" operations on a specific product. You can filter on the product\n"
|
||||
" to see all the past or future movements for the product."
|
||||
msgstr ""
|
||||
"Questo menu fornisce la completa tracciabilità delle operazioni\n"
|
||||
" di magazzino per un prodotto specifico. Si può filtrare sul "
|
||||
"prodotto\n"
|
||||
" per visualizzare i movimenti passati o futuri del prodotto."
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: model_terms:ir.ui.view,arch_db:maintenance_stock.stock_move_line_view_search
|
||||
msgid "To"
|
||||
msgstr "A"
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: model:product.product,name:maintenance_stock.product_toner
|
||||
#: model:product.template,name:maintenance_stock.product_toner_product_template
|
||||
msgid "Toner"
|
||||
msgstr "Inchiostro"
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: model:ir.model,name:maintenance_stock.model_stock_picking
|
||||
msgid "Transfer"
|
||||
msgstr "Trasferimento"
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: model:product.product,uom_name:maintenance_stock.product_toner
|
||||
#: model:product.template,uom_name:maintenance_stock.product_toner_product_template
|
||||
msgid "Unit(s)"
|
||||
msgstr "Unità"
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: model:ir.model,name:maintenance_stock.model_stock_warehouse
|
||||
msgid "Warehouse"
|
||||
msgstr "Magazzino"
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: model:product.product,weight_uom_name:maintenance_stock.product_toner
|
||||
#: model:product.template,weight_uom_name:maintenance_stock.product_toner_product_template
|
||||
msgid "kg"
|
||||
msgstr "kg"
|
||||
172
maintenance_stock/i18n/maintenance_stock.pot
Normal file
@@ -0,0 +1,172 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * maintenance_stock
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 18.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: maintenance_stock
|
||||
#: model_terms:ir.ui.view,arch_db:maintenance_stock.equipment_request_view_form
|
||||
#: model_terms:ir.ui.view,arch_db:maintenance_stock.hr_equipment_view_form
|
||||
msgid "<span class=\"o_stat_text\">Picking list</span>"
|
||||
msgstr ""
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: model_terms:ir.ui.view,arch_db:maintenance_stock.equipment_request_view_form
|
||||
#: model_terms:ir.ui.view,arch_db:maintenance_stock.hr_equipment_view_form
|
||||
msgid "<span class=\"o_stat_text\">Product Moves</span>"
|
||||
msgstr ""
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: model_terms:ir.ui.view,arch_db:maintenance_stock.equipment_request_view_form
|
||||
#: model_terms:ir.ui.view,arch_db:maintenance_stock.hr_equipment_view_form
|
||||
msgid "<span class=\"o_stat_text\">Stock Moves</span>"
|
||||
msgstr ""
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: model:ir.model.fields,field_description:maintenance_stock.field_maintenance_equipment__allow_consumptions
|
||||
#: model:ir.model.fields,field_description:maintenance_stock.field_maintenance_request__allow_consumptions
|
||||
#: model_terms:ir.ui.view,arch_db:maintenance_stock.hr_equipment_request_view_search
|
||||
#: model_terms:ir.ui.view,arch_db:maintenance_stock.hr_equipment_view_search
|
||||
msgid "Allow Consumptions"
|
||||
msgstr ""
|
||||
|
||||
#. module: maintenance_stock
|
||||
#. odoo-python
|
||||
#: code:addons/maintenance_stock/models/stock_warehouse.py:0
|
||||
#: model:stock.picking.type,name:maintenance_stock.main_picking_type_cons
|
||||
msgid "Consumption"
|
||||
msgstr ""
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: model:ir.model.fields,field_description:maintenance_stock.field_stock_warehouse__wh_cons_loc_id
|
||||
msgid "Consumption Location"
|
||||
msgstr ""
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: model:ir.model.fields,field_description:maintenance_stock.field_stock_warehouse__cons_type_id
|
||||
msgid "Consumption Type"
|
||||
msgstr ""
|
||||
|
||||
#. module: maintenance_stock
|
||||
#. odoo-python
|
||||
#: code:addons/maintenance_stock/models/stock_warehouse.py:0
|
||||
msgid "Consumptions"
|
||||
msgstr ""
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: model_terms:ir.actions.act_window,help:maintenance_stock.stock_move_action
|
||||
msgid "Create a new stock movement"
|
||||
msgstr ""
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: model:ir.model.fields,field_description:maintenance_stock.field_maintenance_equipment__default_consumption_warehouse_id
|
||||
#: model:ir.model.fields,field_description:maintenance_stock.field_maintenance_request__default_consumption_warehouse_id
|
||||
msgid "Default Consumption Warehouse"
|
||||
msgstr ""
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: model:ir.model.fields,field_description:maintenance_stock.field_stock_move__maintenance_equipment_id
|
||||
#: model:ir.model.fields,field_description:maintenance_stock.field_stock_move_line__maintenance_equipment_id
|
||||
#: model:ir.model.fields,field_description:maintenance_stock.field_stock_picking__maintenance_equipment_id
|
||||
msgid "Equipment"
|
||||
msgstr ""
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: model:ir.model,name:maintenance_stock.model_maintenance_equipment
|
||||
msgid "Maintenance Equipment"
|
||||
msgstr ""
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: model_terms:ir.ui.view,arch_db:maintenance_stock.view_picking_form
|
||||
msgid "Maintenance Info"
|
||||
msgstr ""
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: model:ir.model,name:maintenance_stock.model_maintenance_request
|
||||
#: model:ir.model.fields,field_description:maintenance_stock.field_stock_move__maintenance_request_id
|
||||
#: model:ir.model.fields,field_description:maintenance_stock.field_stock_move_line__maintenance_request_id
|
||||
#: model:ir.model.fields,field_description:maintenance_stock.field_stock_picking__maintenance_request_id
|
||||
msgid "Maintenance Request"
|
||||
msgstr ""
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: model_terms:ir.ui.view,arch_db:maintenance_stock.stock_move_line_view_search
|
||||
#: model_terms:ir.ui.view,arch_db:maintenance_stock.view_move_search
|
||||
#: model_terms:ir.ui.view,arch_db:maintenance_stock.view_picking_internal_search
|
||||
msgid "Maintenance Request consumption"
|
||||
msgstr ""
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: model:ir.model.fields,field_description:maintenance_stock.field_maintenance_request__stock_picking_ids
|
||||
msgid "Picking list"
|
||||
msgstr ""
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: model:ir.actions.act_window,name:maintenance_stock.stock_move_line_action
|
||||
#: model:ir.ui.menu,name:maintenance_stock.stock_move_line_menu
|
||||
msgid "Product Moves"
|
||||
msgstr ""
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: model:ir.model,name:maintenance_stock.model_stock_move_line
|
||||
msgid "Product Moves (Stock Move Line)"
|
||||
msgstr ""
|
||||
|
||||
#. module: maintenance_stock
|
||||
#. odoo-python
|
||||
#: code:addons/maintenance_stock/models/stock_warehouse.py:0
|
||||
msgid "Sequence consumption"
|
||||
msgstr ""
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: model:ir.model,name:maintenance_stock.model_stock_move
|
||||
msgid "Stock Move"
|
||||
msgstr ""
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: model:ir.actions.act_window,name:maintenance_stock.stock_move_action
|
||||
#: model:ir.ui.menu,name:maintenance_stock.stock_move_menu
|
||||
msgid "Stock Moves"
|
||||
msgstr ""
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: model_terms:ir.actions.act_window,help:maintenance_stock.stock_move_line_action
|
||||
msgid "There's no product move yet"
|
||||
msgstr ""
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: model_terms:ir.actions.act_window,help:maintenance_stock.stock_move_action
|
||||
msgid ""
|
||||
"This menu gives you the full traceability of inventory\n"
|
||||
" operations on a specific product. You can filter on the product\n"
|
||||
" to see all the past or future movements for the product."
|
||||
msgstr ""
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: model_terms:ir.ui.view,arch_db:maintenance_stock.stock_move_line_view_search
|
||||
msgid "To"
|
||||
msgstr ""
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: model:product.template,name:maintenance_stock.product_toner_product_template
|
||||
msgid "Toner"
|
||||
msgstr ""
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: model:ir.model,name:maintenance_stock.model_stock_picking
|
||||
msgid "Transfer"
|
||||
msgstr ""
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: model:ir.model,name:maintenance_stock.model_stock_warehouse
|
||||
msgid "Warehouse"
|
||||
msgstr ""
|
||||
197
maintenance_stock/i18n/pt_BR.po
Normal file
@@ -0,0 +1,197 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * maintenance_stock
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 12.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"PO-Revision-Date: 2021-03-15 06:45+0000\n"
|
||||
"Last-Translator: Marcel Savegnago <marcel.savegnago@gmail.com>\n"
|
||||
"Language-Team: none\n"
|
||||
"Language: pt_BR\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Plural-Forms: nplurals=2; plural=n > 1;\n"
|
||||
"X-Generator: Weblate 4.3.2\n"
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: model_terms:ir.ui.view,arch_db:maintenance_stock.equipment_request_view_form
|
||||
#: model_terms:ir.ui.view,arch_db:maintenance_stock.hr_equipment_view_form
|
||||
msgid "<span class=\"o_stat_text\">Picking list</span>"
|
||||
msgstr "<span class=\"o_stat_text\">Lista de escolha</span>"
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: model_terms:ir.ui.view,arch_db:maintenance_stock.equipment_request_view_form
|
||||
#: model_terms:ir.ui.view,arch_db:maintenance_stock.hr_equipment_view_form
|
||||
msgid "<span class=\"o_stat_text\">Product Moves</span>"
|
||||
msgstr "<span class=\"o_stat_text\">Movimentos do Produto</span>"
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: model_terms:ir.ui.view,arch_db:maintenance_stock.equipment_request_view_form
|
||||
#: model_terms:ir.ui.view,arch_db:maintenance_stock.hr_equipment_view_form
|
||||
msgid "<span class=\"o_stat_text\">Stock Moves</span>"
|
||||
msgstr "<span class=\"o_stat_text\">Movimentos de Ações</span>"
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: model:ir.model.fields,field_description:maintenance_stock.field_maintenance_equipment__allow_consumptions
|
||||
#: model:ir.model.fields,field_description:maintenance_stock.field_maintenance_request__allow_consumptions
|
||||
#: model_terms:ir.ui.view,arch_db:maintenance_stock.hr_equipment_request_view_search
|
||||
#: model_terms:ir.ui.view,arch_db:maintenance_stock.hr_equipment_view_search
|
||||
msgid "Allow Consumptions"
|
||||
msgstr "Permitir Consumos"
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: code:addons/maintenance_stock/models/stock_warehouse.py:42
|
||||
#: model:stock.picking.type,name:maintenance_stock.main_picking_type_cons
|
||||
#, python-format
|
||||
msgid "Consumption"
|
||||
msgstr "Consumo"
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: model:ir.model.fields,field_description:maintenance_stock.field_stock_warehouse__wh_cons_loc_id
|
||||
msgid "Consumption Location"
|
||||
msgstr "Localização de Consumo"
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: model:ir.model.fields,field_description:maintenance_stock.field_stock_warehouse__cons_type_id
|
||||
msgid "Consumption Type"
|
||||
msgstr "Tipo de Consumo"
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: code:addons/maintenance_stock/models/stock_warehouse.py:79
|
||||
#, python-format
|
||||
msgid "Consumptions"
|
||||
msgstr "Consumos"
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: model_terms:ir.actions.act_window,help:maintenance_stock.stock_move_action
|
||||
msgid "Create a new stock movement"
|
||||
msgstr "Crie um novo movimento de ações"
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: model:ir.model.fields,field_description:maintenance_stock.field_maintenance_equipment__default_consumption_warehouse_id
|
||||
#: model:ir.model.fields,field_description:maintenance_stock.field_maintenance_request__default_consumption_warehouse_id
|
||||
msgid "Default Consumption Warehouse"
|
||||
msgstr "Armazém de Consumo Padrão"
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: model:ir.model.fields,field_description:maintenance_stock.field_stock_move__maintenance_equipment_id
|
||||
#: model:ir.model.fields,field_description:maintenance_stock.field_stock_move_line__maintenance_equipment_id
|
||||
#: model:ir.model.fields,field_description:maintenance_stock.field_stock_picking__maintenance_equipment_id
|
||||
msgid "Equipment"
|
||||
msgstr "Equipamento"
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: model:ir.model,name:maintenance_stock.model_maintenance_equipment
|
||||
msgid "Maintenance Equipment"
|
||||
msgstr "Equipamento de Manutenção"
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: model_terms:ir.ui.view,arch_db:maintenance_stock.view_picking_form
|
||||
msgid "Maintenance Info"
|
||||
msgstr "Informações de Manutenção"
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: model:ir.model,name:maintenance_stock.model_maintenance_request
|
||||
#: model:ir.model.fields,field_description:maintenance_stock.field_stock_move__maintenance_request_id
|
||||
#: model:ir.model.fields,field_description:maintenance_stock.field_stock_move_line__maintenance_request_id
|
||||
#: model:ir.model.fields,field_description:maintenance_stock.field_stock_picking__maintenance_request_id
|
||||
msgid "Maintenance Request"
|
||||
msgstr "Requisição de Manutenção"
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: model_terms:ir.ui.view,arch_db:maintenance_stock.stock_move_line_view_search
|
||||
#: model_terms:ir.ui.view,arch_db:maintenance_stock.view_move_search
|
||||
#: model_terms:ir.ui.view,arch_db:maintenance_stock.view_picking_internal_search
|
||||
msgid "Maintenance Request consumption"
|
||||
msgstr "Consumo de Requisição de Manutenção"
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: model:ir.model.fields,field_description:maintenance_stock.field_maintenance_request__stock_picking_ids
|
||||
msgid "Picking list"
|
||||
msgstr "Lista de separação"
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: model:ir.actions.act_window,name:maintenance_stock.stock_move_line_action
|
||||
#: model:ir.ui.menu,name:maintenance_stock.stock_move_line_menu
|
||||
msgid "Product Moves"
|
||||
msgstr "Movimentos do Produto"
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: model:ir.model,name:maintenance_stock.model_stock_move_line
|
||||
msgid "Product Moves (Stock Move Line)"
|
||||
msgstr "Movimentos do Produto (Linha do Movimento do Estoque)"
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: code:addons/maintenance_stock/models/stock_warehouse.py:65
|
||||
#, python-format
|
||||
msgid "Sequence consumption"
|
||||
msgstr "Consumo de sequência"
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: model:ir.model,name:maintenance_stock.model_stock_move
|
||||
msgid "Stock Move"
|
||||
msgstr "Movimento de Estoque"
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: model:ir.actions.act_window,name:maintenance_stock.stock_move_action
|
||||
#: model:ir.ui.menu,name:maintenance_stock.stock_move_menu
|
||||
msgid "Stock Moves"
|
||||
msgstr "Movimentos de Estoque"
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: model:ir.model.fields,field_description:maintenance_stock.field_maintenance_equipment__stock_picking_ids
|
||||
msgid "Stock Picking"
|
||||
msgstr "Separação de Estoque"
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: model_terms:ir.actions.act_window,help:maintenance_stock.stock_move_line_action
|
||||
msgid "There's no product move yet"
|
||||
msgstr "Ainda não há nenhum movimento do produto"
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: model_terms:ir.actions.act_window,help:maintenance_stock.stock_move_action
|
||||
msgid "This menu gives you the full traceability of inventory\n"
|
||||
" operations on a specific product. You can filter on the product\n"
|
||||
" to see all the past or future movements for the product."
|
||||
msgstr ""
|
||||
"Este menu oferece a você a rastreabilidade completa de operações\n"
|
||||
" de inventário em um produto específico. Você pode filtrar o "
|
||||
"produto\n"
|
||||
" para ver todos as movimentações passadas ou futuras para o "
|
||||
"produto."
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: model_terms:ir.ui.view,arch_db:maintenance_stock.stock_move_line_view_search
|
||||
msgid "To"
|
||||
msgstr "Para"
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: model:product.product,name:maintenance_stock.product_toner
|
||||
#: model:product.template,name:maintenance_stock.product_toner_product_template
|
||||
msgid "Toner"
|
||||
msgstr "Toner"
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: model:ir.model,name:maintenance_stock.model_stock_picking
|
||||
msgid "Transfer"
|
||||
msgstr "Transferir"
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: model:product.product,uom_name:maintenance_stock.product_toner
|
||||
#: model:product.template,uom_name:maintenance_stock.product_toner_product_template
|
||||
msgid "Unit(s)"
|
||||
msgstr "UN"
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: model:ir.model,name:maintenance_stock.model_stock_warehouse
|
||||
msgid "Warehouse"
|
||||
msgstr "Armazém"
|
||||
|
||||
#. module: maintenance_stock
|
||||
#: model:product.product,weight_uom_name:maintenance_stock.product_toner
|
||||
#: model:product.template,weight_uom_name:maintenance_stock.product_toner_product_template
|
||||
msgid "kg"
|
||||
msgstr "kg"
|
||||
6
maintenance_stock/models/__init__.py
Normal file
@@ -0,0 +1,6 @@
|
||||
from . import maintenance_equipment
|
||||
from . import maintenance_request
|
||||
from . import stock_move
|
||||
from . import stock_move_line
|
||||
from . import stock_picking
|
||||
from . import stock_warehouse
|
||||
65
maintenance_stock/models/maintenance_equipment.py
Normal file
@@ -0,0 +1,65 @@
|
||||
# © 2020 Solvos Consultoría Informática (<http://www.solvos.es>)
|
||||
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
|
||||
from odoo import api, fields, models
|
||||
|
||||
|
||||
class MaintenanceEquipment(models.Model):
|
||||
_inherit = "maintenance.equipment"
|
||||
|
||||
allow_consumptions = fields.Boolean(
|
||||
groups="stock.group_stock_user",
|
||||
)
|
||||
default_consumption_warehouse_id = fields.Many2one(
|
||||
string="Default Consumption Warehouse",
|
||||
comodel_name="stock.warehouse",
|
||||
groups="stock.group_stock_user",
|
||||
)
|
||||
|
||||
@api.onchange("allow_consumptions")
|
||||
def _onchange_allow_consumptions(self):
|
||||
if not self.allow_consumptions:
|
||||
self.default_consumption_warehouse_id = False
|
||||
|
||||
def action_view_stock_picking_ids(self):
|
||||
self.ensure_one()
|
||||
action = self.env["ir.actions.act_window"]._for_xml_id(
|
||||
"stock.action_picking_tree_all"
|
||||
)
|
||||
action["domain"] = [("maintenance_equipment_id", "=", self.id)]
|
||||
action["context"] = {
|
||||
"show_maintenance_request_id": True,
|
||||
}
|
||||
return action
|
||||
|
||||
def action_view_stock_move_ids(self):
|
||||
self.ensure_one()
|
||||
action = self.env["ir.actions.act_window"]._for_xml_id(
|
||||
"stock.stock_move_action"
|
||||
)
|
||||
action["domain"] = [("maintenance_equipment_id", "=", self.id)]
|
||||
return action
|
||||
|
||||
def action_view_stock_move_line_ids(self):
|
||||
self.ensure_one()
|
||||
action = self.env["ir.actions.act_window"]._for_xml_id(
|
||||
"stock.stock_move_line_action"
|
||||
)
|
||||
action["domain"] = [("maintenance_equipment_id", "=", self.id)]
|
||||
|
||||
# TODO Grouping by destination allows separating consumptions
|
||||
# and returns. Look for a better system and remove this
|
||||
show_groupby_to = (
|
||||
len(
|
||||
self.env["stock.move.line"]
|
||||
.search([("maintenance_equipment_id", "=", self.id)])
|
||||
.mapped("location_dest_id")
|
||||
)
|
||||
> 1
|
||||
)
|
||||
|
||||
action["context"] = {
|
||||
"search_default_done": 1,
|
||||
"search_default_groupby_location_dest_id": show_groupby_to,
|
||||
"search_default_groupby_product_id": 1,
|
||||
}
|
||||
return action
|
||||
69
maintenance_stock/models/maintenance_request.py
Normal file
@@ -0,0 +1,69 @@
|
||||
# © 2020 Solvos Consultoría Informática (<http://www.solvos.es>)
|
||||
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
|
||||
from odoo import fields, models
|
||||
|
||||
|
||||
class MaintenanceRequest(models.Model):
|
||||
_inherit = "maintenance.request"
|
||||
|
||||
allow_consumptions = fields.Boolean(
|
||||
related="equipment_id.allow_consumptions",
|
||||
store=True,
|
||||
groups="stock.group_stock_user",
|
||||
)
|
||||
default_consumption_warehouse_id = fields.Many2one(
|
||||
related="equipment_id.default_consumption_warehouse_id",
|
||||
groups="stock.group_stock_user",
|
||||
)
|
||||
stock_picking_ids = fields.One2many(
|
||||
string="Picking list",
|
||||
comodel_name="stock.picking",
|
||||
inverse_name="maintenance_request_id",
|
||||
groups="stock.group_stock_user",
|
||||
)
|
||||
|
||||
def action_view_stock_picking_ids(self):
|
||||
self.ensure_one()
|
||||
action = self.env["ir.actions.act_window"]._for_xml_id(
|
||||
"stock.stock_picking_action_picking_type"
|
||||
)
|
||||
action["domain"] = [("maintenance_request_id", "=", self.id)]
|
||||
cons_type = self.default_consumption_warehouse_id.cons_type_id
|
||||
action["context"] = {
|
||||
"default_picking_type_id": cons_type.id,
|
||||
"default_maintenance_request_id": self.id,
|
||||
}
|
||||
return action
|
||||
|
||||
def action_view_stock_move_ids(self):
|
||||
self.ensure_one()
|
||||
action = self.env["ir.actions.act_window"]._for_xml_id(
|
||||
"stock.stock_move_action"
|
||||
)
|
||||
action["domain"] = [("maintenance_request_id", "=", self.id)]
|
||||
return action
|
||||
|
||||
def action_view_stock_move_line_ids(self):
|
||||
self.ensure_one()
|
||||
action = self.env["ir.actions.act_window"]._for_xml_id(
|
||||
"stock.stock_move_line_action"
|
||||
)
|
||||
action["domain"] = [("maintenance_request_id", "=", self.id)]
|
||||
|
||||
# TODO Grouping by destination allows separating consumptions
|
||||
# and returns. Look for a better system and remove this
|
||||
show_groupby_to = (
|
||||
len(
|
||||
self.env["stock.move.line"]
|
||||
.search([("maintenance_request_id", "=", self.id)])
|
||||
.mapped("location_dest_id")
|
||||
)
|
||||
> 1
|
||||
)
|
||||
|
||||
action["context"] = {
|
||||
"search_default_done": 1,
|
||||
"search_default_groupby_location_dest_id": show_groupby_to,
|
||||
"search_default_groupby_product_id": 1,
|
||||
}
|
||||
return action
|
||||
16
maintenance_stock/models/stock_move.py
Normal file
@@ -0,0 +1,16 @@
|
||||
# © 2020 Solvos Consultoría Informática (<http://www.solvos.es>)
|
||||
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
|
||||
from odoo import fields, models
|
||||
|
||||
|
||||
class StockMove(models.Model):
|
||||
_inherit = "stock.move"
|
||||
|
||||
maintenance_request_id = fields.Many2one(
|
||||
comodel_name="maintenance.request",
|
||||
related="picking_id.maintenance_request_id",
|
||||
)
|
||||
maintenance_equipment_id = fields.Many2one(
|
||||
comodel_name="maintenance.equipment",
|
||||
related="picking_id.maintenance_equipment_id",
|
||||
)
|
||||
16
maintenance_stock/models/stock_move_line.py
Normal file
@@ -0,0 +1,16 @@
|
||||
# © 2020 Solvos Consultoría Informática (<http://www.solvos.es>)
|
||||
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
|
||||
from odoo import fields, models
|
||||
|
||||
|
||||
class StockMoveLine(models.Model):
|
||||
_inherit = "stock.move.line"
|
||||
|
||||
maintenance_request_id = fields.Many2one(
|
||||
comodel_name="maintenance.request",
|
||||
related="picking_id.maintenance_request_id",
|
||||
)
|
||||
maintenance_equipment_id = fields.Many2one(
|
||||
comodel_name="maintenance.equipment",
|
||||
related="picking_id.maintenance_equipment_id",
|
||||
)
|
||||
17
maintenance_stock/models/stock_picking.py
Normal file
@@ -0,0 +1,17 @@
|
||||
# © 2020 Solvos Consultoría Informática (<http://www.solvos.es>)
|
||||
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
|
||||
from odoo import fields, models
|
||||
|
||||
|
||||
class StockPicking(models.Model):
|
||||
_inherit = "stock.picking"
|
||||
|
||||
maintenance_request_id = fields.Many2one(
|
||||
comodel_name="maintenance.request",
|
||||
index=True,
|
||||
)
|
||||
maintenance_equipment_id = fields.Many2one(
|
||||
comodel_name="maintenance.equipment",
|
||||
related="maintenance_request_id.equipment_id",
|
||||
store=True,
|
||||
)
|
||||
82
maintenance_stock/models/stock_warehouse.py
Normal file
@@ -0,0 +1,82 @@
|
||||
# © 2020 Solvos Consultoría Informática (<http://www.solvos.es>)
|
||||
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
|
||||
from odoo import _, fields, models
|
||||
|
||||
|
||||
class StockWarehouse(models.Model):
|
||||
_inherit = "stock.warehouse"
|
||||
|
||||
wh_cons_loc_id = fields.Many2one(
|
||||
"stock.location", "Consumption Location", domain=[("usage", "=", "inventory")]
|
||||
)
|
||||
cons_type_id = fields.Many2one("stock.picking.type", "Consumption Type")
|
||||
|
||||
def _create_or_update_sequences_and_picking_types(self):
|
||||
warehouse_data = super()._create_or_update_sequences_and_picking_types()
|
||||
PickingType = self.env["stock.picking.type"]
|
||||
|
||||
# TODO when is called for an existing warehouse (e.g. during the
|
||||
# module installation in_type_id is not accesible). Temporary
|
||||
# solved with a hook
|
||||
if "cons_type_id" in warehouse_data:
|
||||
PickingType.browse(warehouse_data["cons_type_id"]).write(
|
||||
{
|
||||
"return_picking_type_id": warehouse_data.get("in_type_id", False),
|
||||
}
|
||||
)
|
||||
return warehouse_data
|
||||
|
||||
def _update_name_and_code(self, new_name=False, new_code=False):
|
||||
for warehouse in self:
|
||||
sequence_data = warehouse._get_sequence_values()
|
||||
warehouse.cons_type_id.sequence_id.write(sequence_data["cons_type_id"])
|
||||
|
||||
def _get_picking_type_create_values(self, max_sequence):
|
||||
data, max_sequence_new = super()._get_picking_type_create_values(max_sequence)
|
||||
return (
|
||||
{
|
||||
**data,
|
||||
"cons_type_id": {
|
||||
"name": _("Consumption"),
|
||||
"code": "outgoing",
|
||||
"use_create_lots": False,
|
||||
"use_existing_lots": True,
|
||||
"default_location_src_id": self.lot_stock_id.id,
|
||||
"default_location_dest_id": self.wh_cons_loc_id.id,
|
||||
"sequence_code": max_sequence_new,
|
||||
"barcode": self.code.replace(" ", "").upper() + "-CONS",
|
||||
"company_id": self.company_id.id or self.env.company.id,
|
||||
},
|
||||
},
|
||||
max_sequence_new + 1,
|
||||
)
|
||||
|
||||
def _get_picking_type_update_values(self):
|
||||
data = super()._get_picking_type_update_values()
|
||||
return {**data, "cons_type_id": {}}
|
||||
|
||||
def _get_sequence_values(self, name=False, code=False):
|
||||
data = super()._get_sequence_values(name=name, code=code)
|
||||
return {
|
||||
**data,
|
||||
"cons_type_id": {
|
||||
"name": self.name + " " + _("Sequence consumption"),
|
||||
"prefix": self.code + "/CONS/",
|
||||
"padding": 5,
|
||||
"company_id": self.company_id.id,
|
||||
},
|
||||
}
|
||||
|
||||
def _get_locations_values(self, vals, code=False):
|
||||
sub_locations = super()._get_locations_values(vals, code)
|
||||
code = vals.get("code") or self.code
|
||||
code = code.replace(" ", "").upper()
|
||||
company_id = vals.get("company_id", self.company_id.id)
|
||||
return {
|
||||
**sub_locations,
|
||||
"wh_cons_loc_id": {
|
||||
"name": _("Consumptions"),
|
||||
"usage": "inventory",
|
||||
"barcode": self._valid_barcode(code + "-CONS", company_id),
|
||||
},
|
||||
}
|
||||
3
maintenance_stock/pyproject.toml
Normal file
@@ -0,0 +1,3 @@
|
||||
[build-system]
|
||||
requires = ["whool"]
|
||||
build-backend = "whool.buildapi"
|
||||
1
maintenance_stock/readme/CONTRIBUTORS.md
Normal file
@@ -0,0 +1 @@
|
||||
- David Alonso \<david.alonso@solvos.es\>
|
||||
2
maintenance_stock/readme/DESCRIPTION.md
Normal file
@@ -0,0 +1,2 @@
|
||||
This module extends the functionality of Odoo Maintenance module by
|
||||
allowing link stock consumptions to maintenance requests.
|
||||
4
maintenance_stock/readme/ROADMAP.md
Normal file
@@ -0,0 +1,4 @@
|
||||
- Product standard list. Enable defining product standard lists (at
|
||||
least, product and quantity per line), and link them with equipments.
|
||||
Then, every maintenance request could select one of them and
|
||||
automatically fill the product and quantity list.
|
||||
27
maintenance_stock/readme/USAGE.md
Normal file
@@ -0,0 +1,27 @@
|
||||
Once installed, first you should enable consumptions for a certain
|
||||
equipment and filling a default warehouse for the picking operations:
|
||||
|
||||

|
||||
|
||||
Then, for every mainteance request of this equipment, *Picking List*
|
||||
button allows us to make consumptions, that will be picking documents
|
||||
with their own sequence:
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
By default, the origin location for this operations will be the stock
|
||||
location for the default warehouse, and destination a new *Consumptions*
|
||||
location, that will not compute for stock inventory, like e.g. partner
|
||||
locations:
|
||||
|
||||

|
||||
|
||||
From both request and equipment forms these stock operations and
|
||||
*Product Moves* are available.
|
||||
|
||||
Return operations are also enabled, and will be linked to the request
|
||||
and equipment as well:
|
||||
|
||||

|
||||
BIN
maintenance_stock/static/description/equipment.png
Normal file
|
After Width: | Height: | Size: 2.9 KiB |
BIN
maintenance_stock/static/description/icon.png
Normal file
|
After Width: | Height: | Size: 9.2 KiB |
462
maintenance_stock/static/description/index.html
Normal file
@@ -0,0 +1,462 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<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: https://docutils.sourceforge.io/" />
|
||||
<title>README.rst</title>
|
||||
<style type="text/css">
|
||||
|
||||
/*
|
||||
:Author: David Goodger (goodger@python.org)
|
||||
:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $
|
||||
:Copyright: This stylesheet has been placed in the public domain.
|
||||
|
||||
Default cascading style sheet for the HTML output of Docutils.
|
||||
Despite the name, some widely supported CSS2 features are used.
|
||||
|
||||
See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
|
||||
customize this style sheet.
|
||||
*/
|
||||
|
||||
/* used to remove borders from tables and images */
|
||||
.borderless, table.borderless td, table.borderless th {
|
||||
border: 0 }
|
||||
|
||||
table.borderless td, table.borderless th {
|
||||
/* Override padding for "table.docutils td" with "! important".
|
||||
The right padding separates the table cells. */
|
||||
padding: 0 0.5em 0 0 ! important }
|
||||
|
||||
.first {
|
||||
/* Override more specific margin styles with "! important". */
|
||||
margin-top: 0 ! important }
|
||||
|
||||
.last, .with-subtitle {
|
||||
margin-bottom: 0 ! important }
|
||||
|
||||
.hidden {
|
||||
display: none }
|
||||
|
||||
.subscript {
|
||||
vertical-align: sub;
|
||||
font-size: smaller }
|
||||
|
||||
.superscript {
|
||||
vertical-align: super;
|
||||
font-size: smaller }
|
||||
|
||||
a.toc-backref {
|
||||
text-decoration: none ;
|
||||
color: black }
|
||||
|
||||
blockquote.epigraph {
|
||||
margin: 2em 5em ; }
|
||||
|
||||
dl.docutils dd {
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
object[type="image/svg+xml"], object[type="application/x-shockwave-flash"] {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* Uncomment (and remove this text!) to get bold-faced definition list terms
|
||||
dl.docutils dt {
|
||||
font-weight: bold }
|
||||
*/
|
||||
|
||||
div.abstract {
|
||||
margin: 2em 5em }
|
||||
|
||||
div.abstract p.topic-title {
|
||||
font-weight: bold ;
|
||||
text-align: center }
|
||||
|
||||
div.admonition, div.attention, div.caution, div.danger, div.error,
|
||||
div.hint, div.important, div.note, div.tip, div.warning {
|
||||
margin: 2em ;
|
||||
border: medium outset ;
|
||||
padding: 1em }
|
||||
|
||||
div.admonition p.admonition-title, div.hint p.admonition-title,
|
||||
div.important p.admonition-title, div.note p.admonition-title,
|
||||
div.tip p.admonition-title {
|
||||
font-weight: bold ;
|
||||
font-family: sans-serif }
|
||||
|
||||
div.attention p.admonition-title, div.caution p.admonition-title,
|
||||
div.danger p.admonition-title, div.error p.admonition-title,
|
||||
div.warning p.admonition-title, .code .error {
|
||||
color: red ;
|
||||
font-weight: bold ;
|
||||
font-family: sans-serif }
|
||||
|
||||
/* Uncomment (and remove this text!) to get reduced vertical space in
|
||||
compound paragraphs.
|
||||
div.compound .compound-first, div.compound .compound-middle {
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
div.compound .compound-last, div.compound .compound-middle {
|
||||
margin-top: 0.5em }
|
||||
*/
|
||||
|
||||
div.dedication {
|
||||
margin: 2em 5em ;
|
||||
text-align: center ;
|
||||
font-style: italic }
|
||||
|
||||
div.dedication p.topic-title {
|
||||
font-weight: bold ;
|
||||
font-style: normal }
|
||||
|
||||
div.figure {
|
||||
margin-left: 2em ;
|
||||
margin-right: 2em }
|
||||
|
||||
div.footer, div.header {
|
||||
clear: both;
|
||||
font-size: smaller }
|
||||
|
||||
div.line-block {
|
||||
display: block ;
|
||||
margin-top: 1em ;
|
||||
margin-bottom: 1em }
|
||||
|
||||
div.line-block div.line-block {
|
||||
margin-top: 0 ;
|
||||
margin-bottom: 0 ;
|
||||
margin-left: 1.5em }
|
||||
|
||||
div.sidebar {
|
||||
margin: 0 0 0.5em 1em ;
|
||||
border: medium outset ;
|
||||
padding: 1em ;
|
||||
background-color: #ffffee ;
|
||||
width: 40% ;
|
||||
float: right ;
|
||||
clear: right }
|
||||
|
||||
div.sidebar p.rubric {
|
||||
font-family: sans-serif ;
|
||||
font-size: medium }
|
||||
|
||||
div.system-messages {
|
||||
margin: 5em }
|
||||
|
||||
div.system-messages h1 {
|
||||
color: red }
|
||||
|
||||
div.system-message {
|
||||
border: medium outset ;
|
||||
padding: 1em }
|
||||
|
||||
div.system-message p.system-message-title {
|
||||
color: red ;
|
||||
font-weight: bold }
|
||||
|
||||
div.topic {
|
||||
margin: 2em }
|
||||
|
||||
h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
|
||||
h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
|
||||
margin-top: 0.4em }
|
||||
|
||||
h1.title {
|
||||
text-align: center }
|
||||
|
||||
h2.subtitle {
|
||||
text-align: center }
|
||||
|
||||
hr.docutils {
|
||||
width: 75% }
|
||||
|
||||
img.align-left, .figure.align-left, object.align-left, table.align-left {
|
||||
clear: left ;
|
||||
float: left ;
|
||||
margin-right: 1em }
|
||||
|
||||
img.align-right, .figure.align-right, object.align-right, table.align-right {
|
||||
clear: right ;
|
||||
float: right ;
|
||||
margin-left: 1em }
|
||||
|
||||
img.align-center, .figure.align-center, object.align-center {
|
||||
display: block;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
table.align-center {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.align-left {
|
||||
text-align: left }
|
||||
|
||||
.align-center {
|
||||
clear: both ;
|
||||
text-align: center }
|
||||
|
||||
.align-right {
|
||||
text-align: right }
|
||||
|
||||
/* reset inner alignment in figures */
|
||||
div.align-right {
|
||||
text-align: inherit }
|
||||
|
||||
/* div.align-center * { */
|
||||
/* text-align: left } */
|
||||
|
||||
.align-top {
|
||||
vertical-align: top }
|
||||
|
||||
.align-middle {
|
||||
vertical-align: middle }
|
||||
|
||||
.align-bottom {
|
||||
vertical-align: bottom }
|
||||
|
||||
ol.simple, ul.simple {
|
||||
margin-bottom: 1em }
|
||||
|
||||
ol.arabic {
|
||||
list-style: decimal }
|
||||
|
||||
ol.loweralpha {
|
||||
list-style: lower-alpha }
|
||||
|
||||
ol.upperalpha {
|
||||
list-style: upper-alpha }
|
||||
|
||||
ol.lowerroman {
|
||||
list-style: lower-roman }
|
||||
|
||||
ol.upperroman {
|
||||
list-style: upper-roman }
|
||||
|
||||
p.attribution {
|
||||
text-align: right ;
|
||||
margin-left: 50% }
|
||||
|
||||
p.caption {
|
||||
font-style: italic }
|
||||
|
||||
p.credits {
|
||||
font-style: italic ;
|
||||
font-size: smaller }
|
||||
|
||||
p.label {
|
||||
white-space: nowrap }
|
||||
|
||||
p.rubric {
|
||||
font-weight: bold ;
|
||||
font-size: larger ;
|
||||
color: maroon ;
|
||||
text-align: center }
|
||||
|
||||
p.sidebar-title {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold ;
|
||||
font-size: larger }
|
||||
|
||||
p.sidebar-subtitle {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold }
|
||||
|
||||
p.topic-title {
|
||||
font-weight: bold }
|
||||
|
||||
pre.address {
|
||||
margin-bottom: 0 ;
|
||||
margin-top: 0 ;
|
||||
font: inherit }
|
||||
|
||||
pre.literal-block, pre.doctest-block, pre.math, pre.code {
|
||||
margin-left: 2em ;
|
||||
margin-right: 2em }
|
||||
|
||||
pre.code .ln { color: gray; } /* line numbers */
|
||||
pre.code, code { background-color: #eeeeee }
|
||||
pre.code .comment, code .comment { color: #5C6576 }
|
||||
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
|
||||
pre.code .literal.string, code .literal.string { color: #0C5404 }
|
||||
pre.code .name.builtin, code .name.builtin { color: #352B84 }
|
||||
pre.code .deleted, code .deleted { background-color: #DEB0A1}
|
||||
pre.code .inserted, code .inserted { background-color: #A3D289}
|
||||
|
||||
span.classifier {
|
||||
font-family: sans-serif ;
|
||||
font-style: oblique }
|
||||
|
||||
span.classifier-delimiter {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold }
|
||||
|
||||
span.interpreted {
|
||||
font-family: sans-serif }
|
||||
|
||||
span.option {
|
||||
white-space: nowrap }
|
||||
|
||||
span.pre {
|
||||
white-space: pre }
|
||||
|
||||
span.problematic, pre.problematic {
|
||||
color: red }
|
||||
|
||||
span.section-subtitle {
|
||||
/* font-size relative to parent (h1..h6 element) */
|
||||
font-size: 80% }
|
||||
|
||||
table.citation {
|
||||
border-left: solid 1px gray;
|
||||
margin-left: 1px }
|
||||
|
||||
table.docinfo {
|
||||
margin: 2em 4em }
|
||||
|
||||
table.docutils {
|
||||
margin-top: 0.5em ;
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
table.footnote {
|
||||
border-left: solid 1px black;
|
||||
margin-left: 1px }
|
||||
|
||||
table.docutils td, table.docutils th,
|
||||
table.docinfo td, table.docinfo th {
|
||||
padding-left: 0.5em ;
|
||||
padding-right: 0.5em ;
|
||||
vertical-align: top }
|
||||
|
||||
table.docutils th.field-name, table.docinfo th.docinfo-name {
|
||||
font-weight: bold ;
|
||||
text-align: left ;
|
||||
white-space: nowrap ;
|
||||
padding-left: 0 }
|
||||
|
||||
/* "booktabs" style (no vertical lines) */
|
||||
table.docutils.booktabs {
|
||||
border: 0px;
|
||||
border-top: 2px solid;
|
||||
border-bottom: 2px solid;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
table.docutils.booktabs * {
|
||||
border: 0px;
|
||||
}
|
||||
table.docutils.booktabs th {
|
||||
border-bottom: thin solid;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
|
||||
h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
|
||||
font-size: 100% }
|
||||
|
||||
ul.auto-toc {
|
||||
list-style-type: none }
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="document">
|
||||
|
||||
|
||||
<a class="reference external image-reference" href="https://odoo-community.org/get-involved?utm_source=readme">
|
||||
<img alt="Odoo Community Association" src="https://odoo-community.org/readme-banner-image" />
|
||||
</a>
|
||||
<div class="section" id="maintenance-stock">
|
||||
<h1>Maintenance Stock</h1>
|
||||
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
!! This file is generated by oca-gen-addon-readme !!
|
||||
!! changes will be overwritten. !!
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
!! source digest: sha256:3c75e13351d3b04da1a5646ec6fd3297366ae5088199ed3e128585025f63197b
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/license-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/maintenance/tree/18.0/maintenance_stock"><img alt="OCA/maintenance" src="https://img.shields.io/badge/github-OCA%2Fmaintenance-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/maintenance-18-0/maintenance-18-0-maintenance_stock"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/maintenance&target_branch=18.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
|
||||
<p>This module extends the functionality of Odoo Maintenance module by
|
||||
allowing link stock consumptions to maintenance requests.</p>
|
||||
<p><strong>Table of contents</strong></p>
|
||||
<div class="contents local topic" id="contents">
|
||||
<ul class="simple">
|
||||
<li><a class="reference internal" href="#usage" id="toc-entry-1">Usage</a></li>
|
||||
<li><a class="reference internal" href="#known-issues-roadmap" id="toc-entry-2">Known issues / Roadmap</a></li>
|
||||
<li><a class="reference internal" href="#bug-tracker" id="toc-entry-3">Bug Tracker</a></li>
|
||||
<li><a class="reference internal" href="#credits" id="toc-entry-4">Credits</a><ul>
|
||||
<li><a class="reference internal" href="#authors" id="toc-entry-5">Authors</a></li>
|
||||
<li><a class="reference internal" href="#contributors" id="toc-entry-6">Contributors</a></li>
|
||||
<li><a class="reference internal" href="#maintainers" id="toc-entry-7">Maintainers</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="usage">
|
||||
<h2><a class="toc-backref" href="#toc-entry-1">Usage</a></h2>
|
||||
<p>Once installed, first you should enable consumptions for a certain
|
||||
equipment and filling a default warehouse for the picking operations:</p>
|
||||
<p><img alt="image1" src="https://raw.githubusercontent.com/OCA/maintenance/18.0/maintenance_stock/static/description/equipment.png" /></p>
|
||||
<p>Then, for every mainteance request of this equipment, <em>Picking List</em>
|
||||
button allows us to make consumptions, that will be picking documents
|
||||
with their own sequence:</p>
|
||||
<p><img alt="image2" src="https://raw.githubusercontent.com/OCA/maintenance/18.0/maintenance_stock/static/description/request-1.png" /></p>
|
||||
<p><img alt="image3" src="https://raw.githubusercontent.com/OCA/maintenance/18.0/maintenance_stock/static/description/pick-1.png" /></p>
|
||||
<p>By default, the origin location for this operations will be the stock
|
||||
location for the default warehouse, and destination a new <em>Consumptions</em>
|
||||
location, that will not compute for stock inventory, like e.g. partner
|
||||
locations:</p>
|
||||
<p><img alt="image4" src="https://raw.githubusercontent.com/OCA/maintenance/18.0/maintenance_stock/static/description/move-line.png" /></p>
|
||||
<p>From both request and equipment forms these stock operations and
|
||||
<em>Product Moves</em> are available.</p>
|
||||
<p>Return operations are also enabled, and will be linked to the request
|
||||
and equipment as well:</p>
|
||||
<p><img alt="image5" src="https://raw.githubusercontent.com/OCA/maintenance/18.0/maintenance_stock/static/description/pick-2.png" /></p>
|
||||
</div>
|
||||
<div class="section" id="known-issues-roadmap">
|
||||
<h2><a class="toc-backref" href="#toc-entry-2">Known issues / Roadmap</a></h2>
|
||||
<ul class="simple">
|
||||
<li>Product standard list. Enable defining product standard lists (at
|
||||
least, product and quantity per line), and link them with equipments.
|
||||
Then, every maintenance request could select one of them and
|
||||
automatically fill the product and quantity list.</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="bug-tracker">
|
||||
<h2><a class="toc-backref" href="#toc-entry-3">Bug Tracker</a></h2>
|
||||
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/maintenance/issues">GitHub Issues</a>.
|
||||
In case of trouble, please check there if your issue has already been reported.
|
||||
If you spotted it first, help us to smash it by providing a detailed and welcomed
|
||||
<a class="reference external" href="https://github.com/OCA/maintenance/issues/new?body=module:%20maintenance_stock%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
|
||||
<p>Do not contact contributors directly about support or help with technical issues.</p>
|
||||
</div>
|
||||
<div class="section" id="credits">
|
||||
<h2><a class="toc-backref" href="#toc-entry-4">Credits</a></h2>
|
||||
<div class="section" id="authors">
|
||||
<h3><a class="toc-backref" href="#toc-entry-5">Authors</a></h3>
|
||||
<ul class="simple">
|
||||
<li>Solvos</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="contributors">
|
||||
<h3><a class="toc-backref" href="#toc-entry-6">Contributors</a></h3>
|
||||
<ul class="simple">
|
||||
<li>David Alonso <<a class="reference external" href="mailto:david.alonso@solvos.es">david.alonso@solvos.es</a>></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="maintainers">
|
||||
<h3><a class="toc-backref" href="#toc-entry-7">Maintainers</a></h3>
|
||||
<p>This module is maintained by the OCA.</p>
|
||||
<a class="reference external image-reference" href="https://odoo-community.org">
|
||||
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
|
||||
</a>
|
||||
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
|
||||
mission is to support the collaborative development of Odoo features and
|
||||
promote its widespread use.</p>
|
||||
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/maintenance/tree/18.0/maintenance_stock">OCA/maintenance</a> project on GitHub.</p>
|
||||
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
BIN
maintenance_stock/static/description/move-line.png
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
maintenance_stock/static/description/pick-1.png
Normal file
|
After Width: | Height: | Size: 9.7 KiB |
BIN
maintenance_stock/static/description/pick-2.png
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
maintenance_stock/static/description/request-1.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
maintenance_stock/static/img/toner.png
Normal file
|
After Width: | Height: | Size: 92 KiB |
1
maintenance_stock/tests/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
from . import test_maintenance_stock
|
||||
156
maintenance_stock/tests/test_maintenance_stock.py
Normal file
@@ -0,0 +1,156 @@
|
||||
# © 2020 Solvos Consultoría Informática (<http://www.solvos.es>)
|
||||
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
|
||||
from odoo.tests import Form, common
|
||||
|
||||
|
||||
class TestMaintenanceStock(common.TransactionCase):
|
||||
def setUp(self):
|
||||
super().setUp()
|
||||
self.maintenance_warehouse = self.env["stock.warehouse"].create(
|
||||
{
|
||||
"name": "Test warehouse",
|
||||
"code": "TEST",
|
||||
}
|
||||
)
|
||||
|
||||
self.product1 = self.env["product.product"].create(
|
||||
{
|
||||
"default_code": "TESTOPROD",
|
||||
"name": "Test prod",
|
||||
"type": "consu",
|
||||
"uom_id": self.env.ref("uom.product_uom_unit").id,
|
||||
"uom_po_id": self.env.ref("uom.product_uom_unit").id,
|
||||
"is_storable": True,
|
||||
}
|
||||
)
|
||||
|
||||
self.equipment_1 = self.env["maintenance.equipment"].create(
|
||||
{
|
||||
"name": "Test equipment",
|
||||
"allow_consumptions": True,
|
||||
"default_consumption_warehouse_id": self.maintenance_warehouse.id,
|
||||
}
|
||||
)
|
||||
self.request_1 = self.env["maintenance.request"].create(
|
||||
{
|
||||
"name": "Test request",
|
||||
"user_id": self.env.ref("base.user_demo").id,
|
||||
"owner_user_id": self.env.ref("base.user_admin").id,
|
||||
"equipment_id": self.equipment_1.id,
|
||||
"stage_id": self.env.ref("maintenance.stage_1").id,
|
||||
"maintenance_team_id": self.env.ref(
|
||||
"maintenance.equipment_team_maintenance"
|
||||
).id,
|
||||
}
|
||||
)
|
||||
|
||||
def test_warehouse(self):
|
||||
self.assertTrue(self.maintenance_warehouse.wh_cons_loc_id)
|
||||
|
||||
self.assertTrue(self.maintenance_warehouse.cons_type_id)
|
||||
self.assertEqual(self.maintenance_warehouse.cons_type_id.code, "outgoing")
|
||||
self.assertEqual(
|
||||
self.maintenance_warehouse.cons_type_id.default_location_src_id,
|
||||
self.maintenance_warehouse.lot_stock_id,
|
||||
)
|
||||
self.assertEqual(
|
||||
self.maintenance_warehouse.cons_type_id.default_location_dest_id,
|
||||
self.maintenance_warehouse.wh_cons_loc_id,
|
||||
)
|
||||
self.assertEqual(
|
||||
self.maintenance_warehouse.cons_type_id.barcode,
|
||||
self.maintenance_warehouse.code.replace(" ", "").upper() + "-CONS",
|
||||
)
|
||||
self.assertEqual(
|
||||
self.maintenance_warehouse.cons_type_id.sequence_id.prefix,
|
||||
self.maintenance_warehouse.code + "/CONS/",
|
||||
)
|
||||
self.assertEqual(
|
||||
self.maintenance_warehouse.cons_type_id.return_picking_type_id,
|
||||
self.maintenance_warehouse.in_type_id,
|
||||
)
|
||||
|
||||
def test_equipment(self):
|
||||
self.assertTrue(self.equipment_1.default_consumption_warehouse_id)
|
||||
self.equipment_1.allow_consumptions = False
|
||||
self.equipment_1._onchange_allow_consumptions()
|
||||
self.assertFalse(self.equipment_1.default_consumption_warehouse_id)
|
||||
|
||||
action1 = self.equipment_1.action_view_stock_picking_ids()
|
||||
self.assertEqual(action1["domain"][0][2], self.equipment_1.id)
|
||||
self.assertTrue(action1["context"]["show_maintenance_request_id"])
|
||||
|
||||
action2 = self.equipment_1.action_view_stock_move_ids()
|
||||
self.assertEqual(action2["domain"][0][2], self.equipment_1.id)
|
||||
|
||||
action3 = self.equipment_1.action_view_stock_move_line_ids()
|
||||
self.assertEqual(action3["domain"][0][2], self.equipment_1.id)
|
||||
self.assertFalse(action3["context"]["search_default_groupby_location_dest_id"])
|
||||
|
||||
def test_request(self):
|
||||
action1 = self.request_1.action_view_stock_picking_ids()
|
||||
self.assertEqual(action1["domain"][0][2], self.request_1.id)
|
||||
self.assertEqual(
|
||||
action1["context"]["default_picking_type_id"],
|
||||
self.request_1.default_consumption_warehouse_id.cons_type_id.id,
|
||||
)
|
||||
self.assertEqual(
|
||||
action1["context"]["default_maintenance_request_id"], self.request_1.id
|
||||
)
|
||||
|
||||
action2 = self.request_1.action_view_stock_move_ids()
|
||||
self.assertEqual(action2["domain"][0][2], self.request_1.id)
|
||||
|
||||
action3 = self.request_1.action_view_stock_move_line_ids()
|
||||
self.assertEqual(action3["domain"][0][2], self.request_1.id)
|
||||
self.assertFalse(action3["context"]["search_default_groupby_location_dest_id"])
|
||||
|
||||
def test_picking(self):
|
||||
self.assertEqual(len(self.request_1.stock_picking_ids), 0)
|
||||
location_id = self.maintenance_warehouse.lot_stock_id
|
||||
picking_type_id = self.maintenance_warehouse.cons_type_id
|
||||
self.env["stock.quant"].create(
|
||||
{
|
||||
"product_id": self.product1.id,
|
||||
"location_id": location_id.id,
|
||||
"quantity": 5,
|
||||
}
|
||||
)
|
||||
picking_form = Form(self.env["stock.picking"])
|
||||
picking_form.picking_type_id = picking_type_id
|
||||
picking_form.location_id = location_id
|
||||
with picking_form.move_ids_without_package.new() as move:
|
||||
move.product_id = self.product1
|
||||
move.product_uom_qty = 5.0
|
||||
picking = picking_form.save()
|
||||
picking.write({"maintenance_request_id": self.request_1.id})
|
||||
self.assertEqual(len(self.request_1.stock_picking_ids), 1)
|
||||
stock_quant_obj = self.env["stock.quant"]
|
||||
domain_from = [
|
||||
("product_id", "=", self.product1.id),
|
||||
("location_id", "=", self.maintenance_warehouse.lot_stock_id.id),
|
||||
]
|
||||
domain_to = [
|
||||
("product_id", "=", self.product1.id),
|
||||
("location_id", "=", self.maintenance_warehouse.wh_cons_loc_id.id),
|
||||
]
|
||||
self.assertEqual(stock_quant_obj.search(domain_from).quantity, 5)
|
||||
self.assertEqual(stock_quant_obj.search(domain_to).quantity, 0)
|
||||
|
||||
picking.action_confirm()
|
||||
picking.action_assign()
|
||||
picking.move_line_ids.write({"quantity": 5.0, "picked": True})
|
||||
picking.button_validate()
|
||||
self.assertEqual(stock_quant_obj.search(domain_from).quantity, 0)
|
||||
self.assertEqual(stock_quant_obj.search(domain_to).quantity, 5)
|
||||
|
||||
def test_update_name_and_code(self):
|
||||
"""Test that _update_name_and_code updates the sequence prefix only."""
|
||||
new_code = "UPDT"
|
||||
self.maintenance_warehouse.code = new_code
|
||||
self.maintenance_warehouse._update_name_and_code()
|
||||
expected_prefix = new_code + "/CONS/"
|
||||
self.assertEqual(
|
||||
self.maintenance_warehouse.cons_type_id.sequence_id.prefix,
|
||||
expected_prefix,
|
||||
)
|
||||
82
maintenance_stock/views/maintenance_equipment_views.xml
Normal file
@@ -0,0 +1,82 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<record id="hr_equipment_view_search" model="ir.ui.view">
|
||||
<field name="model">maintenance.equipment</field>
|
||||
<field name="inherit_id" ref="maintenance.hr_equipment_view_search" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//filter[@name='inactive']" position="after">
|
||||
<separator />
|
||||
<filter
|
||||
string="Allow Consumptions"
|
||||
name="allow_consumptions"
|
||||
domain="[('allow_consumptions', '=', True)]"
|
||||
groups="stock.group_stock_user"
|
||||
/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="hr_equipment_view_tree" model="ir.ui.view">
|
||||
<field name="model">maintenance.equipment</field>
|
||||
<field name="inherit_id" ref="maintenance.hr_equipment_view_tree" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='category_id']" position="after">
|
||||
<field name="allow_consumptions" />
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="hr_equipment_view_form" model="ir.ui.view">
|
||||
<field name="model">maintenance.equipment</field>
|
||||
<field name="inherit_id" ref="maintenance.hr_equipment_view_form" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//div[@name='button_box']" position="inside">
|
||||
<button
|
||||
class="oe_stat_button"
|
||||
type="object"
|
||||
name="action_view_stock_picking_ids"
|
||||
icon="fa-ticket"
|
||||
invisible="allow_consumptions == False"
|
||||
groups="stock.group_stock_user"
|
||||
>
|
||||
<div class="o_form_field o_stat_info">
|
||||
<span class="o_stat_text">Picking list</span>
|
||||
</div>
|
||||
</button>
|
||||
<button
|
||||
class="oe_stat_button"
|
||||
type="object"
|
||||
name="action_view_stock_move_ids"
|
||||
icon="fa-arrows-v"
|
||||
invisible="allow_consumptions == False"
|
||||
groups="stock.group_stock_user"
|
||||
>
|
||||
<div class="o_form_field o_stat_info">
|
||||
<span class="o_stat_text">Stock Moves</span>
|
||||
</div>
|
||||
</button>
|
||||
<button
|
||||
class="oe_stat_button"
|
||||
type="object"
|
||||
name="action_view_stock_move_line_ids"
|
||||
icon="fa-arrows-v"
|
||||
invisible="allow_consumptions == False"
|
||||
groups="stock.group_stock_user"
|
||||
>
|
||||
<div class="o_form_field o_stat_info">
|
||||
<span class="o_stat_text">Product Moves</span>
|
||||
</div>
|
||||
</button>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='location']" position="after">
|
||||
<field name="allow_consumptions" groups="stock.group_stock_user" />
|
||||
<field
|
||||
name="default_consumption_warehouse_id"
|
||||
invisible="allow_consumptions == False"
|
||||
required="allow_consumptions == True"
|
||||
groups="stock.group_stock_user"
|
||||
/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
80
maintenance_stock/views/maintenance_request_views.xml
Normal file
@@ -0,0 +1,80 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<record id="hr_equipment_request_view_search" model="ir.ui.view">
|
||||
<field name="model">maintenance.request</field>
|
||||
<field name="inherit_id" ref="maintenance.hr_equipment_request_view_search" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//filter[@name='high_priority']" position="after">
|
||||
<separator groups="stock.group_stock_user" />
|
||||
<filter
|
||||
string="Allow Consumptions"
|
||||
name="allow_consumptions"
|
||||
domain="[('allow_consumptions', '=', True)]"
|
||||
groups="stock.group_stock_user"
|
||||
/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="hr_equipment_request_view_tree" model="ir.ui.view">
|
||||
<field name="model">maintenance.request</field>
|
||||
<field name="inherit_id" ref="maintenance.hr_equipment_request_view_tree" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='category_id']" position="after">
|
||||
<field name="allow_consumptions" groups="stock.group_stock_user" />
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="equipment_request_view_form" model="ir.ui.view">
|
||||
<field name="model">maintenance.request</field>
|
||||
<field name="inherit_id" ref="base_maintenance.equipment_request_view_form" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//div[@name='button_box']" position="inside">
|
||||
<field
|
||||
name="allow_consumptions"
|
||||
invisible="1"
|
||||
groups="stock.group_stock_user"
|
||||
/>
|
||||
<button
|
||||
class="oe_stat_button"
|
||||
type="object"
|
||||
name="action_view_stock_picking_ids"
|
||||
icon="fa-ticket"
|
||||
invisible="allow_consumptions == False"
|
||||
groups="stock.group_stock_user"
|
||||
>
|
||||
<div class="o_form_field o_stat_info">
|
||||
<span class="o_stat_text">Picking list</span>
|
||||
</div>
|
||||
</button>
|
||||
|
||||
<button
|
||||
class="oe_stat_button"
|
||||
type="object"
|
||||
name="action_view_stock_move_ids"
|
||||
icon="fa-arrows-v"
|
||||
invisible="allow_consumptions == False"
|
||||
groups="stock.group_stock_user"
|
||||
>
|
||||
<div class="o_form_field o_stat_info">
|
||||
<span class="o_stat_text">Stock Moves</span>
|
||||
</div>
|
||||
</button>
|
||||
|
||||
<button
|
||||
class="oe_stat_button"
|
||||
type="object"
|
||||
name="action_view_stock_move_line_ids"
|
||||
icon="fa-arrows-v"
|
||||
invisible="allow_consumptions == False"
|
||||
groups="stock.group_stock_user"
|
||||
>
|
||||
<div class="o_form_field o_stat_info">
|
||||
<span class="o_stat_text">Product Moves</span>
|
||||
</div>
|
||||
</button>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
85
maintenance_stock/views/stock_move_line_views.xml
Normal file
@@ -0,0 +1,85 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<record id="stock_move_line_view_search" model="ir.ui.view">
|
||||
<field name="model">stock.move.line</field>
|
||||
<field name="inherit_id" ref="stock.stock_move_line_view_search" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='location_id']" position="after">
|
||||
<field name="maintenance_equipment_id" />
|
||||
<field name="maintenance_request_id" />
|
||||
</xpath>
|
||||
<xpath expr="//filter[@name='done']" position="after">
|
||||
<separator />
|
||||
<filter
|
||||
string="Maintenance Request consumption"
|
||||
name="maintenance_request_consumption"
|
||||
domain="[('maintenance_request_id', '!=', False)]"
|
||||
/>
|
||||
</xpath>
|
||||
<xpath expr="//filter[@name='groupby_product_id']" position="before">
|
||||
<filter
|
||||
string="To"
|
||||
name="groupby_location_dest_id"
|
||||
domain="[]"
|
||||
context="{'group_by': 'location_dest_id'}"
|
||||
/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_move_line_tree" model="ir.ui.view">
|
||||
<field name="model">stock.move.line</field>
|
||||
<field name="inherit_id" ref="stock.view_move_line_tree" />
|
||||
<field name="arch" type="xml">
|
||||
<field name="product_id" position="after">
|
||||
<field
|
||||
name="maintenance_request_id"
|
||||
invisible="not context.get('show_maintenance_request_id', False)"
|
||||
/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_move_line_form" model="ir.ui.view">
|
||||
<field name="model">stock.move.line</field>
|
||||
<field name="inherit_id" ref="stock.view_move_line_form" />
|
||||
<field name="arch" type="xml">
|
||||
<field name="owner_id" position="after">
|
||||
<field
|
||||
name="maintenance_equipment_id"
|
||||
invisible="maintenance_request_id == False"
|
||||
/>
|
||||
<field
|
||||
name="maintenance_request_id"
|
||||
invisible="maintenance_request_id == False"
|
||||
/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="stock_move_line_action" model="ir.actions.act_window">
|
||||
<field name="name">Product Moves</field>
|
||||
<field name="res_model">stock.move.line</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="view_mode">list,kanban,pivot,form</field>
|
||||
<field name="view_id" ref="stock.view_move_line_tree" />
|
||||
<field name="domain">[('maintenance_request_id', '!=', False)]</field>
|
||||
<field name="context">{
|
||||
'search_default_done': 1,
|
||||
'search_default_groupby_product_id': 1,
|
||||
'show_maintenance_request_id': True,
|
||||
}</field>
|
||||
<field name="help" type="html">
|
||||
<p class="o_view_nocontent_empty_folder">
|
||||
There's no product move yet
|
||||
</p>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<menuitem
|
||||
action="stock_move_line_action"
|
||||
id="stock_move_line_menu"
|
||||
parent="maintenance.maintenance_reporting"
|
||||
sequence="150"
|
||||
/>
|
||||
</odoo>
|
||||
83
maintenance_stock/views/stock_move_views.xml
Normal file
@@ -0,0 +1,83 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<record id="view_move_search" model="ir.ui.view">
|
||||
<field name="model">stock.move</field>
|
||||
<field name="inherit_id" ref="stock.view_move_search" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='partner_id']" position="after">
|
||||
<field name="maintenance_equipment_id" />
|
||||
<field name="maintenance_request_id" />
|
||||
</xpath>
|
||||
<xpath expr="//filter[@name='outgoing']" position="after">
|
||||
<separator />
|
||||
<filter
|
||||
string="Maintenance Request consumption"
|
||||
name="maintenance_request_consumption"
|
||||
domain="[('maintenance_request_id', '!=', False)]"
|
||||
/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_move_tree" model="ir.ui.view">
|
||||
<field name="model">stock.move</field>
|
||||
<field name="inherit_id" ref="stock.view_move_tree" />
|
||||
<field name="arch" type="xml">
|
||||
<field name="product_id" position="after">
|
||||
<field
|
||||
name="maintenance_request_id"
|
||||
invisible="not context.get('show_maintenance_request_id', False)"
|
||||
/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_move_form" model="ir.ui.view">
|
||||
<field name="model">stock.move</field>
|
||||
<field name="inherit_id" ref="stock.view_move_form" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//group[@name='origin_grp']" position="inside">
|
||||
<field
|
||||
name="maintenance_equipment_id"
|
||||
invisible="maintenance_request_id == False"
|
||||
/>
|
||||
<field
|
||||
name="maintenance_request_id"
|
||||
invisible="maintenance_request_id == False"
|
||||
/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
<record id="stock_move_action" model="ir.actions.act_window">
|
||||
<field name="name">Stock Moves</field>
|
||||
<field name="res_model">stock.move</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="view_id" ref="stock.view_move_tree" />
|
||||
<field name="search_view_id" ref="stock.view_move_search" />
|
||||
<field name="domain">[('maintenance_request_id', '!=', False)]</field>
|
||||
<field name="context">{
|
||||
'search_default_done': 1,
|
||||
'search_default_groupby_location_id': 1,
|
||||
'show_maintenance_request_id': True,
|
||||
}</field>
|
||||
<field name="help" type="html">
|
||||
<p class="o_view_nocontent_smiling_face">
|
||||
Create a new stock movement
|
||||
</p>
|
||||
<p>
|
||||
This menu gives you the full traceability of inventory
|
||||
operations on a specific product. You can filter on the product
|
||||
to see all the past or future movements for the product.
|
||||
</p>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<menuitem
|
||||
action="stock_move_action"
|
||||
id="stock_move_menu"
|
||||
parent="maintenance.maintenance_reporting"
|
||||
sequence="140"
|
||||
groups="base.group_no_one"
|
||||
/>
|
||||
</odoo>
|
||||
57
maintenance_stock/views/stock_picking_views.xml
Normal file
@@ -0,0 +1,57 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<record id="view_picking_internal_search" model="ir.ui.view">
|
||||
<field name="model">stock.picking</field>
|
||||
<field name="inherit_id" ref="stock.view_picking_internal_search" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='picking_type_id']" position="after">
|
||||
<field name="maintenance_equipment_id" />
|
||||
<field name="maintenance_request_id" />
|
||||
</xpath>
|
||||
<xpath expr="//filter[@name='activities_upcoming_all']" position="after">
|
||||
<separator />
|
||||
<filter
|
||||
string="Maintenance Request consumption"
|
||||
name="maintenance_request_consumption"
|
||||
domain="[('maintenance_request_id', '!=', False)]"
|
||||
/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="vpicktree" model="ir.ui.view">
|
||||
<field name="model">stock.picking</field>
|
||||
<field name="inherit_id" ref="stock.vpicktree" />
|
||||
<field name="arch" type="xml">
|
||||
<field name="origin" position="after">
|
||||
<field
|
||||
name="maintenance_request_id"
|
||||
invisible="not context.get('show_maintenance_request_id', False)"
|
||||
/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_picking_form" model="ir.ui.view">
|
||||
<field name="model">stock.picking</field>
|
||||
<field name="inherit_id" ref="stock.view_picking_form" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//page[@name='extra']" position="before">
|
||||
<page
|
||||
string="Maintenance Info"
|
||||
name="maintenance"
|
||||
invisible="maintenance_request_id == False"
|
||||
>
|
||||
<group>
|
||||
<group>
|
||||
<field name="maintenance_request_id" readonly="True" />
|
||||
</group>
|
||||
<group>
|
||||
<field name="maintenance_equipment_id" />
|
||||
</group>
|
||||
</group>
|
||||
</page>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||