mirror of
https://github.com/OCA/manufacture.git
synced 2025-01-28 16:37:15 +02:00
[MIG] quality_control_stock: Migration to 10.0
This commit is contained in:
@@ -1,57 +1,81 @@
|
|||||||
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
|
=======================
|
||||||
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
Quality control - Stock
|
||||||
:alt: License: AGPL-3
|
=======================
|
||||||
|
|
||||||
===================================
|
.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
Stock extension for quality control
|
!! This file is generated by oca-gen-addon-readme !!
|
||||||
===================================
|
!! changes will be overwritten. !!
|
||||||
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
|
|
||||||
|
.. |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/licence-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%2Fmanufacture-lightgray.png?logo=github
|
||||||
|
:target: https://github.com/OCA/manufacture/tree/10.0/quality_control_stock
|
||||||
|
:alt: OCA/manufacture
|
||||||
|
.. |badge4| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
|
||||||
|
:target: https://runbot.odoo-community.org/runbot/129/10.0
|
||||||
|
:alt: Try me on Runbot
|
||||||
|
|
||||||
|
|badge1| |badge2| |badge3| |badge4|
|
||||||
|
|
||||||
This module defines triggers that creates inspections when stock moves are done.
|
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.
|
||||||
|
|
||||||
|
**Table of contents**
|
||||||
|
|
||||||
Usage
|
.. contents::
|
||||||
=====
|
:local:
|
||||||
|
|
||||||
.. 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
|
Known issues / Roadmap
|
||||||
======================
|
======================
|
||||||
|
|
||||||
* Put trigger in all languages.
|
* Put trigger in all languages.
|
||||||
|
|
||||||
|
|
||||||
Bug Tracker
|
Bug Tracker
|
||||||
===========
|
===========
|
||||||
|
|
||||||
Bugs are tracked on `GitHub Issues <https://github.com/OCA/manufacture/issues>`_.
|
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.
|
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**>`_.
|
If you spotted it first, help us smashing it by providing a detailed and welcomed feedback.
|
||||||
|
|
||||||
|
Do not contact contributors directly about support or help with technical issues.
|
||||||
|
|
||||||
Credits
|
Credits
|
||||||
=======
|
=======
|
||||||
|
|
||||||
|
Authors
|
||||||
|
~~~~~~~
|
||||||
|
|
||||||
|
* OdooMRP team
|
||||||
|
* AvanzOSC
|
||||||
|
* Serv. Tecnol. Avanzados - Pedro M. Baeza
|
||||||
|
* Agile Business Group
|
||||||
|
|
||||||
Contributors
|
Contributors
|
||||||
------------
|
~~~~~~~~~~~~
|
||||||
|
|
||||||
* Pedro M. Baeza <pedro.baeza@serviciobaeza.com>
|
* Pedro M. Baeza <pedro.baeza@serviciobaeza.com>
|
||||||
* Oihane Crucelaegui <oihanecrucelaegi@avanzosc.es>
|
* Oihane Crucelaegui <oihanecrucelaegi@avanzosc.es>
|
||||||
|
* Simone Rubino <simone.rubino@agilebg.com>
|
||||||
|
|
||||||
Maintainer
|
Maintainers
|
||||||
----------
|
~~~~~~~~~~~
|
||||||
|
|
||||||
|
This module is maintained by the OCA.
|
||||||
|
|
||||||
.. image:: https://odoo-community.org/logo.png
|
.. image:: https://odoo-community.org/logo.png
|
||||||
:alt: Odoo Community Association
|
:alt: Odoo Community Association
|
||||||
:target: https://odoo-community.org
|
:target: https://odoo-community.org
|
||||||
|
|
||||||
This module is maintained by the OCA.
|
|
||||||
|
|
||||||
OCA, or the Odoo Community Association, is a nonprofit organization whose
|
OCA, or the Odoo Community Association, is a nonprofit organization whose
|
||||||
mission is to support the collaborative development of Odoo features and
|
mission is to support the collaborative development of Odoo features and
|
||||||
promote its widespread use.
|
promote its widespread use.
|
||||||
|
|
||||||
To contribute to this module, please visit http://odoo-community.org.
|
This module is part of the `OCA/manufacture <https://github.com/OCA/manufacture/tree/10.0/quality_control_stock>`_ project on GitHub.
|
||||||
|
|
||||||
|
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
|
||||||
|
|||||||
@@ -1,15 +1,15 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# (c) 2014 Serv. Tec. Avanzados - Pedro M. Baeza
|
# Copyright 2014 Serv. Tec. Avanzados - Pedro M. Baeza
|
||||||
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
|
# Copyright 2018 Simone Rubino - Agile Business Group
|
||||||
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
from . import models
|
from . import models
|
||||||
from openerp import SUPERUSER_ID
|
from odoo import api, SUPERUSER_ID
|
||||||
|
|
||||||
|
|
||||||
def post_init_hook(cr, registry):
|
def post_init_hook(cr, registry):
|
||||||
# Create QC triggers
|
# Create QC triggers
|
||||||
picking_type_ids = registry['stock.picking.type'].search(
|
env = api.Environment(cr, SUPERUSER_ID, {})
|
||||||
cr, SUPERUSER_ID, [])
|
picking_type_ids = env['stock.picking.type'].sudo().search([])
|
||||||
for picking_type_id in picking_type_ids:
|
for picking_type_id in picking_type_ids:
|
||||||
registry['stock.picking.type']._create_qc_trigger(
|
picking_type_id.sudo()._create_qc_trigger()
|
||||||
cr, SUPERUSER_ID, picking_type_id)
|
|
||||||
|
|||||||
@@ -1,22 +1,21 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# (c) 2014 Serv. Tec. Avanzados - Pedro M. Baeza
|
# Copyright 2014 Serv. Tec. Avanzados - Pedro M. Baeza
|
||||||
# (c) 2014 Oihane Crucelaegui - AvanzOSC
|
# Copyright 2014 Oihane Crucelaegui - AvanzOSC
|
||||||
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
|
# Copyright 2018 Simone Rubino - Agile Business Group
|
||||||
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
{
|
{
|
||||||
"name": "Quality control - Stock",
|
"name": "Quality control - Stock",
|
||||||
"version": "8.0.1.0.1",
|
"version": "10.0.1.0.0",
|
||||||
"category": "Quality control",
|
"category": "Quality control",
|
||||||
"license": "AGPL-3",
|
"license": "AGPL-3",
|
||||||
"author": "OdooMRP team, "
|
"author": "OdooMRP team, "
|
||||||
"AvanzOSC, "
|
"AvanzOSC, "
|
||||||
"Serv. Tecnol. Avanzados - Pedro M. Baeza, "
|
"Serv. Tecnol. Avanzados - Pedro M. Baeza, "
|
||||||
|
"Agile Business Group, "
|
||||||
"Odoo Community Association (OCA)",
|
"Odoo Community Association (OCA)",
|
||||||
"website": "http://www.odoomrp.com",
|
"website": "https://github.com/OCA/manufacture/tree/10.0/"
|
||||||
"contributors": [
|
"quality_control_stock",
|
||||||
"Pedro M. Baeza <pedro.baeza@serviciosbaeza.com>",
|
|
||||||
"Oihane Crucelaegui <oihanecrucelaegi@avanzosc.es>",
|
|
||||||
],
|
|
||||||
"depends": [
|
"depends": [
|
||||||
"quality_control",
|
"quality_control",
|
||||||
"stock",
|
"stock",
|
||||||
@@ -1,21 +1,19 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<openerp>
|
<!-- Copyright 2018 Simone Rubino - Agile Business Group
|
||||||
|
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
|
||||||
|
<odoo>
|
||||||
|
<record id="req_link_stock_move" model="res.request.link">
|
||||||
|
<field name="name">Stock Move</field>
|
||||||
|
<field name="object">stock.move</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
<data>
|
<record id="req_link_stock_picking" model="res.request.link">
|
||||||
<record id="req_link_stock_move" model="res.request.link">
|
<field name="name">Picking List</field>
|
||||||
<field name="name">Stock Move</field>
|
<field name="object">stock.picking</field>
|
||||||
<field name="object">stock.move</field>
|
</record>
|
||||||
</record>
|
|
||||||
|
|
||||||
<record id="req_link_stock_picking" model="res.request.link">
|
<record id="req_link_stock_production_lot" model="res.request.link">
|
||||||
<field name="name">Picking List</field>
|
<field name="name">Lot</field>
|
||||||
<field name="object">stock.picking</field>
|
<field name="object">stock.production.lot</field>
|
||||||
</record>
|
</record>
|
||||||
|
</odoo>
|
||||||
<record id="req_link_stock_production_lot" model="res.request.link">
|
|
||||||
<field name="name">Lot</field>
|
|
||||||
<field name="object">stock.production.lot</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
</data>
|
|
||||||
</openerp>
|
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# (c) 2014 Serv. Tec. Avanzados - Pedro M. Baeza
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||||
# 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,16 +1,18 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# (c) 2014 Serv. Tec. Avanzados - Pedro M. Baeza
|
# Copyright 2014 Serv. Tec. Avanzados - Pedro M. Baeza
|
||||||
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
|
# Copyright 2018 Simone Rubino - Agile Business Group
|
||||||
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
from openerp import models, fields, api
|
from odoo import api, fields, models
|
||||||
|
|
||||||
|
|
||||||
class QcInspection(models.Model):
|
class QcInspection(models.Model):
|
||||||
_inherit = 'qc.inspection'
|
_inherit = 'qc.inspection'
|
||||||
|
|
||||||
@api.one
|
@api.multi
|
||||||
@api.depends('object_id')
|
@api.depends('object_id')
|
||||||
def get_picking(self):
|
def get_picking(self):
|
||||||
|
self.ensure_one()
|
||||||
self.picking = False
|
self.picking = False
|
||||||
if self.object_id:
|
if self.object_id:
|
||||||
if self.object_id._name == 'stock.move':
|
if self.object_id._name == 'stock.move':
|
||||||
@@ -20,22 +22,24 @@ class QcInspection(models.Model):
|
|||||||
elif self.object_id._name == 'stock.pack.operation':
|
elif self.object_id._name == 'stock.pack.operation':
|
||||||
self.picking = self.object_id.picking_id
|
self.picking = self.object_id.picking_id
|
||||||
|
|
||||||
@api.one
|
@api.multi
|
||||||
@api.depends('object_id')
|
@api.depends('object_id')
|
||||||
def get_lot(self):
|
def get_lot(self):
|
||||||
|
self.ensure_one()
|
||||||
self.lot = False
|
self.lot = False
|
||||||
if self.object_id:
|
if self.object_id:
|
||||||
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.pack_lot_ids[:1].lot_id
|
||||||
elif self.object_id._name == 'stock.move':
|
elif self.object_id._name == 'stock.move':
|
||||||
self.lot = self.object_id.lot_ids[:1]
|
self.lot = self.object_id.lot_ids[:1]
|
||||||
elif self.object_id._name == 'stock.production.lot':
|
elif self.object_id._name == 'stock.production.lot':
|
||||||
self.lot = self.object_id
|
self.lot = self.object_id
|
||||||
|
|
||||||
@api.one
|
@api.multi
|
||||||
@api.depends('object_id')
|
@api.depends('object_id')
|
||||||
def _get_product(self):
|
def _get_product(self):
|
||||||
"""Overriden for getting the product from a stock move."""
|
"""Overriden for getting the product from a stock move."""
|
||||||
|
self.ensure_one()
|
||||||
super(QcInspection, self)._get_product()
|
super(QcInspection, self)._get_product()
|
||||||
if self.object_id:
|
if self.object_id:
|
||||||
if self.object_id._name == 'stock.move':
|
if self.object_id._name == 'stock.move':
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# (c) 2014 Serv. Tec. Avanzados - Pedro M. Baeza
|
# Copyright 2014 Serv. Tec. Avanzados - Pedro M. Baeza
|
||||||
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
|
# Copyright 2018 Simone Rubino - Agile Business Group
|
||||||
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
from openerp import models, fields
|
from odoo import fields, models
|
||||||
|
|
||||||
|
|
||||||
class QcTrigger(models.Model):
|
class QcTrigger(models.Model):
|
||||||
|
|||||||
@@ -1,18 +1,20 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# (c) 2014 Serv. Tec. Avanzados - Pedro M. Baeza
|
# Copyright 2014 Serv. Tec. Avanzados - Pedro M. Baeza
|
||||||
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
|
# Copyright 2018 Simone Rubino - Agile Business Group
|
||||||
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
from openerp import models, fields, api
|
from odoo import api, fields, models
|
||||||
from openerp.addons.quality_control.models.qc_trigger_line import\
|
from odoo.addons.quality_control.models.qc_trigger_line import\
|
||||||
_filter_trigger_lines
|
_filter_trigger_lines
|
||||||
|
|
||||||
|
|
||||||
class StockPicking(models.Model):
|
class StockPicking(models.Model):
|
||||||
_inherit = 'stock.picking'
|
_inherit = 'stock.picking'
|
||||||
|
|
||||||
@api.one
|
@api.multi
|
||||||
@api.depends('qc_inspections', 'qc_inspections.state')
|
@api.depends('qc_inspections', 'qc_inspections.state')
|
||||||
def _count_inspections(self):
|
def _count_inspections(self):
|
||||||
|
self.ensure_one()
|
||||||
self.created_inspections = len(self.qc_inspections)
|
self.created_inspections = len(self.qc_inspections)
|
||||||
self.passed_inspections = len([x for x in self.qc_inspections if
|
self.passed_inspections = len([x for x in self.qc_inspections if
|
||||||
x.state == 'success'])
|
x.state == 'success'])
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# (c) 2014 Serv. Tec. Avanzados - Pedro M. Baeza
|
# Copyright 2014 Serv. Tec. Avanzados - Pedro M. Baeza
|
||||||
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
|
# Copyright 2018 Simone Rubino - Agile Business Group
|
||||||
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
from openerp import models, api
|
from odoo import api, models
|
||||||
|
|
||||||
|
|
||||||
class StockPickingType(models.Model):
|
class StockPickingType(models.Model):
|
||||||
@@ -10,8 +11,9 @@ class StockPickingType(models.Model):
|
|||||||
|
|
||||||
@api.multi
|
@api.multi
|
||||||
def _create_qc_trigger(self):
|
def _create_qc_trigger(self):
|
||||||
|
self.ensure_one()
|
||||||
qc_trigger = {
|
qc_trigger = {
|
||||||
'name': self.complete_name,
|
'name': self.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,
|
'partner_selectable': True,
|
||||||
@@ -31,5 +33,5 @@ class StockPickingType(models.Model):
|
|||||||
qc_trigger_model = self.env['qc.trigger'].sudo()
|
qc_trigger_model = self.env['qc.trigger'].sudo()
|
||||||
qc_trigger = qc_trigger_model.search(
|
qc_trigger = qc_trigger_model.search(
|
||||||
[('picking_type', '=', self.id)])
|
[('picking_type', '=', self.id)])
|
||||||
qc_trigger.name = self.complete_name
|
qc_trigger.name = self.name
|
||||||
return res
|
return res
|
||||||
|
|||||||
@@ -1,16 +1,18 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# (c) 2014 Serv. Tec. Avanzados - Pedro M. Baeza
|
# Copyright 2014 Serv. Tec. Avanzados - Pedro M. Baeza
|
||||||
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
|
# Copyright 2018 Simone Rubino - Agile Business Group
|
||||||
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
from openerp import models, fields, api
|
from odoo import api, fields, models
|
||||||
|
|
||||||
|
|
||||||
class StockProductionLot(models.Model):
|
class StockProductionLot(models.Model):
|
||||||
_inherit = 'stock.production.lot'
|
_inherit = 'stock.production.lot'
|
||||||
|
|
||||||
@api.one
|
@api.multi
|
||||||
@api.depends('qc_inspections', 'qc_inspections.state')
|
@api.depends('qc_inspections', 'qc_inspections.state')
|
||||||
def _count_inspections(self):
|
def _count_inspections(self):
|
||||||
|
self.ensure_one()
|
||||||
self.created_inspections = len(self.qc_inspections)
|
self.created_inspections = len(self.qc_inspections)
|
||||||
self.passed_inspections = len([x for x in self.qc_inspections if
|
self.passed_inspections = len([x for x in self.qc_inspections if
|
||||||
x.state == 'success'])
|
x.state == 'success'])
|
||||||
|
|||||||
3
quality_control_stock/readme/CONTRIBUTORS.rst
Normal file
3
quality_control_stock/readme/CONTRIBUTORS.rst
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
* Pedro M. Baeza <pedro.baeza@serviciobaeza.com>
|
||||||
|
* Oihane Crucelaegui <oihanecrucelaegi@avanzosc.es>
|
||||||
|
* Simone Rubino <simone.rubino@agilebg.com>
|
||||||
3
quality_control_stock/readme/DESCRIPTION.rst
Normal file
3
quality_control_stock/readme/DESCRIPTION.rst
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
This module defines triggers that creates inspections when stock moves are done.
|
||||||
|
|
||||||
|
It also adds some shortcuts on picking and lots to these inspections.
|
||||||
1
quality_control_stock/readme/ROADMAP.rst
Normal file
1
quality_control_stock/readme/ROADMAP.rst
Normal file
@@ -0,0 +1 @@
|
|||||||
|
* Put trigger in all languages.
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# (c) 2015 Oihane Crucelaegui - AvanzOSC
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||||
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
|
|
||||||
|
|
||||||
from . import test_quality_control_stock
|
from . import test_quality_control_stock
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# (c) 2015 Oihane Crucelaegui - AvanzOSC
|
# Copyright 2015 Oihane Crucelaegui - AvanzOSC
|
||||||
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
|
# Copyright 2018 Simone Rubino - Agile Business Group
|
||||||
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
from openerp.tests.common import TransactionCase
|
from odoo.tests.common import TransactionCase
|
||||||
|
|
||||||
|
|
||||||
class TestQualityControl(TransactionCase):
|
class TestQualityControl(TransactionCase):
|
||||||
@@ -18,7 +19,9 @@ class TestQualityControl(TransactionCase):
|
|||||||
self.partner2 = self.env.ref('base.res_partner_4')
|
self.partner2 = self.env.ref('base.res_partner_4')
|
||||||
self.test = self.env.ref('quality_control.qc_test_1')
|
self.test = self.env.ref('quality_control.qc_test_1')
|
||||||
self.picking_type = self.env.ref('stock.picking_type_out')
|
self.picking_type = self.env.ref('stock.picking_type_out')
|
||||||
self.sequence = self.env.ref('stock.seq_type_picking_out')
|
self.location_dest = self.env.ref('stock.stock_location_customers')
|
||||||
|
self.sequence = self.env['ir.sequence'] \
|
||||||
|
.search([('prefix', 'like', '/OUT/')], limit=1)
|
||||||
inspection_lines = (
|
inspection_lines = (
|
||||||
self.inspection_model._prepare_inspection_lines(self.test))
|
self.inspection_model._prepare_inspection_lines(self.test))
|
||||||
self.inspection1 = self.inspection_model.create({
|
self.inspection1 = self.inspection_model.create({
|
||||||
@@ -37,19 +40,27 @@ class TestQualityControl(TransactionCase):
|
|||||||
'product_uom': self.product.uom_id.id,
|
'product_uom': self.product.uom_id.id,
|
||||||
'product_uom_qty': 2.0,
|
'product_uom_qty': 2.0,
|
||||||
'location_id': self.picking_type.default_location_src_id.id,
|
'location_id': self.picking_type.default_location_src_id.id,
|
||||||
'location_dest_id': self.picking_type.default_location_dest_id.id,
|
'location_dest_id': self.location_dest.id,
|
||||||
}
|
}
|
||||||
self.picking1 = self.picking_model.create({
|
self.picking1 = self.picking_model \
|
||||||
'partner_id': self.partner1.id,
|
.with_context(default_picking_type_id=self.picking_type.id) \
|
||||||
'picking_type_id': self.picking_type.id,
|
.create({
|
||||||
'move_lines': [(0, 0, move_vals)],
|
'partner_id': self.partner1.id,
|
||||||
})
|
'picking_type_id': self.picking_type.id,
|
||||||
|
'move_lines': [(0, 0, move_vals)],
|
||||||
|
'location_dest_id': self.location_dest.id
|
||||||
|
})
|
||||||
self.picking1.action_confirm()
|
self.picking1.action_confirm()
|
||||||
self.picking1.force_assign()
|
self.picking1.force_assign()
|
||||||
self.picking1.do_prepare_partial()
|
self.picking1.do_prepare_partial()
|
||||||
for line in self.picking1.pack_operation_ids.filtered(
|
for line in self.picking1.pack_operation_ids.filtered(
|
||||||
lambda r: r.product_id == self.product):
|
lambda r: r.product_id == self.product):
|
||||||
line.write({'lot_id': self.lot.id})
|
line.write({
|
||||||
|
'pack_lot_ids': [(0, 0, {
|
||||||
|
'lot_id': self.lot.id,
|
||||||
|
'qty': 2.0
|
||||||
|
})]
|
||||||
|
})
|
||||||
|
|
||||||
def test_inspection_create_for_product(self):
|
def test_inspection_create_for_product(self):
|
||||||
self.product.qc_triggers = [(
|
self.product.qc_triggers = [(
|
||||||
@@ -200,24 +211,24 @@ class TestQualityControl(TransactionCase):
|
|||||||
def test_picking_type(self):
|
def test_picking_type(self):
|
||||||
picking_type = self.picking_type_model.create({
|
picking_type = self.picking_type_model.create({
|
||||||
'name': 'Test Picking Type',
|
'name': 'Test Picking Type',
|
||||||
'sequence_id': self.sequence.id,
|
|
||||||
'code': 'outgoing',
|
'code': 'outgoing',
|
||||||
|
'sequence_id': self.sequence.id
|
||||||
})
|
})
|
||||||
trigger = self.qc_trigger_model.search(
|
trigger = self.qc_trigger_model.search(
|
||||||
[('picking_type', '=', picking_type.id)])
|
[('picking_type', '=', picking_type.id)])
|
||||||
self.assertEqual(len(trigger), 1,
|
self.assertEqual(len(trigger), 1,
|
||||||
'One trigger must have been created.')
|
'One trigger must have been created.')
|
||||||
self.assertEqual(trigger.name, picking_type.complete_name,
|
self.assertEqual(trigger.name, picking_type.name,
|
||||||
'Trigger name must match picking type name.')
|
'Trigger name must match picking type name.')
|
||||||
picking_type.write({
|
picking_type.write({
|
||||||
'name': 'Test Name Change',
|
'name': 'Test Name Change',
|
||||||
})
|
})
|
||||||
self.assertEqual(trigger.name, picking_type.complete_name,
|
self.assertEqual(trigger.name, picking_type.name,
|
||||||
'Trigger name must match picking type name.')
|
'Trigger name must match picking type name.')
|
||||||
|
|
||||||
def test_qc_inspection_picking(self):
|
def test_qc_inspection_picking(self):
|
||||||
self.inspection1.write({
|
self.inspection1.write({
|
||||||
'object_id': '%s,%d' % (self.picking1._model,
|
'object_id': '%s,%d' % (self.picking1._name,
|
||||||
self.picking1.id),
|
self.picking1.id),
|
||||||
})
|
})
|
||||||
self.assertEquals(self.inspection1.picking,
|
self.assertEquals(self.inspection1.picking,
|
||||||
@@ -225,7 +236,7 @@ class TestQualityControl(TransactionCase):
|
|||||||
|
|
||||||
def test_qc_inspection_stock_move(self):
|
def test_qc_inspection_stock_move(self):
|
||||||
self.inspection1.write({
|
self.inspection1.write({
|
||||||
'object_id': '%s,%d' % (self.picking1.move_lines[:1]._model,
|
'object_id': '%s,%d' % (self.picking1.move_lines[:1]._name,
|
||||||
self.picking1.move_lines[:1].id),
|
self.picking1.move_lines[:1].id),
|
||||||
})
|
})
|
||||||
self.inspection1.onchange_object_id()
|
self.inspection1.onchange_object_id()
|
||||||
@@ -240,7 +251,7 @@ class TestQualityControl(TransactionCase):
|
|||||||
|
|
||||||
def test_qc_inspection_lot(self):
|
def test_qc_inspection_lot(self):
|
||||||
self.inspection1.write({
|
self.inspection1.write({
|
||||||
'object_id': '%s,%d' % (self.lot._model,
|
'object_id': '%s,%d' % (self.lot._name,
|
||||||
self.lot.id),
|
self.lot.id),
|
||||||
})
|
})
|
||||||
self.inspection1.onchange_object_id()
|
self.inspection1.onchange_object_id()
|
||||||
|
|||||||
@@ -1,83 +1,81 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<openerp>
|
<!-- Copyright 2018 Simone Rubino - Agile Business Group
|
||||||
<data>
|
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
|
||||||
|
<odoo>
|
||||||
<record model="ir.ui.view" id="qc_inspection_form_view_picking">
|
<record model="ir.ui.view" id="qc_inspection_form_view_picking">
|
||||||
<field name="name">qc.inspection.form.view.picking</field>
|
<field name="name">qc.inspection.form.view.picking</field>
|
||||||
<field name="model">qc.inspection</field>
|
<field name="model">qc.inspection</field>
|
||||||
<field name="inherit_id" ref="quality_control.qc_inspection_form_view" />
|
<field name="inherit_id" ref="quality_control.qc_inspection_form_view"/>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<field name="product" position="after">
|
<field name="product" position="after">
|
||||||
<field name="picking" />
|
<field name="picking"/>
|
||||||
<field name="lot" groups="stock.group_production_lot" />
|
<field name="lot" groups="stock.group_production_lot"/>
|
||||||
</field>
|
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
<record model="ir.ui.view" id="qc_inspection_tree_view_picking">
|
<record model="ir.ui.view" id="qc_inspection_tree_view_picking">
|
||||||
<field name="name">qc.inspection.tree.view.picking</field>
|
<field name="name">qc.inspection.tree.view.picking</field>
|
||||||
<field name="model">qc.inspection</field>
|
<field name="model">qc.inspection</field>
|
||||||
<field name="inherit_id" ref="quality_control.qc_inspection_tree_view" />
|
<field name="inherit_id" ref="quality_control.qc_inspection_tree_view"/>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<field name="product" position="after">
|
<field name="product" position="after">
|
||||||
<field name="picking" />
|
<field name="picking"/>
|
||||||
<field name="lot" groups="stock.group_production_lot" />
|
<field name="lot" groups="stock.group_production_lot"/>
|
||||||
</field>
|
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
<record model="ir.ui.view" id="qc_inspection_search_view_picking">
|
<record model="ir.ui.view" id="qc_inspection_search_view_picking">
|
||||||
<field name="name">qc.inspection.search.view.picking</field>
|
<field name="name">qc.inspection.search.view.picking</field>
|
||||||
<field name="model">qc.inspection</field>
|
<field name="model">qc.inspection</field>
|
||||||
<field name="inherit_id" ref="quality_control.qc_inspection_search_view" />
|
<field name="inherit_id" ref="quality_control.qc_inspection_search_view"/>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<field name="product" position="after">
|
<field name="product" position="after">
|
||||||
<field name="picking" />
|
<field name="picking"/>
|
||||||
<field name="lot" groups="stock.group_production_lot" />
|
<field name="lot" groups="stock.group_production_lot"/>
|
||||||
</field>
|
|
||||||
<filter string="Product" position="after">
|
|
||||||
<filter string="Picking"
|
|
||||||
domain="[]"
|
|
||||||
context="{'group_by': 'picking'}" />
|
|
||||||
<filter string="Lot"
|
|
||||||
domain="[]"
|
|
||||||
groups="stock.group_production_lot"
|
|
||||||
context="{'group_by': 'lot'}" />
|
|
||||||
</filter>
|
|
||||||
</field>
|
</field>
|
||||||
</record>
|
<group expand="0" position="inside">
|
||||||
|
<filter string="Picking"
|
||||||
|
domain="[]"
|
||||||
|
context="{'group_by': 'picking'}"/>
|
||||||
|
<filter string="Lot"
|
||||||
|
domain="[]"
|
||||||
|
groups="stock.group_production_lot"
|
||||||
|
context="{'group_by': 'lot'}"/>
|
||||||
|
</group>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
<record model="ir.ui.view" id="qc_inspection_line_tree_stock_view">
|
<record model="ir.ui.view" id="qc_inspection_line_tree_stock_view">
|
||||||
<field name="name">qc.inspection.line.tree.stock</field>
|
<field name="name">qc.inspection.line.tree.stock</field>
|
||||||
<field name="model">qc.inspection.line</field>
|
<field name="model">qc.inspection.line</field>
|
||||||
<field name="inherit_id" ref="quality_control.qc_inspection_line_tree_view"/>
|
<field name="inherit_id" ref="quality_control.qc_inspection_line_tree_view"/>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<field name="product" position="after">
|
<field name="product" position="after">
|
||||||
<field name="picking" />
|
<field name="picking"/>
|
||||||
<field name="lot" />
|
<field name="lot"/>
|
||||||
</field>
|
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
<record model="ir.ui.view" id="qc_inspection_line_search_stock_view">
|
<record model="ir.ui.view" id="qc_inspection_line_search_stock_view">
|
||||||
<field name="name">qc.inspection.line.search.stock</field>
|
<field name="name">qc.inspection.line.search.stock</field>
|
||||||
<field name="model">qc.inspection.line</field>
|
<field name="model">qc.inspection.line</field>
|
||||||
<field name="inherit_id" ref="quality_control.qc_inspection_line_search_view" />
|
<field name="inherit_id" ref="quality_control.qc_inspection_line_search_view"/>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<field name="product" position="after">
|
<field name="product" position="after">
|
||||||
<field name="picking" />
|
<field name="picking"/>
|
||||||
<field name="lot" />
|
<field name="lot"/>
|
||||||
</field>
|
|
||||||
<filter string="Product" position="after">
|
|
||||||
<filter string="Picking"
|
|
||||||
domain="[]"
|
|
||||||
context="{'group_by': 'picking'}" />
|
|
||||||
<filter string="Lot"
|
|
||||||
domain="[]"
|
|
||||||
context="{'group_by': 'lot'}" />
|
|
||||||
</filter>
|
|
||||||
</field>
|
</field>
|
||||||
</record>
|
<group expand="0" position="inside">
|
||||||
|
<filter string="Picking"
|
||||||
</data>
|
domain="[]"
|
||||||
</openerp>
|
context="{'group_by': 'picking'}"/>
|
||||||
|
<filter string="Lot"
|
||||||
|
domain="[]"
|
||||||
|
context="{'group_by': 'lot'}"/>
|
||||||
|
</group>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
</odoo>
|
||||||
|
|||||||
@@ -1,72 +1,70 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<openerp>
|
<!-- Copyright 2018 Simone Rubino - Agile Business Group
|
||||||
<data>
|
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
|
||||||
|
<odoo>
|
||||||
|
<record id="action_qc_inspection_per_picking" model="ir.actions.act_window">
|
||||||
|
<field name="name">Quality inspections from picking</field>
|
||||||
|
<field name="res_model">qc.inspection</field>
|
||||||
|
<field name="view_mode">tree,form</field>
|
||||||
|
<field name="domain">[('picking', '=', active_id)]</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
<record id="action_qc_inspection_per_picking" model="ir.actions.act_window">
|
<record id="action_qc_inspection_per_picking_done" model="ir.actions.act_window">
|
||||||
<field name="name">Quality inspections from picking</field>
|
<field name="name">Quality inspection from picking done</field>
|
||||||
<field name="res_model">qc.inspection</field>
|
<field name="res_model">qc.inspection</field>
|
||||||
<field name="view_mode">tree,form</field>
|
<field name="view_mode">tree,form</field>
|
||||||
<field name="domain">[('picking', '=', active_id)]</field>
|
<field name="domain">[('picking', '=', active_id), ('state', 'not in', ['draft', 'waiting'])]</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<record id="action_qc_inspection_per_picking_done" model="ir.actions.act_window">
|
<record id="action_qc_inspection_per_picking_passed" model="ir.actions.act_window">
|
||||||
<field name="name">Quality inspection from picking done</field>
|
<field name="name">Quality inspection from picking passed</field>
|
||||||
<field name="res_model">qc.inspection</field>
|
<field name="res_model">qc.inspection</field>
|
||||||
<field name="view_mode">tree,form</field>
|
<field name="view_mode">tree,form</field>
|
||||||
<field name="domain">[('picking', '=', active_id), ('state', 'not in', ['draft', 'waiting'])]</field>
|
<field name="domain">[('picking', '=', active_id), ('state', '=', 'success')]</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<record id="action_qc_inspection_per_picking_passed" model="ir.actions.act_window">
|
<record id="action_qc_inspection_per_picking_failed" model="ir.actions.act_window">
|
||||||
<field name="name">Quality inspection from picking passed</field>
|
<field name="name">Quality inspections from picking failed</field>
|
||||||
<field name="res_model">qc.inspection</field>
|
<field name="res_model">qc.inspection</field>
|
||||||
<field name="view_mode">tree,form</field>
|
<field name="view_mode">tree,form</field>
|
||||||
<field name="domain">[('picking', '=', active_id), ('state', '=', 'success')]</field>
|
<field name="domain">[('picking', '=', active_id), ('state', '=', 'failed')]</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<record id="action_qc_inspection_per_picking_failed" model="ir.actions.act_window">
|
<record model="ir.ui.view" id="stock_picking_qc_view">
|
||||||
<field name="name">Quality inspections from picking failed</field>
|
<field name="name">stock.picking.qc.view</field>
|
||||||
<field name="res_model">qc.inspection</field>
|
<field name="model">stock.picking</field>
|
||||||
<field name="view_mode">tree,form</field>
|
<field name="inherit_id" ref="stock.view_picking_form" />
|
||||||
<field name="domain">[('picking', '=', active_id), ('state', '=', 'failed')]</field>
|
<field name="groups_id"
|
||||||
</record>
|
eval="[(4, ref('quality_control.group_quality_control_user'))]" />
|
||||||
|
<field name="arch" type="xml">
|
||||||
<record model="ir.ui.view" id="stock_picking_qc_view">
|
<div name="button_box" position="inside">
|
||||||
<field name="name">stock.picking.qc.view</field>
|
<button class="oe_inline oe_stat_button"
|
||||||
<field name="model">stock.picking</field>
|
type="action"
|
||||||
<field name="inherit_id" ref="stock.view_picking_form" />
|
name="%(action_qc_inspection_per_picking)d"
|
||||||
<field name="groups_id"
|
icon="fa-list">
|
||||||
eval="[(4, ref('quality_control.group_quality_control_user'))]" />
|
<field name="created_inspections"
|
||||||
<field name="arch" type="xml">
|
widget="statinfo"
|
||||||
<div class="oe_right oe_button_box" position="inside">
|
string="inspections" />
|
||||||
<button class="oe_inline oe_stat_button"
|
</button>
|
||||||
type="action"
|
<button class="oe_inline oe_stat_button"
|
||||||
name="%(action_qc_inspection_per_picking)d"
|
type="action"
|
||||||
icon="fa-list">
|
name="%(action_qc_inspection_per_picking_done)d"
|
||||||
<field name="created_inspections"
|
icon="fa-pencil">
|
||||||
widget="statinfo"
|
<field name="done_inspections" widget="statinfo" />
|
||||||
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_picking_passed)d"
|
||||||
name="%(action_qc_inspection_per_picking_done)d"
|
icon="fa-thumbs-o-up">
|
||||||
icon="fa-pencil">
|
<field name="passed_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_picking_failed)d"
|
||||||
name="%(action_qc_inspection_per_picking_passed)d"
|
icon="fa-thumbs-o-down">
|
||||||
icon="fa-thumbs-o-up">
|
<field name="failed_inspections" widget="statinfo" />
|
||||||
<field name="passed_inspections" widget="statinfo" />
|
</button>
|
||||||
</button>
|
</div>
|
||||||
<button class="oe_inline oe_stat_button"
|
</field>
|
||||||
type="action"
|
</record>
|
||||||
name="%(action_qc_inspection_per_picking_failed)d"
|
</odoo>
|
||||||
icon="fa-thumbs-o-down">
|
|
||||||
<field name="failed_inspections" widget="statinfo" />
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
</data>
|
|
||||||
</openerp>
|
|
||||||
|
|||||||
@@ -1,72 +1,70 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<openerp>
|
<!-- Copyright 2018 Simone Rubino - Agile Business Group
|
||||||
<data>
|
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
|
||||||
|
<odoo>
|
||||||
|
<record id="action_qc_inspection_per_lot" model="ir.actions.act_window">
|
||||||
|
<field name="name">Quality inspections from lot</field>
|
||||||
|
<field name="res_model">qc.inspection</field>
|
||||||
|
<field name="view_mode">tree,form</field>
|
||||||
|
<field name="domain">[('lot', '=', active_id)]</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
<record id="action_qc_inspection_per_lot" model="ir.actions.act_window">
|
<record id="action_qc_inspection_per_lot_done" model="ir.actions.act_window">
|
||||||
<field name="name">Quality inspections from lot</field>
|
<field name="name">Quality inspection from lot done</field>
|
||||||
<field name="res_model">qc.inspection</field>
|
<field name="res_model">qc.inspection</field>
|
||||||
<field name="view_mode">tree,form</field>
|
<field name="view_mode">tree,form</field>
|
||||||
<field name="domain">[('lot', '=', active_id)]</field>
|
<field name="domain">[('lot', '=', active_id), ('state', 'not in', ['draft', 'waiting'])]</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<record id="action_qc_inspection_per_lot_done" model="ir.actions.act_window">
|
<record id="action_qc_inspection_per_lot_passed" model="ir.actions.act_window">
|
||||||
<field name="name">Quality inspection from lot done</field>
|
<field name="name">Quality inspection from lot passed</field>
|
||||||
<field name="res_model">qc.inspection</field>
|
<field name="res_model">qc.inspection</field>
|
||||||
<field name="view_mode">tree,form</field>
|
<field name="view_mode">tree,form</field>
|
||||||
<field name="domain">[('lot', '=', active_id), ('state', 'not in', ['draft', 'waiting'])]</field>
|
<field name="domain">[('lot', '=', active_id), ('state', '=', 'success')]</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<record id="action_qc_inspection_per_lot_passed" model="ir.actions.act_window">
|
<record id="action_qc_inspection_per_lot_failed" model="ir.actions.act_window">
|
||||||
<field name="name">Quality inspection from lot passed</field>
|
<field name="name">Quality inspections from lot failed</field>
|
||||||
<field name="res_model">qc.inspection</field>
|
<field name="res_model">qc.inspection</field>
|
||||||
<field name="view_mode">tree,form</field>
|
<field name="view_mode">tree,form</field>
|
||||||
<field name="domain">[('lot', '=', active_id), ('state', '=', 'success')]</field>
|
<field name="domain">[('lot', '=', active_id), ('state', '=', 'failed')]</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<record id="action_qc_inspection_per_lot_failed" model="ir.actions.act_window">
|
<record model="ir.ui.view" id="stock_lot_qc_view">
|
||||||
<field name="name">Quality inspections from lot failed</field>
|
<field name="name">stock.production.lot.qc.view</field>
|
||||||
<field name="res_model">qc.inspection</field>
|
<field name="model">stock.production.lot</field>
|
||||||
<field name="view_mode">tree,form</field>
|
<field name="inherit_id" ref="stock.view_production_lot_form" />
|
||||||
<field name="domain">[('lot', '=', active_id), ('state', '=', 'failed')]</field>
|
<field name="groups_id"
|
||||||
</record>
|
eval="[(4, ref('quality_control.group_quality_control_user'))]" />
|
||||||
|
<field name="arch" type="xml">
|
||||||
<record model="ir.ui.view" id="stock_lot_qc_view">
|
<div name="button_box" position="inside">
|
||||||
<field name="name">stock.production.lot.qc.view</field>
|
<button class="oe_inline oe_stat_button"
|
||||||
<field name="model">stock.production.lot</field>
|
type="action"
|
||||||
<field name="inherit_id" ref="stock.view_production_lot_form" />
|
name="%(action_qc_inspection_per_lot)d"
|
||||||
<field name="groups_id"
|
icon="fa-list">
|
||||||
eval="[(4, ref('quality_control.group_quality_control_user'))]" />
|
<field name="created_inspections"
|
||||||
<field name="arch" type="xml">
|
widget="statinfo"
|
||||||
<div class="oe_button_box oe_right" position="inside">
|
string="inspections" />
|
||||||
<button class="oe_inline oe_stat_button"
|
</button>
|
||||||
type="action"
|
<button class="oe_inline oe_stat_button"
|
||||||
name="%(action_qc_inspection_per_lot)d"
|
type="action"
|
||||||
icon="fa-list">
|
name="%(action_qc_inspection_per_lot_done)d"
|
||||||
<field name="created_inspections"
|
icon="fa-pencil">
|
||||||
widget="statinfo"
|
<field name="done_inspections" widget="statinfo" />
|
||||||
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_passed)d"
|
||||||
name="%(action_qc_inspection_per_lot_done)d"
|
icon="fa-thumbs-o-up">
|
||||||
icon="fa-pencil">
|
<field name="passed_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_failed)d"
|
||||||
name="%(action_qc_inspection_per_lot_passed)d"
|
icon="fa-thumbs-o-down">
|
||||||
icon="fa-thumbs-o-up">
|
<field name="failed_inspections" widget="statinfo" />
|
||||||
<field name="passed_inspections" widget="statinfo" />
|
</button>
|
||||||
</button>
|
</div>
|
||||||
<button class="oe_inline oe_stat_button"
|
</field>
|
||||||
type="action"
|
</record>
|
||||||
name="%(action_qc_inspection_per_lot_failed)d"
|
</odoo>
|
||||||
icon="fa-thumbs-o-down">
|
|
||||||
<field name="failed_inspections" widget="statinfo" />
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
</data>
|
|
||||||
</openerp>
|
|
||||||
|
|||||||
Reference in New Issue
Block a user