Skip to content

Commit

Permalink
[IMP] stock_move_purchase_price_update: Split in two modules to avoid…
Browse files Browse the repository at this point in the history
… dependency
  • Loading branch information
carlosdauden committed Sep 13, 2024
1 parent 59a2aa6 commit 21c173d
Show file tree
Hide file tree
Showing 18 changed files with 675 additions and 94 deletions.
6 changes: 6 additions & 0 deletions setup/stock_picking_batch_purchase_price_update/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import setuptools

setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)
26 changes: 9 additions & 17 deletions stock_move_purchase_price_update/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,29 +44,21 @@ Configuration
- Select Reception operation
- Enable 'Show Detailed Operations' option.
- Go to Reception picking
- Add optional column 'Purchase price' in operations and/or detailed
operations
- Go to picking batch with picking type Reception
- Add optional column 'Purchase price' in operations and/or detailed
operations

Usage
=====

1. Go to Sales > Product > Products and edit/create one
2. Set Product Type as Storable Product
3. Set a 'Sales Price'
4. Go to Purchase > Orders > Requests for Quotation
5. Create new RQ with the previous product in the order lines
6. Confirm the Purchase Order
7. Now you have a new button called 'Receive Products' > Press it
8. Add optional column 'Purchase Price' in operations and or detailed
operations
9. You can change the price of the purchase order line from here
10. Go to Inventory > Operations > Batch Transfers
11. Select or create a batch transfer with picking type Receptions
12. Add optional column 'Purchase Price' in operations and or detailed
operations
- Go to Sales > Product > Products and edit/create one
- Set Product Type as Storable Product
- Go to Purchase > Orders > Requests for Quotation
- Create new RQ with the previous product in the order lines
- Confirm the Purchase Order
- Now you have a new button called 'Receive Products' > Press it
- Add optional column 'Purchase Price' in operations and or detailed
operations
- You can change the price of the purchase order line from here

Bug Tracker
===========
Expand Down
1 change: 0 additions & 1 deletion stock_move_purchase_price_update/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
"installable": True,
"depends": [
"purchase_stock",
"stock_picking_batch",
],
"data": [
"views/stock_move_views.xml",
Expand Down
2 changes: 0 additions & 2 deletions stock_move_purchase_price_update/readme/CONFIGURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,3 @@
- Enable 'Show Detailed Operations' option.
- Go to Reception picking
- Add optional column 'Purchase price' in operations and/or detailed operations
- Go to picking batch with picking type Reception
- Add optional column 'Purchase price' in operations and/or detailed operations
20 changes: 8 additions & 12 deletions stock_move_purchase_price_update/readme/USAGE.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
1. Go to Sales \> Product \> Products and edit/create one
2. Set Product Type as Storable Product
3. Set a 'Sales Price'
4. Go to Purchase \> Orders \> Requests for Quotation
5. Create new RQ with the previous product in the order lines
6. Confirm the Purchase Order
7. Now you have a new button called 'Receive Products' \> Press it
8. Add optional column 'Purchase Price' in operations and or detailed operations
9. You can change the price of the purchase order line from here
10. Go to Inventory \> Operations \> Batch Transfers
11. Select or create a batch transfer with picking type Receptions
12. Add optional column 'Purchase Price' in operations and or detailed operations
- Go to Sales \> Product \> Products and edit/create one
- Set Product Type as Storable Product
- Go to Purchase \> Orders \> Requests for Quotation
- Create new RQ with the previous product in the order lines
- Confirm the Purchase Order
- Now you have a new button called 'Receive Products' \> Press it
- Add optional column 'Purchase Price' in operations and or detailed operations
- You can change the price of the purchase order line from here
12 changes: 2 additions & 10 deletions stock_move_purchase_price_update/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -396,29 +396,21 @@ <h1><a class="toc-backref" href="#toc-entry-1">Configuration</a></h1>
<li>Go to Reception picking</li>
<li>Add optional column ‘Purchase price’ in operations and/or detailed
operations</li>
<li>Go to picking batch with picking type Reception</li>
<li>Add optional column ‘Purchase price’ in operations and/or detailed
operations</li>
</ul>
</div>
<div class="section" id="usage">
<h1><a class="toc-backref" href="#toc-entry-2">Usage</a></h1>
<ol class="arabic simple">
<ul class="simple">
<li>Go to Sales &gt; Product &gt; Products and edit/create one</li>
<li>Set Product Type as Storable Product</li>
<li>Set a ‘Sales Price’</li>
<li>Go to Purchase &gt; Orders &gt; Requests for Quotation</li>
<li>Create new RQ with the previous product in the order lines</li>
<li>Confirm the Purchase Order</li>
<li>Now you have a new button called ‘Receive Products’ &gt; Press it</li>
<li>Add optional column ‘Purchase Price’ in operations and or detailed
operations</li>
<li>You can change the price of the purchase order line from here</li>
<li>Go to Inventory &gt; Operations &gt; Batch Transfers</li>
<li>Select or create a batch transfer with picking type Receptions</li>
<li>Add optional column ‘Purchase Price’ in operations and or detailed
operations</li>
</ol>
</ul>
</div>
<div class="section" id="bug-tracker">
<h1><a class="toc-backref" href="#toc-entry-3">Bug Tracker</a></h1>
Expand Down
52 changes: 0 additions & 52 deletions stock_move_purchase_price_update/views/stock_move_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -59,56 +59,4 @@
</field>
</record>

<!-- This view is used in picking batch operations -->
<record id="view_picking_move_tree" model="ir.ui.view">
<field name="model">stock.move</field>
<field name="inherit_id" ref="stock.view_picking_move_tree" />
<field name="arch" type="xml">
<xpath expr="//field[@name='product_uom']" position="after">
<field
name="purchase_line_id"
invisible="1"
groups="purchase.group_purchase_user"
/>
<field
name="is_purchase_price_editable"
invisible="1"
groups="purchase.group_purchase_user"
/>
<field
name="purchase_price_unit"
optional="hide"
attrs="{'column_invisible': [('parent.picking_type_code', '!=', 'incoming')], 'invisible': [('purchase_line_id', '=', False)], 'readonly': [('is_purchase_price_editable', '=', False)]}"
groups="purchase.group_purchase_user"
/>
</xpath>
</field>
</record>

<!-- This view is used in picking batch detailed operations -->
<record id="view_move_line_tree" model="ir.ui.view">
<field name="model">stock.move.line</field>
<field name="inherit_id" ref="stock_picking_batch.view_move_line_tree" />
<field name="arch" type="xml">
<xpath expr="//field[@name='product_uom_id']" position="after">
<field
name="purchase_line_id"
invisible="1"
groups="purchase.group_purchase_user"
/>
<field
name="is_purchase_price_editable"
invisible="1"
groups="purchase.group_purchase_user"
/>
<field
name="purchase_price_unit"
optional="hide"
attrs="{'column_invisible': [('parent.picking_type_code', '!=', 'incoming')], 'invisible': [('purchase_line_id', '=', False)], 'readonly': [('is_purchase_price_editable', '=', False)]}"
groups="purchase.group_purchase_user"
/>
</xpath>
</field>
</record>

</odoo>
106 changes: 106 additions & 0 deletions stock_picking_batch_purchase_price_update/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
=========================================
Stock Picking Batch Purchase Price Update
=========================================

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

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

Allow update purchase price from incoming picking operations, picking
detailed operations and picking batch detailed operations if the
purchase order is not invoiced.

**Table of contents**

.. contents::
:local:

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

- Go to 'Inventory > Configuration > Operations' Types
- Select Reception operation
- Enable 'Show Detailed Operations' option.
- Go to picking batch with picking type Reception
- Add optional column 'Purchase price' in operations and/or detailed
operations

Usage
=====

1. Go to Inventory > Operations > Batch Transfers
2. Select or create a batch transfer with picking type Receptions
3. Add optional column 'Purchase Price' in operations and or detailed
operations

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

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

* Tecnativa

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

- `Tecnativa <https://www.tecnativa.com>`__:

- Carlos Dauden

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

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

|maintainer-carlosdauden|

This module is part of the `OCA/purchase-workflow <https://github.com/OCA/purchase-workflow/tree/15.0/stock_picking_batch_purchase_price_update>`_ 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 stock_picking_batch_purchase_price_update/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
22 changes: 22 additions & 0 deletions stock_picking_batch_purchase_price_update/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Copyright 2024 Tecnativa - Carlos Dauden
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Stock Picking Batch Purchase Price Update",
"summary": "Allow update purchase price from incoming picking batch operations",
"version": "15.0.1.0.0",
"development_status": "Beta",
"category": "stock",
"website": "https://github.com/OCA/purchase-workflow",
"author": "Tecnativa, Odoo Community Association (OCA)",
"maintainers": ["carlosdauden"],
"license": "AGPL-3",
"application": False,
"installable": True,
"depends": [
"stock_move_purchase_price_update",
"stock_picking_batch",
],
"data": [
"views/stock_move_views.xml",
],
}
5 changes: 5 additions & 0 deletions stock_picking_batch_purchase_price_update/readme/CONFIGURE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
- Go to 'Inventory \> Configuration \> Operations' Types
- Select Reception operation
- Enable 'Show Detailed Operations' option.
- Go to picking batch with picking type Reception
- Add optional column 'Purchase price' in operations and/or detailed operations
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- [Tecnativa](https://www.tecnativa.com):
- Carlos Dauden
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Allow update purchase price from incoming picking operations, picking detailed
operations and picking batch detailed operations if the purchase order is not invoiced.
3 changes: 3 additions & 0 deletions stock_picking_batch_purchase_price_update/readme/USAGE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
1. Go to Inventory \> Operations \> Batch Transfers
2. Select or create a batch transfer with picking type Receptions
3. Add optional column 'Purchase Price' in operations and or detailed operations
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 21c173d

Please sign in to comment.