Skip to content

Commit

Permalink
Merge PR #627 into 17.0
Browse files Browse the repository at this point in the history
Signed-off-by dreispt
  • Loading branch information
OCA-git-bot committed Dec 1, 2024
2 parents e37042c + 6ddf0a6 commit 27a70f4
Show file tree
Hide file tree
Showing 15 changed files with 660 additions and 0 deletions.
83 changes: 83 additions & 0 deletions purchase_stock_analytic/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
=======================
Purchase Stock Analytic
=======================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:c149eb74b64f20f5b667b0a346ef4b393df3d2687b8537828b9a77205818656a
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |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%2Faccount--analytic-lightgray.png?logo=github
:target: https://github.com/OCA/account-analytic/tree/17.0/purchase_stock_analytic
:alt: OCA/account-analytic
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/account-analytic-17-0/account-analytic-17-0-purchase_stock_analytic
: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/account-analytic&target_branch=17.0
:alt: Try me on Runboat

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

This module copies the analytic distribution of the purchase order item
to the stock move.

**Table of contents**

.. contents::
:local:

Usage
=====

To use this module, you need to:

1. Create a purchase order
2. Set analytic distribution on purchase order lines
3. Confirm purchase order
4. ... and you should have your analytic distribution on your stock
moves

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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/account-analytic/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/account-analytic/issues/new?body=module:%20purchase_stock_analytic%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
-------

* ACSONE SA/NV

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

{
"name": "Purchase Stock Analytic",
"summary": """
Copies the analytic distribution of the purchase order item to the stock move""",
"version": "17.0.1.0.0",
"license": "AGPL-3",
"author": "ACSONE SA/NV,Odoo Community Association (OCA)",
"website": "https://github.com/OCA/account-analytic",
"depends": ["purchase_stock", "stock_analytic"],
}
22 changes: 22 additions & 0 deletions purchase_stock_analytic/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * purchase_stock_analytic
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2023-07-13 10:09+0000\n"
"Last-Translator: Ivorra78 <[email protected]>\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: purchase_stock_analytic
#: model:ir.model,name:purchase_stock_analytic.model_purchase_order_line
msgid "Purchase Order Line"
msgstr "Línea de pedido de compra"
22 changes: 22 additions & 0 deletions purchase_stock_analytic/i18n/pt_BR.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * purchase_stock_analytic
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2023-10-13 12:42+0000\n"
"Last-Translator: Adriano Prado <[email protected]>\n"
"Language-Team: none\n"
"Language: pt_BR\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: purchase_stock_analytic
#: model:ir.model,name:purchase_stock_analytic.model_purchase_order_line
msgid "Purchase Order Line"
msgstr "Item Pedido de Compra"
19 changes: 19 additions & 0 deletions purchase_stock_analytic/i18n/purchase_stock_analytic.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * purchase_stock_analytic
#
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: purchase_stock_analytic
#: model:ir.model,name:purchase_stock_analytic.model_purchase_order_line
msgid "Purchase Order Line"
msgstr ""
1 change: 1 addition & 0 deletions purchase_stock_analytic/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import purchase_order_line
16 changes: 16 additions & 0 deletions purchase_stock_analytic/models/purchase_order_line.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Copyright 2020 ACSONE SA/NV
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from odoo import models


class PurchaseOrderLine(models.Model):
_inherit = "purchase.order.line"

def _prepare_stock_moves(self, picking):
res = super()._prepare_stock_moves(picking)
if not self.analytic_distribution:
return res
for line in res:
line.update({"analytic_distribution": self.analytic_distribution})
return res
3 changes: 3 additions & 0 deletions purchase_stock_analytic/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 purchase_stock_analytic/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
This module copies the analytic distribution of the purchase order item
to the stock move.
7 changes: 7 additions & 0 deletions purchase_stock_analytic/readme/USAGE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
To use this module, you need to:

1. Create a purchase order
2. Set analytic distribution on purchase order lines
3. Confirm purchase order
4. ... and you should have your analytic distribution on your stock
moves
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 27a70f4

Please sign in to comment.