Purchase Order Triple Discount
purchase_triple_discount · OCA/purchase-workflow
Health
75/100
good
-
Security25/25No findings
-
Activity20/25Last human commit 7 months ago
-
Required by5/250 modules depend on it
-
Maturity25/25In 11 Odoo series since 8.0
Heuristic over the facts below, not an audit · How it's computed
Required by
0
Modules depending on it
External deps
0 pip · 0 bin
Python packages / system binaries
License
AGPL-3
No conflicts with its dependencies
Folder size
0.11 MB
Module directory on disk
Code analysis
1 migration note
5 models
4 views
0 HTTP endpoints
Migration considerations
- Raw `cr.execute()` INSERT/UPDATE/DELETE bypasses the ORM (no compute/constrains/tracking/mail): `UPDATE purchase_order_line upd SET discount1=pol.discount FROM (SELECT * FROM purchase_order_line WHERE discount IS NOT NULL AND discount1 IS NULL AND discount2 IS NULL AND discount3 IS NULL) as pol WHERE upd.id = pol.id` - re-check the table/column names still match after upgrading. (2 occurrences in this file) migration-raw-sql-write · source
Migration review checklist, not a compatibility verdict. "Migrating to X.0" applies once you upgrade to that version; "Since X.0" means this version already ignores or rejects that code. Methodology
Description
This module allows to have three successive discounts on every purchase order line.
Dependencies
Code analysis
Extracted from the source by best-effort static analysis (no code is executed); details may be incomplete.
Views touched 4
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
product_supplierinfo_form_view |
product.supplierinfo | form | Inherits product.product_supplierinfo_form_view | |
product_supplierinfo_tree_view |
product.supplierinfo | tree | Inherits product.product_supplierinfo_tree_view | |
purchase_order_triple_discount_form_view |
purchase.order.triple.discount.form | purchase.order | form | Inherits purchase.purchase_order_form |
view_partner_property_form_inherit_triple_discount |
res.partner | form | Inherits purchase.view_partner_property_form |
HTTP endpoints 0
No HTTP endpoints found for this module.
Models touched 5
New fields (0)
No new fields.
Public methods (1)-
default_get(self, fields_list)
New fields (0)
No new fields.
Public methods (0)No public methods.
New fields (0)
No new fields.
Public methods (0)No public methods.
New fields (4)
-
discountFloatcompute='_compute_discount'store=True -
discount1Floatdigits='Discount'readonly=Falsestring='Disc. 1 (%)' -
discount2Floatdigits='Discount'readonly=Falsestring='Disc. 2 (%)' -
discount3Floatdigits='Discount'readonly=Falsestring='Disc. 3 (%)'
No public methods.
New fields (3)
-
default_supplierinfo_discount1Floatdigits='Discount'help='This value will be used as the default one, for each new supplierinfo line depending on that supplier.'string='Default Supplier Discount 1 (%)' -
default_supplierinfo_discount2Floatdigits='Discount'help='This value will be used as the default one, for each new supplierinfo line depending on that supplier.'string='Default Supplier Discount 2 (%)' -
default_supplierinfo_discount3Floatdigits='Discount'help='This value will be used as the default one, for each new supplierinfo line depending on that supplier.'string='Default Supplier Discount 3 (%)'
No public methods.
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…