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_compute_order/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
=======================
Computed Purchase Order
=======================

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

.. |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/18.0/purchase_compute_order
: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-18-0/purchase-workflow-18-0-purchase_compute_order
: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=18.0
:alt: Try me on Runboat

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

**Provide tools to help a purchaser during the purchase process.**

- Go to **Purchase > Purchase > Computed Purchase Order**, Create a new
Compute Purchase Order (CPO)

- Select a Supplier

- Check the boxes to tell if you want to take into account the virtual
stock or the draft sales/purchases.

- Use the button 'Get products and stocks' to import the list of
products you can purchase to this supplier (ie: products that have a
product_supplierinfo for this partner). It especially calculates for
each product:

- the quantity you have or will have;
- the average_consumption, based on the stock moves created during
last 365 days;
- the theoretical duration of the stock, based on the precedent
figures.

- Unlink the products you don't want to buy anymore to this supplier
(this only deletes the product_supplierinfo)

- Add new products you want to buy and link them (this creates a
product_supplierinfo)

- Modify any information about the products: supplier product_code,
supplier product_name, purchase price, package quantity, purchase UoM.

- Modify the calculated consumption if you think you'll sell more or
less in the future.

- Add a manual stock quantity (positive if you will receive products
that are not registered at all in Odoo, negative if you have not
registered sales)

- Click the "Update Products" button to register the changes you've made
into the product supplierinfo.

- Check the Purchase Target. It's defined on the Partner form, but you
still can change it on each CPO.

- Click the button 'Compute Purchase Quantities' to calculate the
quantities you should purchase. It will compute a purchase order
fitting the purchase objective you set, trying to optimize the stock
duration of all products.

- Click the "Make Purchase Order" button to convert the calculation into
a real purchase order.

Possible Improvements:

- offer more options to calculate the average consumption;

**Table of contents**

.. contents::
:local:

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:%20purchase_compute_order%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
-------

* GRAP
* Druidoo

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

- `Trobz <https://www.trobz.com>`__

- Phan Hong Phuc <[email protected]>

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/purchase-workflow <https://github.com/OCA/purchase-workflow/tree/18.0/purchase_compute_order>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
28 changes: 28 additions & 0 deletions purchase_compute_order/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
##############################################################################
#
# Purchase - Computed Purchase Order Module for Odoo
# Copyright (C) 2019-Today: La Louve (<https://cooplalouve.fr>)
# Copyright (C) 2019-Today: Druidoo (<https://www.druidoo.io>)
# Copyright (C) 2013-Today GRAP (http://www.grap.coop)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
# @author Druidoo
# @author Julien WESTE
# @author Sylvain LE GAL (https://twitter.com/legalsylvain)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################

from . import models
from . import wizard
52 changes: 52 additions & 0 deletions purchase_compute_order/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
##############################################################################
#
# Purchase - Computed Purchase Order Module for Odoo
# Copyright (C) 2019-Today: La Louve (<https://cooplalouve.fr>)
# Copyright (C) 2019-Today: Druidoo (<https://www.druidoo.io>)
# Copyright (C) 2013-Today GRAP (http://www.grap.coop)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
# @author Druidoo
# @author Julien WESTE
# @author Sylvain LE GAL (https://twitter.com/legalsylvain)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################

{
"name": "Computed Purchase Order",
"version": "18.0.1.0.1",
"category": "Purchase",
"author": "GRAP, Druidoo, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/purchase-workflow",
"license": "AGPL-3",
"depends": [
"purchase",
"product_average_consumption",
"purchase_package_qty",
"stock",
],
"data": [
"security/purchase_compute_order_security.xml",
"security/ir.model.access.csv",
"data/ir_sequence.xml",
"wizard/update_product_wizard_view.xml",
"views/computed_purchase_order_view.xml",
"views/computed_purchase_order_line_view.xml",
"views/res_config_view.xml",
"views/purchase_order_line_view.xml",
"views/res_partner_view.xml",
"views/product_supplierinfo_view.xml",
],
}
13 changes: 13 additions & 0 deletions purchase_compute_order/data/ir_sequence.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8" ?>
<!-- ********************************************************************** -->
<!-- See __manifest__.py file for Copyright and Licence Informations. -->
<!-- ********************************************************************** -->
<odoo noupdate="1">
<!-- Sequences for computed.purchase.order -->
<record id="ir_sequence_internal_use" model="ir.sequence">
<field name="name">Computed Purchase Order</field>
<field name="code">computed.purchase.order</field>
<field name="prefix">CPO/%(year)s/</field>
<field name="padding">5</field>
</record>
</odoo>
Loading
Loading