This reverts commit 2e58d23e760313dbf58ce6a90f26b7160db460d8.
Actually the fleet officers want to be notified.
The correct way to handle the original issue is to ping the employees
via their documents, instead of on the fleet.vehicle, to avoid setting
them as followers of the car.
closesodoo/odoo#78716
X-original-commit: 437bd8cc54d999a40ee2d83e2fef9c0ced19f47e
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
The "Claim Car Report" action was not working as expected.
Now the statbutton "Cars" will show the car history of a specific
driver.
closesodoo/odoo#76550
Related: odoo/upgrade#2882
Taskid: 2646113
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Description of the issue/feature this PR addresses:
In fleet, the demo data for service type have two entries for summer tires
The service types are sorted by alphabetical orders instead of id
Current behavior before PR:
The summer tires service type is appearing twice in the demo data
The service types are sorted by id
Desired behavior after PR is merged:
The summer tires service type is unique in the list
The services types are sorted by alphabetical order
task-2641484
closesodoo/odoo#76403
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Overall UI review of the fleet app.
Also changes the behaviour of shared fields between vehicles and vehicle
models.
Task ID: 2468228
closesodoo/odoo#72943
Related: odoo/upgrade#2601
Related: odoo/enterprise#19356
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Replace text fields to html fields as we have our own 'OdooEditor'.
Indeed, it gives more options to users in the way they format their
content without weighting too much on the UI
(tools appear on demand and not by default).
Models -> Fields
1) fleet.vehicle -> description
2) fleet.vehicle.log.contract -> notes
3) hr.job -> description
4) hr.contract -> note
5) hr.leave.allocation -> notes
6) hr.applicant -> description
7) lunch.product -> description
8) lunch.order -> product_description
9) lunch.product.report -> description
Task Id: 2499504
X-original-commit: afe52b050a7667f3f20696cd48cd922f635a941c
Adds two new columns to the vehicle model tree view.
Changes the name of the vehicle model action.
Modifies the order by which vehicle manufacturers are ordered.
Adds filter and modify goupby on vehicle, vehicle model/brand.
Task ID: 2487706
If you set the type (cost_subtype_id) of a new contract
(fleet.vehicle.log.contract) before setting vehicle_id you got an error:
name = record.cost_subtype_id.name + ' ' + name
TypeError: can only concatenate str (not "bool") to str
because vehicle name was False.
opw-2527268
closesodoo/odoo#70973
X-original-commit: 7d956af5106b9efe22b602af007088ce8c2c16ce
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Revamp the kanban view of fleet.vehicle.log.services.
Add some ux improvements (new filters, better naming,..).
Fix bug where contracts/services of archived fleet.vehicle were
not counted in statinfo.
When a fleet.vehicle is archived, archive its related contracts/services.
closesodoo/odoo#62556
Taskid: 2389823
Related: odoo/upgrade#2063
Related: odoo/enterprise#15036
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
PURPOSE
Currently, when changing the driver of a vehicle, we don't set the end date
of the last driver and we can't automatically set it because this end
date can be another date that the start of the new driver.
SPECIFICATIONS
When we change the driver of a vehicle, add an activity to specify
the end date of the last driver.
LINKS
Task-2328981
closesodoo/odoo#58170
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Currently, Failing at base/models/res_partner.py#L535
We write on the partner because of the related `plan_to_change_car`
When Assign driver linked to internal user without admin rights
it gives an error in security rules due to write on partner.
So while creating the vehicle when driver is assigned pop the value
for related field plan_to_change_car and rewrite the same with sudo.
closes odoo/odoo#60358
Issue: #54199
Taskid: 2309192
X-original-commit: af21dba516de688743f75e6ffb3bc3341578e37a
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Co-authored-by: LucasLefevre <lul@odoo.com>
Steps to reproduce the bug:
- Create vehicle A
- Create a contract for vehicle A
- Change the license plate of vehicle A
Bug:
The name of the contract of vehicle A hasn't changed
opw:2327820
closesodoo/odoo#57251
X-original-commit: 5a031de6c456180b0f447470382e1ae1c7dbd5dc
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Signed-off-by: backspac <backspac@users.noreply.github.com>
The three following fields have been added to fleet.vehicle:
- frame_type (Selection)
- frame_size (Float)
- electric_assistance (Boolean)
These fields are specific to bikes and are only displayed in form view when vehicle_type = bike
Number of doors is now set to 0 instead of 5 when the vehicle is a bike.
"plan_to_change_bike" boolean field has been added to the res.partner model and has also been added as related field in fleet.vehicle model.
Task ID: 2238055
closesodoo/odoo#50064
Related: odoo/upgrade#1718
Related: odoo/enterprise#10152
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
This provides a better API to search for records by name without the
formatting part (`display_name`).
This also simplifies all the overridings of `_name_search` that no
longer need to call `name_get()`. The call to `name_get()` is done in
method `name_search` in a generic way.
/web/action/load is the public controller that Should be used by the
webclient to fetch actions
_for_xml_id is the default access method on actions that implements
fields filtering to avoid leaking server action code or other
information not needed by the webclient
Implementing whitelist of fields that can be access per model
Currently, in Configuration > Service Type > Add a new service type.
The category field is mandatory but it does not appear on list view.
So in this commit, display the mandatory category field on list view
Currently, in Configuration > Manufacturers. The count of Models is
always 0 because the it's compute stored field without the depends
so not computed each time.
So in this commit, fix the count of models by adding a correct trigger
closes odoo/odoo#55475
Taskid: 2296851
Closes: #54515
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
- Fix the display of the licence plat on the kanban view
- Store the Driver on fleet.vehicle.log.services to remember who was
the driver at the time the service was done.
- Rename 'Informations' to 'Information'
- Rename 'Driver' to 'Current Driver' on the contract
closesodoo/odoo#54051
Taskid: 2289808
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Leave the generic management of fields default to the orm as much as
possible.
* Default method is not called unless necessary.
* Default values are correctly post-processed by the orm when necessary.
Small UX improvements on list view and edit text of an empty kanban
screen.
Task ID 2291554
closesodoo/odoo#54234
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Changing the driver on a car shouldn't change the
fleet.vehicle.log.services associated. We should keep the driver
assigned to the car at the time the service was done.
closesodoo/odoo#54264
Taskid: 2208080
X-original-commit: 5422bb8d6e3db5d6932570116af74ea634c40a51
Signed-off-by: Paul Morelle <madprog@users.noreply.github.com>
When creating a new service on vehicle, the first vehicle was always
selected by default due to a wrong default value. Same thing for the
contract.
Taskid: 2289808
X-original-commit: 9ec3875249748929c4a8e0c8a16e7b729ab9f2d9
Purpose of the task is the current name(_description) of model
fleet.vehicle.log.contract is too long and confusion.
So in this commmit, Rename model fleet.vehicle.log.contract
name(_description) to 'Vehicle Contract'.
closes odoo/odoo#52176
Taskid: 2267547
Closes: #52176
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Issue
- Install "Fleet" app and open it
- Add new car with user X as driver and set state as "Registered".
- Add new car with user X as future driver and set state as
'Waiting list'
The user is set as "Plan To Change Car".
Cause
When a user is set to a new car as a future driver,
the user will automaticly be set as "Plan To Change Car".
Solution
Add condition to set as "Plan To Change Car" only if the user
new car state is not "Waiting List".
opw-2259606
closesodoo/odoo#52836
X-original-commit: 6d35733e61b1d8b18acc3510046423aec7fe1c85
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Signed-off-by: bon-odoo <nboulif@users.noreply.github.com>
Purpose
=======
The main definition of 'assignation' is the following:
"an appointment to meet someone in secret, typically one made by lovers"
The correct word we should be using is 'assignment':
"the allocation of someone or something as belonging to a particular group or category"
So in this commit change every iteration of the word
'assignation' to 'assignment', across all modules.
closes odoo/odoo#45041
Taskid: 1966215
Closes: #45041
Related: odoo/enterprise#8375
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
With a user with only Fleet Administrator rights.
Assign an internal user as the driver of a vehicle (other than the
current user) => access error, you cannot write on model `res.user`.
Writing on a partner linked to an internal user requires write access to
this user.
closesodoo/odoo#47572
X-original-commit: a693b368d3faddef6774004d40567e26b7d59cec
Signed-off-by: lul-odoo <LucasLefevre@users.noreply.github.com>
Purpose
=======
If you set a future driver and click on "apply change", a new assignation log is
automatically created for the new driver.
But the end date of the former assignation isn't populate.
Specifications
==============
Set the date "end date" for the former driver with the "start date" of the
new driver.
closesodoo/odoo#44635
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Currently when user change the image on a vehicle, it change it
for the car manufacturer and the goal of this image is to recognize
the manufacturer of the vehicle.
After this commit is applied, the model and vehicle image will be
fixed as per the selected brand image. user will not be able to
change from the vehicle and model.
closes odoo/odoo#44153
Taskid: 2168922
Closes: #44153
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Create analytic account from fleet (and link it to vehicle) based
on the plate and the fiscal deduction rate (if l10n_hr_payroll_fleet
is installed).
Add on employee a Mobility Card number. This number is set on vehicle
when we put a partner linked to employee on a vehicle.
taskID: 2127641
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.
closesodoo/odoo#34090
Taskid: 1931775
Related: odoo/enterprise#4572
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Fixes#38574
Assigning default value for non-stored compute fields is required in
13.0
closesodoo/odoo#38685
X-original-commit: 7fa80370f8e6fe814651627832d81abe9edebad3
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
To avoid slowing down search like "{relational_field}" contains "{value}"
we always need to return the lazy name_get() for each [_]name_search method
closesodoo/odoo#36735
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>