Skip to content

Commit

Permalink
Merge PR #63 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 Nov 6, 2024
2 parents 2e4601f + 36c69c6 commit f76e8ba
Show file tree
Hide file tree
Showing 15 changed files with 814 additions and 0 deletions.
86 changes: 86 additions & 0 deletions repair_stock/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
============
Repair Stock
============

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:e5f38d7da6b61c566a431044972a232c89b78faf6eed0fbae77dcf335dd8ed1c
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Alpha-red.png
:target: https://odoo-community.org/page/development-status
:alt: Alpha
.. |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_stock
: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_stock
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/repair&target_branch=17.0
:alt: Try me on Runboat

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

This module acts as a base for the stock related modules for repairs. It
adds some common features that may be overriding between them, as the
compute for the pickings or the smart button for the transfers.

.. IMPORTANT::
This is an alpha version, the data model and design can change at any time without warning.
Only for development or testing purpose, do not use in production.
`More details on development status <https://odoo-community.org/page/development-status>`_

**Table of contents**

.. contents::
:local:

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_stock%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
-------

* ForgeFlow

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

- David Jimenez <[email protected]>
- `APSL-Nagarro <https://www.apsl.tech>`__:

- Patryk Pyczko <[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.

This module is part of the `OCA/repair <https://github.com/OCA/repair/tree/17.0/repair_stock>`_ 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 repair_stock/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
16 changes: 16 additions & 0 deletions repair_stock/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Copyright 2024 ForgeFlow S.L. (https://www.forgeflow.com)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).

{
"name": "Repair Stock",
"version": "17.0.1.0.0",
"author": "ForgeFlow, Odoo Community Association (OCA)",
"category": "Repair",
"website": "https://github.com/OCA/repair",
"depends": ["repair"],
"data": [
"views/repair_order_view.xml",
],
"license": "AGPL-3",
"development_status": "Alpha",
}
34 changes: 34 additions & 0 deletions repair_stock/i18n/it.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * repair_stock
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2024-08-31 11:06+0000\n"
"Last-Translator: mymage <[email protected]>\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 5.6.2\n"

#. module: repair_stock
#: model:ir.model,name:repair_stock.model_repair_order
msgid "Repair Order"
msgstr "Ordine di riparazione"

#. module: repair_stock
#: model:ir.model.fields,field_description:repair_stock.field_repair_order__picking_count
#: model:ir.model.fields,field_description:repair_stock.field_repair_order__picking_ids
#: model_terms:ir.ui.view,arch_db:repair_stock.view_repair_order_form_repair_stock_move_inherited
msgid "Transfers"
msgstr "Trasferimenti"

#. module: repair_stock
#: model_terms:ir.ui.view,arch_db:repair_stock.view_repair_order_form_repair_stock_move_inherited
msgid "Transfers associated with this repair order"
msgstr "Trasferimenti associati a questo ordine di riparazione"
31 changes: 31 additions & 0 deletions repair_stock/i18n/repair_stock.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * repair_stock
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.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: repair_stock
#: model:ir.model,name:repair_stock.model_repair_order
msgid "Repair Order"
msgstr ""

#. module: repair_stock
#: model:ir.model.fields,field_description:repair_stock.field_repair_order__picking_count
#: model:ir.model.fields,field_description:repair_stock.field_repair_order__picking_ids
#: model_terms:ir.ui.view,arch_db:repair_stock.view_repair_order_form_repair_stock_move_inherited
msgid "Transfers"
msgstr ""

#. module: repair_stock
#: model_terms:ir.ui.view,arch_db:repair_stock.view_repair_order_form_repair_stock_move_inherited
msgid "Transfers associated with this repair order"
msgstr ""
3 changes: 3 additions & 0 deletions repair_stock/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Copyright 2024 ForgeFlow S.L. (https://www.forgeflow.com)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from . import repair
36 changes: 36 additions & 0 deletions repair_stock/models/repair.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Copyright 2024 ForgeFlow S.L. (https://www.forgeflow.com)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).

from odoo import fields, models


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

picking_ids = fields.Many2many(
comodel_name="stock.picking",
compute="_compute_picking_ids",
copy=False,
string="Transfers",
)
picking_count = fields.Integer(
string="Transfers", copy=False, compute="_compute_picking_ids"
)

def action_view_pickings(self):
self.ensure_one()
action = self.env["ir.actions.actions"]._for_xml_id(
"stock.action_picking_tree_all"
)
action["domain"] = [("id", "in", self.picking_ids.ids)]
return action

def _compute_picking_ids(self):
for order in self:
moves = self.env["stock.move"].search(
[
("repair_id", "=", order.id),
]
)
order.picking_ids = moves.mapped("picking_id")
order.picking_count = len(moves.mapped("picking_id"))
3 changes: 3 additions & 0 deletions repair_stock/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
3 changes: 3 additions & 0 deletions repair_stock/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- David Jimenez \<<[email protected]>\>
- [APSL-Nagarro](https://www.apsl.tech):
- Patryk Pyczko \<<[email protected]>\>
3 changes: 3 additions & 0 deletions repair_stock/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
This module acts as a base for the stock related modules for repairs. It
adds some common features that may be overriding between them, as the
compute for the pickings or the smart button for the transfers.
Binary file added repair_stock/static/description/icon.png
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 f76e8ba

Please sign in to comment.