Commit Graph
12695 Commits
Author SHA1 Message Date
Kishan Gajjar 22b598bc1b [IMP] web: export improvements
* remove center buttons, corresponding features either moved to fields
list (handle / bin on exported, etc...) or removed
entirely (e.g. clear)
* replace XLS to XLSX format, increases rows# to 1048579
* add FAYT filtering of available fields
* sort available fields alphabetically (CI) always
* change export templates UI: remove buttons

TaskID: 1910953

closes odoo/odoo#32339

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2019-08-12 13:38:31 +00:00
Kaushalya Mandaliya 9b9780e17b [IMP] web: show avatar correctly even when rectangle image is used
Before this commit,
In top-right corner, the avatar that is being shown doesn't correctly
look like a circle if the shape of the avatar is rectangle.

After this commit,
The avatar appears in the top-right corner will be shown in correct circle
shape, irrelevant of the image is square or not.

task-2042276
closes: #35265

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-08-05 10:26:07 +00:00
Kaushalya Mandaliya bf2b11a232 [IMP] web: image field control buttons layout issue
image widget control button icon(Edit and Delete) not displayed in one line
button tag is used for control buttons and button tag has default padding
so removed default padding added by browser by explicitly defining padding 4px

task-2042276
closes: #35265
2019-08-05 10:15:01 +00:00
Mohammed Shekha 597142d12c [REF] web: move some logic in _prepareButtons method
This function was too long and it's now easier to override it
in enterprise

Task ID : 1924779
2019-08-09 09:01:19 +00:00
Mohammed Shekha 80a8b66246 [IMP] web: m2o/m2m SelectCreateDialog will now open kanban view
- many2one widget in mobile will open kanban view instead of listview when
records needs to be selected

- Add support of "kanban_view_ref" on many2x fields:
For many2one fields, this specific kanban view will be opened when you click
on this field. Note that in desktop, the behavior stay unchanged:
'Search More' will open the tree view.
For many2many fields, this specific kanban view will be opened when you add
a record in mobile.

- Add support "selection_mode" in kanban views.
This boolean is set to true when you want to use a kaban view to
select a record instead of open a record.
"selection_mode" is now passed in qweb_context to allow developers
to use t-if='selection_mode' in kanban views to show or hide elements;
buttons, dropdowns, anchor tags are not necessary when selection_mode
is enabled. So those elements can be hidden based on this condition.
Useful when kanban view is opened from m2o in mobile environment.

Task ID : 1924779
2019-08-09 09:01:19 +00:00
qsm-odoo e60323f876 [IMP] website, *: improve brand promotion in the footer
* web, website_event, website_sale, sale_quotation_builder

Instead of an ugly danger-colored badge promoting "odoo", we now use
the official odoo logo. The code is also refactored to use more
consistent and translatable sentences without duplicated code.

Note: the odoo logo is added in the repo, downloaded from our official
brand assets page (https://www.odoo.com/page/brand-assets), in its
'tiny' version. The repo already contained multiple odoo logos but they
are quite old and should be replaced in a further update. Note: the svg
version was not able to be used as it contains external margins...

Part of https://github.com/odoo/odoo/pull/34422
task-2026299
2019-08-09 09:45:07 +00:00
fja-odoo 736353b169 [IMP] website, *: improve published smart button
* = web, website_blog, website_crm_partner_assign, website_event,
website_event_track, website_forum, website_hr_recruitment,
website_livechat, website_partner, website_profile, website_sale,
website_sale_delivery, website_slides

The published button name is a bit ambiguous, now it will clearly state
what it does with a new title : "Go to Website". The "Published",
"Unpublished" state is shown with the globe icon changing color
(green and red) and a title on the button.

Badge and Delivery don't have a website page, the button will then be
a publish/unpublish button in the backend.

task-2002435

closes odoo/odoo#34261

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2019-08-08 16:05:33 +00:00
Géry Debongnie 8ce97d144d [FIX] web: remove flickering in calendar popover
Before this commit, the calendar popover was opened before the popover
widget was ready.  This is not usually the way it is done in odoo.

closes odoo/odoo#31874

Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2019-08-08 12:32:30 +00:00
Jigar Patel 56cf4f8125 [IMP] web: add new many2many_tags_avatar field widget to show avatar with tags 2019-08-07 12:30:55 +00:00
Jigar Patel f4194d53aa [FIX] web: add missing 'selection' key to create selection field using makeRecord 2019-08-07 12:30:55 +00:00
sri-odooandjat-odoo 369c20a99b [REF] web: refactor the calendar view
Improve design and introducing several usability improvements:
- Removed customization of an event card, just display event title.
- Added popover, popover consist of two sections:
    1) Show the title, date and time of an event. Date and time are
       automatically computed according to the user timing preferences,
       language and event duration. Can be hidden with hide_date/hide_time
       attribute respectively.
    2) Display all the fields specified inside the <calendar/> element.
       fields can be specified with a widget and its options.
       e.g. <field name="name" string="Custom Name" widget="char" options="{}"/>
- Show avatar in popover for filters.
- Removed hide sidebar feature.
- Increase readability using a better color selection.
- Better UI in mobile.

And, Adapted test cases

Task 1919926

Co-authored-by: jat-odoo <jat@openerp.com>
2019-08-07 12:30:55 +00:00
Mathieu Duckerts-Antoine 1e7f281070 [FIX] web: avoid graph flickering on firefox
The way in which graph tooltips were created and
positioned used to make the graph flicker on firefox.
This fix solves that problem by choosing a fixed initial
position for the tooltip before recompute it (when
the necessary information to choose a correct position
is available).

closes odoo/odoo#35552

Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2019-08-08 09:00:36 +00:00
Mathieu Duckerts-Antoine d925a4557a [IMP] web: default groupbys can be given a rank
Consider an action with a search view defined by the arch

<search>
<filter name="gb_foo" context="{'group_by':'foo'}"/>
<filter name="gb_bar" context="{'group_by':'bar'}"/>
</search>

If the action context is

{
search_defaults_gb_foo: true,
search_defaults_gb_bar: true,
}

the two groupbys will be activated at start but not necessarily in a suitable
order.

This commit allows to specify the order in which the default groupbys should be
activated by giving them a rank. For example

{
search_defaults_gb_foo: 2,
search_defaults_gb_bar: 1,
}

leads to group first by bar then by foo.
The rank number should be chosen between 1 and 99.

closes odoo/odoo#35538

Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2019-08-08 09:27:23 +00:00
Victor Feyens 56aab8bc11 [IMP] web/dialog.js : support xl dialog modal size. 2019-08-07 12:50:09 +00:00
mreficent 355a5dfc36 [IMP] *: fix typos in comments
closes odoo/odoo#35404

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-08-07 10:28:33 +00:00
Dharmang Soni 7c95dbf366 [IMP] web: allow invisible filters to be used
Before this rev. `invisible` filters in the search view were not
considered at all.

Now the filters are still invisible from the user POV, but they are
still accesible via context and can be applied on search.

Related of task 2036392
2019-08-07 07:23:15 +00:00
Mitali Patel 857c485175 [IMP] base/web: store more precision digits for rate field
Currently, only 6 digits after decimal point is stored in database and for some currencies
it may require to have more digits after decimal precision to correctly convert rates,
like MXN -> USD currency. So, we allow maximum digits to be stored in database.

On the view side, wherever rate is editable(form or tree view), we show 12 digits
after decimal point and on list view, we truncate limit it to 6 digits.

Also, a bug is fixed for web where 'digits' attribute for float field on list view isn't considered.

Also, we have to remove a test case statement which only checks for 6 digits for a float number.

task: 2024668
closes: #34279

Signed-off-by: Josse Colpaert <jco@openerp.com>
2019-08-06 05:28:35 +00:00
Mathieu Duckerts-AntoineandAaron Bohy 49a97305b1 [REF] *: pivot view refactoring
The main aim of the present refactoring is twofold:

- simplify the code that was largely complexified at the time of the
introduction of comparisons in the pivot view (Time Ranges menu),

- factorize the method expandHeader and _loadData that were too much complex.

Along the way, the pivot model structure has been simplified
and many tests have been added.
Performances in mobile mode have been improved by avoiding
unecessary operations due to useless column groupbys in that
mode.
It should now be easier to understand and modify the pivot view in future.

Co-Authored-By: Aaron Bohy <aab@odoo.com>

closes odoo/odoo#33615

Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2019-08-02 18:34:18 +00:00
Mathieu Duckerts-Antoine 1ef258f6cb [FIX] web: mockReadGroup does not mix 'false' and false
An implicit call to toString was made for the
groupbys values in the function used to
group records in _mockReadGroup.
Consequently, the values false and 'false' were
mixed and the corresponding records put in the
same group.
2019-08-02 18:34:18 +00:00
Mathieu Duckerts-Antoine 5894df57d3 [IMP] web: add math_utils to core
math_utils is a small library that exports two
functions:

    - cartesian: allows to compute the cartesian
                products of any numbers of arrays
                while preserving the internal
                structures of their elements.
    - sections: returns an array with all
                the initial sections of the
                array passed as parameter.
2019-08-02 18:34:18 +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
Martin Trigaux 66dea8bb7b [REF] web: remove raw_mode flag on export
The export is now always in raw_mode
Adapt the tests

Fixes odoo/odoo#18798

closes odoo/odoo#26724

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-08-02 08:53:24 +00:00
Vincent Schippefilt 75aca37453 [IMP] web: listview remove extra style on click
Before this commit, when clicking on a cell in the listview, the cell
receives the focus, which makes it have an extra style (darker gray)
when waiting for the page to laod.

After this commit, the extra style will only be added when using the
keyboard to navigate between the cells and not on click.

task-id: 2041902

closes odoo/odoo#35303

Signed-off-by: Mathieu Duckerts-Antoine <Polymorphe57@users.noreply.github.com>
2019-07-30 14:21:46 +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
fja-odoo 5ac167a85b [IMP] web: revert warnings display in back-end
Fix for: https://github.com/odoo/odoo/pull/32132

We had changed the display of the warnings in the back-end to be like the
front-end (notification toast). This change needs to be reverted. Now
the warnings in the front-end are toast notifications and in the
back-end they are Warning modals.

Part of: https://github.com/odoo/odoo/pull/35209
2019-07-30 16:01:20 +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
fja-odoo 2d6dc75a2c [FIX] web, *: make crash_manager use services correctly
* = website_forum, stock

Fix for: https://github.com/odoo/odoo/pull/32132

crash_manager.js was using the services while bypassing
ServiceProviderMixin That means all services are duplicated, each having
their own state.
To fix this issue, CrashManager now extends AbstractService. Also
crash_manager is now registered in serviceRegistry instead of being
instanciated on the fly.

The crash_manager now being a Service raise one issue with the tests:
The services are not run for the tests but some tests needs the
crash_manager 'unhandledrejection' listener. For that matter the
services are reenable in qunit. Also the crash_manager's
'unhandledrejection' listener has to have precedence over the qunit
listener as it will handle rejections wich have no reason or are not
Errors.

Part of: https://github.com/odoo/odoo/pull/35209
2019-07-30 15:57:14 +00:00
Arnold Moyaux caf6cb929b [IMP] base, web: barcode drawer remove margins
The purpose of quiet parameter is to return a barcode image
without left and right margins.
It could be usefull on report where the barcode size should be
minize or align to another element.

closes odoo/odoo#29209

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-07-31 08:04:38 +00:00
qsm-odoo afb3c28fcc [FIX] web: restore modal backdrops click behavior
Since https://github.com/odoo/odoo/commit/2ad49ec93e39ae5d59ccc17884408870e1c86c5e,
all dialogs were able to be closed by clicking on the backdrop which was
not a desired behavior.

Indeed, the 'backdrop' option of the BS component was misused.

closes odoo/odoo#35300

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-07-30 13:42:09 +00:00
Vincent Schippefilt a86795e60e [REV] web: list: display help in header cell tooltip
This reverts commit 3ea179e03c938222d88e32cbb5accacdfcef78c6.

SBU requested to revert this task
https://www.odoo.com/web#id=2036832&model=project.task&view_type=form&menu_id=4720

closes odoo/odoo#35298

Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
2019-07-30 13:13:52 +00:00
fja-odoo 0299a3fa24 [IMP] web_editor, *: add message when no document/image
* web

The document/image tab in "Select a media" Dialog were not displaying
any info when there was no document/images to load.
Now there is a message with the same image as the backend.
The "All attachments have been loaded" message is only displayed if
there is no more documents to display after using the button "Load More".
The "Load More" button is removed in the backend if there is no
documents/images.

Part of https://github.com/odoo/odoo/pull/33195
task-1945874

closes odoo/odoo#33195

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-07-30 09:04:18 +00:00
fja-odoo bb37077610 [IMP] web_editor, *: remove assets from documents
* web

"Document" tab in "Select a media" Dialog was displaying all the assets
files. Now all files containing "assets_" are excluded from the
"Document" tab. This is similar to the regenerateAssets function in
debug_manager that deletes assets based on this criteria.

For consistency the Assets Domain is now a utils.js function

Part of https://github.com/odoo/odoo/pull/33195
task-1945874
2019-07-30 09:03:51 +00:00
Mathieu Duckerts-Antoine f781a7acbb [IMP] web: graph legend always on top 2019-07-30 06:53:12 +00:00
Mathieu Duckerts-Antoine c8f5cd71ed [IMP] web: fill area for unique line chart group 2019-07-30 06:53:12 +00:00
Vincent Schippefilt 97efe4b4e7 [REF] web: fix graph view code typos and formatting 2019-07-30 06:53:12 +00:00
Mathieu Duckerts-Antoine df279a5113 [IMP] web: add a small padding-top to the graph container 2019-07-30 06:53:12 +00:00
Mathieu Duckerts-Antoine 781d4da3f7 [IMP] web: make sure all non zero datasets are visible in graph views 2019-07-30 06:53:12 +00:00
Mathieu Duckerts-Antoine 4302f4dc1c [REF] web: review inline doc of graph renderer 2019-07-30 06:53:11 +00:00
Mathieu Duckerts-AntoineandThomas Werland 21944479a2 [IMP] web: tooltips on graph view legend items
Graph view legend items are shortened when ther are too long.
Here we add tooltips on hover to allow the user to see the
full text of items that were cut.

We also improve a bit the way items are shortened.

Co-Authored-By: Thomas Werland <twe@odoo.com>
2019-07-30 06:53:11 +00:00
Thomas Werland f9bcf4c079 [IMP] web: Chart.js update
Update of Chart.js library to the latest version.
The onLeave listener was not avalaible in the previous version of the library.
This has also removed a bug in the graph view where
some groups were sometimes not shown in the legend.
2019-07-30 06:53:11 +00:00
Mathieu Duckerts-AntoineandThomas Werland adeeb0149a [IMP] web: bar charts not stacked if not enough datasets
Co-Authored-By: Thomas Werland <twe@odoo.com>
2019-07-30 06:53:11 +00:00
Mathieu Duckerts-Antoine a9d013c581 [REF] web: remove old dropdown_menu.js file 2019-07-30 06:53:11 +00:00
Mathieu Duckerts-AntoineandThomas Werland 7811189c59 [IMP] web: custom tooltips in graph view
Co-Authored-By: Thomas Werland <twe@odoo.com>
2019-07-30 06:53:11 +00:00
Christophe Simonis d5e1fd16b4 [MERGE] forward port branch saas-12.4 up to cda4f3c308 2019-07-29 14:10:30 +02:00
Julien MougenotandLucas Perais ed18095127 [IMP] base: Configure document layout
The onboarding modal for setting up the few base fields of a company
has now been moved to a wizard
It is accessible from the general settings, but also in the onboarding
section of sale and account modules.

The following company settings are editable with that wizard:

- Set report **layout**:
The user can chose the overall look of the report. The current choices
are : *Standard* (default), *Background*, *Boxed* and *Clean*.

- Set company **logo**:
Changes the company logo.

- Set report **colors**:
The user can set the primary and secondary colors of the report through
a newly added widget allowing to pick a custom color.
When changing the **logo**, colors are automatically set to its most dominant
colors.
> A "Reset colors" button also triggers the color calculation.

- Set report **font**:
Changes the overall font of the report. Only Google Fonts are used
for enhanced compatibility.

- Company **tagline**, also called "header"
- **Footer**
- **Paper format**
- Report **preview**:
A mockup of a final report
Automatically updates when changing **layout**, **logo**, **colors** or **font**

Co-authored by: Julien Mougenot <jum@odoo.com>

closes odoo/odoo#33863

Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>


Co-authored-by: Lucas Perais <lpe@odoo.com>
2019-07-29 08:29:26 +00:00
Julien Mougenot a8c93df9c8 [IMP] web: add noTransparency option for colorpicker dialog
Added a boolean option to toggle opacity settings on the colorpicker dialog widget.
When set to true, both the opacity slider and the opacity input are hidden in the
dialog. When not set or set to false, opacity settings remain unchanged.
2019-07-29 08:28:15 +00:00
Julien Mougenot edc60f7fb4 [REF] web,web_editor: moved ColorpickerDialog to web
The reason this widget was moved is that the next improvement
([IMP] base: Configure document layout) defines a new field (FieldColor)
which needs to call the colorpicker dialog inside of the base module.
This couldn't be done while the dialog was located in the wysiwyg assets.
2019-07-29 08:28:15 +00:00
Yannick Tivisse 43c5a7d74f [IMP] web: Implement confirm attr on kanban views
Purpose
=======

On a form view, it's possible to add a confirm attribute to open a
popup when clicking on a button.

This mechanism is not implemented on kanban views, and would imply to
create a specific wizard just for that in the referral application.
2019-07-26 08:47:03 +00:00
Lucas Perais (lpe) a6f66f8bcf [FIX] web: translatable size of binary fields
Before this commit, the string containing all size units for binary fields
was comma separated.
The problem with this is that comma got also translated into the language's specific
comma-like, whereas in this case it is obviously a technical separator which shouldn't be translated

After this commit, we separate unit size with pipes (|), hoping that this character
- is easy to find on any keyboard
- has no language specific equivalent

OPW 2041975

closes odoo/odoo#35183

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-25 13:03:48 +00:00
Christophe Simonis bfd34e14b1 [MERGE] forward port branch saas-12.3 up to 40e8b67179 2019-07-26 15:12:29 +02:00