Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[17.0][MIG] purchase_blanket_order #2379

Merged
merged 72 commits into from
Sep 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
bab2469
[11.0][ADD] Add the module purchase_blanket_order
AdriaGForgeFlow Nov 30, 2018
b363374
Add schedule date to blanket order lines
AdriaGForgeFlow Jan 28, 2019
91a713b
[ADD] Blanket Order Lines View and ability to create PO from BO lines
AdriaGForgeFlow Feb 8, 2019
5c689c1
add cancel button
AdriaGForgeFlow Feb 8, 2019
94008ab
update README
AdriaGForgeFlow Feb 26, 2019
1726266
add taxes and total price to blanket order and extend tests
AdriaGForgeFlow Feb 28, 2019
dd8542b
add taxes and unit price from blanket order
JordiBForgeFlow Mar 1, 2019
bf06a77
[UPD] Update purchase_blanket_order.pot
oca-travis Jul 16, 2019
038f7d0
[UPD] README.rst
OCA-git-bot Jul 16, 2019
a2df2b9
[ADD] icon.png
OCA-git-bot Jul 16, 2019
1a233d2
[UPD] README.rst
OCA-git-bot Jul 29, 2019
1f75a97
[IMP] purchase_blanket_order: black, isort
HviorForgeFlow Mar 27, 2020
9a2f81f
[MIG] purchase_blanket_order: Migration to 13.0
HviorForgeFlow Mar 27, 2020
8aafae7
[UPD] Update purchase_blanket_order.pot
oca-travis Oct 1, 2020
983ab86
[UPD] README.rst
OCA-git-bot Oct 1, 2020
9e7a55d
[UPD] Update purchase_blanket_order.pot
oca-travis Oct 5, 2020
7e4d6a4
[IMP] purchase_blanket_order: black, isort, prettier
ChrisOForgeFlow Apr 28, 2022
0aab304
[14.0][MIG] purchase_blanket_order
ChrisOForgeFlow Apr 28, 2022
f6bbc77
[FIX] purchase_blanket_order: Use purchasing UoM.
LoisRForgeFlow May 24, 2022
69323a5
[UPD] Update purchase_blanket_order.pot
oca-travis May 25, 2022
60cf33e
[UPD] README.rst
OCA-git-bot May 25, 2022
26286ec
[MIG] purchase_blanket_order: Migration to 15.0
LoisRForgeFlow May 26, 2022
4c55665
[UPD] Update purchase_blanket_order.pot
May 26, 2022
d32bf38
[UPD] README.rst
OCA-git-bot May 26, 2022
8ff857d
[IMP] purchase_blanket_order: Add partner_ref field + order blanket o…
victoralmau Jun 28, 2022
c9bc33e
[UPD] Update purchase_blanket_order.pot
Jul 1, 2022
9b14c56
purchase_blanket_order 15.0.1.1.0
OCA-git-bot Jul 1, 2022
b92b5d0
[FIX] purchase_blanket_order: Set name by sequence only if is necessary.
victoralmau Jun 30, 2022
ee6b684
[UPD] Update purchase_blanket_order.pot
Jul 1, 2022
80e4b64
purchase_blanket_order 15.0.1.1.1
OCA-git-bot Jul 1, 2022
82c002e
[FIX] purchase_blanket_order: multi company rules not migrated
LoisRForgeFlow Jul 8, 2022
2a72721
[IMP] purchase_blanket_order: change model descriptions to differenti…
LoisRForgeFlow Jul 8, 2022
18e5cc5
[UPD] Update purchase_blanket_order.pot
Jul 8, 2022
245ec88
purchase_blanket_order 15.0.1.1.2
OCA-git-bot Jul 8, 2022
6e3100f
[FIX] purchase_blanket_order: Don't compare with translatable string
pedrobaeza Jul 12, 2022
a501d25
[UPD] Update purchase_blanket_order.pot
Jul 13, 2022
571e8fb
[UPD] Update purchase_blanket_order.pot
Jul 17, 2022
da049e9
[FIX] purchase_blanket_order: Allow to modify lines in open state
victoralmau Sep 26, 2022
d04c62f
[FIX] purchase_blanket_order: Display total table in pdf report
victoralmau Sep 26, 2022
f444b3b
purchase_blanket_order 15.0.1.2.0
OCA-git-bot Sep 28, 2022
c613545
[FIX] purchase_blanket_order: Set force_save="1" to Order Lines to pr…
victoralmau Sep 29, 2022
27b2c7c
purchase_blanket_order 15.0.1.3.0
OCA-git-bot Sep 29, 2022
97b5265
[15.0][FIX] purchase_blanket_order: fix blanket order automatically s…
Nov 9, 2022
2c5b53a
[UPD] Update purchase_blanket_order.pot
Nov 10, 2022
54dff70
purchase_blanket_order 15.0.1.3.1
OCA-git-bot Nov 10, 2022
f7b0275
[UPD] README.rst
OCA-git-bot Sep 3, 2023
b7cfab6
[IMP] purchase_blanket_order: avoid overwrite context in views inherited
ThiagoMForgeFlow Oct 11, 2023
0c51990
[BOT] post-merge updates
OCA-git-bot Oct 23, 2023
7fd70a1
[UPD] Update purchase_blanket_order.pot
Oct 27, 2023
83c3cf7
[BOT] post-merge updates
OCA-git-bot Oct 28, 2023
6d2aad8
[MIG] purchase_blanket_order: Migration to 16.0
ThiagoMForgeFlow Jan 18, 2024
458d65b
[UPD] Update purchase_blanket_order.pot
Feb 5, 2024
d307120
[BOT] post-merge updates
OCA-git-bot Feb 5, 2024
9716a4b
Added translation using Weblate (Italian)
mymage Feb 8, 2024
2b75474
Added translation using Weblate (Spanish)
Ivorra78 Feb 11, 2024
02746b5
Translated using Weblate (Spanish)
Ivorra78 Feb 11, 2024
3b3c528
[UPD] Update purchase_blanket_order.pot
Mar 5, 2024
2cdd3c1
Update translation files
weblate Mar 5, 2024
bdc6f3e
Translated using Weblate (Italian)
mymage Mar 15, 2024
f2174cf
[IMP] purchase_blanket_order: link PBO when a PO is created and add e…
ThiagoMForgeFlow Jan 23, 2024
de87a01
[UPD] Update purchase_blanket_order.pot
Mar 19, 2024
f79b47f
Update translation files
weblate Mar 19, 2024
86f0211
Translated using Weblate (Italian)
mymage Mar 19, 2024
6117568
[IMP] purchase_blanket_order: show invoice information in bo form view
DavidJForgeFlow Apr 8, 2024
a635fd3
[UPD] Update purchase_blanket_order.pot
Apr 10, 2024
b6ed4cf
[BOT] post-merge updates
OCA-git-bot Apr 10, 2024
a89da25
Update translation files
weblate Apr 10, 2024
bb46a5b
Translated using Weblate (Italian)
mymage Apr 15, 2024
23b4c55
Translated using Weblate (Spanish)
Ivorra78 Apr 18, 2024
b374b92
[IMP] purchase_blanket_order: pre-commit stuff
ArnauCForgeFlow Jul 31, 2024
7dd1044
[MIG] purchase_blanket_order: Migration to 17.0
ArnauCForgeFlow Jul 31, 2024
961de26
[BUILD] Copier update + mark purchase_order_qty_change_no_recompute a…
ArnauCForgeFlow Sep 6, 2024
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
5 changes: 3 additions & 2 deletions .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Do NOT update manually; changes here will be overwritten by Copier
_commit: v1.21.1
_commit: v1.24
_src_path: gh:oca/oca-addons-repo-template
additional_ruff_rules: []
ci: GitHub
Expand All @@ -16,7 +16,8 @@ odoo_test_flavor: Both
odoo_version: 17.0
org_name: Odoo Community Association (OCA)
org_slug: OCA
rebel_module_groups: []
rebel_module_groups:
- purchase_order_qty_change_no_recompute
repo_description: 'TODO: add repo description.'
repo_name: purchase-workflow
repo_slug: purchase-workflow
Expand Down
2 changes: 1 addition & 1 deletion .eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ env:

# See https://github.com/OCA/odoo-community.org/issues/37#issuecomment-470686449
parserOptions:
ecmaVersion: 2019
ecmaVersion: 2022

overrides:
- files:
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,17 @@ jobs:
matrix:
include:
- container: ghcr.io/oca/oca-ci/py3.10-odoo17.0:latest
include: "purchase_order_qty_change_no_recompute"
name: test with Odoo
- container: ghcr.io/oca/oca-ci/py3.10-ocb17.0:latest
include: "purchase_order_qty_change_no_recompute"
name: test with OCB
makepot: "true"
- container: ghcr.io/oca/oca-ci/py3.10-odoo17.0:latest
exclude: "purchase_order_qty_change_no_recompute"
name: test with Odoo
- container: ghcr.io/oca/oca-ci/py3.10-ocb17.0:latest
exclude: "purchase_order_qty_change_no_recompute"
name: test with OCB
makepot: "true"
services:
Expand All @@ -49,6 +58,9 @@ jobs:
POSTGRES_DB: odoo
ports:
- 5432:5432
env:
INCLUDE: "${{ matrix.include }}"
EXCLUDE: "${{ matrix.exclude }}"
steps:
- uses: actions/checkout@v3
with:
Expand Down
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,15 @@ var/
*.egg
*.eggs

# Debian packages
*.deb

# Redhat packages
*.rpm

# MacOS packages
*.dmg

# Installer logs
pip-log.txt
pip-delete-this-directory.txt
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ repos:
hooks:
- id: whool-init
- repo: https://github.com/oca/maintainer-tools
rev: 9a170331575a265c092ee6b24b845ec508e8ef75
rev: d5fab7ee87fceee858a3d01048c78a548974d935
hooks:
# update the NOT INSTALLABLE ADDONS section above
- id: oca-update-pre-commit-excluded-addons
Expand Down
150 changes: 150 additions & 0 deletions purchase_blanket_order/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
=======================
Purchase Blanket Orders
=======================

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

.. |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/17.0/purchase_blanket_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-17-0/purchase-workflow-17-0-purchase_blanket_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=17.0
:alt: Try me on Runboat

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

A purchase blanket order is a pre-agreement to purchase a certain number
of quantities of products at a specific price. From a confirmed blanket
order, the users can create new purchase orders at such price, until the
blanket order expires due to reaching the validity date.

**Table of contents**

.. contents::
:local:

Usage
=====

A new menu in the Purchase area is created, allowing users to create new
blanket orders.

To create a new Purchase Blanket Order go to the purchase menu in the
Purchase section:

|Blanket Orders menu|

Hitting the button create will open the form view in which we can
introduce the following information:

- Vendor

- Payment Terms

- Ordering and Validity dates

- Order lines:

- Product
- Accorded price
- Original, Ordered, Invoiced, Received and Remaining quantities

- Terms and Conditions of the Blanket Order

|Blanket Orders form|

From the form, once the Blanket Order has been confirmed and its state
is open, the user can create a Purchase Order, check the Purchase Orders
associated to the Blanket Order and/or see the Blanket Order lines
associated to the BO.

|Actions that can be done from Blanket Order|

Hitting the button Create Purchase Order will open a wizard that will
ask for the amount of each product in the BO lines for which the
Purchase Order will be created.

|Create Purchase Order from Blanket Order|

Installing this module will add an additional menu which will show all
the blanket order lines currently defined in the system. From this list
the user can create customized Purchase Orders selecting the lines for
which the PO (or POs if the vendors are different) is (are) created.

|Blanket Order lines and actions|

In the Purchase Order form one field is added in the PO lines, the
Blanket Order line field. This field keeps track to which Blanket Order
line the PO line is associated. Upon adding a new product in a newly
created Purchase Order a blanket order line will be suggested depending
on the following factors:

- Closer Validity date
- Remaining quantity > Quantity introduced in the Purchase Order line

|New field added in Purchase Order Line|

.. |Blanket Orders menu| image:: https://raw.githubusercontent.com/purchase_blanket_order/static/description/BO_menu.png
.. |Blanket Orders form| image:: https://raw.githubusercontent.com/purchase_blanket_order/static/description/BO_form.png
.. |Actions that can be done from Blanket Order| image:: https://raw.githubusercontent.com/purchase_blanket_order/static/description/BO_actions.png
.. |Create Purchase Order from Blanket Order| image:: https://raw.githubusercontent.com/purchase_blanket_order/static/description/PO_from_BO.png
.. |Blanket Order lines and actions| image:: https://raw.githubusercontent.com/purchase_blanket_order/static/description/BO_lines.png
.. |New field added in Purchase Order Line| image:: https://raw.githubusercontent.com/purchase_blanket_order/static/description/PO_BOLine.png

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_blanket_order%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
-------

* ForgeFlow

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

- Adrià Gil Sorribes <[email protected]>
- Jordi Ballester Alomar <[email protected]>
- Héctor Villarreal <[email protected]>
- Lois Rilo <[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/17.0/purchase_blanket_order>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
4 changes: 4 additions & 0 deletions purchase_blanket_order/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from . import models
from . import wizard
28 changes: 28 additions & 0 deletions purchase_blanket_order/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Copyright 2019-22 ForgeFlow S.L. (https://www.forgeflow.com)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Purchase Blanket Orders",
"category": "Purchase",
"license": "AGPL-3",
"author": "ForgeFlow, Odoo Community Association (OCA)",
"version": "17.0.1.0.0",
"website": "https://github.com/OCA/purchase-workflow",
"summary": "Purchase Blanket Orders",
"depends": [
"purchase",
"base_view_inheritance_extension",
],
"data": [
"security/ir.model.access.csv",
"security/security.xml",
"data/sequence.xml",
"data/ir_cron.xml",
"wizard/create_purchase_orders.xml",
"views/purchase_config_settings.xml",
"views/purchase_blanket_order_views.xml",
"views/purchase_order_views.xml",
"report/templates.xml",
"report/report.xml",
],
"installable": True,
}
38 changes: 38 additions & 0 deletions purchase_blanket_order/data/ir_cron.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright (C) 2018 ForgeFlow S.L. (https://www.forgeflow.com)
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
<odoo noupdate="1">
<record
forcecreate="True"
id="expired_purchase_blanket_orders_cron"
model="ir.cron"
>
<field name="name">Expire Blanket Orders</field>
<field name="interval_number">1</field>
<field name="interval_type">days</field>
<field
name="nextcall"
eval="(DateTime.now() + relativedelta(hour=00, minute=1, second=0)).strftime('%Y-%m-%d %H:%M:%S')"
/>
<field name="numbercall">-1</field>
<field name="doall" eval="False" />
<field name="model_id" ref="model_purchase_blanket_order" />
<field name="state">code</field>
<field name="code">model.expire_orders()</field>
</record>

<record id="warnings_purchase_blanket_orders_cron" model="ir.cron">
<field name="name">Warnings Blanket Orders</field>
<field name="interval_number">1</field>
<field name="interval_type">days</field>
<field
name="nextcall"
eval="(DateTime.now() + relativedelta(hour=00, minute=1, second=0)).strftime('%Y-%m-%d %H:%M:%S')"
/>
<field name="numbercall">-1</field>
<field name="doall" eval="False" />
<field name="model_id" ref="model_purchase_blanket_order" />
<field name="state">code</field>
<field name="code">model.compute_warnings()</field>
</record>
</odoo>
11 changes: 11 additions & 0 deletions purchase_blanket_order/data/sequence.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo noupdate="1">
<!-- Sequences for purchase.blanket.order -->
<record id="seq_purchase_blanket_order" model="ir.sequence">
<field name="name">Purchase Blanket Order</field>
<field name="code">purchase.blanket.order</field>
<field name="prefix">PBO</field>
<field name="padding">3</field>
<field name="company_id" eval="False" />
</record>
</odoo>
Loading
Loading