TIP: You can type at any time to perform a new search.
Philippines - Discount Privileges on Invoice
l10n_ph_invoice · odoo/odoo
Security findings
- Repository
- odoo/odoo · module folder
- Module version
- 0.1.0
- Category
- Accounting/Localizations
- Folder size
- 0.14 MB
- License
- LGPL-3
- Application
- No
- Auto-installable
- No
- Website
- https://www.odoo.com/documentation/latest/applications/finance/fiscal_localizations/philippines.html
- Last tracking update
- 2026-09-28 18:31:15
- Authors
- Odoo S.A.
- Maintainers
- Odoo S.A.
- Committers
- Odoo Translation Bot, Krzysztof Magusiak (krma), Nisarg (nipl), Arnav Varshney
Code Analysis
Views touched (4)
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
view_l10n_ph_discount_privilege_form |
l10n_ph.discount.privilege.form | l10n_ph.discount.privilege | form | New |
view_l10n_ph_discount_privilege_tree |
l10n_ph.discount.privilege.list | l10n_ph.discount.privilege | list | New |
view_l10n_ph_discount_privilege_wizard_form |
l10n_ph.discount.privilege.wizard.form | l10n_ph.discount.privilege.wizard | form | New |
view_move_form_l10n_ph_discount_privilege_button |
account.move.form.l10n_ph.discount_privilege | account.move | form | Inherits account.view_move_form |
HTTP endpoints (0)
No HTTP endpoints found for this module.
Models touched (7)
New fields (0)
No new fields.
Public methods (0)No public methods.
New fields (1)
-
l10n_ph_has_discount_privilegeBooleancompute='_compute_l10n_ph_has_discount_privilege'
-
action_open_discount_privilege_wizard(self)
New fields (1)
-
l10n_ph_original_tax_idsMany2manyrelation='account_move_line_l10n_ph_original_tax_rel'
No public methods.
New fields (8)
-
account_idMany2one → account.accountcheck_company=Truerequired=Truestring='Account' args: 'account.account' -
activeBooleandefault=True args: 'Active' -
applied_to_category_idsMany2many → product.categoryhelp='Product categories the privilege applies to. If a parent category is selected, all of its child categories are also considered. Leave empty to apply the privilege to all products.'string='Applies To' args: 'product.category' -
company_idMany2one → res.companydefault=<expr>required=True args: 'res.company' -
discount_amountFloatdigits='Discount'required=Truestring='Discount Amount' -
discount_typeSelectiondefault='pwd'required=Trueselection=[('pwd', 'PWD Discount'), ('sc', 'Senior Citizen Discount'), ('special', 'Special Discount')]string='Type' -
fiscal_position_idMany2one → account.fiscal.positioncheck_company=Truecomodel_name='account.fiscal.position'help='Fiscal position mapping the taxes of the invoice lines to the SC/PWD VAT-exempt taxes when the privilege is applied. The original taxes are restored when the privilege is removed. Leave empty to apply the privilege without changing the taxes.'string='Fiscal Position' -
nameCharrequired=Truestring='Discount Name'
No public methods.
New fields (7)
-
currency_idMany2one → res.currencystring='Currency' args: 'res.currency' -
l10n_ph_discount_privilege_idMany2one → l10n_ph.discount.privilegecheck_company=Trueondelete='restrict'readonly=Truestring='Discount Privilege' args: 'l10n_ph.discount.privilege' -
l10n_ph_original_discountFloatreadonly=Truestring='Original Discount (pre-privilege)' -
l10n_ph_original_price_unitFloatdigits='Product Price'store=Truestring='Original Price Unit (pre-privilege)' -
l10n_ph_original_tax_idsMany2many → account.taxstore=Truestring='Original Taxes (pre-privilege)' args: 'account.tax' -
l10n_ph_regular_discount_amountMonetarycompute='_compute_l10n_ph_discount_amounts'currency_field='currency_id'readonly=Truestring='Regular Disc. Amount' -
l10n_ph_special_discount_amountMonetarycompute='_compute_l10n_ph_discount_amounts'currency_field='currency_id'readonly=Truestring='Special Disc. Amount'
No public methods.
New fields (12)
-
apply_onSelectiondefault='all'required=Trueselection=[('all', 'All Order Lines'), ('product_category', 'Product Categories'), ('product', 'Products')]string='Apply On' -
available_category_idsMany2many → product.categorycompute='_compute_available_filters' args: 'product.category' -
available_product_idsMany2many → product.productcompute='_compute_available_filters'relation='l10n_ph_discount_privilege_wizard_available_product_rel' args: 'product.product' -
category_idsMany2many → product.categorystring='Product Categories' args: 'product.category' -
company_idMany2one → res.companycomodel_name='res.company'compute='_compute_l10n_ph_document_company_currency'readonly=True -
currency_idMany2one → res.currencycomodel_name='res.currency'compute='_compute_l10n_ph_document_company_currency'readonly=True -
has_applied_privilegesBooleancompute='_compute_has_applied_privileges' -
line_idsOne2many → l10n_ph.discount.privilege.wizard.linestring='Lines' args: 'l10n_ph.discount.privilege.wizard.line', 'wizard_id' -
move_idMany2one → account.moveargs: 'account.move' -
privilege_idMany2one → l10n_ph.discount.privilegecheck_company=Truestring='Privilege Applied' args: 'l10n_ph.discount.privilege' -
product_idsMany2many → product.productrelation='l10n_ph_discount_privilege_wizard_product_rel'string='Products' args: 'product.product' -
scope_category_idsMany2many → product.categorycompute='_compute_scope_category_ids' args: 'product.category'
-
action_confirm(self)Apply the selected privilege to the invoice. Writes the privilege on each matching line, then applies the fiscal-position tax mapping, price-unit adaptation, and statutory discount in a single write so the FP takes effect without waiting for an @api.depends recomputation. Lines marked for removal get their privilege restored instead. -
action_remove_all(self) -
create(self, vals_list)@api.model_create_multiAutopopulate line_ids from the invoice, excluding discount-allocation lines (which are handled by other modules and should not receive privileges).
New fields (10)
-
category_idMany2one → product.categorycompute='_compute_category_id'string='Product Category' args: 'product.category' -
currency_idMany2onerelated='wizard_id.currency_id' -
discountFloatcompute='_compute_preview_fields'digits='Discount'string='Discount Applied (%)' -
discount_amountMonetarycompute='_compute_preview_fields'currency_field='currency_id'string='Discount Amount' -
has_applied_discount_privilegeBooleancompute='_compute_preview_fields' -
has_discount_privilegeBooleancompute='_compute_preview_fields' -
invoice_line_idMany2one → account.move.lineargs: 'account.move.line' -
nameTextcompute='_compute_name'string='Product' -
remove_discount_privilegeBooleanhelp='When confirmed, the privilege is removed from the source line and its original price, taxes and discount are restored.'string='Remove Discount Privilege' -
wizard_idMany2one → l10n_ph.discount.privilege.wizardondelete='cascade'required=True args: 'l10n_ph.discount.privilege.wizard'
-
action_remove_line_discount(self)Mark the line for privilege removal. The actual removal is only performed on action_confirm, so cancelling the wizard leaves the invoice untouched.