Skip to content

Commit

Permalink
[16.0][ADD] internal_stock_quant_package
Browse files Browse the repository at this point in the history
  • Loading branch information
glitchov committed Feb 9, 2023
1 parent f29eb83 commit bf651b6
Show file tree
Hide file tree
Showing 21 changed files with 1,200 additions and 0 deletions.
78 changes: 78 additions & 0 deletions internal_stock_quant_package/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
============================
Internal Stock Quant Package
============================

.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! 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%2Fstock--logistics--tracking-lightgray.png?logo=github
:target: https://github.com/OCA/stock-logistics-tracking/tree/16.0/internal_stock_quant_package
:alt: OCA/stock-logistics-tracking
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/stock-logistics-tracking-16-0/stock-logistics-tracking-16-0-internal_stock_quant_package
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/webui/builds.html?repo=OCA/stock-logistics-tracking&target_branch=16.0
:alt: Try me on Runboat

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

This module allows to declare internal stock quant package.

An internal stock quant package will never leave the warehouse. It's
a package used in the picking process and is emptied when a 'put
in pack' operation occurs or when the picking is validated (except
if configured to not do it on the picking type).

**Table of contents**

.. contents::
:local:

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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/stock-logistics-tracking/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/stock-logistics-tracking/issues/new?body=module:%20internal_stock_quant_package%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
~~~~~~~

* ACSONE SA/NV

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

* Hughes Damry <hughes.damry@acsone.eu>

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/stock-logistics-tracking <https://github.com/OCA/stock-logistics-tracking/tree/16.0/internal_stock_quant_package>`_ 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 internal_stock_quant_package/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
18 changes: 18 additions & 0 deletions internal_stock_quant_package/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Copyright 2021 ACSONE SA/NV
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

{
"name": "Internal Stock Quant Package",
"summary": "This module allows to declare internal stock quant package",
"version": "16.0.1.0.0",
"license": "AGPL-3",
"author": "ACSONE SA/NV, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/stock-logistics-tracking",
"depends": ["stock", "delivery"],
"data": [
"security/ir.model.access.csv",
"views/stock_quant_package_views.xml",
"views/stock_picking_type_views.xml",
],
"installable": True,
}
111 changes: 111 additions & 0 deletions internal_stock_quant_package/i18n/alc_internal_stock_quant_package.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * alc_internal_stock_quant_package
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0+e\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: alc_internal_stock_quant_package
#: model:ir.model.fields,field_description:alc_internal_stock_quant_package.field_stock_internal_package_config_line_create_uid
msgid "Created by"
msgstr ""

#. module: alc_internal_stock_quant_package
#: model:ir.model.fields,field_description:alc_internal_stock_quant_package.field_stock_internal_package_config_line_create_date
msgid "Created on"
msgstr ""

#. module: alc_internal_stock_quant_package
#: model:ir.model.fields,field_description:alc_internal_stock_quant_package.field_stock_internal_package_config_line_delivery_carrier_id
msgid "Delivery carrier id"
msgstr ""

#. module: alc_internal_stock_quant_package
#: model:ir.model.fields,field_description:alc_internal_stock_quant_package.field_stock_internal_package_config_line_display_name
msgid "Display Name"
msgstr ""

#. module: alc_internal_stock_quant_package
#: model:ir.model.fields,field_description:alc_internal_stock_quant_package.field_stock_internal_package_config_line_empty
msgid "Empty"
msgstr ""

#. module: alc_internal_stock_quant_package
#: model:ir.model.fields,field_description:alc_internal_stock_quant_package.field_stock_picking_empty_internal_package_on_transfer
#: model:ir.model.fields,field_description:alc_internal_stock_quant_package.field_stock_picking_type_empty_internal_package_on_transfer
msgid "Empty internal package on transfer"
msgstr ""

#. module: alc_internal_stock_quant_package
#: model:ir.model.fields,field_description:alc_internal_stock_quant_package.field_stock_internal_package_config_line_id
msgid "ID"
msgstr ""

#. module: alc_internal_stock_quant_package
#: model:ir.model.fields,help:alc_internal_stock_quant_package.field_stock_picking_type_empty_internal_package_on_transfer
msgid "If set internal packages are emptied after the transfer or when products are put in pack."
msgstr ""

#. module: alc_internal_stock_quant_package
#: model:ir.ui.view,arch_db:alc_internal_stock_quant_package.stock_quant_package_search_view
msgid "Internal"
msgstr ""

#. module: alc_internal_stock_quant_package
#: model:ir.model,name:alc_internal_stock_quant_package.model_stock_internal_package_config_line
msgid "Internal Package Configuration Line"
msgstr ""

#. module: alc_internal_stock_quant_package
#: model:ir.model.fields,field_description:alc_internal_stock_quant_package.field_stock_quant_package_is_internal
msgid "Internal use?"
msgstr ""

#. module: alc_internal_stock_quant_package
#: model:ir.model.fields,field_description:alc_internal_stock_quant_package.field_stock_internal_package_config_line___last_update
msgid "Last Modified on"
msgstr ""

#. module: alc_internal_stock_quant_package
#: model:ir.model.fields,field_description:alc_internal_stock_quant_package.field_stock_internal_package_config_line_write_uid
msgid "Last Updated by"
msgstr ""

#. module: alc_internal_stock_quant_package
#: model:ir.model.fields,field_description:alc_internal_stock_quant_package.field_stock_internal_package_config_line_write_date
msgid "Last Updated on"
msgstr ""

#. module: alc_internal_stock_quant_package
#: model:ir.model,name:alc_internal_stock_quant_package.model_stock_quant_package
msgid "Physical Packages"
msgstr ""

#. module: alc_internal_stock_quant_package
#: model:ir.model.fields,field_description:alc_internal_stock_quant_package.field_stock_picking_type_stock_internal_package_config_line_ids
msgid "Stock internal package config line ids"
msgstr ""

#. module: alc_internal_stock_quant_package
#: model:ir.model.fields,field_description:alc_internal_stock_quant_package.field_stock_internal_package_config_line_stock_picking_type_id
msgid "Stock picking type id"
msgstr ""

#. module: alc_internal_stock_quant_package
#: model:ir.model,name:alc_internal_stock_quant_package.model_stock_picking_type
msgid "The picking type determines the picking view"
msgstr ""

#. module: alc_internal_stock_quant_package
#: model:ir.model,name:alc_internal_stock_quant_package.model_stock_picking
msgid "Transfer"
msgstr ""

119 changes: 119 additions & 0 deletions internal_stock_quant_package/i18n/fr_BE.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * alc_internal_stock_quant_package
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0+e\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-12-01 16:30+0000\n"
"PO-Revision-Date: 2021-12-01 16:30+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: alc_internal_stock_quant_package
#: model:ir.model.fields,field_description:alc_internal_stock_quant_package.field_stock_internal_package_config_line_create_uid
msgid "Created by"
msgstr ""

#. module: alc_internal_stock_quant_package
#: model:ir.model.fields,field_description:alc_internal_stock_quant_package.field_stock_internal_package_config_line_create_date
msgid "Created on"
msgstr ""

#. module: alc_internal_stock_quant_package
#: model:ir.model.fields,field_description:alc_internal_stock_quant_package.field_stock_internal_package_config_line_delivery_carrier_id
msgid "Delivery carrier id"
msgstr ""

#. module: alc_internal_stock_quant_package
#: model:ir.model.fields,field_description:alc_internal_stock_quant_package.field_stock_internal_package_config_line_display_name
msgid "Display Name"
msgstr ""

#. module: alc_internal_stock_quant_package
#: model:ir.model.fields,field_description:alc_internal_stock_quant_package.field_stock_internal_package_config_line_empty
msgid "Empty"
msgstr ""

#. module: alc_internal_stock_quant_package
#: model:ir.model.fields,field_description:alc_internal_stock_quant_package.field_stock_picking_empty_internal_package_on_transfer
#: model:ir.model.fields,field_description:alc_internal_stock_quant_package.field_stock_picking_type_empty_internal_package_on_transfer
msgid "Empty internal package on transfer"
msgstr "Vider les colis internes lors du transfert?"

#. module: alc_internal_stock_quant_package
#: model:ir.model.fields,field_description:alc_internal_stock_quant_package.field_stock_internal_package_config_line_id
msgid "ID"
msgstr ""

#. module: alc_internal_stock_quant_package
#: model:ir.model.fields,help:alc_internal_stock_quant_package.field_stock_picking_type_empty_internal_package_on_transfer
msgid ""
"If set internal packages are emptied after the transfer or when products are "
"put in pack."
msgstr ""
"Si coché, les colis internes sont vidés une fois la préparation terminée ou "
"lorsqu'on fait la mise en colis."

#. module: alc_internal_stock_quant_package
#: model:ir.ui.view,arch_db:alc_internal_stock_quant_package.stock_quant_package_search_view
msgid "Internal"
msgstr "Interne"

#. module: alc_internal_stock_quant_package
#: model:ir.model,name:alc_internal_stock_quant_package.model_stock_internal_package_config_line
#, fuzzy
msgid "Internal Package Configuration Line"
msgstr "Vider les colis internes lors du transfert?"

#. module: alc_internal_stock_quant_package
#: model:ir.model.fields,field_description:alc_internal_stock_quant_package.field_stock_quant_package_is_internal
msgid "Internal use?"
msgstr "Usage interne?"

#. module: alc_internal_stock_quant_package
#: model:ir.model.fields,field_description:alc_internal_stock_quant_package.field_stock_internal_package_config_line___last_update
msgid "Last Modified on"
msgstr ""

#. module: alc_internal_stock_quant_package
#: model:ir.model.fields,field_description:alc_internal_stock_quant_package.field_stock_internal_package_config_line_write_uid
msgid "Last Updated by"
msgstr ""

#. module: alc_internal_stock_quant_package
#: model:ir.model.fields,field_description:alc_internal_stock_quant_package.field_stock_internal_package_config_line_write_date
msgid "Last Updated on"
msgstr ""

#. module: alc_internal_stock_quant_package
#: model:ir.model,name:alc_internal_stock_quant_package.model_stock_quant_package
msgid "Physical Packages"
msgstr "Colis physiques"

#. module: alc_internal_stock_quant_package
#: model:ir.model.fields,field_description:alc_internal_stock_quant_package.field_stock_picking_type_stock_internal_package_config_line_ids
#, fuzzy
msgid "Stock internal package config line ids"
msgstr "Vider les colis internes lors du transfert?"

#. module: alc_internal_stock_quant_package
#: model:ir.model.fields,field_description:alc_internal_stock_quant_package.field_stock_internal_package_config_line_stock_picking_type_id
msgid "Stock picking type id"
msgstr ""

#. module: alc_internal_stock_quant_package
#: model:ir.model,name:alc_internal_stock_quant_package.model_stock_picking_type
msgid "The picking type determines the picking view"
msgstr "Le type de préparation détermine la vue de préparation"

#. module: alc_internal_stock_quant_package
#: model:ir.model,name:alc_internal_stock_quant_package.model_stock_picking
msgid "Transfer"
msgstr "Transfert"
4 changes: 4 additions & 0 deletions internal_stock_quant_package/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
from . import stock_internal_package_config_line
from . import stock_picking_type
from . import stock_picking
from . import stock_quant_package
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Copyright 2022 ACSONE SA/NV
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from odoo import fields, models


class StockInternalPackageConfigLine(models.Model):
_name = "stock.internal.package.config.line"
_description = "Internal Package Configuration Line"

empty = fields.Boolean()
delivery_carrier_id = fields.Many2one(
"delivery.carrier",
required=True,
ondelete="cascade",
)
stock_picking_type_id = fields.Many2one(
"stock.picking.type",
required=True,
readonly=True,
ondelete="cascade",
)

def write(self, vals):
res = super().write(vals)
self._invalidate_empty_internal_package_on_transfer_cache()
return res

def _invalidate_empty_internal_package_on_transfer_cache(self):
domain = [("stock_internal_package_config_line_ids", "in", self.ids)]
picking_types = self.env["stock.picking.type"].search(domain)
picking_types.clear_caches()
self.env["stock.picking"].invalidate_model()
Loading

0 comments on commit bf651b6

Please sign in to comment.