Skip to content
Closed
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
69 changes: 69 additions & 0 deletions connector_wms_whs_set/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
.. image:: https://odoo-community.org/readme-banner-image
:target: https://odoo-community.org/get-involved?utm_source=readme
:alt: Odoo Community Association

================================
Connector WMS and Production Set
================================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:ea7ae4c1d1298359e8a307f0e256124641b1c942109528310dbeabf7663fb2fa
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |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/license-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-efatto%2Fe--efatto-lightgray.png?logo=github
:target: https://github.com/efatto/e-efatto/tree/16.0/connector_wms_whs_set
:alt: efatto/e-efatto

|badge1| |badge2| |badge3|

This is an extension to module connector_whs to connect Production Set.

**Table of contents**

.. contents::
:local:

Configuration
=============

Vedi modulo connector_whs e mrp_production_set.

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

Bugs are tracked on `GitHub Issues <https://github.com/efatto/e-efatto/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/efatto/e-efatto/issues/new?body=module:%20connector_wms_whs_set%0Aversion:%2016.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
~~~~~~~

* Sergio Corato

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

* Sergio Corato <https://github.com/sergiocorato>

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

This module is part of the `efatto/e-efatto <https://github.com/efatto/e-efatto/tree/16.0/connector_wms_whs_set>`_ project on GitHub.

You are welcome to contribute.
1 change: 1 addition & 0 deletions connector_wms_whs_set/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
22 changes: 22 additions & 0 deletions connector_wms_whs_set/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Copyright 2025 Sergio Corato <https://github.com/sergiocorato>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "Connector WMS and Production Set",
"version": "16.0.1.0.0",
"category": "Warehouse Management",
"license": "AGPL-3",
"summary": """
Glue module when connector to WMS and Production Set are intalled.
""",
"author": "Sergio Corato",
"website": "https://github.com/efatto/e-efatto",
"depends": [
"connector_wms_whs",
"mrp_production_set",
],
"data": [
"views/mrp_production_set.xml",
],
"installable": True,
"auto_install": True,
}
79 changes: 79 additions & 0 deletions connector_wms_whs_set/i18n/it.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * connector_wms_whs_set
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-10-08 13:18+0000\n"
"PO-Revision-Date: 2025-10-08 13:18+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: connector_wms_whs_set
#: model:ir.model.fields,field_description:connector_wms_whs_set.field_hyddemo_whs_liste__assigned_attachment_ids
#: model:ir.model.fields,field_description:connector_wms_whs_set.field_mrp_production__assigned_attachment_ids
#: model:ir.model.fields,field_description:connector_wms_whs_set.field_mrp_production_set__assigned_attachment_ids
msgid "Assigned Attachments"
msgstr "Allegati assegnati"

#. module: connector_wms_whs_set
#: model:ir.model.fields,field_description:connector_wms_whs_set.field_hyddemo_whs_liste__display_name
#: model:ir.model.fields,field_description:connector_wms_whs_set.field_mrp_production__display_name
#: model:ir.model.fields,field_description:connector_wms_whs_set.field_mrp_production_set__display_name
msgid "Display Name"
msgstr "Nome visualizzato"

#. module: connector_wms_whs_set
#: model:ir.model.fields,field_description:connector_wms_whs_set.field_hyddemo_whs_liste__id
#: model:ir.model.fields,field_description:connector_wms_whs_set.field_mrp_production__id
#: model:ir.model.fields,field_description:connector_wms_whs_set.field_mrp_production_set__id
msgid "ID"
msgstr ""

#. module: connector_wms_whs_set
#: model:ir.model.fields,field_description:connector_wms_whs_set.field_hyddemo_whs_liste____last_update
#: model:ir.model.fields,field_description:connector_wms_whs_set.field_mrp_production____last_update
#: model:ir.model.fields,field_description:connector_wms_whs_set.field_mrp_production_set____last_update
msgid "Last Modified on"
msgstr "Ultima modifica il"

#. module: connector_wms_whs_set
#: model:ir.model.fields.selection,name:connector_wms_whs_set.selection__hyddemo_whs_liste__tipo__12
msgid "Lavorazione_isola"
msgstr ""

#. module: connector_wms_whs_set
#: model:ir.model,name:connector_wms_whs_set.model_hyddemo_whs_liste
msgid "Lists to synchronize with WMS"
msgstr "Liste da sincronizzare con WMS"

#. module: connector_wms_whs_set
#: model:ir.model,name:connector_wms_whs_set.model_mrp_production_set
msgid "MRP Production Set"
msgstr "Set Ordini Produzione"

#. module: connector_wms_whs_set
#: model:ir.model,name:connector_wms_whs_set.model_mrp_production
msgid "Production Order"
msgstr "Ordine di produzione"

#. module: connector_wms_whs_set
#: model_terms:ir.ui.view,arch_db:connector_wms_whs_set.mrp_production_set_form
msgid "Send to WHS"
msgstr "Invia a WHS"

#. module: connector_wms_whs_set
#: model:ir.model.fields,field_description:connector_wms_whs_set.field_mrp_production_set__sent_to_whs
msgid "Sent To Whs"
msgstr "Inviato a WHS"

#. module: connector_wms_whs_set
#: model:ir.model.fields,field_description:connector_wms_whs_set.field_hyddemo_whs_liste__tipo
msgid "Tipo lista"
msgstr ""
3 changes: 3 additions & 0 deletions connector_wms_whs_set/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from . import hyddemo_whs_liste
from . import mrp_production
from . import mrp_production_set
12 changes: 12 additions & 0 deletions connector_wms_whs_set/models/hyddemo_whs_liste.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
from odoo import fields, models


class HyddemoWhsListe(models.Model):
_inherit = "hyddemo.whs.liste"

tipo = fields.Selection(
selection_add=[
("12", "Lavorazione_isola"), # 12 scarico per lavorazione isola robot
],
ondelete={"12": lambda r: r.write({"tipo": "11"})},
)
51 changes: 51 additions & 0 deletions connector_wms_whs_set/models/mrp_production.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
import logging

from odoo import models

_logger = logging.getLogger(__name__)


class MrpProduction(models.Model):
_inherit = "mrp.production"

def _get_tipo(self, is_custom=False):
res = super()._get_tipo(is_custom=is_custom)
if self.production_left_set_ids or self.production_right_set_ids:
res = "12"
return res

def _get_num_lista(self):
num_lista = False
riga = 0
production_set_ids = (
self.production_left_set_ids | self.production_right_set_ids
)
if production_set_ids:
production_set_ids.ensure_one()
left = production_set_ids.production_left_id
right = production_set_ids.production_right_id
if left.move_raw_ids.whs_list_ids:
num_lista = left.move_raw_ids.whs_list_ids.num_lista
riga = 1
elif right.move_raw_ids.whs_list_ids:
num_lista = right.move_raw_ids.whs_list_ids.num_lista
riga = 1
if not num_lista:
num_lista, riga = super()._get_num_lista()
return num_lista, riga

def _create_whs_list_raw_move(
self, move, num_lista, riga, is_custom, qty_producing=0
):
if (
self.production_left_set_ids | self.production_right_set_ids
).split_production:
qty_producing = (
self.production_left_set_ids
and not self.production_left_set_ids.sent_to_whs
and self.production_left_set_ids.qty_producing_left
or self.production_right_set_ids.qty_producing_right
)
return super()._create_whs_list_raw_move(
move, num_lista, riga, is_custom, qty_producing=qty_producing
)
22 changes: 22 additions & 0 deletions connector_wms_whs_set/models/mrp_production_set.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
from odoo import api, fields, models


class MrpProductionSet(models.Model):
_inherit = "mrp.production.set"

sent_to_whs = fields.Boolean(
compute="_compute_sent_to_whs",
store=True,
)

def button_send_to_whs(self):
self.production_left_id.button_send_to_whs()
self.production_right_id.button_send_to_whs()

@api.depends("production_left_id.sent_to_whs", "production_right_id.sent_to_whs")
def _compute_sent_to_whs(self):
for record in self:
record.sent_to_whs = (
record.production_left_id.sent_to_whs
and record.production_right_id.sent_to_whs
)
3 changes: 3 additions & 0 deletions connector_wms_whs_set/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
1 change: 1 addition & 0 deletions connector_wms_whs_set/readme/CONFIGURE.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Vedi modulo connector_whs e mrp_production_set.
1 change: 1 addition & 0 deletions connector_wms_whs_set/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* Sergio Corato <https://github.com/sergiocorato>
1 change: 1 addition & 0 deletions connector_wms_whs_set/readme/DESCRIPTION.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This is an extension to module connector_whs to connect Production Set.
Binary file added connector_wms_whs_set/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
Loading