Sustainability Employee Commuting
sustainability_employee_commuting · OCA/sustainability
Health
73/100
fair
-
Security25/25No findings
-
Activity25/25Last human commit 2 months ago
-
Required by5/250 modules depend on it
-
Maturity18/25In 3 Odoo series since 16.0
Heuristic over the facts below, not an audit · How it's computed
Required by
0
Modules depending on it
External deps
2 pip · 0 bin
Python packages / system binaries
License
AGPL-3
No conflicts with its dependencies
Folder size
0.13 MB
Module directory on disk
Code analysis
0 migration notes
6 models
2 views
0 HTTP endpoints
Description
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 |
|---|---|---|---|---|
res_config_settings_view_form |
res.config.settings.view.form.inherit.sustainability.commuting | res.config.settings | form | Inherits sustainability.res_config_settings_view_form |
view_employee_form_commuting |
hr.employee.form.inherit.commuting | hr.employee | form | Inherits hr.view_employee_form |
HTTP endpoints 0
No HTTP endpoints found for this module.
Models touched 6
New fields (4)
-
employee_commuting_carbon_dateDatecopy=Falsedefault=False args: 'Employee commuting date' -
employee_remote_work_carbon_dateDatecopy=Falsedefault=False -
is_employee_commuting_carbonBooleancopy=Falsedefault=False args: "Employees' commuting carbon emissions" -
is_employee_remote_work_carbonBooleancopy=Falsedefault=False
No public methods.
New fields (4)
-
allowed_carbon_factor_idsMany2many → carbon.factordomain=<expr>related='employee_id.company_id.employee_commuting_carbon_factor_id.descendant_ids' args: 'carbon.factor' -
carbon_factor_idMany2one → carbon.factordomain="[('id', 'in', allowed_carbon_factor_ids),('carbon_value', '!=', False)]"required=Truestring='Transport mean' args: 'carbon.factor' -
distance_kmIntegerstring='Average weekly distance in kilometers' -
employee_idMany2one → hr.employeestring='Employee' args: 'hr.employee'
-
get_commuting_carbon_value_at_date(self, date)
New fields (1)
-
carbon_commuting_idsOne2many → carbon.hr.commutingstring='Employee commuting records' args: 'carbon.hr.commuting', 'employee_id'
No public methods.
New fields (2)
-
has_locationBooleandefault=Falsestore=True -
work_days_homeIntegercompute='_compute_work_days_home'help='Number of days per week the employee works from home.'store=Truestring='Work Days at Home'
No public methods.
New fields (9)
-
employee_commuting_account_idMany2one → account.accountdomain="[('deprecated', '=', False)]"string='Employee Commuting Account' args: 'account.account' -
employee_commuting_carbon_cronjob_activeBooleandefault=Falsestring='Cronjob active' -
employee_commuting_carbon_factor_idMany2one → carbon.factorargs: 'carbon.factor' -
employee_commuting_journal_idMany2one → account.journalargs: 'account.journal' -
employee_commuting_post_account_move_activeBooleandefault=Falsestring='Post account move when cron is finished' -
employee_remote_work_account_idMany2one → account.accountdomain="[('deprecated', '=', False)]"string='Employee Remote Work Account' args: 'account.account' -
employee_remote_work_carbon_cronjob_activeBooleandefault=Falsestring='Remote Work Cronjob Active' -
employee_remote_work_carbon_factor_idMany2one → carbon.factorargs: 'carbon.factor' -
employee_remote_work_journal_idMany2one → account.journalargs: 'account.journal'
-
calculate_average(self, metric_sum, count)Calculates the average of a given metric if the count is non-zero. -
carbon_commuting_create_account_move(self, account_move_date, to_post=False) -
create_account_move(self, ref, journal_id, account_move_date, aml_vals_list, mode)Creates an account move with the given parameters. -
delete_existing_account_moves(self, account_move_date, mode)Deletes existing account moves for a given date to avoid duplicates. -
get_employees_with_contracts(self, account_move_date, employees_domain=None)Retrieves employees with active contracts in the company. -
prepare_account_move_line(self, employee, carbon_value, account_id, description)Prepares account move line dictionary for an employee. -
remote_work_create_account_move(self, account_move_date, to_post=False)Generate account move for employee remote work carbon emissions. Calculates carbon emissions based on remote work days for each employee, fallback to average if no employees with remote work set.
New fields (9)
-
employee_commuting_account_idMany2one → account.accountreadonly=Falserelated='company_id.employee_commuting_account_id' args: 'account.account' -
employee_commuting_carbon_cronjob_activeBooleanreadonly=Falserelated='company_id.employee_commuting_carbon_cronjob_active' args: 'Cron job active' -
employee_commuting_carbon_factor_idMany2one → carbon.factorreadonly=Falserelated='company_id.employee_commuting_carbon_factor_id' args: 'carbon.factor' -
employee_commuting_journal_idMany2one → account.journalreadonly=Falserelated='company_id.employee_commuting_journal_id' args: 'account.journal' -
employee_commuting_post_account_move_activeBooleanreadonly=Falserelated='company_id.employee_commuting_post_account_move_active'string='Post account move when cron is finished' -
employee_remote_work_account_idMany2one → account.accountreadonly=Falserelated='company_id.employee_remote_work_account_id' args: 'account.account' -
employee_remote_work_carbon_cronjob_activeBooleanreadonly=Falserelated='company_id.employee_remote_work_carbon_cronjob_active' args: 'Cron job' -
employee_remote_work_carbon_factor_idMany2one → carbon.factordomain=<expr>readonly=Falserelated='company_id.employee_remote_work_carbon_factor_id' args: 'carbon.factor' -
employee_remote_work_journal_idMany2one → account.journalreadonly=Falserelated='company_id.employee_remote_work_journal_id' args: 'account.journal'
-
set_values(self)
Loading…
Loading…
Loading…