TIP: You can type at any time to perform a new search.
Add hooks to the merge PO feature.
purchase_group_hooks · OCA/purchase-workflow
- Repository
- OCA/purchase-workflow · module folder · Try on Runboat
- Module version
- 0.1
- Category
- Purchase Management
- Folder size
- 0.02 MB
- License
- AGPL-3
- Application
- No
- Auto-installable
- No
- Website
- http://www.camptocamp.com/
- Last tracking update
- 2026-08-07 07:17:49
- Authors
- Camptocamp, Odoo Community Association (OCA)
- Maintainers
- Camptocamp
- Committers
- Pedro M. Baeza
- Odoo dependencies
- Python dependencies
- None
- System dependencies
- None
- Required by
- None
- Description
In the core OpenERP purchase module, there is a wizard to merge purchase orders. That feature is convenient, but as soon as a field is added to the purchase order, it does not work anymore and needs to be patched. The original implementation does not provide any hooks for extension, and modules can only reimplement a method completely. This required a lot of copy and paste, and worse, it breaks if two modules attempt to do that. Therefore, this module reimplements the feature, with the same basic result in the standard case. Hooks are provided for extra modules that add fields or change the logic.
Code Analysis ⓘ
Views touched (0)
No views found for this module.
HTTP endpoints (0)
No HTTP endpoints found for this module.
Models touched (1)
New fields (0)
No new fields.
Public methods (1)-
do_merge(self, cr, uid, input_order_ids, context=None)Merge Purchase Orders. This method replaces the original one in the purchase module because it did not provide any hooks for customization. Receive a list of order ids, and return a dictionary where each element is in the form: new_order_id: [old_order_1_id, old_order_2_id] New orders are created, and old orders are deleted.
Loading…
Loading…
Loading…