Skip to content

Commit

Permalink
Merge PR #55 into 17.0
Browse files Browse the repository at this point in the history
Signed-off-by LoisRForgeFlow
  • Loading branch information
OCA-git-bot committed Oct 24, 2024
2 parents 53414c7 + 6318a12 commit 26d183d
Show file tree
Hide file tree
Showing 19 changed files with 944 additions and 0 deletions.
102 changes: 102 additions & 0 deletions repair_quality_control/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
======================
Repair Quality Control
======================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:7b23fcc98e06bb1dd4759c268fa0d616d4eb9afaf9790ebf7e0753f03dfda350
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |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%2Frepair-lightgray.png?logo=github
:target: https://github.com/OCA/repair/tree/17.0/repair_quality_control
:alt: OCA/repair
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/repair-17-0/repair-17-0-repair_quality_control
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/repair&target_branch=17.0
:alt: Try me on Runboat

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

This module allows to create quality control inspections from repair
order when that one is done. One repair order is linked to many
different inspections.

**Table of contents**

.. contents::
:local:

Usage
=====

To use this module, you need to:

Create a repair order:

1. Go to Repairs > Manufacturing Orders .
2. Create new repair order and repair that.
3. Create a inspection from the header button called "Create Inspection"

You can access from repair order to inspection directly with a smart
button and the same backwards.

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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/repair/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/repair/issues/new?body=module:%20repair_quality_control%0Aversion:%2017.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
-------

* Antoni Marroig

Contributors
------------

- `APSL-Nagarro <https://www.apsl.tech>`__:

- Antoni Marroig <[email protected]>

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.

.. |maintainer-peluko00| image:: https://github.com/peluko00.png?size=40px
:target: https://github.com/peluko00
:alt: peluko00

Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-peluko00|

This module is part of the `OCA/repair <https://github.com/OCA/repair/tree/17.0/repair_quality_control>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
3 changes: 3 additions & 0 deletions repair_quality_control/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from . import models
22 changes: 22 additions & 0 deletions repair_quality_control/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Copyright 2024 Antoni Marroig(APSL-Nagarro)<[email protected]>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Repair Quality Control",
"summary": "Create quality controls from repair order",
"version": "17.0.1.0.0",
"category": "Repair",
"website": "https://github.com/OCA/repair",
"author": "Antoni Marroig, Odoo Community Association (OCA)",
"maintainers": ["peluko00"],
"license": "AGPL-3",
"application": False,
"installable": True,
"depends": [
"repair",
"quality_control_stock_oca",
],
"data": [
"views/repair_views.xml",
"views/qc_inspection_views.xml",
],
}
54 changes: 54 additions & 0 deletions repair_quality_control/i18n/ca_ES.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * repair_quality_control
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 17.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-09-13 13:56+0000\n"
"PO-Revision-Date: 2024-09-13 13:56+0000\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: repair_quality_control
#: model_terms:ir.ui.view,arch_db:repair_quality_control.view_repair_order_form_inherit
msgid "<span class=\"o_stat_text\">Inspections</span>"
msgstr "<span class=\"o_stat_text\">Inspeccions</span>"

#. module: repair_quality_control
#: model_terms:ir.ui.view,arch_db:repair_quality_control.view_qc_inspection_form_inherit
msgid "<span class=\"o_stat_text\">Repair order</span>"
msgstr "<span class=\"o_stat_text\">Ordre de reparació</span>"

#. module: repair_quality_control
#. odoo-python
#: code:addons/repair_quality_control/models/repair.py:0
#: model_terms:ir.ui.view,arch_db:repair_quality_control.view_repair_order_form_inherit
#, python-format
msgid "Create Inspection"
msgstr "Crear Inspecció"

#. module: repair_quality_control
#: model:ir.model.fields,field_description:repair_quality_control.field_repair_order__inspection_ids
msgid "Inspections"
msgstr "Inspecciones"

#. module: repair_quality_control
#: model:ir.model,name:repair_quality_control.model_qc_inspection
msgid "Quality control inspection"
msgstr "Inspecció del control de qualitat"

#. module: repair_quality_control
#: model:ir.model.fields,field_description:repair_quality_control.field_qc_inspection__repair_id
msgid "Repair"
msgstr "Reparació"

#. module: repair_quality_control
#: model:ir.model,name:repair_quality_control.model_repair_order
msgid "Repair Order"
msgstr "Ordre de reparació"
54 changes: 54 additions & 0 deletions repair_quality_control/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * repair_quality_control
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 17.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-09-13 13:56+0000\n"
"PO-Revision-Date: 2024-09-13 13:56+0000\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: repair_quality_control
#: model_terms:ir.ui.view,arch_db:repair_quality_control.view_repair_order_form_inherit
msgid "<span class=\"o_stat_text\">Inspections</span>"
msgstr "<span class=\"o_stat_text\">Inspecciones</span>"

#. module: repair_quality_control
#: model_terms:ir.ui.view,arch_db:repair_quality_control.view_qc_inspection_form_inherit
msgid "<span class=\"o_stat_text\">Repair order</span>"
msgstr "<span class=\"o_stat_text\">Ordre de reparació</span>"

#. module: repair_quality_control
#. odoo-python
#: code:addons/repair_quality_control/models/repair.py:0
#: model_terms:ir.ui.view,arch_db:repair_quality_control.view_repair_order_form_inherit
#, python-format
msgid "Create Inspection"
msgstr "Crear inspección"

#. module: repair_quality_control
#: model:ir.model.fields,field_description:repair_quality_control.field_repair_order__inspection_ids
msgid "Inspections"
msgstr "Inspecciones"

#. module: repair_quality_control
#: model:ir.model,name:repair_quality_control.model_qc_inspection
msgid "Quality control inspection"
msgstr "Inspección del control de calidad"

#. module: repair_quality_control
#: model:ir.model.fields,field_description:repair_quality_control.field_qc_inspection__repair_id
msgid "Repair"
msgstr "Reparación"

#. module: repair_quality_control
#: model:ir.model,name:repair_quality_control.model_repair_order
msgid "Repair Order"
msgstr "Orden de reparación"
4 changes: 4 additions & 0 deletions repair_quality_control/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from . import qc_inspection
from . import repair
18 changes: 18 additions & 0 deletions repair_quality_control/models/qc_inspection.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Copyright 2024 Antoni Marroig(APSL-Nagarro)<[email protected]>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from odoo import fields, models


class QcInspection(models.Model):
_inherit = "qc.inspection"

repair_id = fields.Many2one("repair.order")

def action_view_qc_repair_order(self):
return {
"type": "ir.actions.act_window",
"view_mode": "form",
"res_model": "repair.order",
"res_id": self.repair_id.id,
}
42 changes: 42 additions & 0 deletions repair_quality_control/models/repair.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Copyright 2024 Antoni Marroig(APSL-Nagarro)<[email protected]>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from odoo import _, fields, models


class RepairOrder(models.Model):
_inherit = "repair.order"

inspection_ids = fields.One2many(
"qc.inspection",
"repair_id",
"Inspections",
)

def action_create_qc_inspection(self):
self.ensure_one()
action = self.env["ir.actions.act_window"]._for_xml_id(
"quality_control_oca.action_qc_inspection"
)
action["view_mode"] = "form"
action["views"] = [(False, "form")]
action["target"] = "current"
action["name"] = _("Create Inspection")

action["context"] = {
"default_qty": self.product_qty,
"default_repair_id": self.id,
"default_object_id": f"product.product,{self.product_id.id}",
}
if self.lot_id:
action["context"]["default_object_id"] = f"stock.lot,{self.lot_id.id}"
return action

def action_view_repair_inspections(self):
return {
"name": "Inspections from " + self.name,
"type": "ir.actions.act_window",
"view_mode": "tree,form",
"res_model": "qc.inspection",
"domain": [("id", "in", self.inspection_ids.ids)],
}
3 changes: 3 additions & 0 deletions repair_quality_control/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
2 changes: 2 additions & 0 deletions repair_quality_control/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- [APSL-Nagarro](https://www.apsl.tech):
- Antoni Marroig \<<[email protected]>\>
2 changes: 2 additions & 0 deletions repair_quality_control/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
This module allows to create quality control inspections from repair order
when that one is done. One repair order is linked to many different inspections.
10 changes: 10 additions & 0 deletions repair_quality_control/readme/USAGE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
To use this module, you need to:

Create a repair order:

1. Go to Repairs \> Manufacturing Orders .
2. Create new repair order and repair that.
3. Create a inspection from the header button called "Create Inspection"

You can access from repair order to inspection directly with a
smart button and the same backwards.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 26d183d

Please sign in to comment.