Sale Global Discount
sale_global_discount · OCA/sale-workflow
Health
75/100
good
-
Security25/25No findings
-
Activity20/25Last human commit 8 months ago
-
Required by5/250 modules depend on it
-
Maturity25/25In 9 Odoo series since 11.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.12 MB
Module directory on disk
Code analysis
1 migration note
3 models
2 views
0 HTTP endpoints
Migration considerations
- Raw `cr.execute()` INSERT/UPDATE/DELETE bypasses the ORM (no compute/constrains/tracking/mail): `update sale_order set amount_untaxed_before_global_discounts = amount_untaxed` - 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
Apply global financial discounts to sales that will be transmited to invoices and accounting.
Dependencies
Code analysis
Extracted from the source by best-effort static analysis (no code is executed); details may be incomplete.
Views touched 2
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
report_saleorder_document |
report_saleorder_document | ir.ui.view | qweb | Inherits sale.report_saleorder_document |
view_order_form |
sale.order | form | Inherits sale.view_order_form |
HTTP endpoints 0
No HTTP endpoints found for this module.
Models touched 3
New fields (0)
No new fields.
Public methods (0)No public methods.
New fields (5)
-
amount_global_discountMonetarycompute='_compute_amounts'compute_sudo=Truecurrency_field='currency_id'readonly=Truestore=Truestring='Total Global Discounts' -
amount_total_before_global_discountsMonetarycompute='_compute_amounts'compute_sudo=Truecurrency_field='currency_id'readonly=Truestore=Truestring='Amount Total Before Discounts' -
amount_untaxed_before_global_discountsMonetarycompute='_compute_amounts'compute_sudo=Truecurrency_field='currency_id'readonly=Truestore=Truestring='Amount Untaxed Before Discounts' -
global_discount_idsMany2many → global.discountcomodel_name='global.discount'compute='_compute_global_discount_ids'domain="[('discount_scope', '=', 'sale'), ('account_id', '!=', False), '|', ('company_id', '=', company_id), ('company_id', '=', False)]"readonly=Falsestore=Truestring='Sale Global Discounts' -
global_discount_ids_readonlyMany2manyreadonly=Truerelated='global_discount_ids'string='Sale Global Discounts (readonly)'
-
get_discounted_global(self, price=0, discounts=None)@api.model
New fields (0)
No new fields.
Public methods (0)No public methods.
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…