TIP: You can type at any time to perform a new search.
Employee Advance and Clearing
hr_expense_advance_clearing · OCA/hr-expense
- Repository
- OCA/hr-expense · module folder · Try on Runboat
- Module version
- 1.1.1
- Category
- Human Resources
- Folder size
- 0.16 MB
- License
- AGPL-3
- Application
- No
- Auto-installable
- No
- Website
- https://github.com/OCA/hr-expense
- Last tracking update
- 2026-08-07 08:42:58
- Authors
- Odoo Community Association (OCA), Ecosoft
- Maintainers
- Odoo Community Association (OCA), Ecosoft
- Committers
- Saran440, Christopher Rogos, Weblate, Eduardo de Miguel, OCA-git-bot, oca-ci, David Bañón
- Odoo dependencies
- Python dependencies
- None
- System dependencies
- None
- Required by
- hr_expense_advance_clearing_sequence, l10n_th_account_tax_expense, l10n_th_tier_department_demo
- Description
Standard Expenses module allow employee to do the expense reimbursement only after the expense has been made. In other world, employee will need to pay first and reimburse later. This module, allow company to advance an amount to the employee. Employee can then use that advance amount to purchase product/service first, then back to company and do the clearing. There can be 3 scenarios for advance and clearing - 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.
Code Analysis ⓘ
Views touched (10)
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
hr_employee_public_view_form |
hr.employee.public.form | hr.employee.public | form | Inherits hr.hr_employee_public_view_form |
hr_expense_sheet_view_search |
hr.expense.sheet.view.search | hr.expense.sheet | search | Inherits hr_expense.hr_expense_sheet_view_search |
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 |
view_hr_expense_sheet_form |
hr.expense.sheet.form | hr.expense.sheet | form | Inherits hr_expense.view_hr_expense_sheet_form |
view_hr_expense_sheet_list |
hr.expense.sheet.list | hr.expense.sheet | list | Inherits hr_expense.view_hr_expense_sheet_tree |
HTTP endpoints (0)
No HTTP endpoints found for this module.
Models touched (8)
New fields (0)
No new fields.
Public methods (3)-
action_force_register_payment(self)Odoo core does not allow register payment with type 'entry'. However, a payment can be registered when clearing a document, provided the amount cleared exceeds the advance payment. -
button_cancel(self) -
button_draft(self)
New fields (1)
-
advance_idMany2one → hr.expense.sheetcomodel_name='hr.expense.sheet'readonly=True
-
action_post(self)
New fields (0)
No new fields.
Public methods (0)No public methods.
New fields (2)
-
advance_countIntegercompute='_compute_advance_count'help='Count advance sheet in expense report'string='# of Advance' -
advance_sheet_idsOne2many → hr.expense.sheetcomodel_name='hr.expense.sheet'domain=[('advance', '=', True)]inverse_name='employee_id'readonly=True
-
action_open_advance_clearing(self)
New fields (3)
-
advanceBooleandefault=Falsestring='Employee Advance' -
av_line_idMany2one → hr.expensecomodel_name='hr.expense'help='Expense created from this advance expense line'ondelete='set null'string='Ref: Advance' -
clearing_product_idMany2one → product.productcomodel_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'string='Clearing Product'tracking=True
-
onchange_advance(self)@api.onchange('advance')
New fields (10)
-
advanceBooleanstring='Employee Advance' -
advance_sheet_idMany2one → hr.expense.sheetcomodel_name='hr.expense.sheet'domain="[('advance', '=', True), ('employee_id', '=', employee_id), ('clearing_residual', '>', 0.0)]"help='Show remaining advance of this employee'string='Clear Advance' -
advance_sheet_residualMonetaryhelp='Remaining amount to clear the selected advance sheet'related='advance_sheet_id.clearing_residual'store=Truestring='Advance Remaining' -
amount_payableMonetarycompute='_compute_amount_payable'help='Final regiter payment amount even after advance clearing'string='Payable Amount' -
clearing_countIntegercompute='_compute_clearing_count' -
clearing_journal_idMany2one → account.journalcheck_company=Truecomodel_name='account.journal'compute='_compute_clearing_journal_id'domain="[('type', '=', 'general')]"help='Miscellaneous journal used to post the clearing journal entry.'readonly=Falsestore=True -
clearing_residualMonetarycompute='_compute_clearing_residual'help='Amount to clear of this expense sheet in company currency'store=Truestring='Amount to clear' -
clearing_sheet_idsOne2many → hr.expense.sheetcomodel_name='hr.expense.sheet'help='Show reference clearing on advance'inverse_name='advance_sheet_id'readonly=Truestring='Clearing Sheet' -
payment_return_idsOne2many → account.paymentcomodel_name='account.payment'help='Show reference return advance on advance'inverse_name='advance_id'readonly=Truestring='Payment Return' -
return_countIntegercompute='_compute_return_count'compute_sudo=True
-
action_open_clearings(self) -
action_open_payment_return(self) -
action_register_payment(self) -
action_sheet_move_post(self)Post journal entries with clearing document -
create_clearing_expense_line(self, line) -
get_domain_advance_sheet_expense_line(self) -
open_clear_advance(self)
New fields (1)
-
clearing_journal_idMany2one → account.journalcheck_company=Truecomodel_name='account.journal'domain="[('type', '=', 'general')]"help='Default Miscellaneous journal used when posting the advance clearing journal entry.'string='Default Clearing Journal'
No public methods.
New fields (1)
-
clearing_journal_idMany2one → account.journalcheck_company=Truecomodel_name='account.journal'domain="[('type', '=', 'general')]"readonly=Falserelated='company_id.clearing_journal_id'
No public methods.
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
- Status
- Open migration PR — not merged yet for this version
- CI status
- green — ready to merge
- Open since
- 85 days ago
- Last activity
- 0 days ago
- Repository
- OCA/hr-expense
- Pull request
- [19.0][MIG] hr_expense_advance_clearing: Migration to 19.0 (#358)