Repository
OCA/purchase-workflow · module folder · Try on Runboat
Module version
1.0.2
Category
Purchases
Folder size
0.27 MB
License
AGPL-3
Application
No
Auto-installable
No
Website
https://github.com/OCA/purchase-workflow
Last tracking update
2026-08-07 09:06:27
Authors
ACSONE SA/NV, Odoo Community Association (OCA), ForgeFlow
Maintainers
ACSONE SA/NV, Odoo Community Association (OCA), ForgeFlow
Committers
JordiMForgeFlow, Quoc - Pham Ngoc, Weblate, OCA-git-bot, oca-ci
Odoo dependencies
Python dependencies
None
System dependencies
None
Required by
None
Description
This module extends the functionality of purchases adding a new state
*Approved* in purchase orders before the *Purchase Order* state.
Additionally add the possibility to set back to draft a purchase order
in all the states previous to *Purchase Order*. From a user point of
view, this change introduces a two-step validation process of the
purchase order.

In this new *Approved* state:

- You cannot modify the purchase order.
- However, you can go back to draft and pass through the workflow again.
- The incoming shipments are not created. You can create them by
  clicking the *Convert to Purchase Order* button, also moving to state
  *Purchase Order*.

The new state diagram is depicted below:

![New states diagram](https://raw.githubusercontent.com/OCA/purchase-workflow/12.0/purchase_order_approved/static/description/schema.png)

Code Analysis

Views touched (5)
XML IDNameModelTypeStatus
purchase_order_form purchase.order.form - purchase_order_approved purchase.order form Inherits purchase.purchase_order_form
report_purchaseorder_document report_purchaseorder_document ir.ui.view qweb Inherits purchase.report_purchaseorder_document
res_partner_form_view res.partner.form (in purchase_order_approved) res.partner form Inherits base.view_partner_form
view_purchase_configuration res.config.settings.view.form.inherit.purchase - purchase_order_approved res.config.settings form Inherits purchase_stock.res_config_settings_view_form_purchase
view_purchase_order_filter request.quotation.select - purchase_order_approved purchase.order Inherits purchase.view_purchase_order_filter
HTTP endpoints (0)

No HTTP endpoints found for this module.

Models touched (4)

New fields (1)
  • state Selection
    selection_add=[('approved', 'Approved'), ('purchase')]
Public methods (2)
  • button_approve(self, force=False)
  • button_release(self)

New fields (1)
  • purchase_approve_active Boolean
    help="Adds an extra state in purchase orders previous to 'Purchase Order'. After confirming and approving a purchase order it will go to state 'Approved'. In this state the incoming shipments are not created yet and you still can go back to draft. You can release the creation of the incoming shipments moving the purchase order to state 'Purchase Order'." string="Use State 'Approved' in Purchase Orders"
Public methods (0)

No public methods.

New fields (1)
  • purchase_approve_active Boolean
    readonly=False related='company_id.purchase_approve_active' string="Use 'Approved' Stage"
Public methods (0)

No public methods.

New fields (1)
  • purchase_requires_second_approval Selection
    copy=False default='based_on_company' selection=[('never', 'Never'), ('based_on_company', 'Based on company policy'), ('always', 'Always')]
Public methods (0)

No public methods.

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…