Commit Graph
142 Commits
Author SHA1 Message Date
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
Kamesh Patel 039650f824 [IMP] Fleet: driver end date activity
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

closes odoo/odoo#58170

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-09-24 08:43:33 +00:00
uso-odooandLucasLefevre 28a9e90dce [FIX] fleet: Fix access error on assign driver linked to internal user
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>
2020-10-20 10:43:36 +00:00
Kairis ec0eda3233 [IMP] fleet: Add new fuels
Adding some new fuels and link them to the right ATN

closes odoo/odoo#57139

Taskid: 2319585
Related: odoo/enterprise#12983
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-09-09 14:39:50 +00:00
nie 34c9709404 [FIX] fleet: contract name does not update when changing vehicle name
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

closes odoo/odoo#57251

X-original-commit: 5a031de6c456180b0f447470382e1ae1c7dbd5dc
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Signed-off-by: backspac <backspac@users.noreply.github.com>
2020-09-08 11:38:18 +00:00
Sébastien Mottet (oms) d0af0ddcc7 [IMP] fleet: add 3 fields specific to bike vehicle type
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

closes odoo/odoo#50064

Related: odoo/upgrade#1718
Related: odoo/enterprise#10152
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-08-31 08:49:03 +00:00
Raphael Collet 1f48130d2b [REF] core: _name_search() now returns a list of ids
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.
2020-08-18 13:02:41 +00:00
Martin Trigaux d5c1649239 [IMP] base,web: _for_xml_id as a safe access point
/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
2020-08-17 09:08:23 +00:00
Nisha patel e249d2b434 [FIX] fleet: Fix model_count and category in the fleet
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>
2020-08-05 14:27:54 +00:00
Kevin Baptiste 9213cd3508 [IMP] fleet: usability improvements
- 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

closes odoo/odoo#54051

Taskid: 2289808
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-08-03 06:16:09 +00:00
Victor Feyens 5dc8b7bdd8 [IMP] *: replace default_get overrides by default attribute on fields.
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.
2020-07-23 16:38:17 +00:00
Simon Genin (ges) e88fc62222 [IMP] fleet: Improve ux of list views
Small UX improvements on list view and edit text of an empty kanban
screen.

Task ID 2291554

closes odoo/odoo#54234

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-07-15 08:37:56 +00:00
Kevin Baptiste f572fa720e [FIX] fleet: store driver on log services
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.

closes odoo/odoo#54264

Taskid: 2208080
X-original-commit: 5422bb8d6e3db5d6932570116af74ea634c40a51
Signed-off-by: Paul Morelle <madprog@users.noreply.github.com>
2020-07-09 11:16:48 +00:00
Kevin Baptiste 6a330e0b00 [FIX] fleet: remove default value on fleet.vehicle.log.services
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
2020-07-09 11:16:48 +00:00
shs-odoo 770494fade [IMP] fleet: Change long description of fleet.vehicle.log.contract model
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>
2020-06-02 04:16:25 +00:00
Nasreddin (bon) 8f2be8560e [FIX] fleet: User is set to "Plan To Change Car" when set as future driver
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

closes odoo/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>
2020-06-11 10:39:10 +00:00
jev-odoo 223b6cff6e [FIX] fleet: No notification on future_driver_update
Added `future_driver_id` in the 'Changed Driver' subtype.

OPW-2242321

closes odoo/odoo#52150

X-original-commit: d2174b3223e9987ae05920c5c9de54688ee05eda
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: Richard Mathot (rim) <rim@openerp.com>
2020-05-29 09:30:19 +00:00
Kevin Baptiste 5268f3c870 [IMP] fleet: add active, description on service log
Purpose
=======

Add new fields on fleet.vehicle.log.services to make the model more
flexible for several use cases.

TaskID: 2237599
2020-04-16 11:23:41 +00:00
Yannick Tivisse d970bd53fb [IMP] fleet: Add model types (car, bike) on vehicles
closes odoo/odoo#48300

Taskid: 2172282
Related: odoo/enterprise#9467
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-04-10 09:38:31 +00:00
Raphael Collet 5ab51dee7b [FIX] *: useless old API field parameters 2020-04-07 09:25:08 +00:00
Helly kapatel 1c9a6db16f [IMP] various: Change 'assignation' to 'assignment' across all modules
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>
2020-03-20 14:12:51 +00:00
Lucas Lefèvre 594ca5ea8b [FIX] fleet: Assign internal user as driver
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.

closes odoo/odoo#47572

X-original-commit: a693b368d3faddef6774004d40567e26b7d59cec
Signed-off-by: lul-odoo <LucasLefevre@users.noreply.github.com>
2020-03-13 10:30:10 +00:00
Lucas Lefèvre 2d470a423f [IMP] fleet: Close driver history on driver change
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.

closes odoo/odoo#44635

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-02-05 10:01:24 +00:00
Ujas Dubal ff23944ad7 [IMP] fleet: Make the image readonly on the vehicle and model
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>
2020-02-19 10:54:30 +00:00
jbm-odoo df44538a8b [IMP] fleet: Add analytic account and mobility card
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
2019-11-28 10:39:49 +00:00
Kevin Baptiste 84de0832ec [FIX] fleet: remove odometer log from chatter
closes odoo/odoo#41004

Taskid: 1931775
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-11-28 07:16:25 +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
RomainLibert 063cbc99bf [FIX] fleet: avoid cache miss in compute method
X-original-commit: 1adae2e5b85f06b8f2abc38190a8650dbe0ce95f
2019-10-16 14:17:27 +00:00
Swapnesh Shah 8f2716e1a3 [FIX] fleet: assign value for every record
Fixes #38574
Assigning default value for non-stored compute fields is required in
13.0

closes odoo/odoo#38685

X-original-commit: 7fa80370f8e6fe814651627832d81abe9edebad3
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-10-14 09:09:10 +00:00
Xavier ALT bea0a9edfe [FIX] base, *: ensure name_search() returns lazy name_get() result
To avoid slowing down search like "{relational_field}" contains "{value}"
we always need to return the lazy name_get() for each [_]name_search method

closes odoo/odoo#36735

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2019-09-11 17:11:33 +00:00
Raphael Collet 31764a984a [FIX] fleet: field recomputed with falsy fields
closes odoo/odoo#35910

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2019-09-03 12:02:45 +00:00
Prakash Prajapati c058562d73 [IMP] various: Add multi company domains on views
When the many2xxx field relates to a model where company_id is required, set
this  domain [('company_id','=',company_id.id)]

When the company_id field of the related model is not required, set this domain
['|',('company_id','=',company_id.id),('company_id','=',False)]

When setting the domain on a field which is in the treeview of a xxx2many field
evaluate against the company_id of the 'parent'.

Some constraints have been added on sereval models. Take a look at the complete
specification for more details.

TaskID: 2024446
Closes: #35266

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-08-16 11:17:28 +00:00
Sébastien Theys f0ffbea173 [IMP] *: remove unnecessary image sizes
The big images are probably never going to be used for the following models:

- pos category
- fleet brand
- livechat channel
- mail channel
- payment acquirer

And if big images are needed some day the model should use image.mixin instead.

PR: #34925
2019-08-02 16:47:58 +00:00
Sébastien Theys 58a2ffa26f [IMP] *: rename image fields
image_original => image_1920 (now resized to 1920)
image_big => image_1024
image_large => image_256
image_medium => image_128
image_small  => image_64
image replaced by image_1920 (when writing) or by image_1024 (when displaying
	what was previously the big size)

+ add new intermediate format:
image_512

PR: #34925
2019-08-02 16:47:58 +00:00
Lucas LefèvreandYannick Tivisse 3e97cff779 [IMP] base: Remove customer and supplier fields from res.partner
Purpose
=======

Fields `customer` and `supplier` on `res.partner`
are mostly used in domains of many2x fields.

Those domains can confuse end users because they don't
see the partner they are looking for; and it's not obvious why.

Some identified problems:

1. It can lead to duplicated partners: the user does not find
   the partner, so he creates a new one.

2. The user imports supplier contacts in the Contacts app, so they
   don't get the `supplier` flag. Then the user wants to make a purchase order,
   and cannot find the new suppliers in the list

3. A user removes the customer flag on a prospect, because they don't think
   it's a customer yet - except now they can't make a quote for that customer...

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

Remove the two mentioned fields.

Since fields `customer` and `supplier` have been removed, all partners
are now shown in many2one dropdowns.

But in some cases, not all partners are relevant or some are more likely
to be relevant than others. e.g. when creating a PO, top suppliers have a
higher priority than other partners.

So, adapt the places where those fields were used with the new mechanism to
display the searched the partners, according to the number purchase/sales
orders they made.

TaskID: 2031147

Co-authored-by: Yannick Tivisse <yti@odoo.com>
2019-08-01 12:42:03 +02:00
Adrian Torres 4b38cc6590 [REM] *: calls to @api.multi
Multi is the default api for methods, it is not necessary to explicitly
decorate methods with it, adds clutter and most people use it because
they see that the rest of the code uses it.

Done with `find . -type f -name '*.py' | xargs sed -i '/@api.multi/d'`
2019-07-17 14:13:12 +02:00
RomainLibert 8514ef827e [IMP] various: Make some small tree views editable
Purpose
=======

Some formviews are useless since there are so few relevant fields https://nimb.ws/1EdMV7

For instance, to create a new lost reason the user is forced to:
1. Hit create
2. Type in the name of the record
3. Hit save
4. Go back to the treeview
While he could simply type them away in an editable treeview.

The goal of this task is to allow for creation/edition of records in such models
directly from the treeview.

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

Modify tree views from a given list of models for which the
treeview has to be made editable bottom.

If not specified otherwise, the content treeview should stay the same.

If a field is readonly/required/etc. in the formview, it should be in the
editable treeview as well.

Relabeling has to be done of the field itself, not in the view.

TaskID: 2026126

closes odoo/odoo#34577

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-07-15 12:47:03 +00:00
Hiral Bhavsar 3cd7ed07a2 [IMP] *: remove 'view_type' on window actions.
The old tree views don't really exist anymore, this odd pseudo-flag to
dispatch between "list" and "tree" tree views has no reason to remain.

Task 1937686

closes odoo/odoo#31243

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2019-06-17 11:34:17 +00:00
Yannick Tivisse f5dfe4727c [IMP] api.py: Rename company_id/company_ids into company/companies
The goal is to be coherent with the user property.

Actually, company_id and company_ids on the environment are no fields.

Calling env.company_id returns a browse record, not an id.
2019-05-29 08:09:15 +00:00
Yannick Tivisse a5b6f31cf2 [IMP] base: Contextualize the multi company
Purpose
=======

Allow the user to select the allowed companies for which he wants to see records
on top of selecting his current company.

It is confusing for users to see the records from the company he is connected to
and the records of the children companies.

Instead of using the hierarchy of companies to access records across companies,
the user can now select (from his set of allowed companies) the companies for
which he wants to access records.

/!\ This means that the user will interact with records from company A when in
company B.
Example: a SO has been created and confirmed in A. When in B, I create the
invoice from it.

Specifications
==============

1/ Deprecate the parent/children hierarchy on the res.company model. The fields are
kept on the res.company model to ensure the retro-compatibility, but won't be used
accross the standard code anymore. The only functional usage for this mechanism
was to allow to see records from several companies by creating a virtual parent
company, which will be possible with the new mechanism.

2/ By default, a user will only see the records of the company he is connected
to (or records without a company). (It is still editable by the user if needed).
For that, put this information in the user context, to allow having different
configurations on different browser tabs. Instead of having domains like
['|',
('company_id', '=', False),
('company_id', 'child_of', user.company_id.id)]
you'll have something like
['|',
('company_id', '=', False),
('company_id', 'in', company_ids)]
Note that the 'company_ids' is a value that is passed in the evaluation
context on the record rule, as we already have user, or time.
company_ids is a list of the ids of all the enabled companies in the
user's context.

3/ Out of the generic improvements brought by this task, this will illustrate
issues that could exist since several versions. For example, it should not be
possible to create a scrap order for the company A with a package of the company
B, or it should not be possible to create an invoice on the company A with
payment terms from the company B. Before the version 12.0, it was easy to
encounter this kind of issues as the admin was the SUPERUSER_ID. A positive side
effect of the fact that the SUPERUSER_ID has become an inactive user was to
make it more difficult to introduce mismatch on the records, but haven't solved
the issue, as it was still possible to do it with parent companies
configuration. Some of these issues have been fixed in this commit, but all the
business flows should be re-tested to check if an ir.rule should be introduced
(eg: a multi company rule for stock.quand.package), if the company of a record
is correctly transfered to another record created from the first record (eg:
From a SO, create an invoice and a payment, the company of the sales order
should be transfered on the invoice and the payment, even if the company of the
sales order is A and I'm logged into the company B with the company A enabled.

4/ Currently, if I click on a button on a notification email (example 'View
Task'), I face a traceback if I'm not logged into the company of the record.
Now, if you click on a button and if you have access to the record, the correct
company will be automatically set.

5/ If I display a kanban view with several records from several companies (and
an image), all the images should be displayed.

6/ Currently if you copy paste an url, this will crash if you're not in the
correct company. This won't be fixed because it's quite impossible to do it in
a clean way. This task brings a workaround. Copy/Paste -> Traceback -> Log into
the correct company, re-copy/paste -> Ok.

7/ 2 property methods have been added on the environment to retrieve the company
on which the user is logged in and the companies the user enabled, on a specific
tab.
That way, when creating a record, instead of doing
default=lambda self: self.env.user.company_id
do
default=lambda self: self.env.company_id
On the other hand, to retrieve the enabled companies, do
companies = self.env.company_ids

8/ Modify the Company Switcher widget to allow to log into another company
WITHOUT writing on the res.users (and thus bringing cache invalidation issues
and so on). Also allow to enable several companies and see records from several
companies, and independantly of the other browser's tabs.

9/ When focusing on a tab, save the current company configuration on the local
storage. That way, when doing 'CTRL+T' or a middle click, the context is
propagated to the new tab.

10/ Improve the error message in case of multi company access errors. Now, when
the user is in debug mode, display the related names of the records and the name
of the user who brings the issue.

11/ Remove the context erasing when writing on a res.users
This is probably coming from the migration to new API of the base module.
The context was not propagated at this moment, which was a common mistake at
that time. When migrating the module, probably by using the 'black box' method,
as the context was not propagated, it was erased on the new version. This is
now an issue because the context (i.e. the enabled companies) was erased when
writing on a res.users, leading to tracebacks.
See: https://github.com/odoo/odoo/commit/7eab8e26d3d46c53f4be924d6a34e80a66e74960#diff-4c2e738ee8f64f11806c889ea097b5e7R624

12/ Fix the crash manager on redirect warnings. The issue is the following
- Create an invoice on a company without a configured CoA.
- Set a partner
- On the onchange_partner_id, a redirect warning is raised to propose you
to configure a CoA
- Click on 'Go to the configuration panel'
- A generic warning says something like 'Do you want to discard your changes?'
- Click on yes, the page refreshes, but not on the redirect action.
Now, set correctly the action on the hash, and reload instead. The breadcrumb is
lost for example, but you reach the correct action at least.

13/ Introduce a res.group to enable/disable the multi company per tab
feature.

14/ To help the users to know which tab is in which company, add the
possibility to have a favicon per company. When creating a company,
the classical 'O' icon is colored by default in a random color.

15/ Remove the company switcher on the frontend. This was mainly there
to allow a user to swicth to the company linked to the website.
This behavior is now transparent to the user. If the website A is
activated, then the company set on the context is the company of the
website.

16/ Deprecated the _company_default_get method on the res.company
model. Remove the method _get_company on the res.users model.

17/ Add 'allowed_company_ids' and 'current_company_id' on the pyeval
context. You can now use those variables on domains in the views to
access directly to the activated company.ies on the current tab.

TaskID: 1960971

closes odoo/odoo#32341

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-05-13 08:57:49 +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
Christophe Simonis 5dbf7bf357 [MERGE] forward port branch saas-12.1 up to f00c490be8 2019-03-26 10:33:26 +01:00
Christophe Simonis f00c490be8 [MERGE] forward port branch 12.0 up to 11b1e12cde 2019-03-25 19:45:26 +01:00
Christophe Simonis 11b1e12cde [MERGE] forward port branch saas-11.3 up to e9068c290b 2019-03-25 18:28:16 +01:00
Christophe Simonis e9068c290b [MERGE] forward port branch 11.0 up to 0196a6feb5 2019-03-25 16:47:05 +01:00
Nicolas Martinelli 7e6577398a [FIX] fleet: expired contract
- Create a contract for a vehicle
- Renew the contract and set old one to closed
- Run the cron 'Fleet: Generate contracts costs based on costs
  frequency'

The closed contract is reset to expired.

The contract should remain closed.

opw-1949470

closes odoo/odoo#31974

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-03-20 10:32:29 +00:00
Christophe Simonis 93d736e905 [MERGE] forward port branch 12.0 up to 6e8dff1952 2019-02-11 16:17:02 +01:00
Christophe Simonis 75eec26da3 [MERGE] forward port branch saas-11.3 up to 728bb2a28e 2019-02-11 12:47:52 +01:00