mirror of
https://github.com/OCA/manufacture.git
synced 2025-01-28 16:37:15 +02:00
[MOD] Smartbuttons all in one div
This commit is contained in:
@@ -1,3 +1,8 @@
|
|||||||
|
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
|
||||||
|
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||||
|
:alt: License: AGPL-3
|
||||||
|
|
||||||
|
===================================
|
||||||
Stock extension for quality control
|
Stock extension for quality control
|
||||||
===================================
|
===================================
|
||||||
|
|
||||||
@@ -5,6 +10,48 @@ This module defines triggers that creates inspections when stock moves are done.
|
|||||||
|
|
||||||
It also adds some shortcuts on picking and lots to these inspections.
|
It also adds some shortcuts on picking and lots to these inspections.
|
||||||
|
|
||||||
|
|
||||||
|
Usage
|
||||||
|
=====
|
||||||
|
|
||||||
|
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
|
||||||
|
:alt: Try me on Runbot
|
||||||
|
:target: https://runbot.odoo-community.org/runbot/129/8.0
|
||||||
|
|
||||||
|
|
||||||
|
Known issues / Roadmap
|
||||||
|
======================
|
||||||
|
|
||||||
|
* Put trigger in all languages.
|
||||||
|
|
||||||
|
|
||||||
|
Bug Tracker
|
||||||
|
===========
|
||||||
|
|
||||||
|
Bugs are tracked on `GitHub Issues <https://github.com/OCA/manufacture/issues>`_.
|
||||||
|
In case of trouble, please check there if your issue has already been reported.
|
||||||
|
If you spotted it first, help us smashing it by providing a detailed and welcomed feedback `here <https://github.com/OCA/manufacture/issues/new?body=module:%20quality_control%0Aversion:%208.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
|
||||||
|
|
||||||
|
|
||||||
|
Credits
|
||||||
|
=======
|
||||||
|
|
||||||
Contributors
|
Contributors
|
||||||
------------
|
------------
|
||||||
* Pedro M. Baeza <pedro.baeza@serviciobaeza.com>
|
* Pedro M. Baeza <pedro.baeza@serviciobaeza.com>
|
||||||
|
* Oihane Crucelaegui <oihanecrucelaegi@avanzosc.es>
|
||||||
|
|
||||||
|
Maintainer
|
||||||
|
----------
|
||||||
|
|
||||||
|
.. image:: https://odoo-community.org/logo.png
|
||||||
|
:alt: Odoo Community Association
|
||||||
|
:target: https://odoo-community.org
|
||||||
|
|
||||||
|
This module is maintained by the OCA.
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
To contribute to this module, please visit http://odoo-community.org.
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
##############################################################################
|
# (c) 2014 Serv. Tec. Avanzados - Pedro M. Baeza
|
||||||
# For copyright and license notices, see __openerp__.py file in root directory
|
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
|
||||||
##############################################################################
|
|
||||||
|
|
||||||
from . import models
|
from . import models
|
||||||
from openerp import SUPERUSER_ID
|
from openerp import SUPERUSER_ID
|
||||||
|
|||||||
@@ -1,45 +1,31 @@
|
|||||||
# -*- encoding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
##############################################################################
|
# (c) 2014 Serv. Tec. Avanzados - Pedro M. Baeza
|
||||||
#
|
# (c) 2014 Oihane Crucelaegui - AvanzOSC
|
||||||
# Copyright (c)
|
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
|
||||||
# 2014 Serv. Tec. Avanzados - Pedro M. Baeza (http://www.serviciosbaeza.com)
|
|
||||||
# 2014 AvanzOsc (http://www.avanzosc.es)
|
|
||||||
#
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU Affero General Public License as published
|
|
||||||
# by the Free Software Foundation, either version 3 of the License, or
|
|
||||||
# (at your option) any later version.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU Affero General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU Affero General Public License
|
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
#
|
|
||||||
##############################################################################
|
|
||||||
|
|
||||||
{
|
{
|
||||||
"name": "Quality control - Stock",
|
"name": "Quality control - Stock",
|
||||||
"version": "1.0",
|
"version": "8.0.1.0.0",
|
||||||
"author": "OdooMRP team,"
|
"category": "Quality control",
|
||||||
"AvanzOSC,"
|
"license": "AGPL-3",
|
||||||
"Serv. Tecnol. Avanzados - Pedro M. Baeza",
|
"author": "OdooMRP team, "
|
||||||
|
"AvanzOSC, "
|
||||||
|
"Serv. Tecnol. Avanzados - Pedro M. Baeza, "
|
||||||
|
"Odoo Community Association (OCA)",
|
||||||
"website": "http://www.odoomrp.com",
|
"website": "http://www.odoomrp.com",
|
||||||
"contributors": [
|
"contributors": [
|
||||||
"Pedro M. Baeza <pedro.baeza@serviciosbaeza.com",
|
"Pedro M. Baeza <pedro.baeza@serviciosbaeza.com>",
|
||||||
|
"Oihane Crucelaegui <oihanecrucelaegi@avanzosc.es>",
|
||||||
],
|
],
|
||||||
"category": "Quality control",
|
|
||||||
"depends": [
|
"depends": [
|
||||||
'quality_control',
|
"quality_control",
|
||||||
'stock',
|
"stock",
|
||||||
],
|
],
|
||||||
"data": [
|
"data": [
|
||||||
'data/quality_control_stock_data.xml',
|
"data/quality_control_stock_data.xml",
|
||||||
'views/qc_inspection_view.xml',
|
"views/qc_inspection_view.xml",
|
||||||
'views/stock_picking_view.xml',
|
"views/stock_picking_view.xml",
|
||||||
'views/stock_production_lot_view.xml',
|
"views/stock_production_lot_view.xml",
|
||||||
],
|
],
|
||||||
"post_init_hook": "post_init_hook",
|
"post_init_hook": "post_init_hook",
|
||||||
"installable": True,
|
"installable": True,
|
||||||
|
|||||||
@@ -1,19 +1,27 @@
|
|||||||
# Translation of Odoo Server.
|
# Translation of Odoo Server.
|
||||||
# This file contains the translation of the following modules:
|
# This file contains the translation of the following modules:
|
||||||
# * quality_control_stock
|
# * quality_control_stock
|
||||||
#
|
#
|
||||||
|
# Translators:
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: Odoo Server 8.0\n"
|
"Project-Id-Version: odoomrp-wip (8.0)\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2014-12-10 19:26+0000\n"
|
"POT-Creation-Date: 2015-10-07 10:44+0000\n"
|
||||||
"PO-Revision-Date: 2014-12-10 19:26+0000\n"
|
"PO-Revision-Date: 2015-10-09 10:50+0000\n"
|
||||||
"Last-Translator: <>\n"
|
"Last-Translator: Pedro M. Baeza <pedro.baeza@gmail.com>\n"
|
||||||
"Language-Team: \n"
|
"Language-Team: Spanish (http://www.transifex.com/oca/odoomrp-wip-8-0/language/es/)\n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: \n"
|
"Content-Transfer-Encoding: \n"
|
||||||
"Plural-Forms: \n"
|
"Language: es\n"
|
||||||
|
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||||
|
|
||||||
|
#. module: quality_control_stock
|
||||||
|
#: field:stock.picking,qc_inspections:0
|
||||||
|
#: field:stock.production.lot,qc_inspections:0
|
||||||
|
msgid "Inspections"
|
||||||
|
msgstr "Inspecciones"
|
||||||
|
|
||||||
#. module: quality_control_stock
|
#. module: quality_control_stock
|
||||||
#: help:stock.production.lot,qc_inspections:0
|
#: help:stock.production.lot,qc_inspections:0
|
||||||
@@ -30,9 +38,15 @@ msgstr "Inspecciones relativas a este albarán."
|
|||||||
#: field:qc.inspection,lot:0
|
#: field:qc.inspection,lot:0
|
||||||
#: view:qc.inspection.line:quality_control_stock.qc_inspection_line_search_stock_view
|
#: view:qc.inspection.line:quality_control_stock.qc_inspection_line_search_stock_view
|
||||||
#: field:qc.inspection.line,lot:0
|
#: field:qc.inspection.line,lot:0
|
||||||
|
#: model:res.request.link,name:quality_control_stock.req_link_stock_production_lot
|
||||||
msgid "Lot"
|
msgid "Lot"
|
||||||
msgstr "Lote"
|
msgstr "Lote"
|
||||||
|
|
||||||
|
#. module: quality_control_stock
|
||||||
|
#: model:ir.model,name:quality_control_stock.model_stock_production_lot
|
||||||
|
msgid "Lot/Serial"
|
||||||
|
msgstr "Lote/Nº de serie"
|
||||||
|
|
||||||
#. module: quality_control_stock
|
#. module: quality_control_stock
|
||||||
#: view:qc.inspection:quality_control_stock.qc_inspection_search_view_picking
|
#: view:qc.inspection:quality_control_stock.qc_inspection_search_view_picking
|
||||||
#: field:qc.inspection,picking:0
|
#: field:qc.inspection,picking:0
|
||||||
@@ -41,11 +55,38 @@ msgstr "Lote"
|
|||||||
msgid "Picking"
|
msgid "Picking"
|
||||||
msgstr "Albarán"
|
msgstr "Albarán"
|
||||||
|
|
||||||
|
#. module: quality_control_stock
|
||||||
|
#: model:ir.model,name:quality_control_stock.model_stock_picking
|
||||||
|
#: model:res.request.link,name:quality_control_stock.req_link_stock_picking
|
||||||
|
msgid "Picking List"
|
||||||
|
msgstr "Albarán"
|
||||||
|
|
||||||
#. module: quality_control_stock
|
#. module: quality_control_stock
|
||||||
#: field:qc.trigger,picking_type:0
|
#: field:qc.trigger,picking_type:0
|
||||||
msgid "Picking type"
|
msgid "Picking type"
|
||||||
msgstr "Tipo de albarán"
|
msgstr "Tipo de albarán"
|
||||||
|
|
||||||
|
#. module: quality_control_stock
|
||||||
|
#: view:qc.inspection:quality_control_stock.qc_inspection_search_view_picking
|
||||||
|
#: view:qc.inspection.line:quality_control_stock.qc_inspection_line_search_stock_view
|
||||||
|
msgid "Product"
|
||||||
|
msgstr "Producto"
|
||||||
|
|
||||||
|
#. module: quality_control_stock
|
||||||
|
#: model:ir.model,name:quality_control_stock.model_qc_inspection
|
||||||
|
msgid "Quality control inspection"
|
||||||
|
msgstr "Inspección del control de calidad"
|
||||||
|
|
||||||
|
#. module: quality_control_stock
|
||||||
|
#: model:ir.model,name:quality_control_stock.model_qc_inspection_line
|
||||||
|
msgid "Quality control inspection line"
|
||||||
|
msgstr "Línea de inspección de control de calidad"
|
||||||
|
|
||||||
|
#. module: quality_control_stock
|
||||||
|
#: model:ir.model,name:quality_control_stock.model_qc_trigger
|
||||||
|
msgid "Quality control trigger"
|
||||||
|
msgstr "Disparador del control de calidad"
|
||||||
|
|
||||||
#. module: quality_control_stock
|
#. module: quality_control_stock
|
||||||
#: model:ir.actions.act_window,name:quality_control_stock.action_qc_inspection_per_lot_done
|
#: model:ir.actions.act_window,name:quality_control_stock.action_qc_inspection_per_lot_done
|
||||||
msgid "Quality inspection from lot done"
|
msgid "Quality inspection from lot done"
|
||||||
@@ -86,9 +127,18 @@ msgstr "Inspecciones desde albarán"
|
|||||||
msgid "Quality inspections from picking failed"
|
msgid "Quality inspections from picking failed"
|
||||||
msgstr "Inspecciones desde albarán falladas"
|
msgstr "Inspecciones desde albarán falladas"
|
||||||
|
|
||||||
|
#. module: quality_control_stock
|
||||||
|
#: model:res.request.link,name:quality_control_stock.req_link_stock_move
|
||||||
|
msgid "Stock Move"
|
||||||
|
msgstr "Movimiento de stock"
|
||||||
|
|
||||||
|
#. module: quality_control_stock
|
||||||
|
#: model:ir.model,name:quality_control_stock.model_stock_picking_type
|
||||||
|
msgid "The picking type determines the picking view"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#. module: quality_control_stock
|
#. module: quality_control_stock
|
||||||
#: view:stock.picking:quality_control_stock.stock_picking_qc_view
|
#: view:stock.picking:quality_control_stock.stock_picking_qc_view
|
||||||
#: view:stock.production.lot:quality_control_stock.stock_lot_qc_view
|
#: view:stock.production.lot:quality_control_stock.stock_lot_qc_view
|
||||||
msgid "inspections"
|
msgid "inspections"
|
||||||
msgstr "inspecciones"
|
msgstr "inspecciones"
|
||||||
|
|
||||||
|
|||||||
@@ -1,19 +1,27 @@
|
|||||||
# Translation of Odoo Server.
|
# Translation of Odoo Server.
|
||||||
# This file contains the translation of the following modules:
|
# This file contains the translation of the following modules:
|
||||||
# * quality_control_stock
|
# * quality_control_stock
|
||||||
#
|
#
|
||||||
|
# Translators:
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: Odoo Server 8.0\n"
|
"Project-Id-Version: odoomrp-wip (8.0)\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2014-12-10 19:26+0000\n"
|
"POT-Creation-Date: 2015-10-07 10:44+0000\n"
|
||||||
"PO-Revision-Date: 2014-12-10 19:26+0000\n"
|
"PO-Revision-Date: 2015-09-10 16:38+0000\n"
|
||||||
"Last-Translator: <>\n"
|
"Last-Translator: <>\n"
|
||||||
"Language-Team: \n"
|
"Language-Team: French (http://www.transifex.com/oca/odoomrp-wip-8-0/language/fr/)\n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: \n"
|
"Content-Transfer-Encoding: \n"
|
||||||
"Plural-Forms: \n"
|
"Language: fr\n"
|
||||||
|
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
||||||
|
|
||||||
|
#. module: quality_control_stock
|
||||||
|
#: field:stock.picking,qc_inspections:0
|
||||||
|
#: field:stock.production.lot,qc_inspections:0
|
||||||
|
msgid "Inspections"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#. module: quality_control_stock
|
#. module: quality_control_stock
|
||||||
#: help:stock.production.lot,qc_inspections:0
|
#: help:stock.production.lot,qc_inspections:0
|
||||||
@@ -26,31 +34,59 @@ msgid "Inspections related to this picking."
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#. module: quality_control_stock
|
#. module: quality_control_stock
|
||||||
#: view:qc.inspection:quality_control_stock.qc_inspection_search_view_putvalid
|
#: view:qc.inspection:quality_control_stock.qc_inspection_search_view_picking
|
||||||
#: field:qc.inspection,lot:0
|
#: field:qc.inspection,lot:0
|
||||||
#: view:qc.inspection.line:quality_control_stock.qc_inspection_line_search_stock_view
|
#: view:qc.inspection.line:quality_control_stock.qc_inspection_line_search_stock_view
|
||||||
#: field:qc.inspection.line,lot:0
|
#: field:qc.inspection.line,lot:0
|
||||||
|
#: model:res.request.link,name:quality_control_stock.req_link_stock_production_lot
|
||||||
msgid "Lot"
|
msgid "Lot"
|
||||||
msgstr ""
|
msgstr "Lot"
|
||||||
|
|
||||||
#. module: quality_control_stock
|
#. module: quality_control_stock
|
||||||
#: model:ir.model,name:quality_control_stock.model_stock_production_lot
|
#: model:ir.model,name:quality_control_stock.model_stock_production_lot
|
||||||
msgid "Lot/Serial"
|
msgid "Lot/Serial"
|
||||||
msgstr ""
|
msgstr "Lot/n° de série"
|
||||||
|
|
||||||
#. module: quality_control_stock
|
#. module: quality_control_stock
|
||||||
#: view:qc.inspection:quality_control_stock.qc_inspection_search_view_putvalid
|
#: view:qc.inspection:quality_control_stock.qc_inspection_search_view_picking
|
||||||
#: field:qc.inspection,picking:0
|
#: field:qc.inspection,picking:0
|
||||||
#: view:qc.inspection.line:quality_control_stock.qc_inspection_line_search_stock_view
|
#: view:qc.inspection.line:quality_control_stock.qc_inspection_line_search_stock_view
|
||||||
#: field:qc.inspection.line,picking:0
|
#: field:qc.inspection.line,picking:0
|
||||||
msgid "Picking"
|
msgid "Picking"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: quality_control_stock
|
||||||
|
#: model:ir.model,name:quality_control_stock.model_stock_picking
|
||||||
|
#: model:res.request.link,name:quality_control_stock.req_link_stock_picking
|
||||||
|
msgid "Picking List"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#. module: quality_control_stock
|
#. module: quality_control_stock
|
||||||
#: field:qc.trigger,picking_type:0
|
#: field:qc.trigger,picking_type:0
|
||||||
msgid "Picking type"
|
msgid "Picking type"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: quality_control_stock
|
||||||
|
#: view:qc.inspection:quality_control_stock.qc_inspection_search_view_picking
|
||||||
|
#: view:qc.inspection.line:quality_control_stock.qc_inspection_line_search_stock_view
|
||||||
|
msgid "Product"
|
||||||
|
msgstr "Article"
|
||||||
|
|
||||||
|
#. module: quality_control_stock
|
||||||
|
#: model:ir.model,name:quality_control_stock.model_qc_inspection
|
||||||
|
msgid "Quality control inspection"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: quality_control_stock
|
||||||
|
#: model:ir.model,name:quality_control_stock.model_qc_inspection_line
|
||||||
|
msgid "Quality control inspection line"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: quality_control_stock
|
||||||
|
#: model:ir.model,name:quality_control_stock.model_qc_trigger
|
||||||
|
msgid "Quality control trigger"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#. module: quality_control_stock
|
#. module: quality_control_stock
|
||||||
#: model:ir.actions.act_window,name:quality_control_stock.action_qc_inspection_per_lot_done
|
#: model:ir.actions.act_window,name:quality_control_stock.action_qc_inspection_per_lot_done
|
||||||
msgid "Quality inspection from lot done"
|
msgid "Quality inspection from lot done"
|
||||||
@@ -91,9 +127,18 @@ msgstr ""
|
|||||||
msgid "Quality inspections from picking failed"
|
msgid "Quality inspections from picking failed"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: quality_control_stock
|
||||||
|
#: model:res.request.link,name:quality_control_stock.req_link_stock_move
|
||||||
|
msgid "Stock Move"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: quality_control_stock
|
||||||
|
#: model:ir.model,name:quality_control_stock.model_stock_picking_type
|
||||||
|
msgid "The picking type determines the picking view"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#. module: quality_control_stock
|
#. module: quality_control_stock
|
||||||
#: view:stock.picking:quality_control_stock.stock_picking_qc_view
|
#: view:stock.picking:quality_control_stock.stock_picking_qc_view
|
||||||
#: view:stock.production.lot:quality_control_stock.stock_lot_qc_view
|
#: view:stock.production.lot:quality_control_stock.stock_lot_qc_view
|
||||||
msgid "inspections"
|
msgid "inspections"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
144
quality_control_stock_oca/i18n/pt_BR.po
Normal file
144
quality_control_stock_oca/i18n/pt_BR.po
Normal file
@@ -0,0 +1,144 @@
|
|||||||
|
# Translation of Odoo Server.
|
||||||
|
# This file contains the translation of the following modules:
|
||||||
|
# * quality_control_stock
|
||||||
|
#
|
||||||
|
# Translators:
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: odoomrp-wip (8.0)\n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"POT-Creation-Date: 2015-10-07 10:44+0000\n"
|
||||||
|
"PO-Revision-Date: 2015-10-09 03:43+0000\n"
|
||||||
|
"Last-Translator: danimaribeiro <danimaribeiro@gmail.com>\n"
|
||||||
|
"Language-Team: Portuguese (Brazil) (http://www.transifex.com/oca/odoomrp-wip-8-0/language/pt_BR/)\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: \n"
|
||||||
|
"Language: pt_BR\n"
|
||||||
|
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
||||||
|
|
||||||
|
#. module: quality_control_stock
|
||||||
|
#: field:stock.picking,qc_inspections:0
|
||||||
|
#: field:stock.production.lot,qc_inspections:0
|
||||||
|
msgid "Inspections"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: quality_control_stock
|
||||||
|
#: help:stock.production.lot,qc_inspections:0
|
||||||
|
msgid "Inspections related to this lot."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: quality_control_stock
|
||||||
|
#: help:stock.picking,qc_inspections:0
|
||||||
|
msgid "Inspections related to this picking."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: quality_control_stock
|
||||||
|
#: view:qc.inspection:quality_control_stock.qc_inspection_search_view_picking
|
||||||
|
#: field:qc.inspection,lot:0
|
||||||
|
#: view:qc.inspection.line:quality_control_stock.qc_inspection_line_search_stock_view
|
||||||
|
#: field:qc.inspection.line,lot:0
|
||||||
|
#: model:res.request.link,name:quality_control_stock.req_link_stock_production_lot
|
||||||
|
msgid "Lot"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: quality_control_stock
|
||||||
|
#: model:ir.model,name:quality_control_stock.model_stock_production_lot
|
||||||
|
msgid "Lot/Serial"
|
||||||
|
msgstr "Lote/Serial"
|
||||||
|
|
||||||
|
#. module: quality_control_stock
|
||||||
|
#: view:qc.inspection:quality_control_stock.qc_inspection_search_view_picking
|
||||||
|
#: field:qc.inspection,picking:0
|
||||||
|
#: view:qc.inspection.line:quality_control_stock.qc_inspection_line_search_stock_view
|
||||||
|
#: field:qc.inspection.line,picking:0
|
||||||
|
msgid "Picking"
|
||||||
|
msgstr "Separação"
|
||||||
|
|
||||||
|
#. module: quality_control_stock
|
||||||
|
#: model:ir.model,name:quality_control_stock.model_stock_picking
|
||||||
|
#: model:res.request.link,name:quality_control_stock.req_link_stock_picking
|
||||||
|
msgid "Picking List"
|
||||||
|
msgstr "Lista de separação"
|
||||||
|
|
||||||
|
#. module: quality_control_stock
|
||||||
|
#: field:qc.trigger,picking_type:0
|
||||||
|
msgid "Picking type"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: quality_control_stock
|
||||||
|
#: view:qc.inspection:quality_control_stock.qc_inspection_search_view_picking
|
||||||
|
#: view:qc.inspection.line:quality_control_stock.qc_inspection_line_search_stock_view
|
||||||
|
msgid "Product"
|
||||||
|
msgstr "Produto"
|
||||||
|
|
||||||
|
#. module: quality_control_stock
|
||||||
|
#: model:ir.model,name:quality_control_stock.model_qc_inspection
|
||||||
|
msgid "Quality control inspection"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: quality_control_stock
|
||||||
|
#: model:ir.model,name:quality_control_stock.model_qc_inspection_line
|
||||||
|
msgid "Quality control inspection line"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: quality_control_stock
|
||||||
|
#: model:ir.model,name:quality_control_stock.model_qc_trigger
|
||||||
|
msgid "Quality control trigger"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: quality_control_stock
|
||||||
|
#: model:ir.actions.act_window,name:quality_control_stock.action_qc_inspection_per_lot_done
|
||||||
|
msgid "Quality inspection from lot done"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: quality_control_stock
|
||||||
|
#: model:ir.actions.act_window,name:quality_control_stock.action_qc_inspection_per_lot_passed
|
||||||
|
msgid "Quality inspection from lot passed"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: quality_control_stock
|
||||||
|
#: model:ir.actions.act_window,name:quality_control_stock.action_qc_inspection_per_picking_done
|
||||||
|
msgid "Quality inspection from picking done"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: quality_control_stock
|
||||||
|
#: model:ir.actions.act_window,name:quality_control_stock.action_qc_inspection_per_picking_passed
|
||||||
|
msgid "Quality inspection from picking passed"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: quality_control_stock
|
||||||
|
#: model:ir.actions.act_window,name:quality_control_stock.action_qc_inspection_per_lot
|
||||||
|
msgid "Quality inspections from lot"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: quality_control_stock
|
||||||
|
#: model:ir.actions.act_window,name:quality_control_stock.action_qc_inspection_per_lot_failed
|
||||||
|
msgid "Quality inspections from lot failed"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: quality_control_stock
|
||||||
|
#: model:ir.actions.act_window,name:quality_control_stock.action_qc_inspection_per_picking
|
||||||
|
msgid "Quality inspections from picking"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: quality_control_stock
|
||||||
|
#: model:ir.actions.act_window,name:quality_control_stock.action_qc_inspection_per_picking_failed
|
||||||
|
msgid "Quality inspections from picking failed"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: quality_control_stock
|
||||||
|
#: model:res.request.link,name:quality_control_stock.req_link_stock_move
|
||||||
|
msgid "Stock Move"
|
||||||
|
msgstr "Movimentação de estoque"
|
||||||
|
|
||||||
|
#. module: quality_control_stock
|
||||||
|
#: model:ir.model,name:quality_control_stock.model_stock_picking_type
|
||||||
|
msgid "The picking type determines the picking view"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: quality_control_stock
|
||||||
|
#: view:stock.picking:quality_control_stock.stock_picking_qc_view
|
||||||
|
#: view:stock.production.lot:quality_control_stock.stock_lot_qc_view
|
||||||
|
msgid "inspections"
|
||||||
|
msgstr ""
|
||||||
145
quality_control_stock_oca/i18n/sl.po
Normal file
145
quality_control_stock_oca/i18n/sl.po
Normal file
@@ -0,0 +1,145 @@
|
|||||||
|
# Translation of Odoo Server.
|
||||||
|
# This file contains the translation of the following modules:
|
||||||
|
# * quality_control_stock
|
||||||
|
#
|
||||||
|
# Translators:
|
||||||
|
# Matjaž Mozetič <m.mozetic@matmoz.si>, 2015
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: odoomrp-wip (8.0)\n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"POT-Creation-Date: 2015-10-07 10:44+0000\n"
|
||||||
|
"PO-Revision-Date: 2015-09-20 19:04+0000\n"
|
||||||
|
"Last-Translator: Matjaž Mozetič <m.mozetic@matmoz.si>\n"
|
||||||
|
"Language-Team: Slovenian (http://www.transifex.com/oca/odoomrp-wip-8-0/language/sl/)\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: \n"
|
||||||
|
"Language: sl\n"
|
||||||
|
"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);\n"
|
||||||
|
|
||||||
|
#. module: quality_control_stock
|
||||||
|
#: field:stock.picking,qc_inspections:0
|
||||||
|
#: field:stock.production.lot,qc_inspections:0
|
||||||
|
msgid "Inspections"
|
||||||
|
msgstr "Inšpekcije"
|
||||||
|
|
||||||
|
#. module: quality_control_stock
|
||||||
|
#: help:stock.production.lot,qc_inspections:0
|
||||||
|
msgid "Inspections related to this lot."
|
||||||
|
msgstr "Inšpekcije vezane na ta lot."
|
||||||
|
|
||||||
|
#. module: quality_control_stock
|
||||||
|
#: help:stock.picking,qc_inspections:0
|
||||||
|
msgid "Inspections related to this picking."
|
||||||
|
msgstr "Inšpekcije vezane na ta zbirnik."
|
||||||
|
|
||||||
|
#. module: quality_control_stock
|
||||||
|
#: view:qc.inspection:quality_control_stock.qc_inspection_search_view_picking
|
||||||
|
#: field:qc.inspection,lot:0
|
||||||
|
#: view:qc.inspection.line:quality_control_stock.qc_inspection_line_search_stock_view
|
||||||
|
#: field:qc.inspection.line,lot:0
|
||||||
|
#: model:res.request.link,name:quality_control_stock.req_link_stock_production_lot
|
||||||
|
msgid "Lot"
|
||||||
|
msgstr "Lot"
|
||||||
|
|
||||||
|
#. module: quality_control_stock
|
||||||
|
#: model:ir.model,name:quality_control_stock.model_stock_production_lot
|
||||||
|
msgid "Lot/Serial"
|
||||||
|
msgstr "Lot/serijska št."
|
||||||
|
|
||||||
|
#. module: quality_control_stock
|
||||||
|
#: view:qc.inspection:quality_control_stock.qc_inspection_search_view_picking
|
||||||
|
#: field:qc.inspection,picking:0
|
||||||
|
#: view:qc.inspection.line:quality_control_stock.qc_inspection_line_search_stock_view
|
||||||
|
#: field:qc.inspection.line,picking:0
|
||||||
|
msgid "Picking"
|
||||||
|
msgstr "Zbirnik"
|
||||||
|
|
||||||
|
#. module: quality_control_stock
|
||||||
|
#: model:ir.model,name:quality_control_stock.model_stock_picking
|
||||||
|
#: model:res.request.link,name:quality_control_stock.req_link_stock_picking
|
||||||
|
msgid "Picking List"
|
||||||
|
msgstr "Zbirnik"
|
||||||
|
|
||||||
|
#. module: quality_control_stock
|
||||||
|
#: field:qc.trigger,picking_type:0
|
||||||
|
msgid "Picking type"
|
||||||
|
msgstr "Tip zbirnika"
|
||||||
|
|
||||||
|
#. module: quality_control_stock
|
||||||
|
#: view:qc.inspection:quality_control_stock.qc_inspection_search_view_picking
|
||||||
|
#: view:qc.inspection.line:quality_control_stock.qc_inspection_line_search_stock_view
|
||||||
|
msgid "Product"
|
||||||
|
msgstr "Proizvod"
|
||||||
|
|
||||||
|
#. module: quality_control_stock
|
||||||
|
#: model:ir.model,name:quality_control_stock.model_qc_inspection
|
||||||
|
msgid "Quality control inspection"
|
||||||
|
msgstr "Inšpekcija nadzora kvalitete"
|
||||||
|
|
||||||
|
#. module: quality_control_stock
|
||||||
|
#: model:ir.model,name:quality_control_stock.model_qc_inspection_line
|
||||||
|
msgid "Quality control inspection line"
|
||||||
|
msgstr "Inšpekcijska postavka kontrole kakovosti"
|
||||||
|
|
||||||
|
#. module: quality_control_stock
|
||||||
|
#: model:ir.model,name:quality_control_stock.model_qc_trigger
|
||||||
|
msgid "Quality control trigger"
|
||||||
|
msgstr "Sprožilec kontrole kakovosti"
|
||||||
|
|
||||||
|
#. module: quality_control_stock
|
||||||
|
#: model:ir.actions.act_window,name:quality_control_stock.action_qc_inspection_per_lot_done
|
||||||
|
msgid "Quality inspection from lot done"
|
||||||
|
msgstr "Opravljene inšpekcije kakovosti na lotu"
|
||||||
|
|
||||||
|
#. module: quality_control_stock
|
||||||
|
#: model:ir.actions.act_window,name:quality_control_stock.action_qc_inspection_per_lot_passed
|
||||||
|
msgid "Quality inspection from lot passed"
|
||||||
|
msgstr "Izpolnjene inšpekcije kakovosti na lotu"
|
||||||
|
|
||||||
|
#. module: quality_control_stock
|
||||||
|
#: model:ir.actions.act_window,name:quality_control_stock.action_qc_inspection_per_picking_done
|
||||||
|
msgid "Quality inspection from picking done"
|
||||||
|
msgstr "Opravljene inšpekcije kakovosti na zbirniku"
|
||||||
|
|
||||||
|
#. module: quality_control_stock
|
||||||
|
#: model:ir.actions.act_window,name:quality_control_stock.action_qc_inspection_per_picking_passed
|
||||||
|
msgid "Quality inspection from picking passed"
|
||||||
|
msgstr "Izpolnjene inšpekcije kakovosti na zbirniku"
|
||||||
|
|
||||||
|
#. module: quality_control_stock
|
||||||
|
#: model:ir.actions.act_window,name:quality_control_stock.action_qc_inspection_per_lot
|
||||||
|
msgid "Quality inspections from lot"
|
||||||
|
msgstr "Inšpekcije kakovosti na lotu"
|
||||||
|
|
||||||
|
#. module: quality_control_stock
|
||||||
|
#: model:ir.actions.act_window,name:quality_control_stock.action_qc_inspection_per_lot_failed
|
||||||
|
msgid "Quality inspections from lot failed"
|
||||||
|
msgstr "Neuspešne inšpekcije kakovosti na lotu"
|
||||||
|
|
||||||
|
#. module: quality_control_stock
|
||||||
|
#: model:ir.actions.act_window,name:quality_control_stock.action_qc_inspection_per_picking
|
||||||
|
msgid "Quality inspections from picking"
|
||||||
|
msgstr "Inšpekcije kakovosti na zbirniku"
|
||||||
|
|
||||||
|
#. module: quality_control_stock
|
||||||
|
#: model:ir.actions.act_window,name:quality_control_stock.action_qc_inspection_per_picking_failed
|
||||||
|
msgid "Quality inspections from picking failed"
|
||||||
|
msgstr "Neuspešne inšpekcije kakovosti na zbirniku"
|
||||||
|
|
||||||
|
#. module: quality_control_stock
|
||||||
|
#: model:res.request.link,name:quality_control_stock.req_link_stock_move
|
||||||
|
msgid "Stock Move"
|
||||||
|
msgstr "Premik zaloge"
|
||||||
|
|
||||||
|
#. module: quality_control_stock
|
||||||
|
#: model:ir.model,name:quality_control_stock.model_stock_picking_type
|
||||||
|
msgid "The picking type determines the picking view"
|
||||||
|
msgstr "Tip zbirnika določi prikaz zbirnika"
|
||||||
|
|
||||||
|
#. module: quality_control_stock
|
||||||
|
#: view:stock.picking:quality_control_stock.stock_picking_qc_view
|
||||||
|
#: view:stock.production.lot:quality_control_stock.stock_lot_qc_view
|
||||||
|
msgid "inspections"
|
||||||
|
msgstr "inšpekcije"
|
||||||
@@ -1,7 +1,6 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
##############################################################################
|
# (c) 2014 Serv. Tec. Avanzados - Pedro M. Baeza
|
||||||
# For copyright and license notices, see __openerp__.py file in root directory
|
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
|
||||||
##############################################################################
|
|
||||||
|
|
||||||
from . import qc_trigger
|
from . import qc_trigger
|
||||||
from . import qc_inspection
|
from . import qc_inspection
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
##############################################################################
|
# (c) 2014 Serv. Tec. Avanzados - Pedro M. Baeza
|
||||||
# For copyright and license notices, see __openerp__.py file in root directory
|
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
|
||||||
##############################################################################
|
|
||||||
from openerp import models, fields, api
|
from openerp import models, fields, api
|
||||||
|
|
||||||
|
|
||||||
@@ -28,8 +28,7 @@ class QcInspection(models.Model):
|
|||||||
if self.object_id._name == 'stock.pack.operation':
|
if self.object_id._name == 'stock.pack.operation':
|
||||||
self.lot = self.object_id.lot_id
|
self.lot = self.object_id.lot_id
|
||||||
elif self.object_id._name == 'stock.move':
|
elif self.object_id._name == 'stock.move':
|
||||||
if self.object_id.lot_ids:
|
self.lot = self.object_id.lot_ids[:1]
|
||||||
self.lot = self.object_id.lot_ids[0]
|
|
||||||
|
|
||||||
@api.one
|
@api.one
|
||||||
@api.depends('object_id')
|
@api.depends('object_id')
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
##############################################################################
|
# (c) 2014 Serv. Tec. Avanzados - Pedro M. Baeza
|
||||||
# For copyright and license notices, see __openerp__.py file in root directory
|
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
|
||||||
##############################################################################
|
|
||||||
from openerp import models, fields
|
from openerp import models, fields
|
||||||
|
|
||||||
|
|
||||||
@@ -9,4 +9,4 @@ class QcTrigger(models.Model):
|
|||||||
_inherit = 'qc.trigger'
|
_inherit = 'qc.trigger'
|
||||||
|
|
||||||
picking_type = fields.Many2one(
|
picking_type = fields.Many2one(
|
||||||
comodel_name="stock.picking.type", readonly=True)
|
comodel_name="stock.picking.type", readonly=True, ondelete="cascade")
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
##############################################################################
|
# (c) 2014 Serv. Tec. Avanzados - Pedro M. Baeza
|
||||||
# For copyright and license notices, see __openerp__.py file in root directory
|
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
|
||||||
##############################################################################
|
|
||||||
from openerp import models, fields, api
|
from openerp import models, fields, api
|
||||||
|
from openerp.addons.quality_control.models.qc_trigger_line import\
|
||||||
|
_filter_trigger_lines
|
||||||
|
|
||||||
|
|
||||||
class StockPicking(models.Model):
|
class StockPicking(models.Model):
|
||||||
@@ -42,9 +44,11 @@ class StockPicking(models.Model):
|
|||||||
for model in ['qc.trigger.product_category_line',
|
for model in ['qc.trigger.product_category_line',
|
||||||
'qc.trigger.product_template_line',
|
'qc.trigger.product_template_line',
|
||||||
'qc.trigger.product_line']:
|
'qc.trigger.product_line']:
|
||||||
|
partner = (self.partner_id
|
||||||
|
if qc_trigger.partner_selectable else False)
|
||||||
trigger_lines = trigger_lines.union(
|
trigger_lines = trigger_lines.union(
|
||||||
self.env[model].get_trigger_line_for_product(
|
self.env[model].get_trigger_line_for_product(
|
||||||
qc_trigger, operation.product_id))
|
qc_trigger, operation.product_id, partner=partner))
|
||||||
for trigger_line in trigger_lines:
|
for trigger_line in _filter_trigger_lines(trigger_lines):
|
||||||
inspection_model._make_inspection(operation, trigger_line)
|
inspection_model._make_inspection(operation, trigger_line)
|
||||||
return res
|
return res
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
##############################################################################
|
# (c) 2014 Serv. Tec. Avanzados - Pedro M. Baeza
|
||||||
# For copyright and license notices, see __openerp__.py file in root directory
|
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
|
||||||
##############################################################################
|
|
||||||
from openerp import models, api
|
from openerp import models, api
|
||||||
|
|
||||||
|
|
||||||
@@ -11,10 +11,10 @@ class StockPickingType(models.Model):
|
|||||||
@api.multi
|
@api.multi
|
||||||
def _create_qc_trigger(self):
|
def _create_qc_trigger(self):
|
||||||
qc_trigger = {
|
qc_trigger = {
|
||||||
# Synchronize all translations
|
|
||||||
'name': self.complete_name,
|
'name': self.complete_name,
|
||||||
'company_id': self.warehouse_id.company_id.id,
|
'company_id': self.warehouse_id.company_id.id,
|
||||||
'picking_type': self.id,
|
'picking_type': self.id,
|
||||||
|
'partner_selectable': True,
|
||||||
}
|
}
|
||||||
return self.env['qc.trigger'].sudo().create(qc_trigger)
|
return self.env['qc.trigger'].sudo().create(qc_trigger)
|
||||||
|
|
||||||
@@ -33,9 +33,3 @@ class StockPickingType(models.Model):
|
|||||||
[('picking_type', '=', self.id)])
|
[('picking_type', '=', self.id)])
|
||||||
qc_trigger.name = self.complete_name
|
qc_trigger.name = self.complete_name
|
||||||
return res
|
return res
|
||||||
|
|
||||||
@api.multi
|
|
||||||
def unlink(self):
|
|
||||||
self.env['qc.trigger'].sudo().search(
|
|
||||||
[('picking_type', '=', self.id)]).unlink()
|
|
||||||
return super(StockPickingType, self).unlink()
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
##############################################################################
|
# (c) 2014 Serv. Tec. Avanzados - Pedro M. Baeza
|
||||||
# For copyright and license notices, see __openerp__.py file in root directory
|
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
|
||||||
##############################################################################
|
|
||||||
from openerp import models, fields, api
|
from openerp import models, fields, api
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
5
quality_control_stock_oca/tests/__init__.py
Normal file
5
quality_control_stock_oca/tests/__init__.py
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# (c) 2015 Oihane Crucelaegui - AvanzOSC
|
||||||
|
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
|
||||||
|
|
||||||
|
from . import test_quality_control_stock
|
||||||
231
quality_control_stock_oca/tests/test_quality_control_stock.py
Normal file
231
quality_control_stock_oca/tests/test_quality_control_stock.py
Normal file
@@ -0,0 +1,231 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# (c) 2015 Oihane Crucelaegui - AvanzOSC
|
||||||
|
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
|
||||||
|
|
||||||
|
from openerp.tests.common import TransactionCase
|
||||||
|
|
||||||
|
|
||||||
|
class TestQualityControl(TransactionCase):
|
||||||
|
|
||||||
|
def setUp(self):
|
||||||
|
super(TestQualityControl, self).setUp()
|
||||||
|
self.picking_model = self.env['stock.picking']
|
||||||
|
self.inspection_model = self.env['qc.inspection']
|
||||||
|
self.qc_trigger_model = self.env['qc.trigger']
|
||||||
|
self.picking_type_model = self.env['stock.picking.type']
|
||||||
|
self.product = self.env.ref('product.product_product_4')
|
||||||
|
self.partner1 = self.env.ref('base.res_partner_2')
|
||||||
|
self.partner2 = self.env.ref('base.res_partner_4')
|
||||||
|
self.test = self.env.ref('quality_control.qc_test_1')
|
||||||
|
self.picking_type = self.env.ref('stock.picking_type_out')
|
||||||
|
self.sequence = self.env.ref('stock.seq_type_picking_out')
|
||||||
|
inspection_lines = (
|
||||||
|
self.inspection_model._prepare_inspection_lines(self.test))
|
||||||
|
self.inspection1 = self.inspection_model.create({
|
||||||
|
'name': 'Test Inspection',
|
||||||
|
'inspection_lines': inspection_lines,
|
||||||
|
})
|
||||||
|
self.trigger = self.qc_trigger_model.search(
|
||||||
|
[('picking_type', '=', self.picking_type.id)])
|
||||||
|
self.lot = self.env['stock.production.lot'].create({
|
||||||
|
'name': 'Lot for tests',
|
||||||
|
'product_id': self.product.id,
|
||||||
|
})
|
||||||
|
move_vals = {
|
||||||
|
'name': self.product.name,
|
||||||
|
'product_id': self.product.id,
|
||||||
|
'product_uom': self.product.uom_id.id,
|
||||||
|
'location_id': self.picking_type.default_location_src_id.id,
|
||||||
|
'location_dest_id': self.picking_type.default_location_dest_id.id,
|
||||||
|
}
|
||||||
|
self.picking1 = self.picking_model.create({
|
||||||
|
'partner_id': self.partner1.id,
|
||||||
|
'picking_type_id': self.picking_type.id,
|
||||||
|
'move_lines': [(0, 0, move_vals)],
|
||||||
|
})
|
||||||
|
self.picking1.action_confirm()
|
||||||
|
self.picking1.force_assign()
|
||||||
|
self.picking1.do_prepare_partial()
|
||||||
|
for line in self.picking1.pack_operation_ids.filtered(
|
||||||
|
lambda r: r.product_id == self.product):
|
||||||
|
line.write({'lot_id': self.lot.id})
|
||||||
|
|
||||||
|
def test_inspection_create_for_product(self):
|
||||||
|
self.product.qc_triggers = [(
|
||||||
|
0, 0, {
|
||||||
|
'trigger': self.trigger.id,
|
||||||
|
'test': self.test.id,
|
||||||
|
}
|
||||||
|
)]
|
||||||
|
self.picking1.do_transfer()
|
||||||
|
self.assertEqual(self.picking1.created_inspections, 1,
|
||||||
|
'Only one inspection must be created')
|
||||||
|
self.assertEqual(self.picking1.qc_inspections[:1].test, self.test,
|
||||||
|
'Wrong test picked when creating inspection.')
|
||||||
|
|
||||||
|
def test_inspection_create_for_template(self):
|
||||||
|
self.product.product_tmpl_id.qc_triggers = [(
|
||||||
|
0, 0, {
|
||||||
|
'trigger': self.trigger.id,
|
||||||
|
'test': self.test.id,
|
||||||
|
}
|
||||||
|
)]
|
||||||
|
self.picking1.do_transfer()
|
||||||
|
self.assertEqual(self.picking1.created_inspections, 1,
|
||||||
|
'Only one inspection must be created')
|
||||||
|
self.assertEqual(self.picking1.qc_inspections[:1].test, self.test,
|
||||||
|
'Wrong test picked when creating inspection.')
|
||||||
|
|
||||||
|
def test_inspection_create_for_category(self):
|
||||||
|
self.product.categ_id.qc_triggers = [(
|
||||||
|
0, 0, {
|
||||||
|
'trigger': self.trigger.id,
|
||||||
|
'test': self.test.id,
|
||||||
|
}
|
||||||
|
)]
|
||||||
|
self.picking1.do_transfer()
|
||||||
|
self.assertEqual(self.picking1.created_inspections, 1,
|
||||||
|
'Only one inspection must be created')
|
||||||
|
self.assertEqual(self.picking1.qc_inspections[:1].test, self.test,
|
||||||
|
'Wrong test picked when creating inspection.')
|
||||||
|
|
||||||
|
def test_inspection_create_for_product_partner(self):
|
||||||
|
self.product.qc_triggers = [(
|
||||||
|
0, 0, {
|
||||||
|
'trigger': self.trigger.id,
|
||||||
|
'test': self.test.id,
|
||||||
|
'partners': [(6, 0, self.partner1.ids)],
|
||||||
|
}
|
||||||
|
)]
|
||||||
|
self.picking1.do_transfer()
|
||||||
|
self.assertEqual(self.picking1.created_inspections, 1,
|
||||||
|
'Only one inspection must be created')
|
||||||
|
self.assertEqual(self.picking1.qc_inspections[:1].test, self.test,
|
||||||
|
'Wrong test picked when creating inspection.')
|
||||||
|
|
||||||
|
def test_inspection_create_for_template_partner(self):
|
||||||
|
self.product.product_tmpl_id.qc_triggers = [(
|
||||||
|
0, 0, {
|
||||||
|
'trigger': self.trigger.id,
|
||||||
|
'test': self.test.id,
|
||||||
|
'partners': [(6, 0, self.partner1.ids)],
|
||||||
|
}
|
||||||
|
)]
|
||||||
|
self.picking1.do_transfer()
|
||||||
|
self.assertEqual(self.picking1.created_inspections, 1,
|
||||||
|
'Only one inspection must be created')
|
||||||
|
self.assertEqual(self.picking1.qc_inspections[:1].test, self.test,
|
||||||
|
'Wrong test picked when creating inspection.')
|
||||||
|
|
||||||
|
def test_inspection_create_for_category_partner(self):
|
||||||
|
self.product.categ_id.qc_triggers = [(
|
||||||
|
0, 0, {
|
||||||
|
'trigger': self.trigger.id,
|
||||||
|
'test': self.test.id,
|
||||||
|
'partners': [(6, 0, self.partner1.ids)],
|
||||||
|
}
|
||||||
|
)]
|
||||||
|
self.picking1.do_transfer()
|
||||||
|
self.assertEqual(self.picking1.created_inspections, 1,
|
||||||
|
'Only one inspection must be created')
|
||||||
|
self.assertEqual(self.picking1.qc_inspections[:1].test, self.test,
|
||||||
|
'Wrong test picked when creating inspection.')
|
||||||
|
|
||||||
|
def test_inspection_create_for_product_wrong_partner(self):
|
||||||
|
self.product.qc_triggers = [(
|
||||||
|
0, 0, {
|
||||||
|
'trigger': self.trigger.id,
|
||||||
|
'test': self.test.id,
|
||||||
|
'partners': [(6, 0, self.partner2.ids)],
|
||||||
|
}
|
||||||
|
)]
|
||||||
|
self.picking1.do_transfer()
|
||||||
|
self.assertEqual(self.picking1.created_inspections, 0,
|
||||||
|
'No inspection must be created')
|
||||||
|
|
||||||
|
def test_inspection_create_for_template_wrong_partner(self):
|
||||||
|
self.product.product_tmpl_id.qc_triggers = [(
|
||||||
|
0, 0, {
|
||||||
|
'trigger': self.trigger.id,
|
||||||
|
'test': self.test.id,
|
||||||
|
'partners': [(6, 0, self.partner2.ids)],
|
||||||
|
}
|
||||||
|
)]
|
||||||
|
self.picking1.do_transfer()
|
||||||
|
self.assertEqual(self.picking1.created_inspections, 0,
|
||||||
|
'No inspection must be created')
|
||||||
|
|
||||||
|
def test_inspection_create_for_category_wrong_partner(self):
|
||||||
|
self.product.categ_id.qc_triggers = [(
|
||||||
|
0, 0, {
|
||||||
|
'trigger': self.trigger.id,
|
||||||
|
'test': self.test.id,
|
||||||
|
'partners': [(6, 0, self.partner2.ids)],
|
||||||
|
}
|
||||||
|
)]
|
||||||
|
self.picking1.do_transfer()
|
||||||
|
self.assertEqual(self.picking1.created_inspections, 0,
|
||||||
|
'No inspection must be created')
|
||||||
|
|
||||||
|
def test_inspection_create_only_one(self):
|
||||||
|
self.product.qc_triggers = [(
|
||||||
|
0, 0, {
|
||||||
|
'trigger': self.trigger.id,
|
||||||
|
'test': self.test.id,
|
||||||
|
}
|
||||||
|
)]
|
||||||
|
self.product.categ_id.qc_triggers = [(
|
||||||
|
0, 0, {
|
||||||
|
'trigger': self.trigger.id,
|
||||||
|
'test': self.test.id,
|
||||||
|
}
|
||||||
|
)]
|
||||||
|
self.picking1.do_transfer()
|
||||||
|
self.assertEqual(self.picking1.created_inspections, 1,
|
||||||
|
'Only one inspection must be created')
|
||||||
|
self.assertEqual(self.picking1.qc_inspections[:1].test, self.test,
|
||||||
|
'Wrong test picked when creating inspection.')
|
||||||
|
self.assertEqual(self.lot.created_inspections, 1,
|
||||||
|
'Only one inspection must be created')
|
||||||
|
self.assertEqual(self.lot.qc_inspections[:1].test, self.test,
|
||||||
|
'Wrong test picked when creating inspection.')
|
||||||
|
|
||||||
|
def test_picking_type(self):
|
||||||
|
picking_type = self.picking_type_model.create({
|
||||||
|
'name': 'Test Picking Type',
|
||||||
|
'sequence_id': self.sequence.id,
|
||||||
|
'code': 'outgoing',
|
||||||
|
})
|
||||||
|
trigger = self.qc_trigger_model.search(
|
||||||
|
[('picking_type', '=', picking_type.id)])
|
||||||
|
self.assertEqual(len(trigger), 1,
|
||||||
|
'One trigger must have been created.')
|
||||||
|
self.assertEqual(trigger.name, picking_type.complete_name,
|
||||||
|
'Trigger name must match picking type name.')
|
||||||
|
picking_type.write({
|
||||||
|
'name': 'Test Name Change',
|
||||||
|
})
|
||||||
|
self.assertEqual(trigger.name, picking_type.complete_name,
|
||||||
|
'Trigger name must match picking type name.')
|
||||||
|
|
||||||
|
def test_qc_inspection_picking(self):
|
||||||
|
self.inspection1.write({
|
||||||
|
'object_id': '%s,%d' % (self.picking1._model,
|
||||||
|
self.picking1.id),
|
||||||
|
})
|
||||||
|
self.assertEquals(self.inspection1.picking,
|
||||||
|
self.picking1)
|
||||||
|
|
||||||
|
def test_qc_inspection_stock_move(self):
|
||||||
|
self.inspection1.write({
|
||||||
|
'object_id': '%s,%d' % (self.picking1.move_lines[:1]._model,
|
||||||
|
self.picking1.move_lines[:1].id),
|
||||||
|
})
|
||||||
|
self.assertEquals(self.inspection1.picking,
|
||||||
|
self.picking1)
|
||||||
|
self.assertEquals(self.inspection1.lot,
|
||||||
|
self.picking1.move_lines[:1].lot_ids[:1])
|
||||||
|
self.assertEquals(self.inspection1.product,
|
||||||
|
self.picking1.move_lines[:1].product_id)
|
||||||
|
self.assertEquals(self.inspection1.qty,
|
||||||
|
self.picking1.move_lines[:1].product_qty)
|
||||||
@@ -34,6 +34,8 @@
|
|||||||
<field name="name">stock.picking.qc.view</field>
|
<field name="name">stock.picking.qc.view</field>
|
||||||
<field name="model">stock.picking</field>
|
<field name="model">stock.picking</field>
|
||||||
<field name="inherit_id" ref="stock.view_picking_form" />
|
<field name="inherit_id" ref="stock.view_picking_form" />
|
||||||
|
<field name="groups_id"
|
||||||
|
eval="[(4, ref('quality_control.group_quality_control_user'))]" />
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<div class="oe_right oe_button_box" position="inside">
|
<div class="oe_right oe_button_box" position="inside">
|
||||||
<button class="oe_inline oe_stat_button"
|
<button class="oe_inline oe_stat_button"
|
||||||
|
|||||||
@@ -34,36 +34,36 @@
|
|||||||
<field name="name">stock.production.lot.qc.view</field>
|
<field name="name">stock.production.lot.qc.view</field>
|
||||||
<field name="model">stock.production.lot</field>
|
<field name="model">stock.production.lot</field>
|
||||||
<field name="inherit_id" ref="stock.view_production_lot_form" />
|
<field name="inherit_id" ref="stock.view_production_lot_form" />
|
||||||
|
<field name="groups_id"
|
||||||
|
eval="[(4, ref('quality_control.group_quality_control_user'))]" />
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<div class="oe_title" position="after">
|
<div class="oe_button_box oe_right" position="inside">
|
||||||
<div class="oe_right oe_button_box" name="buttons">
|
<button class="oe_inline oe_stat_button"
|
||||||
<button class="oe_inline oe_stat_button"
|
type="action"
|
||||||
type="action"
|
name="%(action_qc_inspection_per_lot)d"
|
||||||
name="%(action_qc_inspection_per_lot)d"
|
icon="fa-list">
|
||||||
icon="fa-list">
|
<field name="created_inspections"
|
||||||
<field name="created_inspections"
|
widget="statinfo"
|
||||||
widget="statinfo"
|
string="inspections" />
|
||||||
string="inspections" />
|
</button>
|
||||||
</button>
|
<button class="oe_inline oe_stat_button"
|
||||||
<button class="oe_inline oe_stat_button"
|
type="action"
|
||||||
type="action"
|
name="%(action_qc_inspection_per_lot_done)d"
|
||||||
name="%(action_qc_inspection_per_lot_done)d"
|
icon="fa-pencil">
|
||||||
icon="fa-pencil">
|
<field name="done_inspections" widget="statinfo" />
|
||||||
<field name="done_inspections" widget="statinfo" />
|
</button>
|
||||||
</button>
|
<button class="oe_inline oe_stat_button"
|
||||||
<button class="oe_inline oe_stat_button"
|
type="action"
|
||||||
type="action"
|
name="%(action_qc_inspection_per_lot_passed)d"
|
||||||
name="%(action_qc_inspection_per_lot_passed)d"
|
icon="fa-thumbs-o-up">
|
||||||
icon="fa-thumbs-o-up">
|
<field name="passed_inspections" widget="statinfo" />
|
||||||
<field name="passed_inspections" widget="statinfo" />
|
</button>
|
||||||
</button>
|
<button class="oe_inline oe_stat_button"
|
||||||
<button class="oe_inline oe_stat_button"
|
type="action"
|
||||||
type="action"
|
name="%(action_qc_inspection_per_lot_failed)d"
|
||||||
name="%(action_qc_inspection_per_lot_failed)d"
|
icon="fa-thumbs-o-down">
|
||||||
icon="fa-thumbs-o-down">
|
<field name="failed_inspections" widget="statinfo" />
|
||||||
<field name="failed_inspections" widget="statinfo" />
|
</button>
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|||||||
Reference in New Issue
Block a user