Commit Graph
115 Commits
Author SHA1 Message Date
Sébastien Theys b6288e5446 [IMP] *: remove image_64 and clean views
There are too many image sizes. Since they are stored resized this takes time to
generate when saving a new image, it's more rows on the attachment table, more
files on the disk, ...

64px is close enough to 128px that it can be removed without a big impact on
download size.

It will even reduce download and number of requests when both images are
displayed because now only one has to be downloaded and then benefit from cache.

The difference between the two is typically around 1.5kB which is negligible
these days, especially when the request overhead is around 0.5kB already, not
even taking into account other factors such as latency.

If a 64px image must absolutely be returned, it is still possible to pass the
size parameters to the image route. But the current guideline is to handle
resizing in the views when necessary.

Views
=====

- remove width and height attributes when existing CSS rules are overriding them
  (eg. `.oe_kanban_avatar` in the right context)
- add CSS rules instead of width and height attributes when possible
- use `object-fit: cover;` where width and height are forced to avoid distortion
  of non-square images
- for products, use `object-fit: contain;` instead, keep ratio but without crop
- add new CSS rules where the expected size was max 64px*64px before due to the
  image size itself
- remove `img-fluid` where using size classes to avoid conflicting rules

task-2060865

closes odoo/odoo#36147

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2019-09-19 10:23:39 +00:00
fja-odoo 424adb63e3 [IMP] gamification, *: remove KarmaError
* = stock, test_website, web, website_forum, website_slides, base

Replace KarmaError with AccessError and remove the related override made
on crash_manager and ir_http.

task-2069890

closes odoo/odoo#36655

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-09-12 13:49:02 +00:00
Alexandre Kühn 6f6445be8c [FIX] gamification, web: Edge does not support obj spread operator
As of August 20 2019, Microsoft Edge partially supports ECMA2018.
For instance, `Promise.prototype.finally()` can be used, but the
spread operator does not work on objects.

Task-ID 2056070
2019-08-28 08:50:56 +00:00
fja-odoo 09681e5660 [FIX] gamification, web: separate gamification/crash_manager
Fix for: https://github.com/odoo/odoo/pull/32132

A reference to gamification was still made in the crash_manager.

Part of: https://github.com/odoo/odoo/pull/35209
2019-07-30 16:00:05 +00:00
David Beguin 1949c796b5 [FIX] gamification, website_profile : re-fix division by zero if user has no karma
If a new user try to access the elearning platform or his porfile, if he has
no karma, has it is the case for new users, he won't get any rank. So that
the next rank karma minus current rank karma equals zero.

To avoid this, next_rank will always be first one existing if the user has no
karma. Also, the current rank will not be displayed if the user has no karma.
finally, next rank will not be displayed if the user reached the last existing
rank.

Task ID : 1941250
PR #31512
2019-03-06 14:08:24 +00:00
Thibault Delavallée e85c99c145 [FIX] gamification: improve next rank icons
Background of icons should be transparent.

Commit linked to task ID 1941250 and PR #31317.
2019-02-21 16:37:52 +00:00
Thibault Delavallée e7b3535884 [REF] gamification: clean next rank motivational implementation
Purpose of this commit is to clean motivational capabilities of gamification
ranks[1]. It makes more sense to store a motivational to achieve on next rank
itself. We therefore rename the field and provide nice demo data that will be
used in elearning use of gamification ranks.

Commit linked to task ID 1941250 and PR #31133.

[1] task ID 1922159 (landed at 91ee6ba5a7)
2019-02-15 17:45:11 +00:00
Thibault Delavallée c971b622c0 [IMP] gamification, website_slides: add challenges in slides and improve ranks
Purpose of this commit is to add challenges related to slide / elearning
module. 5 new challenges with their badges are added. Portal user partner
is now also published to have bioutifoul demo data. Commit linked to
eLearning tasks [1][2]

Co-Authored-By: David Beguin <dbe@odoo.com>
Co-Authored-By: Thibault Delavallee <tde@odoo.com>

[1] new homepage task: ID 1936153 and PR #30770
[2] new user profile / gamification task: ID 1922159 and PR #30514 and #30988
2019-02-15 09:57:46 +00:00
David Beguin 9e082662af [IMP] gamification : add ranks based on karma
To encourage forum and slides users to be more active ranks are now added.
They are directly linked to karma. The more the user has karma the more his
rank will be high.

The default rank is Newbie, with 1 point of karma. Users with 0 karma are
considered as inactive on forum or slides. When a user reach a new rank
a mail is sent to him to congratulate him with his new rank.

To add a button in the mail template to allow users to go directly on
a website section (like forum or slides) simply override
get_gamification_redirection_data to add the target url.

Partial commit linked to eLearning project. Main specifications related
to gamification and user profile can be found on task 1922159 (PR #30514).
Main specifications related to eLearning can be found on task 1902304
(PR #29876).
2019-02-07 12:13:28 +00:00
stefanorigano 1d9208c4fa [REF] *: improve app icons, add SVG version
- Uniform colors and design
- Replace duplicated icons (eg. sale / sale_management)
- Improve misleading icons (eg. POS)
- Add icons for new apps

Add SVG versions to lossless future editing and print/marketing use.

task-54681
2018-08-09 15:46:06 +02:00
qsm-odoo b04dec4025 [REF] *: rename all LESS files to SCSS
This is a simple renaming without adaptation.
2018-04-18 15:59:15 +02:00
rar-odoo ad9e39020f Revert "[IMP] Gamification: email template (#15582)" (#18670)
This reverts commit fb9865d900.
2017-08-04 01:35:22 +02:00
Thibault Delavallée fb9865d900 [IMP] Gamification: email template (#15582)
* [IMP] Gamification: email template

* [FIX] Gamification: mail template

Fix of the template.
- removed most of the static code,
- add user-specific information.

* [IMP] Gamification: email template

- Split templates for 'personal' and 'ranking'.
- beug fixes
- Code cleaning

* [IMP] Gamification: template

- removed report_template_id field,
- force dedicated template for 'personal' and 'ranking,
- fix image size on personal template.
- code cleaning
2017-08-03 19:15:08 +02:00
Keyur Gajjar 82e35bce6c [FIX] gamification: several layout issues
1/ ISSUES WITH BADGES:
Go to menu Employees > Badges > Select any Badge from kanban View.
Click on "GRANT THIS BADGE" button.
- When you grant a badge, the description field is not at the right place.
  It should be below the employee field
- Badges Form View: "Granted Employees" should be a stat button with a counter
- Badges form view is broken, field label/values are not at right place

2/ ISSUES WITH CHALLENGES:
Go to menu Employees > Challenges
Challenges Kanban View
- Image Avatars are too big, make it smaller.
- Challenges Form View > Advanced Options : fields Report frequency, Report Template
  and Send a Copy to are ugly
2016-03-21 14:02:10 +01:00
Keyur Gajjar bea7b19862 [MIG] gamification: migrated sass to less. 2016-03-21 14:02:10 +01:00
Fabien Pinckaers 4c8e908b49 [IMP] Speed up app switcher loading: 645k --> 137k lossless compression for all icons 2016-02-26 11:39:38 +01:00
Aaron Bohy a0cbf891af [REM] *: remove chat menu and timeline view 2015-09-01 20:57:13 +02:00
Christophe Matthieu 6baf611df1 [IMP] web: create generic controller '/web/content' and '/web/image'
Replace deprecate controllers like /web/binary/image, /web/binary/saveas...
Use ETag for all content with 'unique' option to cache the content if the content is never changed.
2015-08-21 22:06:52 +02:00
qsm-odoo 5960d3cff8 [IMP] *: New icons 2015-08-11 14:31:10 +02:00
Christophe Matthieu 500c33b184 [IMP] web: split model.js into model.js and data_model.js. Web js modules must call web.DataModel. 2015-07-10 16:32:35 +02:00
Thibault Delavallée 1c38e61c35 [REM] mail, hr: removed suggested groups / suggested employees feature.
Removed fields and code related to the display of groups and employee
suggestions. This impacts notably the model of res.users in mail and
hr.
2015-07-09 10:09:10 +02:00
Valerie Pirenne c24332e6da [IMP][ADD] mail, various: timeline view.
This commit introduces a new view type, the timeline view. This view is
intended to display messages like the previous chatter. This is now a view
like the form or list view. Like other views it will be possible to have
custom templates for some specific needs, allowing customization.

[IMP] mail: the value tracking is modified. Previously messages were created
containing the modified values. Those values are now stored, using a new
model mail.tracking.value. The message body is dynamically build based on
the values. Tests have been updated.

This version is temporary. Indeed two main modifications will come in a short
future :

 - the new design will improve the display
 - the slack mode will change the way the Inbox and notifications are managed

All glory to the Hypnotoad.

Special thanks to Valerie Pirenne (vpi), Jerome Maes (jem) and Richat Mathot
(rim) that did not code but said a lot of things. Martin Trigaux (mat) did
nothing, a bit like for the slides modules, but he is busy sending emails.
2015-05-21 12:10:25 +02:00
Géry Debongnie 4fdf74fe21 [IMP] web+addons: improvement to module system
The module system needs to know the dependencies of a given module
before executing the function.  This is why the dependencies were
defined once in an array, and then were described one more times in the
call to require.

But a trick can simplify this: the boot function can parse the string
representation of the module and extract the calls to require from it.
It is more work for the processor, but it leads to simpler module
definitions.
2015-03-18 09:23:37 +01:00
Géry Debongnie 858e46e977 [REF] update various small addons to the new module system 2015-03-18 09:01:52 +01:00
Yannick Tivisse 9207c4645a [IMP] Replace all oe_e class by fontawesome + remove entyporegular library 2015-01-21 16:11:26 +01:00
rba-odoo 6baca1b494 [IMP] *: kanban custom CSS removal 2014-11-12 13:39:37 +01:00
Christophe Simonis c825d0552d [MERGE] forward port of branch saas-3 up to ec27773 2014-11-05 21:46:42 +01:00
Christophe Simonis ec277732fe [MERGE] forward port of branch 7.0 up to 3e3e35e 2014-11-05 21:10:15 +01:00
Martin Trigaux 56b3db8219 [IMP] gamification: usability and shit
Challenge
- 'Reward as soon as every goal is reached' box checked by default (most of the time people want this behaviour, few special cases were do not)
- Click on challenge kanban opens goal list instead of challenge form
- Add button 'Start Challenge' clicking on statusbar is not intuitive

Badge
- When creates a challenge from badge view, set by default badge to 'For Every Succeding User' field
- replace filter 'Current' vs 'Passed' by 'Running' (in progress and done with not reached end date) vs 'Done' (done & failed without end date or end date passed)

Goal
- list of badge on employee form not the first tab
2014-09-18 11:12:15 +02:00
Denis Ledoux 79d4c57877 [MERGE] Forward-port of latest saas-3 bugfixes, up to rev. 9439 revid:dle@openerp.com-20140429112147-hqfqd0y487s817n7
bzr revid: dle@openerp.com-20140429112738-y2el246dmd2o2zy9
2014-04-29 13:27:38 +02:00
Martin Trigaux b2bc761d76 [FIX] gamification: do not overwrite the mail widget as it would be called too often, the wall is enough
bzr revid: mat@openerp.com-20140425130740-ptkbsyyql08cx572
2014-04-25 15:07:40 +02:00
Martin Trigaux 21022c5472 [REF] gamification: add batch mode, improve some views, remove inprogess_update state (replaced with boolean 'to update')
bzr revid: mat@openerp.com-20140411142257-zpaul4sq3t5j5r64
2014-04-11 16:22:57 +02:00
Stephane Wirtel bea411bb98 [IMP] Backport one feature from website: this feature allows to specify a file
path on the field tag fetching the right file instead of using the base64
encoded file in the field.

<field name="image" type="base64" file="base/static/img/main_partner-image.png" />

bzr revid: stw@openerp.com-20140109154550-a04qybctzaaqtrlr
2014-01-09 16:45:50 +01:00
Martin Trigaux 22a291d47a [REF] gamification: use sass files instead of native css
bzr revid: mat@openerp.com-20131224134405-9k4potbzq7ea20p4
2013-12-24 14:44:05 +01:00
Martin Trigaux aefd64e8cf [REF] gamification: compute_code is now similar to ir.actions, cleanup code
bzr revid: mat@openerp.com-20131224130023-e4gc91ell38zdtfj
2013-12-24 14:00:23 +01:00
Martin Trigaux c0eef31160 [REF] gamification: add user_from_id on badge, remove outdated-doc, remove useless message_post call
bzr revid: mat@openerp.com-20131223155404-h4in4ocr8jakq3ff
2013-12-23 16:54:04 +01:00
Martin Trigaux f77aefc07a [REF] gamification: cleaning methods and reports
bzr revid: mat@openerp.com-20131220144521-wyu1gx8bcitu6nk4
2013-12-20 15:45:21 +01:00
Martin Trigaux 4bc29b9ffa [REF] gamification
bzr revid: mat@openerp.com-20131217170232-e0zruxzl1wlycaji
2013-12-17 18:02:32 +01:00
Martin Trigaux 122c15c48d [REF] gamification: pretty much changing half of the code to make tde happy...
bzr revid: mat@openerp.com-20131217161541-oxsgy7gmko2x6qui
2013-12-17 17:15:41 +01:00
Martin Trigaux 8a80688560 [FIX] gamification: move icon to description folder
bzr revid: mat@openerp.com-20131212102624-obfsh2nsclhpv4n9
2013-12-12 11:26:24 +01:00
Martin Trigaux ba64b6e3e6 [FIX] gamification: use gauge merged in web and instead of own version
bzr revid: mat@openerp.com-20131002150507-ea76au2frffvfd0r
2013-10-02 17:05:07 +02:00
Quentin (OpenERP) 3887f78cef [REF] gamification: code review (WIP)
bzr revid: qdp-launchpad@openerp.com-20130603203053-dy7ia09rl0i1sxmd
2013-06-03 22:30:53 +02:00
Martin Trigaux a51a1fe65d [IMP] don't use new action manager for do_action
bzr revid: mat@openerp.com-20130527093738-2dp8uw5nli7xzahu
2013-05-27 11:37:38 +02:00
Martin Trigaux 2b5069f7c8 [REF] move justgage to lib directory
bzr revid: mat@openerp.com-20130429154912-hcq99ukqwr1b2uqh
2013-04-29 17:49:12 +02:00
Martin Trigaux e396d9f0b6 [IMP] tooltip on goal symbols
bzr revid: mat@openerp.com-20130429154738-as56ln2gpv3muvyx
2013-04-29 17:47:38 +02:00
Martin Trigaux 0ea12d6d91 [IMP] design tweaks
bzr revid: mat@openerp.com-20130429153007-tha1wmcvbtp89dz2
2013-04-29 17:30:07 +02:00
Martin Trigaux 3ee9aa428b [FIX]gamification: design issues
bzr revid: mat@openerp.com-20130429132000-kibmf1u17h24j92c
2013-04-29 15:20:00 +02:00
Martin Trigaux 6eaf93264b [IMP] small fixes
bzr revid: mat@openerp.com-20130429130536-gx2vtz8qgy3ogx5u
2013-04-29 15:05:36 +02:00
niv-openerp f99ce17ecf Removed KanbanRecord hack to use kanban fields registry
bzr revid: nicolas.vanhoren@openerp.com-20130429114305-3b24eixyj4xts9lv
2013-04-29 13:43:05 +02:00
Martin Trigaux 87c1fab873 [IMP] remove inner_box block
bzr revid: mat@openerp.com-20130426161613-4mxh5f25yjc8ogl8
2013-04-26 18:16:13 +02:00