Metadata-Version: 2.1
Name: odoo-addon-budget_control_purchase_stock
Version: 18.0.2.1.1
Requires-Python: >=3.10
Requires-Dist: odoo-addon-budget_control_purchase==18.0.*
Requires-Dist: odoo-addon-budget_control_stock==18.0.*
Requires-Dist: odoo==18.0.*
Summary: Budget Control on Purchase with Stock
Home-page: https://github.com/ecosoft-odoo/budgeting
License: AGPL-3
Author: Ecosoft, Odoo Community Association (OCA)
Author-email: support@odoo-community.org
Classifier: Programming Language :: Python
Classifier: Framework :: Odoo
Classifier: Framework :: Odoo :: 18.0
Classifier: License :: OSI Approved :: GNU Affero General Public License v3
Classifier: Development Status :: 3 - Alpha
Description-Content-Type: text/x-rst

.. image:: https://odoo-community.org/readme-banner-image
   :target: https://odoo-community.org/get-involved?utm_source=readme
   :alt: Odoo Community Association

=====================================
Budget Control on Purchase with Stock
=====================================

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

.. |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/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-ecosoft--odoo%2Fbudgeting-lightgray.png?logo=github
    :target: https://github.com/ecosoft-odoo/budgeting/tree/18.0/budget_control_purchase_stock
    :alt: ecosoft-odoo/budgeting

|badge1| |badge2| |badge3|

This module bridges purchase and stock budget control with a
product-category inventory recognition policy and a company fallback:

- **Vendor Bill**: posting the bill releases the PO commitment and
  records budget actual. Outgoing stock operations do not affect budget.
- **Stock Issue Valuation**: posting the bill affects neither actual nor
  the PO commitment. Confirming an outgoing operation replaces the
  traceable PO commitment with a stock commitment; posting its valuation
  entry replaces that stock commitment with budget actual.

Each product category can use **Company Default**, **Vendor Bill**, or
**Stock Issue Valuation**. The resolved policy is captured independently
on each purchase order line and stock move, so mixed-policy purchase
orders are supported and later configuration changes do not rewrite
confirmed transactions. Returns preserve the original stock move policy.

Services and other non-storable products always use Vendor Bill. Stock
Issue requires automated inventory valuation. It also applies to
outgoing quantities that did not originate from a purchase (for example,
manufactured stock) when their product category uses Stock Issue; a
Vendor Bill category intentionally excludes all of its outgoing stock
operations from budget.

Lot-tracked products trace their source PO lines through completed
receipts. When a lot was received on several PO lines, each outgoing
move line prefers the source with the same analytic accounts, then the
oldest receipt. If no source has matching analytics, receipt FIFO still
releases the original PO commitment when stock is issued to another
project. Different outgoing moves can therefore release different PO
lines even when they share one lot.

Non-lot products use company- and budget-period-scoped product FIFO
across received PO lines, ordered by PO date. Quantity is converted
between stock and purchase UoMs, and remaining commitment caps use
company-currency values. Cancelling an outgoing operation restores its
PO commitment, while a stock return reverses the issue actual without
recreating the fulfilled PO commitment.

.. 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 <https://odoo-community.org/page/development-status>`_

**Table of contents**

.. contents::
   :local:

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

1. In **Budget > Configuration > Settings**, choose the company's
   **Default Inventory Budget Actual Source**.
2. On each **Product Category**, choose **Company Default**, **Vendor
   Bill**, or **Stock Issue Valuation** under Inventory Valuation.
3. Categories using Stock Issue must use automated inventory valuation.

The category setting is company-specific. Services and non-storable
products always use Vendor Bill. Company and category changes apply to
new PO-line and stock-move snapshots; finish open purchase/delivery
flows before changing a policy for the same product.

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

Bugs are tracked on `GitHub Issues <https://github.com/ecosoft-odoo/budgeting/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/ecosoft-odoo/budgeting/issues/new?body=module:%20budget_control_purchase_stock%0Aversion:%2018.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
-------

* Ecosoft

Contributors
------------

- Saran Lim saranl@ecosoft.co.th

Maintainers
-----------

.. |maintainer-Saran440| image:: https://github.com/Saran440.png?size=40px
    :target: https://github.com/Saran440
    :alt: Saran440

Current maintainer:

|maintainer-Saran440| 

This module is part of the `ecosoft-odoo/budgeting <https://github.com/ecosoft-odoo/budgeting/tree/18.0/budget_control_purchase_stock>`_ project on GitHub.

You are welcome to contribute.
