Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[16.0][MIG] mgmtsystem_nonconformity_quality_control_oca #498

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
91 changes: 91 additions & 0 deletions mgmtsystem_nonconformity_quality_control_oca/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
============================================
Mgmtsystem Nonconformity Quality Control Oca
============================================

.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! 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%2Fmanagement--system-lightgray.png?logo=github
:target: https://github.com/OCA/management-system/tree/15.0/mgmtsystem_nonconformity_quality_control_oca
:alt: OCA/management-system
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/management-system-15-0/management-system-15-0-mgmtsystem_nonconformity_quality_control_oca
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
:target: https://runbot.odoo-community.org/runbot/128/15.0
:alt: Try me on Runbot

|badge1| |badge2| |badge3| |badge4| |badge5|

This is a bridge module between Management System and Quality Control

This module contains some new features for Management System modules.

Nonconformity (NC)

* Quality Control Inspection: add a field to link a specific quality control inspection.

**Table of contents**

.. contents::
:local:

Usage
=====

NC QC Inspection

* Go to Inspection → create a new one
* Go to Management System → Nonconformity
* Create new Nonconformity
* Select a Quality Control Inspection on the list

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/management-system/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 <https://github.com/OCA/management-system/issues/new?body=module:%20mgmtsystem_nonconformity_quality_control_oca%0Aversion:%2015.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
~~~~~~~

* Escodoo

Contributors
~~~~~~~~~~~~

* `Escodoo <https://www.escodoo.com.br>`_:

* Marcel Savegnago <marcel.savegnago@escodoo.com.br>

Maintainers
~~~~~~~~~~~

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

This module is part of the `OCA/management-system <https://github.com/OCA/management-system/tree/15.0/mgmtsystem_nonconformity_quality_control_oca>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
1 change: 1 addition & 0 deletions mgmtsystem_nonconformity_quality_control_oca/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
21 changes: 21 additions & 0 deletions mgmtsystem_nonconformity_quality_control_oca/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Copyright 2022 - TODAY, Escodoo
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

{
"name": "Mgmtsystem Nonconformity Quality Control Oca",
"summary": """
Bridge module between Quality Control and Non Conformities""",
"version": "16.0.1.0.0",
"license": "AGPL-3",
"author": "Escodoo,Odoo Community Association (OCA)",
"website": "https://github.com/OCA/management-system",
"depends": [
"mgmtsystem_nonconformity",
"quality_control_oca",
],
"data": [
"views/qc_inspection.xml",
"views/mgmtsystem_nonconformity.xml",
],
"demo": [],
}
71 changes: 71 additions & 0 deletions mgmtsystem_nonconformity_quality_control_oca/i18n/it.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * mgmtsystem_nonconformity_quality_control_oca
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2022-11-11 11:45+0000\n"
"Last-Translator: mymage <stefano.consolaro@mymage.it>\n"
"Language-Team: none\n"
"Language: it\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.14.1\n"

#. module: mgmtsystem_nonconformity_quality_control_oca
#: model:ir.model.fields,field_description:mgmtsystem_nonconformity_quality_control_oca.field_qc_inspection__mgmtsystem_nonconformity_count
msgid "# Non-Conformities"
msgstr "Nr. Non conformità"

#. module: mgmtsystem_nonconformity_quality_control_oca
#: model_terms:ir.ui.view,arch_db:mgmtsystem_nonconformity_quality_control_oca.qc_inspection_form_view
msgid ""
"<span class=\"o_stat_text\" attrs=\"{'invisible': [('mgmtsystem_nonconformity_count', '&lt;', 2)]}\"> Nonconformities</span>\n"
" <span class=\"o_stat_text\" attrs=\"{'invisible': [('mgmtsystem_nonconformity_count', '&gt;', 1)]}\"> Nonconformity</span>"
msgstr ""
"<span class=\"o_stat_text\" attrs=\"{'invisible': [("
"'mgmtsystem_nonconformity_count', '&lt;', 2)]}\"> Non conformità</span>\n"
" <span class=\"o_stat_text\" attrs=\"{'invisible': [("
"'mgmtsystem_nonconformity_count', '&gt;', 1)]}\"> Non conformità</span>"

#. module: mgmtsystem_nonconformity_quality_control_oca
#: model:ir.model.fields,field_description:mgmtsystem_nonconformity_quality_control_oca.field_mgmtsystem_nonconformity__display_name
#: model:ir.model.fields,field_description:mgmtsystem_nonconformity_quality_control_oca.field_qc_inspection__display_name
msgid "Display Name"
msgstr "Nome visualizzato"

#. module: mgmtsystem_nonconformity_quality_control_oca
#: model:ir.model.fields,field_description:mgmtsystem_nonconformity_quality_control_oca.field_mgmtsystem_nonconformity__id
#: model:ir.model.fields,field_description:mgmtsystem_nonconformity_quality_control_oca.field_qc_inspection__id
msgid "ID"
msgstr "ID"

#. module: mgmtsystem_nonconformity_quality_control_oca
#: model:ir.model.fields,field_description:mgmtsystem_nonconformity_quality_control_oca.field_mgmtsystem_nonconformity____last_update
#: model:ir.model.fields,field_description:mgmtsystem_nonconformity_quality_control_oca.field_qc_inspection____last_update
msgid "Last Modified on"
msgstr "Ultima modifica il"

#. module: mgmtsystem_nonconformity_quality_control_oca
#: model:ir.model.fields,field_description:mgmtsystem_nonconformity_quality_control_oca.field_qc_inspection__mgmtsystem_nonconformity_ids
msgid "Non-Conformities"
msgstr "Non conformità"

#. module: mgmtsystem_nonconformity_quality_control_oca
#: model:ir.model,name:mgmtsystem_nonconformity_quality_control_oca.model_mgmtsystem_nonconformity
msgid "Nonconformity"
msgstr "Non conformità"

#. module: mgmtsystem_nonconformity_quality_control_oca
#: model:ir.model.fields,field_description:mgmtsystem_nonconformity_quality_control_oca.field_mgmtsystem_nonconformity__qc_inspection_id
msgid "Quality Control Inspection"
msgstr "Ispezione controllo qualità"

#. module: mgmtsystem_nonconformity_quality_control_oca
#: model:ir.model,name:mgmtsystem_nonconformity_quality_control_oca.model_qc_inspection
msgid "Quality control inspection"
msgstr "Ispezione controllo qualità"
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * mgmtsystem_nonconformity_quality_control_oca
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 15.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: mgmtsystem_nonconformity_quality_control_oca
#: model:ir.model.fields,field_description:mgmtsystem_nonconformity_quality_control_oca.field_qc_inspection__mgmtsystem_nonconformity_count
msgid "# Non-Conformities"
msgstr ""

#. module: mgmtsystem_nonconformity_quality_control_oca
#: model_terms:ir.ui.view,arch_db:mgmtsystem_nonconformity_quality_control_oca.qc_inspection_form_view
msgid ""
"<span class=\"o_stat_text\" attrs=\"{'invisible': [('mgmtsystem_nonconformity_count', '&lt;', 2)]}\"> Nonconformities</span>\n"
" <span class=\"o_stat_text\" attrs=\"{'invisible': [('mgmtsystem_nonconformity_count', '&gt;', 1)]}\"> Nonconformity</span>"
msgstr ""

#. module: mgmtsystem_nonconformity_quality_control_oca
#: model:ir.model.fields,field_description:mgmtsystem_nonconformity_quality_control_oca.field_qc_inspection__mgmtsystem_nonconformity_ids
msgid "Non-Conformities"
msgstr ""

#. module: mgmtsystem_nonconformity_quality_control_oca
#: model:ir.model,name:mgmtsystem_nonconformity_quality_control_oca.model_mgmtsystem_nonconformity
msgid "Nonconformity"
msgstr ""

#. module: mgmtsystem_nonconformity_quality_control_oca
#: model:ir.model.fields,field_description:mgmtsystem_nonconformity_quality_control_oca.field_mgmtsystem_nonconformity__qc_inspection_id
msgid "Quality Control Inspection"
msgstr ""

#. module: mgmtsystem_nonconformity_quality_control_oca
#: model:ir.model,name:mgmtsystem_nonconformity_quality_control_oca.model_qc_inspection
msgid "Quality control inspection"
msgstr ""
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from . import mgmtsystem_nonconformity
from . import qc_inspection
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Copyright 2022 - TODAY, Marcel Savegnago <marcel.savegnago@escodoo.com.br>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from odoo import fields, models


class MgmtsystemNonconformity(models.Model):

_inherit = "mgmtsystem.nonconformity"

qc_inspection_id = fields.Many2one("qc.inspection", "Quality Control Inspection")
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Copyright 2022 - TODAY, Marcel Savegnago <marcel.savegnago@escodoo.com.br>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from odoo import api, fields, models


class QcInspection(models.Model):

_inherit = "qc.inspection"

mgmtsystem_nonconformity_ids = fields.One2many(
"mgmtsystem.nonconformity", "qc_inspection_id", string="Non-Conformities"
)

mgmtsystem_nonconformity_count = fields.Integer(
compute="_compute_mgmtsystem_nonconformity_count", string="# Non-Conformities"
)

@api.depends("mgmtsystem_nonconformity_ids")
def _compute_mgmtsystem_nonconformity_count(self):
for rec in self:
rec.mgmtsystem_nonconformity_count = len(rec.mgmtsystem_nonconformity_ids)

def action_view_nonconformities(self):
action = self.env.ref(
"mgmtsystem_nonconformity.open_mgmtsystem_nonconformity_list"
).read()[0]
if self.mgmtsystem_nonconformity_count > 1:
action["domain"] = [("id", "in", self.mgmtsystem_nonconformity_ids.ids)]
else:
action["views"] = [
(
self.env.ref(
"mgmtsystem_nonconformity.view_mgmtsystem_nonconformity_form"
).id,
"form",
)
]
action["res_id"] = (
self.mgmtsystem_nonconformity_ids
and self.mgmtsystem_nonconformity_ids.ids[0]
or False
)
action["context"] = {
"search_default_qc_inspection_id": self.id,
"default_qc_inspection_id": self.id,
"default_name": self.name,
"default_company_id": self.company_id.id,
}
return action
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
* `Escodoo <https://www.escodoo.com.br>`_:

* Marcel Savegnago <marcel.savegnago@escodoo.com.br>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
This is a bridge module between Management System and Quality Control

This module contains some new features for Management System modules.

Nonconformity (NC)

* Quality Control Inspection: add a field to link a specific quality control inspection.
6 changes: 6 additions & 0 deletions mgmtsystem_nonconformity_quality_control_oca/readme/USAGE.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
NC QC Inspection

* Go to Inspection → create a new one
* Go to Management System → Nonconformity
* Create new Nonconformity
* Select a Quality Control Inspection on the list
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading