Commit Graph
189 Commits
Author SHA1 Message Date
Jurgen (jugj) ceba69f3ed [IMP] (l10n_be_hr_payroll)_fleet : Improve the visual of fleet contracts
task - 3247012

closes odoo/odoo#120865

X-original-commit: 88cc0f78dd9f7f7f8d0c29c54ca4ffbd8a9a0911
Related: odoo/enterprise#40829
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-05-09 11:57:44 +02:00
Rémy Voet (ryv) 302c7baa87 [REM] core,*: remove name_get_uid parameter from _name_search.
`name_get_uid` is unused (at least since v14) and the
documentation about it, is wrong.

closes odoo/odoo#117819

Related: odoo/enterprise#39483
Signed-off-by: Rémy Voet <ryv@odoo.com>
2023-04-28 16:04:27 +02:00
Rémy Voet (ryv) 234db70d86 [IMP] *: Use the new API of _read_group for backend use
Part-of: odoo/odoo#110737
2023-04-19 21:58:27 +02:00
Rémy Voet (ryv) 603c16b1a0 [FIX] core,fleet: remove group_operator for Many2oneReference
The default `group_operator` of `Many2oneReference` is 'sum' (inherited
from the parent class `Integer`), it doesn't make any functional sense
to sum ids.

Also set group_operator to None on `co2` instead of override read_group
for the same result.

Part-of: odoo/odoo#110737
2023-04-19 21:58:26 +02:00
Jurgen (jugj) 1902beb621 [IMP] fleet : Add default contract types for vehicles and expand name_search to manufacturer name
This PR :
- Adds 2 new default contract types to the data : Omnium and Leasing
- Lets the user search models by manufacturer name and model name

task - 3249291

closes odoo/odoo#117059

Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-04-19 12:13:30 +02:00
niyasraphy f4fab2d10c [FIX] fleet: missing avatar image for model and vehicle field
before this commit, in the list view of
fleet (fleet.vehicle),
services (fleet.vehicle.log.services) and
odometer(fleet.vehicle.odometer) the vehicle_id
and model_id field with many2one_avatar is
not showing the image of vehicle and model.

* open fleet -> fleet -> fleet
* switch to list view
* model field will be with empty image
* similarly in services and odometer menus

after this commit, the widget will be removed
from the field as the avatar field doesn't
exists in the model level.

closes odoo/odoo#117752

X-original-commit: e57b6f898775a0e432ae1a21266a0f4bf82c0242
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-04-05 10:45:57 +02:00
Louis Wicket (wil) 9afe7c74c9 [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#114533

Related: odoo/enterprise#37853
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-03-14 15:52:10 +01:00
Rohitkumar (roku) 41b3559ec9 [IMP] fleet: add order date field in fleet vehicle
Currently, when the vehicle is assigned, it is checked from the first contract date, now it
will be checked from the order date

In this Commit, We added order date  field in  fleet vehicle

task-3054981

closes odoo/odoo#107073

Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-12-13 14:56:00 +01:00
niyasraphy 0bc65727c7 [IMP] fleet, privacy_lookup: better breadcrumb for models
closes odoo/odoo#106650

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2022-12-01 16:27:58 +01:00
Leonardo Pavan Rocha 8a170ddf2c [IMP] fleet: log plan to change car field in chatter
This commit adds tracking to the "plan to change car" field in res.partner.

task-3086287

closes odoo/odoo#106845

Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-12-01 13:30:59 +01:00
Yannick Tivisse e1c011449c [FIX] fleet,product_margin,resource: Avoid using write on compute methods
Purpose
=======

Onchange methods are executed in "edit-mode", so you need to save to get the definitive
values saved on the DB, but if you do a write on it, that changes are immediately saved
to the DB, so if you discard the changes on UI, you will have inconsistent data. That's
why you have to do update instead, that only modifies the temporary dataset.

Courtesy of https://github.com/OCA/pylint-odoo/issues/356

closes odoo/odoo#104539

Taskid: 3046426
X-original-commit: 5f18f068e62ba6cf6296c5f818b2cdfabed1fdfb
Related: odoo/enterprise#33409
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2022-10-29 12:05:55 +02:00
Raphael Collet b38a5f78b6 [FIX] *: avoid non-searchable field dependencies
closes odoo/odoo#98562

Related: odoo/enterprise#30639
Signed-off-by: Raphael Collet <rco@odoo.com>
2022-08-29 22:43:11 +02:00
Fabien Pinckaers 3363e55cac [IMP] cleanup of help messages in all modules
This commit aims at removing unuseful help message to:
1/ reduce translators work, to focus on more useful translations
2/ not sending unuseful information in load_views
3/ reduce help message to useful messages, so that we can mark
   fields having a tooltip in the future UI.
4/ some cleanup of existing messages too

The main use cases:
- REMOVED: help redundant with the field name, providing no extra info
- MOVED TO COMMENT: technical help messages, that should not be in UX

closes odoo/odoo#97279

Signed-off-by: Fabien Pinckaers <fp@odoo.com>
2022-08-02 00:26:53 +02:00
Kevin Baptiste 9c6f20a853 [FIX] fleet: properly archive Contract/Services
When archiving a vehicle, the active state of its Contracts/Services
were toggled, which was confusing (an archived Contract would suddently
become unarchived on an archived vehicle).

Now we only archive the Contracts/Services when the Vehicle is archived,
and no unarchiving is done.

task-2898104

closes odoo/odoo#95650

X-original-commit: 0be40d67c28b8575613f59ca5b4d8d6ea99638cb
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-07-08 14:34:30 +02:00
Kevin Baptiste 45b175a18d [IMP] (hr_)fleet: usability changes (b2b)
Minor usability changes:

  * Reorganize menu to be more consistent with other HR apps;
  * Tweak several views;
  * Don't expire contract when date is set to Today - they will be
    automatically expired the next day;
  * Show contract name on form view.

closes odoo/odoo#92604

Related: odoo/enterprise#27919
Taskid: 2856135
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-06-23 17:16:57 +02:00
Leonardo Pavan Rocha 5dba452227 [IMP] fleet, hr_fleet: improve assignment logs view
Assignment logs list view can be accessed both from fleet and from hr_fleet,
however they show many repeating fields and, for this reason, this commit
improves these views by leaving the repeating fields as optional="hide".

task-2742923

Part-of: odoo/odoo#83755
2022-05-24 15:59:56 +02:00
Kevin Baptiste 7061bacf6a [IMP] fleet: count archived services on vehicle
When a vehicle is archived, its corresponding services/contracts are archived
as well. However, the corresponding records were no longer counted for
the stat buttons.

closes odoo/odoo#90406

Taskid: 2841384
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-05-12 13:42:43 +02:00
Dossogne Bertrand a63a271768 [FIX] fleet: fix fuel types
There shouldn't be a distinction between full hybrids.
'hybrid' and 'full_hybrid_gasoline' are replaced in this commit by a unique 'full_hybrid'.
fixes task 2629318

taskID 2753096

closes odoo/odoo#90413

Related: odoo/enterprise#26886
Related: odoo/upgrade#3494
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-05-12 09:19:04 +02:00
sofiagvaladze 0476f084a1 [IMP] fleet: add category_id to the vehicle from model
category_id field is populated from the model, but it can be edited.

task - 2828459

closes odoo/odoo#89282

Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-05-11 19:46:00 +02:00
Victor Feyens c3b9c0d8a2 [FIX] *: typos in translated strings
closes odoo/odoo#89718

Related: odoo/enterprise#26630
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2022-05-02 21:36:40 +02:00
Kevin Baptiste 1078226f9f [IMP] fleet: add tracking on fields
closes odoo/odoo#89102

Taskid: 2826804
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-04-22 09:03:04 +02:00
william 3155c3e425 [IMP] core,*: add helper for name_search
Most of the extensions of `_name_get` are very similar and only want to
search for the given string in multiple fields.
A lot of extensions also don't take into account the negative operators.
Some implementations were also really outdated and needlessly
complicated.

closes odoo/odoo#86588

Related: odoo/enterprise#25608
Signed-off-by: Raphael Collet <rco@odoo.com>
2022-04-06 18:37:39 +02:00
Yannick Tivisse 62f72d1819 [FIX] fleet: Compute counts using read_group
Divides by 2 the kanban view loading on odoo.com

X-original-commit: 5fa89995f010964e3d5d5a1417b23965735136e9
2022-03-30 17:04:50 +02:00
Vincent Schippefilt 05fc9a6733 [IMP] *: use _read_group instead of read_group
This commit modifies most of the usages of read_group and uses
_read_group instead. _read_group doesn't join automatically on the
many2one fields when no order_by is specified, making it more performant
when the "name" of the many2one is not relevant, which is the case for
most back-end cases

closes odoo/odoo#84908

Task-id: 2479334
Related: odoo/enterprise#24877
Signed-off-by: Raphael Collet <rco@odoo.com>
2022-03-02 17:10:48 +00:00
Thibault Francois 4340a7e4d2 [FIX] fleet: fix search method for contract_renewal*
the search method of contract_renewal_due_soon and
contract_renewal_overdue return a domain
id in res_ids where res_ids are id of contract
not vehicle

So it return random result

Solution
--------
Get the vehicle_id from the contract record set

closes odoo/odoo#84987

X-original-commit: 975841953adaa6b7adc8016fb96cc6efc8891613
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-02-21 13:13:52 +00:00
William Braeckman 556c1237a2 [IMP] fleet: reorder/reword fuel types
There was some confusion about all the types of hybrid vehicles.
Also changes the order in which they are displayed.

TaskId-2629318

closes odoo/odoo#82672

X-original-commit: 73171da60059c85355e8675061db485e84aedb05
Related: odoo/enterprise#23460
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2022-01-13 09:30:56 +00:00
Florian Damhaut c81d5607dc [FIX] hr_fleet: no duplicate contract renewal activity reminder
Step to reproduce:
- Have a fleet contract that need renewal

Current Behaviour:
- A new activity is created everytime the scheduler is called

Behaviour after PR:
- A new activity is only created if there is no current renewal activity present when the scheduler is called

opw-2713537

closes odoo/odoo#81919

X-original-commit: 3610069ea2c10fccf8fcc82c384a2194c4702e06
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Damhaut Florian (flda) <flda@odoo.com>
2021-12-28 08:07:47 +00:00
Kevin Baptiste 3acd3a08f7 [FIX] fleet: fix missing compute method
The PR #75475 removed the method `_compute_manager_id` without removing
the reference in the field.

closes odoo/odoo#81766

X-original-commit: a4e1477d120c336ace405421ddb860a72cfeafe1
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2021-12-22 07:50:51 +00:00
Yannick TivisseandVictor Feyens 18952cdc76 [IMP] *: Convert single create method into multi
Taskid: 2703085
Part-of: odoo/odoo#80824
Co-authored-by: Victor Feyens <vfe@odoo.com>
2021-12-14 19:13:18 +00:00
Yannick Tivisse 6a7c1c51ce Revert "[FIX] hr_fleet: Don't notify future_driver_id as Changed Driver"
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.

closes odoo/odoo#78716

X-original-commit: 437bd8cc54d999a40ee2d83e2fef9c0ced19f47e
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-10-28 12:21:19 +00:00
Kevin Baptiste c715ecb38b [IMP] fleet: add Write Off Date on vehicle
Add the Write Off Date on vehicle.

closes odoo/odoo#77464

Related: odoo/enterprise#21299
Related: odoo/upgrade#2878
Taskid: 2657561
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2021-10-19 07:12:04 +00:00
Kevin Baptiste 67a07865d1 [IMP] (hr_)fleet: improve Claim Car Report
The "Claim Car Report" action was not working as expected.
Now the statbutton "Cars" will show the car history of a specific
driver.

closes odoo/odoo#76550

Related: odoo/upgrade#2882
Taskid: 2646113
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2021-10-04 11:29:55 +00:00
Philippe Wauthy 52e9668e99 [FIX] fleet: clean service type demo data
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

closes odoo/odoo#76403

Signed-off-by: Kevin Baptiste <kba@odoo.com>
2021-09-21 08:08:47 +00: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
William Braeckman c80002f660 [IMP] fleet: Improve general UX (Back2basics)
Overall UI review of the fleet app.

Also changes the behaviour of shared fields between vehicles and vehicle
models.

Task ID: 2468228

closes odoo/odoo#72943

Related: odoo/upgrade#2601
Related: odoo/enterprise#19356
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-07-14 14:40:54 +00:00
William Braeckman 677d51e7b0 [IMP] fleet: minor changes to views
Rename some views.

Task ID: 2415309
2021-07-09 14:51:26 +02: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
Yannick Tivisse bc1603167d [FIX] hr_fleet: Don't notify future_driver_id as Changed Driver
We are supposed to notify the driver change when the driver actually changes.

X-original-commit: 2e58d23e760313dbf58ce6a90f26b7160db460d8
2021-06-11 15:36:03 +00:00
Yannick Tivisse 77a27c574d [IMP] fleet: Rename action methods according to guidelines
closes odoo/odoo#71915

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-06-15 03:54:33 +00: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 99858e7643 [IMP] fleet: compute state on date changes
Currently changing the expiration date of a fleet contract doesn't reset
the state. This commit aims to fix this.

Task ID: 2563156
2021-06-14 07:34:02 +00:00
dht-odoo 5ce7ad709c [IMP] hr: improves field type from text to html
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
2021-06-07 05:24:08 +00:00
Yannick Tivisse 9a5b2e2549 [MOV] fleet: Split model files according to coding guidelines
closes odoo/odoo#70612

Related: odoo/upgrade#2493
Related: odoo/enterprise#18250
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-06-04 08:47:45 +00:00
William Braeckman 32a8dc42f8 [IMP] fleet: add trailer_hook field to vehicles
Task ID: 2487706
2021-06-04 07:20:15 +00:00
William Braeckman e85763d982 [IMP] fleet: minor changes to views
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
2021-06-04 07:20:15 +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
Nicolas Lempereur 9921b88c0b [FIX] fleet: new contract no vehicle no error
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

closes odoo/odoo#70973

X-original-commit: 7d956af5106b9efe22b602af007088ce8c2c16ce
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2021-05-18 11:57:23 +00:00
Aurélien (avd) fc396a4d17 [IMP] fleet: improve ux + fix contracts/services archive bug
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.

closes odoo/odoo#62556

Taskid: 2389823
Related: odoo/upgrade#2063
Related: odoo/enterprise#15036
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-02-24 12:32:11 +00:00
Yannick Tivisse 497698bfa2 [FIX] fleet: Fix compute method to work in batch
closes odoo/odoo#64716

X-original-commit: a408494c6be551e169a8eec2d76cd57acda97fee
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-01-18 17:08:47 +00:00
Goffin Simon d060eb9063 [FIX] fleet: Module fleet_account doesn't exist
The module fleet_account has been replaced by account_disallowed_expenses_fleet
in https://github.com/odoo/odoo/commit/db9da432b7aedcd1bc944e23e59459c9c92801b7

opw:2382169

closes odoo/odoo#61867

Related: odoo/upgrade#1947
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2020-11-18 15:15:38 +00:00