Skip to content
Open
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
132 changes: 132 additions & 0 deletions purchase_stock_price_variance/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
=============================
Purchase Stock Price Variance
=============================

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

.. |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--workflow-lightgray.png?logo=github
:target: https://github.com/OCA/stock-logistics-workflow/tree/16.0/purchase_stock_price_variance
: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-purchase_stock_price_variance
: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 checks the variance between the purchase price and the
product's standard price at the time of receipt picking validation. If
the variance exceeds a given threshold, the notification can be left in
the chatter. Additionally, an error can be triggered before receiving
the stock if needed.

**Table of contents**

.. contents::
:local:

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

1. Navigate to *Inventory > Configuration > Settings*.
2. Find and enable the 'Enable Price Variance Error' option to activate
this feature. An error will occur if the price difference exceeds the
threshold when receiving the product.
3. Set the following global values to apply if no specific value is set
at the product level. If the threshold value is set to 0, this
threshold will not be checked.

- **Price Variance Threshold Percent**: Default percentage variance
for all products.
- **Price Variance Threshold Amount**: Default maximum variance for
all products.

4. Go to *Inventory > Configuration > Product Categories*.
5. Enable **Bypass Price Variance Check** to skip the error check for
the products under this category.
6. Go to *Inventory > Products* and open the product.
7. Click on the Inventory tab and configure the following fields. If the
threshold value is set to 0, the threshold will refer to the global
value.

- **Bypass Price Variance Check**: Enable this to skip the error
check for this specific product.
- **Price Variance Threshold Percent**: Set the allowable percentage
variance.
- **Price Variance Threshold Amount**: Define the maximum allowable
price variance.

8. Assign the internal user to the "Manage Price Variance Check" group.
This will make the "Bypass Price Variance Check" checkbox updatable
in the receipt form.

Usage
=====

This module logs a notification in the chatter when the variance between
the purchase price and the standard price exceeds a given threshold
during the receipt process.

You can configure the price variance threshold at the product level.

If needed, an error message can also be triggered. The 'Bypass Price
Variance Check' option can be set both at the product level and in each
Stock Picking to skip the error

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

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

* Quartile

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

- `Quartile <https://www.quartile.co>`__:

- Aung Ko Ko Lin
- Yoshi Tashiro
- Toshikimi Shigenobu

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-workflow <https://github.com/OCA/stock-logistics-workflow/tree/16.0/purchase_stock_price_variance>`_ 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_price_variance/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
19 changes: 19 additions & 0 deletions purchase_stock_price_variance/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Copyright 2025 Quartile (https://www.quartile.co)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Purchase Stock Price Variance",
"version": "16.0.1.0.0",
"category": "Stock",
"author": "Quartile, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/stock-logistics-workflow",
"depends": ["purchase_stock"],
"license": "AGPL-3",
"data": [
"security/purchase_stock_price_variance_security.xml",
"views/product_category_views.xml",
"views/product_template_views.xml",
"views/res_config_setting_views.xml",
"views/stock_picking_views.xml",
],
"installable": True,
}
208 changes: 208 additions & 0 deletions purchase_stock_price_variance/i18n/ja.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,208 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * purchase_stock_price_variance
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-03-11 06:28+0000\n"
"PO-Revision-Date: 2025-03-11 06:28+0000\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_price_variance
#: model:ir.model.fields,field_description:purchase_stock_price_variance.field_product_category__bypass_price_variance_check
#: model:ir.model.fields,field_description:purchase_stock_price_variance.field_product_product__bypass_price_variance_check
#: model:ir.model.fields,field_description:purchase_stock_price_variance.field_product_template__bypass_price_variance_check
#: model:ir.model.fields,field_description:purchase_stock_price_variance.field_stock_picking__bypass_price_variance_check
msgid "Bypass Price Variance Check"
msgstr "価格差チェックをバイパス"

#. module: purchase_stock_price_variance
#: model:ir.model,name:purchase_stock_price_variance.model_res_company
msgid "Companies"
msgstr "会社"

#. module: purchase_stock_price_variance
#: model:ir.model,name:purchase_stock_price_variance.model_res_config_settings
msgid "Config Settings"
msgstr "コンフィグ設定"

#. module: purchase_stock_price_variance
#: model:ir.model.fields,field_description:purchase_stock_price_variance.field_res_company__enable_price_variance_error
#: model:ir.model.fields,field_description:purchase_stock_price_variance.field_res_config_settings__enable_price_variance_error
msgid "Enable Price Variance Error"
msgstr "価格差エラーを有効化"

#. module: purchase_stock_price_variance
#: model_terms:ir.ui.view,arch_db:purchase_stock_price_variance.view_stock_config_settings
msgid ""
"Enable the feature that triggers an error when receiving a product if\n"
" the price difference exceeds the threshold."
msgstr "入荷時に価格差がしきい値を超えた場合にエラーを発生させる機能を有効化します。"

#. module: purchase_stock_price_variance
#: model:ir.model.fields,help:purchase_stock_price_variance.field_stock_picking__bypass_price_variance_check
msgid ""
"If enabled, no error is raised for price variance between the product's "
"standard price and purchase receipt unit price."
msgstr "有効にすると、商品の標準価格と購買単価の間の価格差によるエラーは発生しません。"

#. module: purchase_stock_price_variance
#: model:ir.model.fields,help:purchase_stock_price_variance.field_product_category__bypass_price_variance_check
msgid ""
"If enabled, the products under this category will not raise an error for "
"price variance between the product's standard price and the purchase receipt"
" unit price."
msgstr "有効にすると、このカテゴリ内の製品は、標準価格と購買単価の価格差によるエラーを発生させません。"

#. module: purchase_stock_price_variance
#: model:ir.model.fields,help:purchase_stock_price_variance.field_product_product__bypass_price_variance_check
#: model:ir.model.fields,help:purchase_stock_price_variance.field_product_template__bypass_price_variance_check
msgid ""
"If enabled, this product will not raise an error for price variance between "
"the product's standard price and the purchase receipt unit price."
msgstr "有効にすると、この製品は、標準価格と購買単価の価格差によるエラーを発生させません。"

#. module: purchase_stock_price_variance
#: model:res.groups,name:purchase_stock_price_variance.group_manage_price_variance_check
msgid "Manage Price Variance Check"
msgstr "価格差チェックの管理"

#. module: purchase_stock_price_variance
#: model_terms:ir.ui.view,arch_db:purchase_stock_price_variance.view_stock_config_settings
msgid ""
"Maximum allowable variance (in monetary amount, based on company\n"
" currency) between the product's standard price and the purchase receipt\n"
" unit price.\n"
" Keeping it at zero means that this threshold will not be checked."
msgstr ""
"製品の標準価格と購買単価の間で許容される最大の価格差(会社の通貨単位)。\n"
" 0に設定すると、このしきい値はチェックされません。"

#. module: purchase_stock_price_variance
#: model:ir.model.fields,help:purchase_stock_price_variance.field_product_product__price_variance_threshold_amount
#: model:ir.model.fields,help:purchase_stock_price_variance.field_product_template__price_variance_threshold_amount
msgid ""
"Maximum allowable variance (in monetary amount, based on company currency) "
"between the product's standard price and the purchase receipt unit price. "
"Setting this to zero means the threshold will refer to the global setting."
msgstr "製品の標準価格と購買単価の間で許容される最大の価格差(会社の通貨単位)。0に設定すると、このグローバル設定が利用されます。"

#. module: purchase_stock_price_variance
#: model:ir.model.fields,help:purchase_stock_price_variance.field_res_company__price_variance_threshold_amount
#: model:ir.model.fields,help:purchase_stock_price_variance.field_res_config_settings__price_variance_threshold_amount
msgid ""
"Maximum allowable variance (in monetary amount, based on company currency) "
"between the product's standard price and the purchase receipt unit price. "
"Setting this to zero means this threshold will not be checked."
msgstr "製品の標準価格と購買単価の間で許容される最大の価格差(会社の通貨単位)。0に設定すると、このしきい値はチェックされません。"

#. module: purchase_stock_price_variance
#: model_terms:ir.ui.view,arch_db:purchase_stock_price_variance.view_stock_config_settings
msgid ""
"Maximum variance (in percent) allowable between the product's standard\n"
" price and purchase receipt unit price.\n"
" Keeping it at zero means that this threshold will not be checked."
msgstr "製品の標準価格に対する購買単価の許容される最大差異(パーセント)。0に設定すると、このしきい値はチェックされません。"

#. module: purchase_stock_price_variance
#: model:ir.model.fields,help:purchase_stock_price_variance.field_product_product__price_variance_threshold_percent
#: model:ir.model.fields,help:purchase_stock_price_variance.field_product_template__price_variance_threshold_percent
msgid ""
"Maximum variance (in percent) allowable between the product's standard price"
" and purchase receipt unit price. Setting this to zero means the threshold "
"will refer to the global setting."
msgstr "製品の標準価格に対する購買単価の許容される最大差異(パーセント)。0 に設定すると、このグローバル設定が利用されます。"

#. module: purchase_stock_price_variance
#: model:ir.model.fields,help:purchase_stock_price_variance.field_res_company__price_variance_threshold_percent
#: model:ir.model.fields,help:purchase_stock_price_variance.field_res_config_settings__price_variance_threshold_percent
msgid ""
"Maximum variance (in percent) allowable between the product's standard price"
" and purchase receipt unit price.Setting this to zero means this threshold "
"will not be checked."
msgstr "製品の標準価格に対する購買単価の許容される最大差異(パーセント)。0に設定すると、このしきい値はチェックされません。"

#. module: purchase_stock_price_variance
#: model_terms:ir.ui.view,arch_db:purchase_stock_price_variance.view_template_property_form
msgid "Price Discrepancy Settings"
msgstr "価格差異設定"

#. module: purchase_stock_price_variance
#: model:ir.model.fields,field_description:purchase_stock_price_variance.field_product_product__price_variance_threshold_amount
#: model:ir.model.fields,field_description:purchase_stock_price_variance.field_product_template__price_variance_threshold_amount
#: model:ir.model.fields,field_description:purchase_stock_price_variance.field_res_company__price_variance_threshold_amount
#: model:ir.model.fields,field_description:purchase_stock_price_variance.field_res_config_settings__price_variance_threshold_amount
msgid "Price Variance Threshold Amount"
msgstr "価格差しきい値(金額)"

#. module: purchase_stock_price_variance
#: model:ir.model.fields,field_description:purchase_stock_price_variance.field_product_product__price_variance_threshold_percent
#: model:ir.model.fields,field_description:purchase_stock_price_variance.field_product_template__price_variance_threshold_percent
#: model:ir.model.fields,field_description:purchase_stock_price_variance.field_res_company__price_variance_threshold_percent
#: model:ir.model.fields,field_description:purchase_stock_price_variance.field_res_config_settings__price_variance_threshold_percent
msgid "Price Variance Threshold Percent"
msgstr "価格差しきい値(パーセント)"

#. module: purchase_stock_price_variance
#. odoo-python
#: code:addons/purchase_stock_price_variance/models/stock_picking.py:0
#, python-format
msgid ""
"Price variance exceeding a threshold detected for the following products:"
msgstr "以下の製品でしきい値を超える価格差が検出されました:"

#. module: purchase_stock_price_variance
#. odoo-python
#: code:addons/purchase_stock_price_variance/models/stock_picking.py:0
#, python-format
msgid ""
"Price variance exceeding a threshold detected for the following products:\n"
"\n"
msgstr ""
"以下の製品でしきい値を超える価格差が検出されました:\n"
"\n"

#. module: purchase_stock_price_variance
#: model:ir.model,name:purchase_stock_price_variance.model_product_template
msgid "Product"
msgstr "プロダクト"

#. module: purchase_stock_price_variance
#: model:ir.model,name:purchase_stock_price_variance.model_product_category
msgid "Product Category"
msgstr "プロダクトカテゴリ"

#. module: purchase_stock_price_variance
#. odoo-python
#: code:addons/purchase_stock_price_variance/models/product_template.py:0
#: code:addons/purchase_stock_price_variance/models/product_template.py:0
#: code:addons/purchase_stock_price_variance/models/res_company.py:0
#: code:addons/purchase_stock_price_variance/models/res_company.py:0
#, python-format
msgid "The threshold values cannot be negative."
msgstr "しきい値は負の値にはできません。"

#. module: purchase_stock_price_variance
#: model:ir.model,name:purchase_stock_price_variance.model_stock_picking
msgid "Transfer"
msgstr "運送"

#. module: purchase_stock_price_variance
#. odoo-python
#: code:addons/purchase_stock_price_variance/models/product_category.py:0
#: code:addons/purchase_stock_price_variance/models/product_template.py:0
#: code:addons/purchase_stock_price_variance/models/stock_picking.py:0
#: code:addons/purchase_stock_price_variance/models/stock_picking.py:0
#, python-format
msgid ""
"You do not have permission to modify the 'Bypass Price Variance Check' "
"field. Please contact an administrator or a user with the appropriate "
"permissions."
msgstr "「価格差異チェックをバイパス」のフィールドを変更する権限がありません。管理者または適切な権限を持つユーザーにお問い合わせください。"
5 changes: 5 additions & 0 deletions purchase_stock_price_variance/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from . import product_category
from . import product_template
from . import res_company
from . import res_config_settings
from . import stock_picking
Loading
Loading