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

==================================
DDMRP Exclude Moves ADU Calc Sales
==================================

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

.. |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-LGPL--3-blue.png
:target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
:alt: License: LGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fddmrp-lightgray.png?logo=github
:target: https://github.com/OCA/ddmrp/tree/19.0/ddmrp_exclude_moves_adu_calc_sales
:alt: OCA/ddmrp
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/ddmrp-19-0/ddmrp-19-0-ddmrp_exclude_moves_adu_calc_sales
: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/ddmrp&target_branch=19.0
:alt: Try me on Runboat

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

This module extends ddmrp_exclude_moves_adu_calc to be able to mark sale
order lines to be excluded from adu calculation

**Table of contents**

.. contents::
:local:

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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/ddmrp/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/ddmrp/issues/new?body=module:%20ddmrp_exclude_moves_adu_calc_sales%0Aversion:%2019.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
------------

- Lois Rilo <lois.rilo@forgeflow.com>
- David Jiménez <david.jimenez@forgeflow.com>

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-DavidJForgeFlow| image:: https://github.com/DavidJForgeFlow.png?size=40px
:target: https://github.com/DavidJForgeFlow
:alt: DavidJForgeFlow

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

|maintainer-DavidJForgeFlow|

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

{
"name": "DDMRP Exclude Moves ADU Calc Sales",
"summary": "DDMRP Exclude Moves ADU Calc integration with Sales app.",
"version": "19.0.1.0.0",
"development_status": "Beta",
"author": "ForgeFlow, Odoo Community Association (OCA)",
"maintainers": ["DavidJForgeFlow"],
"website": "https://github.com/OCA/ddmrp",
"category": "Warehouse Management",
"depends": ["sale_stock", "ddmrp_exclude_moves_adu_calc"],
"data": ["views/sale_order_view.xml"],
"license": "LGPL-3",
"installable": True,
}
41 changes: 41 additions & 0 deletions ddmrp_exclude_moves_adu_calc_sales/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * ddmrp_exclude_moves_adu_calc_sales
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2024-03-20 20:35+0000\n"
"Last-Translator: Ivorra78 <informatica@totmaterial.es>\n"
"Language-Team: none\n"
"Language: es\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.17\n"

#. module: ddmrp_exclude_moves_adu_calc_sales
#: model:ir.model.fields,field_description:ddmrp_exclude_moves_adu_calc_sales.field_sale_order_line__exclude_from_adu
msgid "Exclude from ADU calculation"
msgstr "Excluir del cálculo ADU"

#. module: ddmrp_exclude_moves_adu_calc_sales
#: model:ir.model.fields,help:ddmrp_exclude_moves_adu_calc_sales.field_sale_order_line__exclude_from_adu
msgid ""
"If this flag is set related stock moves will be excluded from ADU "
"calculation"
msgstr ""
"Si se activa este indicador, los movimientos de existencias relacionados se "
"excluirán del cálculo de ADU"

#. module: ddmrp_exclude_moves_adu_calc_sales
#: model:ir.model,name:ddmrp_exclude_moves_adu_calc_sales.model_sale_order_line
msgid "Sales Order Line"
msgstr "Línea de Orden de Venta"

#. module: ddmrp_exclude_moves_adu_calc_sales
#: model:ir.model,name:ddmrp_exclude_moves_adu_calc_sales.model_stock_move
msgid "Stock Move"
msgstr "Movimiento de Almacén"
41 changes: 41 additions & 0 deletions ddmrp_exclude_moves_adu_calc_sales/i18n/it.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * ddmrp_exclude_moves_adu_calc_sales
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2024-03-04 09:35+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.17\n"

#. module: ddmrp_exclude_moves_adu_calc_sales
#: model:ir.model.fields,field_description:ddmrp_exclude_moves_adu_calc_sales.field_sale_order_line__exclude_from_adu
msgid "Exclude from ADU calculation"
msgstr "Escudere dal calcolo ADU"

#. module: ddmrp_exclude_moves_adu_calc_sales
#: model:ir.model.fields,help:ddmrp_exclude_moves_adu_calc_sales.field_sale_order_line__exclude_from_adu
msgid ""
"If this flag is set related stock moves will be excluded from ADU "
"calculation"
msgstr ""
"Se questa opzione è attiva, i movimenti di magazzino relativi verranno "
"esclusi dal calcolo ADU"

#. module: ddmrp_exclude_moves_adu_calc_sales
#: model:ir.model,name:ddmrp_exclude_moves_adu_calc_sales.model_sale_order_line
msgid "Sales Order Line"
msgstr "Riga ordine di vendita"

#. module: ddmrp_exclude_moves_adu_calc_sales
#: model:ir.model,name:ddmrp_exclude_moves_adu_calc_sales.model_stock_move
msgid "Stock Move"
msgstr "Movimento di magazzino"
1 change: 1 addition & 0 deletions ddmrp_exclude_moves_adu_calc_sales/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import sale_order_line
28 changes: 28 additions & 0 deletions ddmrp_exclude_moves_adu_calc_sales/models/sale_order_line.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Copyright 2024 ForgeFlow S.L. (https://www.forgeflow.com)
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).

from odoo import fields, models


class SaleOrderLine(models.Model):
_inherit = "sale.order.line"

exclude_from_adu = fields.Boolean(
string="Exclude from ADU calculation",
compute="_compute_exclude_from_adu",
inverse="_inverse_exclude_from_adu",
copy=False,
help="If this flag is set related stock moves will be excluded from "
"ADU calculation",
)

def _compute_exclude_from_adu(self):
for rec in self:
rec.exclude_from_adu = all(move.exclude_from_adu for move in rec.move_ids)

def _inverse_exclude_from_adu(self):
for rec in self:
if rec.exclude_from_adu:
rec.move_ids.write({"exclude_from_adu": True})
else:
rec.move_ids.write({"exclude_from_adu": False})
3 changes: 3 additions & 0 deletions ddmrp_exclude_moves_adu_calc_sales/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 ddmrp_exclude_moves_adu_calc_sales/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Lois Rilo \<<lois.rilo@forgeflow.com>\>
- David Jiménez \<<david.jimenez@forgeflow.com>\>
2 changes: 2 additions & 0 deletions ddmrp_exclude_moves_adu_calc_sales/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
This module extends ddmrp_exclude_moves_adu_calc to be able to mark sale
order lines to be excluded from adu calculation
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading