Commit Graph
31 Commits
Author SHA1 Message Date
Thibault Delavallée d13d251a2f [MOV] various: move and split mail data
Just doing the summer file cleaning. Move mail data into files named based on
their model, easing maintenance and searching for those data.

Spotted during Task-2207626 (Rating: Delay rating notification to ease feedback)

Part-of: odoo/odoo#98661
2022-08-25 10:31:56 +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
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
Martin Trigaux d9e3aab69b [FIX] mail: convert res_model_id to selection
Following the removal of read access on ir.model (odoo/odoo#69120),
the mail.activity.type model was not accessible to non-admin users due
to the res_model_id many2one field.

Before this commit, a project user could not access the Activity Type
menu.

Convert it to a selection field with the selection values being
computed in sudo.

closes odoo/odoo#74981

Related: odoo/enterprise#20214
Related: odoo/upgrade#2734
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-08-23 06:56:00 +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
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
Xavier Morel ef709fd92b [IMP] core, base: avoid multiple xids when importing records w/ inherits
Before this change, we create an xid for every parent of a record
being imported, regardless of whether it already has an xid, or if
it's being created implicitly through the child.

This generates unnecessary extra xids on pre-existing objects
e.g. update 5 product variants -> the product gets 5 new xids despite
already having one.

We should *only* set a xid on parent records which are being
implicitly created by the creation of a child with a specified
xid. That is, we should never set a xid on the parent if it exists
before the child is created.

Update _process_end to try and see if "non-loaded" xids correspond to
an automatically generated "parent" xid: we're still setting a xid on
implicitly created records (if the child is created with a xid) so
they're properly removed if e.g. the module is uninstalled, but
because we're only doing so at creation these xids will not be visited
during update and _process_end will try to delete them.

A special case can be added to check that "unknown" parent xids don't
have children which _inherit them, in which case we want to protect them.

Task 2251039

closes odoo/odoo#53283

Related: odoo/enterprise#12023
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2020-07-27 06:32:59 +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
Kevin Baptiste 6cbe824871 [REV] web: reverts update to fontawesome 5.11.2
This reverts commit ff1c35513a.

closes odoo/odoo#41480

X-original-commit: 116057b26e71db4692280463669f3e80d813ddcc
Related: odoo/enterprise#7110
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-12-09 10:33:36 +00:00
Kevin Baptiste ff1c35513a [IMP] web: update to fontawesome 4.7.0 to 5.11.2
FontAwesome 5 introduced new names for some icons as described on
https://fontawesome.com/how-to-use/on-the-web/setup/upgrading-from-version-4#name-changes

This commit replaces the old names to the new ones.

closes odoo/odoo#35826

Taskid: 2050241
Related: odoo/enterprise#5180
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-11-28 10:05:12 +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
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
Martin Trigaux 3c568aec0b [FIX] base,website_sale,fleet: do not use a space in xmlid
This probably a bad idea for odoo but is definitly a bad idea for pofile

As shown in gettext reference, the spaces are used as separator in po files
https://www.gnu.org/software/gettext/manual/html_node/PO-Files.html
For instance
    #: src/msgcmp.c:338 src/po-lex.c:699
    #, c-format
    msgid "found %d fatal error"
    msgstr "..."

The line "model_terms:ir.ui.view,arch_db:website_sale.search count"
was considered as two references:
- 'model_terms:ir.ui.view,arch_db:website_sale.search'
- 'count'

Correct external id of fleet, even if not translatable
2019-06-05 09:44:11 +00:00
Davor Bojkić 6dde6b98a5 [IMP] fleet: replace hardcoded ids by reference
More stable to changes

closes odoo/odoo#32960

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-05-27 16:15:33 +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 2602642a78 [IMP] mail,*: remove useless field is_master_data
This field is a non-sense. By using the same logic, it should be added
to any low level model.
Replace the check by a simple verification of presence of an XMLID.

A more generic opt-in solution should be integrated into ORM.

Partially revert commits 0db0e66e96 and
bbd64c22ab.

See #29257 odoo/enterprise#3550

closes odoo/odoo#31778

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-03-12 10:29:51 +00:00
Mohit Ghodasara bbd64c22ab [IMP] various: prevent unlink of automated activity types
Purpose of this merge is to update main addons and set activity types used
for automated activities as master data. This means they cannot be removed.
Indeed those activity types are used in business flow to generate activities
and removing them may break some flows.

This commit is linked to task ID 1907970 and PR #29257.
2019-02-05 11:32:14 +00:00
Christophe Simonis 835b77ba94 [MERGE] forward port branch 12.0 up to ebe43bad9e 2018-10-09 11:37:30 +02:00
Yannick Tivisse c972b62b3c [IMP] fleet: Load fleet vehicles as data instead of demo data
Purpose
=======

In the fleet module, Models & Brand are in demo data. It should be loaded as regular data.

closes odoo/odoo#27524
2018-10-08 09:55:20 +00:00
Xavier Morel e1837721a8 [FIX] *: reassociate various demo data to admin instead of root 2018-09-24 15:55:06 +02:00
Yannick Tivisse 592391d2d7 [FIX] fleet: Move data from 'demo' to 'data' 2018-08-20 17:17:53 +02:00
Yannick Tivisse 348447923a [IMP] fleet: Improve stages demo data
Remove the old one and defined stages that are more realistic.
2018-05-04 09:47:05 +02:00
Yannick Tivisse ef8befeef4 [IMP] fleet: Add subtype to track driver modifications 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 3be5611206 [IMP] fleet: Move model,tags and service type data to demo 2017-11-22 13:28:05 +01:00
Baris Kocak bbcebcc123 [IMP] fleet: Improve dashboard, vehicule form and contracts
Purpose: Improve fleet for a better usability

Dashboard:
  - Replace 'leasing' button by a contract status icon in kanban tiles
  - Add a link to contract
  - Link to vehicule form when clicking on the tile

Vehicle form:
  - Track contract status in a chatter
  - Add a model_year

Contracts:
  - Imporve the states names
  - Split service types in two list views service/contracts
  - Execute a cron once a day to upgrade contract status
  - Add a new contract status is introduced 'Expiring Soon' to help
    spot contracts that will expire until 15 days with a filter.
  - Add a 'group by vehicle' to improve list usability

Fuel logs view: Add an an odometer column
2017-08-07 14:05:16 +02:00
Thibault Delavallée 1c79c5ee30 [REF] ir_cron: make scheduled actions inherits from server actions
The purpose of this commit is to handle code execution only in server
action and delegate schedule management to ir_cron model.

ir.cron model now inherits from ir.actions.server. Fields model, function
and args are removed as well as the logic to handle them. There is no
more code manipulation and evaluation in ir_cron, only a call to the run
method of ir.actions.server.

Cron form view use server action form view as primary view. This way
automated actions use the same base form as server actions with
cron details added.

Thanks to @fpodoo for the original idea and preliminary work. Thanks to
@jpr-odoo for first developments. Thanks to @jem-odoo for reviewing.
2017-01-03 19:11:07 +01:00
Ravi Gadhia e513af0bb0 [IMP] fleet: migrate to new api (fleet.py). my eye is paining 2016-05-27 10:39:22 +02:00
Ravi Gadhia 288568f486 [IMP] fleet: change directory structure according to new api 2016-05-27 10:33:28 +02:00