Commit Graph
36 Commits
Author SHA1 Message Date
prye-odoo 7694f012cd [FIX] *: handle unlink/create access for reporting views
*: account,event_sale,fleet,hr_attendance,hr_contract,hr_timesheet,
im_livechat,point_of_sale,project

When the user tries to delete a record(s) from the reporting views,  this
traceback will be generated.

Steps to produce (Example only):

- Settings > Technical > Actions > Window Actions
- Search for the Work Entries Analysis. Open it and add a 'tree' as view_mode
in that action.
- Payroll > Reporting > Work Entries Analysis menu and select the tree view.
- Select one or more records and try to delete these records.

Error: A traceback appears: "cannot delete from view "hr_work_entry_report"

Handled the unlink access by using their model access of the reporting models.
similarly, this issue resolves in other reporting models.

Sentry-3975590063

closes odoo/odoo#125697

X-original-commit: 209d8c76ce9bb1d6cc7084d55b5623e939af8fbc
Related: odoo/enterprise#42825
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2023-07-03 21:55:48 +02:00
Louis Wicket (wil) 0c53d28133 [IMP] *: remove "French spacing"
According to Wiktionary, French spacing is "the archaic practice (though
still current in French) of inserting a space around colons, semicolons,
question marks, and exclamation marks". This is not standard practice in
English and most languages of the world.

The purpose of this commit is to start purging the code from this typo,
as it may reflect poorly on the software for some people.

closes odoo/odoo#116167

Related: odoo/enterprise#38542
Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
2023-03-24 12:50:13 +01:00
Dossogne Bertrand 605a3c1e44 [IMP] hr_*: uniformize group category
*:
approvals
hr_apprasaisal
hr_payroll
hr_referral
fleet
hr
hr_attendance
hr_holidays
hr_recruitment
lunch

Change various access rights names to improve understandability for users.
Addition of an officer role in fleet with intermediate accesses

TaskID 2742855

closes odoo/odoo#87545

Related: odoo/enterprise#25741
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-05-03 14:38:19 +02:00
Yannick Tivisse 24713b76b5 [REV] fleet: Revert multiple fleet mechanism
I don't get why you don't get it...

Partial revert of the taskID: 2415309
Com PR: https://github.com/odoo/odoo/pull/70313
Ent PR: https://github.com/odoo/enterprise/pull/18114
Upg PR: https://github.com/odoo/upgrade/pull/2447

closes odoo/odoo#75475

Related: odoo/enterprise#20406
Related: odoo/upgrade#2765
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-08-25 12:20:39 +00:00
prro-odoo 5c4a971d89 [FIX] fleet: display only current companies' fleet
How to reproduce the problem:
- Install the Fleet app.
- Create a user that has access to 2 or more companies (e.g. Mitchell Admin).
- Log in as this user. Go to fleet -> Vehicles -> Vehicles Costs/Contracts/Fuel Logs/Services Logs
- Uncheck one of your companies.
- The user still has access to the fleet of the other companies, even if they are unchecked.

Cause of the problem : missing record rules

Solution : added multi-companies rules

opw-2518188

closes odoo/odoo#73925

X-original-commit: 41828bc22b5cf663b96196371f412ad2bfbbfb22
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-08-17 07:25:48 +00:00
William Braeckman 5849acab43 [IMP] fleet,hr_fleet: add support for multiple fleets
Add a layer above the vehicle model to separate vehicles from different
fleets.

Task ID: 2415309
2021-07-09 14:51:26 +02:00
William Braeckman f9ae3fdc18 [IMP] fleet: fleet contract multi-company
Adds a multi company rule for the vehicle contract.

Task ID: 2563156
2021-06-14 07:34:02 +00:00
William Braeckman 9b5768688a [IMP] fleet: add vehicle model categories
Adds categories to vehicle models

Task ID: 2487706
2021-06-04 07:20:15 +00:00
Victor Feyens 532c083cbb [IMP] *: remove global field definition in ir rules xml
It is a computed field, there is no need to manually set its value.
2020-03-20 16:15:40 +01:00
jbm-odoo 5889dc3cc4 [FIX] fleet,hr_fleet: Fix user rights
Task ID: 2170625

closes odoo/odoo#47079

X-original-commit: ee13013808460c5100bec03ed415fc184ff031e5
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-03-06 12:43:06 +00:00
Kevin Baptiste 82df1dfccc [IMP] fleet: model cleanup, dashboard
Purpose
=======

It is currently difficult to know exactly what is used for costs
and services on the contracts.

Hence it make it difficult to evolve the fleet application
We should clean the models in order to have something that is clearer

Specification
=============

Cleanup of models: removed Fuel and Cost. Contract and Services are no
longer inheriting Cost and are seperate models simplifying the use of
Fleet. A contract now has included services and they are no longer
generating cost.

closes odoo/odoo#34090

Taskid: 1931775
Related: odoo/enterprise#4572
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-11-27 11:54:51 +00:00
Lucas Lefèvre effcf0d13b [FIX] fleet: Add multi company ir.rule
Purpose
=======
Since the new company switcher, it's now easier
to manage records of different companies.

Specification
=============
Add a multi company `ir.rule` for `fleet.vehicle`.

closes odoo/odoo#34426

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-07-01 07:34:15 +00:00
RomainLibert 3c32f9b903 [IMP] fleet: add future drivers on cars + managers on models
Basically when someone requests a new car, getting that car ready takes
some time, this means that during the waiting period, that person is
still driving its old car.

This commit adds a field future_driver_id on fleet.vehicle to tackle
that problem and a boolean plan_to_change_car on the partner to track
who wants to change car.

+ Apply some linting to the files
This commit cleans the vehicle form view, the vehicle contract form
view, the cost list view and adds a manager_id field on the
vehicle.model which is then used as a related on the vehicle.

Task: 1930298

closes odoo/odoo#31197

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-04-18 11:55:25 +00:00
jbm-odoo ec07e72845 [IMP] base,*: Reorganize access rights groups
Purpose
=======

Access group terminology is missleading. Yous have to be manager to administrate
an application. This task consists to rename groups to be understandable for everyone.

Groups should be reorganised on the users form to be more explicit.

Specification
=============

1/ Rename 'Manager' to 'Administrator' in users groups.
2/ Define a hierarchy on access groups by using the category_id in the manifests
   A category 'Operations/Project' will create a category Project with a parent
   category 'Operations', and something smart is already developed (in modules/db.py)
   to avoid duplicating categories.
3/ Add a group in expenses to be able to approve expenses reports for my team.
4/ Add a group in timesheets to be able to approve timesheets for my team.
5/ Remove partially the useless crap in ir_module_category_data.xml
6/ Sort access rights groups on users form according to its parent category

closes odoo/odoo#29362

Signed-off-by: "Yannick Tivisse (yti)" <yti@odoo.com>
2019-03-05 09:08:12 +00:00
Raphael Collet 2f7c03d9ca [IMP] base: add regular user admin as uid 2
User 1 simply becomes a technical user (inactive, no password).
2018-08-23 21:38:57 +02:00
Yannick Tivisse 02775e6cd2 [IMP] fleet: Introduce fleet.vehicle.assignation.log model
Purpose
=======

Currently it's impossible to know who was driving a given car at a given time.

We have some piece of information like the immatriculation date of a vehicle
or the date of the first contract. But it's not enough.

This is problematic to solve a rather common issue:
- Who is gonna pay the fine for having exceeded the speed limit?

Specification
=============

Introduce a simple model fleet.vehicle.assignation.log, containing info about:
- The driver
- The vehicle
- The start Date
- The end Date

A simple button on the fleet vehicle should be sufficient to solve the issue.

We cannot generate data from the salary package as these dates can't be predicted
at the contract signature.
2018-04-27 17:30:30 +02:00
Thibault Delavallée 77c7b68a9b [IMP] fleet: improve activity management on fleet contract model
This commit improves fleet contracts management through a better integration
of activities and addition of automated activities. Several things are done
in this commit :

 * fleet vehicle log contract does not inherit from mail.activity.mixin.
   This commit adds the inherit so that fleet users and managers can now
   schedule and manage activities on vehicle contracts. This will help them
   in their daily job;
 * automatic activities generation is added when contracts are nearly expired
   and renewal is required;
 * a menu to configure activity types is added. Indeed fleet managers should
   be able to see and configure activity types related to their job;
 * filters are added to be able to use the systray and to filter the kanban
   view based on activities

Having automated activities allow to replace some messages posted on the
contract. Indeed currently there are messages posted on vehicles about
contracts to renew. As we now have automated activities on contracts to
remind assigned people to renew it the log can be safely removed. It will
lessen noise generated on chatter.
2018-03-27 16:31:01 +02:00
Yannick Tivisse 080158c1fe [FIX] fleet: Fleet user rigths implies employees user rights
Create users having only manager or user rights on fleet, cannot acces \web pages, We should add the employee rights, as when we give fleet rights
2016-09-20 12:55:15 +02:00
Yannick Tivisse ff63f5d0a3 [IMP] base_setup: Allow the admin to modify the default user acess rights
Add a link in the general settings to access easily the default_user form view in order to modify the default access rights

The default_user manager rights declarations in all the applications have been move in a noupdate="1" definition to avoid the manual configuration overwrittings
2016-08-23 11:14:37 +02:00
Ravi Gadhia a999969f81 [REM] fleet: Remove unused code 2016-05-27 10:39:22 +02:00
Ravi Gadhia e513af0bb0 [IMP] fleet: migrate to new api (fleet.py). my eye is paining 2016-05-27 10:39:22 +02:00
Yannick Tivisse 1ecba213f4 [IMP] Newly created users get all manager access right
Coming from a bug in web_settings_dashboard. Invited user didn't have any rights
when created from the dashboard, which was leading to an error.

This bug leaded to a new discussion. Better to have basic employee having user
rights for all main applications. For bigger entreprises there is an admin that
will carefully remove extra rights, if necessary. The target is small businesses,
it makes sense that every way to create a user gives the same result.

In conclusion, each new user has a full access to the applications by default

How is it implemented ?
We added an inactive default user which original access right to the groups
'base.group_user' and 'base.group_partner_manager' in base. Each
application will extend the default user's access right by adding the maximal
access right for this application.

On user creation, we will use by default the 'group_id' field from the default
user. We will in the same time remove the ugly 'default_groups_ref' key which
was passed sometimes in the context for some fields in some views, and sometimes
nothing.

So, the user can modify the access rights for the default user, but he should be
aware that removing project user access rights for a default user will prevent
a *created on the fly in a task* user will not be able to access the task.
2015-11-20 16:27:32 +01:00
Olivier Dony 3fe6987ce7 [MERGE] Harmonization of noupdate flag on security XML data, courtesy of Alexis de Lattre (Akretion)
ir.rule records are in noupdate data blocks to let the admin
alter them without fear of them being reset at next update.
Other records such as groups are in normal mode, so they
can be updated whenever necessary

bzr revid: odo@openerp.com-20121218232001-t425t4hi7qbmsip2
2012-12-19 00:20:01 +01:00
Cedric Snauwaert d7461fb1c8 [FIX]fleet: setting group for user_demo should be done in demo data instead of data
bzr revid: csn@openerp.com-20121217132045-lt0b2aeubty1hrkn
2012-12-17 14:20:45 +01:00
Cedric Snauwaert 9bfd41c39e [ADD]after install go to fleet menu, change driver of demo data to demo_user and put demo_user in fleet_user group
bzr revid: csn@openerp.com-20121210162834-bej2x1m8vms87qre
2012-12-10 17:28:34 +01:00
Cedric Snauwaert 789ede3ea8 [ADD]search field and some changes to fuel and service log: purchaser should be driver by default
bzr revid: csn@openerp.com-20121210140317-kg03hsk46rpzgcyx
2012-12-10 15:03:17 +01:00
Cedric Snauwaert d37bd882a8 [FIX]finish renaming some field
bzr revid: csn@openerp.com-20121206142941-pmq2s4h2or1ey0nl
2012-12-06 15:29:41 +01:00
Cedric Snauwaert b2457a3fc1 [REF]change some field name, remove useless line in access rules
bzr revid: csn@openerp.com-20121206105033-6dcffqm1626jt5r8
2012-12-06 11:50:33 +01:00
Cedric Snauwaert a56f37e6f4 [ADD]access rules and groups
bzr revid: csn@openerp.com-20121204162056-cacua9dw1shg5fnv
2012-12-04 17:20:56 +01:00
Vo Minh Thu 724f452f1e [IMP] fleet/porta/account_budget: removed some initialization warnings.
bzr revid: vmt@openerp.com-20121115160643-lc0b07n6xiaq1rl3
2012-11-15 17:06:43 +01:00
Cedric Snauwaert 1697d619c3 [ADD]change in contract view and model
bzr revid: csn@openerp.com-20121004102033-mr108oy63dnmxlik
2012-10-04 12:20:33 +02:00
Cedric Snauwaert 6f97f45ee8 [FIX]replace string type by char in object
bzr revid: csn@openerp.com-20121003150419-9t3jmprmjh5b6lux
2012-10-03 17:04:19 +02:00
Cedric Snauwaert 7a8b30aeba [DEL]removed unused object contract state
bzr revid: csn@openerp.com-20121003133811-u31kfolwiv0xer3s
2012-10-03 15:38:11 +02:00
Cedric Snauwaert 8d52f11708 [FIX]fix access rule and removed warning
bzr revid: csn@openerp.com-20121003080250-wg6faq7p9o3x23rk
2012-10-03 10:02:50 +02:00
Denis Ledoux dle@openerp.com b3a470b0bb [IMP]Deleting generic logs and inherits from odometer part 4. Removing Access Rights
bzr revid: dle@openerp.com-20120926151849-5mjlb5qyxj6j8d5x
2012-09-26 17:18:49 +02:00
Cedric Snauwaert 7df4da3c4a [ADD]security access rules for each object
bzr revid: csn@openerp.com-20120925120942-rdaiucpwmt4jl8v3
2012-09-25 14:09:42 +02:00