From 84a2277d7de0c8dac94ba5e47d79f5608b5564cc Mon Sep 17 00:00:00 2001 From: Aungkokolin1997 Date: Fri, 13 Sep 2024 09:58:13 +0000 Subject: [PATCH] relect oca changes --- .../stock_valuation_fifo_lot_mrp_landed_cost | 1 + .../setup.py | 6 + .../README.rst | 98 ++++ .../__init__.py | 1 + .../__manifest__.py | 15 + .../models/__init__.py | 1 + .../models/stock_landed_cost.py | 17 + .../readme/CONTRIBUTORS.rst | 10 + .../readme/DESCRIPTION.rst | 1 + .../static/description/index.html | 437 ++++++++++++++++++ 10 files changed, 587 insertions(+) create mode 120000 setup/stock_valuation_fifo_lot_mrp_landed_cost/odoo/addons/stock_valuation_fifo_lot_mrp_landed_cost create mode 100644 setup/stock_valuation_fifo_lot_mrp_landed_cost/setup.py create mode 100644 stock_valuation_fifo_lot_mrp_landed_cost/README.rst create mode 100644 stock_valuation_fifo_lot_mrp_landed_cost/__init__.py create mode 100644 stock_valuation_fifo_lot_mrp_landed_cost/__manifest__.py create mode 100644 stock_valuation_fifo_lot_mrp_landed_cost/models/__init__.py create mode 100644 stock_valuation_fifo_lot_mrp_landed_cost/models/stock_landed_cost.py create mode 100644 stock_valuation_fifo_lot_mrp_landed_cost/readme/CONTRIBUTORS.rst create mode 100644 stock_valuation_fifo_lot_mrp_landed_cost/readme/DESCRIPTION.rst create mode 100644 stock_valuation_fifo_lot_mrp_landed_cost/static/description/index.html diff --git a/setup/stock_valuation_fifo_lot_mrp_landed_cost/odoo/addons/stock_valuation_fifo_lot_mrp_landed_cost b/setup/stock_valuation_fifo_lot_mrp_landed_cost/odoo/addons/stock_valuation_fifo_lot_mrp_landed_cost new file mode 120000 index 00000000..d3d287ed --- /dev/null +++ b/setup/stock_valuation_fifo_lot_mrp_landed_cost/odoo/addons/stock_valuation_fifo_lot_mrp_landed_cost @@ -0,0 +1 @@ +../../../../stock_valuation_fifo_lot_mrp_landed_cost \ No newline at end of file diff --git a/setup/stock_valuation_fifo_lot_mrp_landed_cost/setup.py b/setup/stock_valuation_fifo_lot_mrp_landed_cost/setup.py new file mode 100644 index 00000000..28c57bb6 --- /dev/null +++ b/setup/stock_valuation_fifo_lot_mrp_landed_cost/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +) diff --git a/stock_valuation_fifo_lot_mrp_landed_cost/README.rst b/stock_valuation_fifo_lot_mrp_landed_cost/README.rst new file mode 100644 index 00000000..54504e94 --- /dev/null +++ b/stock_valuation_fifo_lot_mrp_landed_cost/README.rst @@ -0,0 +1,98 @@ +======================================== +Stock Valuation Fifo Lot MRP Landed Cost +======================================== + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:21ea12a0400da8515046cc3fa647d54482ff123046d5f5e8ae0e90b89058f0b9 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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%2Fstock--logistics--workflow-lightgray.png?logo=github + :target: https://github.com/OCA/stock-logistics-workflow/tree/16.0/stock_valuation_fifo_lot_mrp_landed_cost + :alt: OCA/stock-logistics-workflow +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/stock-logistics-workflow-16-0/stock-logistics-workflow-16-0-stock_valuation_fifo_lot_mrp_landed_cost + :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/stock-logistics-workflow&target_branch=16.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module propagates the lot_producing_id of mrp_production_ids to the SVL when adding the landed cost for these MOs. + +.. 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 `_ + +**Table of contents** + +.. contents:: + :local: + +Bug Tracker +=========== + +Bugs are tracked on `GitHub 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 `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +~~~~~~~ + +* Ecosoft + +Contributors +~~~~~~~~~~~~ + +* `Ecosoft `__: + + * Tharathip Chaweewongphan + * Saran Limpajitkutaporn + * Pimolnat Suntian + +* `Quartile `__: + + * Aung Ko Ko Lin + + +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-newtratip| image:: https://github.com/newtratip.png?size=40px + :target: https://github.com/newtratip + :alt: newtratip + +Current `maintainer `__: + +|maintainer-newtratip| + +This module is part of the `OCA/stock-logistics-workflow `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/stock_valuation_fifo_lot_mrp_landed_cost/__init__.py b/stock_valuation_fifo_lot_mrp_landed_cost/__init__.py new file mode 100644 index 00000000..0650744f --- /dev/null +++ b/stock_valuation_fifo_lot_mrp_landed_cost/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/stock_valuation_fifo_lot_mrp_landed_cost/__manifest__.py b/stock_valuation_fifo_lot_mrp_landed_cost/__manifest__.py new file mode 100644 index 00000000..dac94be7 --- /dev/null +++ b/stock_valuation_fifo_lot_mrp_landed_cost/__manifest__.py @@ -0,0 +1,15 @@ +# Copyright 2023 Ecosoft Co., Ltd (https://ecosoft.co.th) +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html) + +{ + "name": "Stock Valuation Fifo Lot MRP Landed Cost", + "version": "16.0.1.0.0", + "category": "Warehouse Management", + "development_status": "Alpha", + "license": "AGPL-3", + "author": "Ecosoft, Odoo Community Association (OCA)", + "website": "https://github.com/OCA/stock-logistics-workflow", + "depends": ["stock_valuation_fifo_lot", "mrp_landed_costs"], + "installable": True, + "maintainers": ["newtratip"], +} diff --git a/stock_valuation_fifo_lot_mrp_landed_cost/models/__init__.py b/stock_valuation_fifo_lot_mrp_landed_cost/models/__init__.py new file mode 100644 index 00000000..e9907b68 --- /dev/null +++ b/stock_valuation_fifo_lot_mrp_landed_cost/models/__init__.py @@ -0,0 +1 @@ +from . import stock_landed_cost diff --git a/stock_valuation_fifo_lot_mrp_landed_cost/models/stock_landed_cost.py b/stock_valuation_fifo_lot_mrp_landed_cost/models/stock_landed_cost.py new file mode 100644 index 00000000..98ac48b2 --- /dev/null +++ b/stock_valuation_fifo_lot_mrp_landed_cost/models/stock_landed_cost.py @@ -0,0 +1,17 @@ +# Copyright 2023 Ecosoft Co., Ltd (https://ecosoft.co.th) +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html) + +from odoo import models + + +class StockLandedCost(models.Model): + _inherit = "stock.landed.cost" + + def button_validate(self): + "Update Lots/SN on stock.valuation.layer line" + res = super().button_validate() + for rec in self.stock_valuation_layer_ids: + lot_ids = self.mrp_production_ids.mapped("lot_producing_id") + if lot_ids: + rec.write({"lot_ids": lot_ids}) + return res diff --git a/stock_valuation_fifo_lot_mrp_landed_cost/readme/CONTRIBUTORS.rst b/stock_valuation_fifo_lot_mrp_landed_cost/readme/CONTRIBUTORS.rst new file mode 100644 index 00000000..e2e916aa --- /dev/null +++ b/stock_valuation_fifo_lot_mrp_landed_cost/readme/CONTRIBUTORS.rst @@ -0,0 +1,10 @@ +* `Ecosoft `__: + + * Tharathip Chaweewongphan + * Saran Limpajitkutaporn + * Pimolnat Suntian + +* `Quartile `__: + + * Aung Ko Ko Lin + \ No newline at end of file diff --git a/stock_valuation_fifo_lot_mrp_landed_cost/readme/DESCRIPTION.rst b/stock_valuation_fifo_lot_mrp_landed_cost/readme/DESCRIPTION.rst new file mode 100644 index 00000000..b5e969bd --- /dev/null +++ b/stock_valuation_fifo_lot_mrp_landed_cost/readme/DESCRIPTION.rst @@ -0,0 +1 @@ +This module propagates the lot_producing_id of mrp_production_ids to the SVL when adding the landed cost for these MOs. diff --git a/stock_valuation_fifo_lot_mrp_landed_cost/static/description/index.html b/stock_valuation_fifo_lot_mrp_landed_cost/static/description/index.html new file mode 100644 index 00000000..08f45c70 --- /dev/null +++ b/stock_valuation_fifo_lot_mrp_landed_cost/static/description/index.html @@ -0,0 +1,437 @@ + + + + + +Stock Valuation Fifo Lot MRP Landed Cost + + + +
+

Stock Valuation Fifo Lot MRP Landed Cost

+ + +

Alpha License: AGPL-3 OCA/stock-logistics-workflow Translate me on Weblate Try me on Runboat

+

This module propagates the lot_producing_id of mrp_production_ids to the SVL when adding the landed cost for these MOs.

+
+

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

+
+

Table of contents

+ +
+

Bug Tracker

+

Bugs are tracked on GitHub 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.

+

Do not contact contributors directly about support or help with technical issues.

+
+
+

Credits

+
+

Authors

+
    +
  • Ecosoft
  • +
+
+
+

Contributors

+ +
+
+

Maintainers

+

This module is maintained by the OCA.

+Odoo Community Association +

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.

+

Current maintainer:

+

newtratip

+

This module is part of the OCA/stock-logistics-workflow project on GitHub.

+

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

+
+
+
+ +