Skip to content
Health
80/100
good
  • Security25/25
    No findings
  • Activity25/25
    Last human commit 1 month ago
  • Required by5/25
    0 modules depend on it
  • Maturity25/25
    In 8 Odoo series since 12.0

Heuristic over the facts below, not an audit · How it's computed

Security findings
Grave / minor (static analysis)
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.15 MB
Module directory on disk
Code analysis 0 migration notes 7 models 8 views 0 HTTP endpoints

Description

The standard Expenses application reimburses employees after they have paid an expense. This module also allows companies to give employees an advance and clear it against their expenses later.

There are 3 advance clearing scenarios:

  • When clearing amount = advance amount, no other operation is required.
  • When clearing amount > advance amount, company will pay the extra to employee.
  • When clearing amount < advance amount, employee will return the remain to company.

Dependencies

Odoo dependencies
Python dependencies
None
System dependencies
None
Required by
None

Code analysis

Extracted from the source by best-effort static analysis (no code is executed); details may be incomplete.

Views touched 8

XML IDNameModelTypeStatus
hr_expense_post_wizard_view Post Expenses hr.expense.post.wizard Inherits hr_expense.hr_expense_post_wizard_view
hr_expense_view_expenses_analysis_tree hr.expense.list hr.expense list Inherits hr_expense.hr_expense_view_expenses_analysis_tree
hr_expense_view_form hr.expense.view.form hr.expense form Inherits hr_expense.hr_expense_view_form
hr_expense_view_search hr.expense.view.search hr.expense search Inherits hr_expense.hr_expense_view_search
res_config_settings_view_form res.config.settings.view.form.inherit.hr.expense.advance.clearing res.config.settings form Inherits hr_expense.res_config_settings_view_form
view_account_payment_form account.payment.form account.payment form Inherits account.view_account_payment_form
view_account_payment_search account.payment.search account.payment search Inherits account.view_account_payment_search
view_employee_form hr.employee.form hr.employee form Inherits hr.view_employee_form

HTTP endpoints 0

No HTTP endpoints found for this module.

Models touched 7

New fields (1)
  • advance_id Many2one → hr.expense
    comodel_name='hr.expense' readonly=True
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (2)
  • advance_count Integer
    compute='_compute_advance_count' help='Count advances' string='# of Advance'
  • advance_ids One2many → hr.expense
    comodel_name='hr.expense' domain=[('advance', '=', True)] inverse_name='employee_id' readonly=True
Public methods (1)
  • action_open_advance_clearing(self)

New fields (10)
  • advance Boolean
  • advance_id Many2one → hr.expense
    comodel_name='hr.expense' help='Show remaining advance of this employee' string='Clear Advance'
  • advance_residual Monetary
    currency_field='company_currency_id' help='Remaining amount of the selected advance.' related='advance_id.clearing_residual' string='Advance Remaining'
  • amount_to_pay Monetary
    compute='_compute_amount_to_pay' currency_field='company_currency_id' help='Remaining amount to pay when the clearing exceeds the advance.' string='Amount to Pay'
  • clearing_count Integer
    compute='_compute_clearing_count'
  • clearing_ids One2many → hr.expense
    comodel_name='hr.expense' help='Show reference clearing on advance' inverse_name='advance_id' readonly=True
  • clearing_product_id Many2one → product.product
    comodel_name='product.product' domain="[('can_be_expensed', '=', True),'|', ('company_id', '=', False), ('company_id', '=', company_id)]" help='Optional: On the clear advance, the clearing product will create default product line.' ondelete='restrict' tracking=True
  • clearing_residual Monetary
    compute='_compute_clearing_residual' currency_field='company_currency_id' help='Amount to clear of this advance in company currency' store=True string='Amount to clear'
  • payment_return_ids One2many → account.payment
    comodel_name='account.payment' help='Show reference return advance on advance' inverse_name='advance_id' readonly=True
  • return_count Integer
    compute='_compute_return_count' compute_sudo=True
Public methods (6)
  • action_open_clearings(self)
  • action_open_payment_return(self)
  • action_pay(self)
  • action_return_advance(self)
  • onchange_advance(self)
    @api.onchange('advance')
  • open_clear_advance(self)

New fields (2)
  • clearing_journal_id Many2one → account.journal
    check_company=True comodel_name='account.journal' default=<expr>
  • is_advance_clearing Boolean
    default=<expr>
Public methods (1)
  • action_post_entry(self)

New fields (1)
  • clearing_journal_id Many2one → account.journal
    check_company=True comodel_name='account.journal' domain="[('type', '=', 'general')]" help='Default Miscellaneous journal used when posting the advance clearing journal entry.' string='Default Clearing Journal'
Public methods (0)

No public methods.

New fields (1)
  • clearing_journal_id Many2one → account.journal
    check_company=True comodel_name='account.journal' domain="[('type', '=', 'general')]" readonly=False related='company_id.clearing_journal_id'
Public methods (0)

No public methods.

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…