TIP: You can type at any time to perform a new search.

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
Odoo dependencies
Python dependencies
None
System dependencies
None
Required by
l10n_ph_sale
Description

Code Analysis info_outline

Views touched (4)
XML IDNameModelTypeStatus
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_privilege Boolean
    compute='_compute_l10n_ph_has_discount_privilege'
Public methods (1)
  • action_open_discount_privilege_wizard(self)

New fields (1)
  • l10n_ph_original_tax_ids Many2many
    relation='account_move_line_l10n_ph_original_tax_rel'
Public methods (0)

No public methods.

New fields (8)
  • account_id Many2one → account.account
    check_company=True required=True string='Account' args: 'account.account'
  • active Boolean
    default=True args: 'Active'
  • applied_to_category_ids Many2many → product.category
    help='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_id Many2one → res.company
    default=<expr> required=True args: 'res.company'
  • discount_amount Float
    digits='Discount' required=True string='Discount Amount'
  • discount_type Selection
    default='pwd' required=True selection=[('pwd', 'PWD Discount'), ('sc', 'Senior Citizen Discount'), ('special', 'Special Discount')] string='Type'
  • fiscal_position_id Many2one → account.fiscal.position
    check_company=True comodel_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'
  • name Char
    required=True string='Discount Name'
Public methods (0)

No public methods.

New fields (7)
  • currency_id Many2one → res.currency
    string='Currency' args: 'res.currency'
  • l10n_ph_discount_privilege_id Many2one → l10n_ph.discount.privilege
    check_company=True ondelete='restrict' readonly=True string='Discount Privilege' args: 'l10n_ph.discount.privilege'
  • l10n_ph_original_discount Float
    readonly=True string='Original Discount (pre-privilege)'
  • l10n_ph_original_price_unit Float
    digits='Product Price' store=True string='Original Price Unit (pre-privilege)'
  • l10n_ph_original_tax_ids Many2many → account.tax
    store=True string='Original Taxes (pre-privilege)' args: 'account.tax'
  • l10n_ph_regular_discount_amount Monetary
    compute='_compute_l10n_ph_discount_amounts' currency_field='currency_id' readonly=True string='Regular Disc. Amount'
  • l10n_ph_special_discount_amount Monetary
    compute='_compute_l10n_ph_discount_amounts' currency_field='currency_id' readonly=True string='Special Disc. Amount'
Public methods (0)

No public methods.

New fields (12)
  • apply_on Selection
    default='all' required=True selection=[('all', 'All Order Lines'), ('product_category', 'Product Categories'), ('product', 'Products')] string='Apply On'
  • available_category_ids Many2many → product.category
    compute='_compute_available_filters' args: 'product.category'
  • available_product_ids Many2many → product.product
    compute='_compute_available_filters' relation='l10n_ph_discount_privilege_wizard_available_product_rel' args: 'product.product'
  • category_ids Many2many → product.category
    string='Product Categories' args: 'product.category'
  • company_id Many2one → res.company
    comodel_name='res.company' compute='_compute_l10n_ph_document_company_currency' readonly=True
  • currency_id Many2one → res.currency
    comodel_name='res.currency' compute='_compute_l10n_ph_document_company_currency' readonly=True
  • has_applied_privileges Boolean
    compute='_compute_has_applied_privileges'
  • line_ids One2many → l10n_ph.discount.privilege.wizard.line
    string='Lines' args: 'l10n_ph.discount.privilege.wizard.line', 'wizard_id'
  • move_id Many2one → account.move
    args: 'account.move'
  • privilege_id Many2one → l10n_ph.discount.privilege
    check_company=True string='Privilege Applied' args: 'l10n_ph.discount.privilege'
  • product_ids Many2many → product.product
    relation='l10n_ph_discount_privilege_wizard_product_rel' string='Products' args: 'product.product'
  • scope_category_ids Many2many → product.category
    compute='_compute_scope_category_ids' args: 'product.category'
Public methods (3)
  • 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_multi
    Autopopulate line_ids from the invoice, excluding discount-allocation lines (which are handled by other modules and should not receive privileges).

New fields (10)
  • category_id Many2one → product.category
    compute='_compute_category_id' string='Product Category' args: 'product.category'
  • currency_id Many2one
    related='wizard_id.currency_id'
  • discount Float
    compute='_compute_preview_fields' digits='Discount' string='Discount Applied (%)'
  • discount_amount Monetary
    compute='_compute_preview_fields' currency_field='currency_id' string='Discount Amount'
  • has_applied_discount_privilege Boolean
    compute='_compute_preview_fields'
  • has_discount_privilege Boolean
    compute='_compute_preview_fields'
  • invoice_line_id Many2one → account.move.line
    args: 'account.move.line'
  • name Text
    compute='_compute_name' string='Product'
  • remove_discount_privilege Boolean
    help='When confirmed, the privilege is removed from the source line and its original price, taxes and discount are restored.' string='Remove Discount Privilege'
  • wizard_id Many2one → l10n_ph.discount.privilege.wizard
    ondelete='cascade' required=True args: 'l10n_ph.discount.privilege.wizard'
Public methods (1)
  • 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.