Commit Graph
12429 Commits
Author SHA1 Message Date
Martin Trigaux 9aac7c9286 [IMP] web: unify the use of GROUPABLE_TYPES
cf discussion on #31789

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-05-28 15:47:49 +00:00
Martin Trigaux b9f8e234ae [IMP] web: allow to group by integer
No technical reason to forbid it

Fixes odoo/odoo#31684
Closes odoo/odoo#31789
2019-05-28 15:47:36 +00:00
Yannick Tivisse ac6cbbaf5d [IMP] web: Improve switch company bar layout
fp request: add 0.1rem padding-top and -bottom to the items of the multicompany dropdown menu
2019-05-28 14:31:34 +00:00
Yannick Tivisse ec670beb4b [IMP] web: Keep multi company config when switching company
when moving from company A to company B, company A should not be 'uncheck' (it should stay in the set of visible companies)
use case: https://drive.google.com/file/d/1o9lN_8jHSxDOkeqTpo7F_NgmvO4NwF2l/view
I start in A with only A visible
I check B to make both A and B visible
I move to B and A is not visible anymore
when moving to a company that is not checked, it should be checked, but the reverse is not true (moving out of a company should not uncheck it)

fp request
2019-05-28 14:31:34 +00:00
Prakash PrajapatiandMohammed Shekha 77cd665645 [IMP] web: Hide the handle widget in grouped list view
when user in the group by list view it is not allow to change
the sequence of items by drag & drop with the handle widget,
so it does not make sense to display handle widget.

After this commit handle widget will hide in grouped list view.

Task-1964661

closes odoo/odoo#32855

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


Co-authored-by: Mohammed Shekha <msh@openerp.com>
2019-04-22 09:17:57 +00:00
Prakash Prajapati b3aab58a59 [IMP] web: Hovering out of a systray menu item closes its submenus dropdown
While hovering in the systray a menu dropdown can only be open if user currently on his parent menu.

It should close when user hover on another systray menu.

Task: #1959678

closes odoo/odoo#32322

Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
2019-05-28 14:03:29 +00:00
Priyanka KakadiyaandMohammed Shekha d9c33c4c78 [IMP] web: add accesskey 'b' for previous breadcrumb
Also, exclude 'b' for being automatically assigned to buttons

Issue : 1878248

closes odoo/odoo#33689

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>


Co-authored-by: Mohammed Shekha <msh@openerp.com>
2019-05-27 13:59:34 +00:00
Jigar Patel 9ab3270c5a [FIX] web: avoid flickering when click on action defined using href tag
Before this commit,
Defining action using <a type="action"> outside of normal views(like qweb view)
css style does not apply to it because missing the href tag. by defining href
tag on a link will first open home screen then perform do_action thus it will do
flickering.

After this commit,
Prevent event default behaviour so it will stop flickering and restore css style
for action by defining href tag on it.

closes odoo/odoo#33703

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-05-28 06:40:33 +00:00
Swapnesh Shah 316b33c869 [IMP] web: correct typo
closes odoo/odoo#33070

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-05-27 11:02:07 +00:00
Prakash PrajapatiandMohammed Shekha 4107dc11de [ADD] web: Allow to add multiple records in m2m_tags widget.
Before this commit when user want to add multiple record at that time
they only allow to add one record at a time.

After this commit user can add multiple record from search more wizard.

Added function _getSearchCreatePopupOptions so that it can be overridden
in FieldMany2ManyTags, options for FieldMany2ManyTags will differ, like
FieldMany2ManyTags SearchCreateDailog should have multi record selection,
Many2ManyTags' SelectCreateDialog should display record other than selected

This commit is related to task id: 1945912

closes odoo/odoo#32453

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


Co-authored-by: Mohammed Shekha <msh@openerp.com>
2019-05-22 13:43:44 +00:00
Xavier Morel 0e1a471144 [IMP] web: warn admin on login if their password is "admin"
* We want to limit the obtrusiveness of the mechanism & at the same
time show the warning immediately, so send the warning through a
private channel between the superuser and the admin user rather than
the regular mail.thread's message_post which would likely send the
warning though email.
* Ignore issue when the request comes from a "private" IP (likely a
local dev box where it doesn't matter).
* Only check for "admin" on the admin user: passwords created manually
are already length-checked (required) and strength-checked (visual
indicator).

Task 31122

Supersedes #22428

closes odoo/odoo#33254

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2019-05-13 12:08:53 +00:00
Vincent Schippefilt 9d9a866cc3 [REF] web: remove hardcoding of maxage for load_menu
use CONTENT_MAXAGE to define the max-age instead

closes odoo/odoo#33634

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-05-24 07:09:57 +00:00
Pierre Paridans 0771f008ff [IMP] web: searchpanel's categories should unfold when clicked
In the SearchPanel there was a separation between selecting and
unfolding a category with children.

With this commit, when the user click to select a parent category the
children are also folded/unfolded.

This reduce the number of actions needed to reach a sub-category.

Task ID: 1917277

closes odoo/odoo#32660

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2019-05-23 13:12:58 +00:00
Pierre Paridans 4d1cce97a9 [IMP] lunch,web: don't disable SearchPanel on mobile
SearchPanel widget in kanban views has been introduced in commit
https://github.com/odoo/odoo/pull/30517/commits/25c9355c02485e85914430188f3281246fc54cda.
But this feature was disabled for mobile.

This commit removes unneeded differentiation between desktop and mobile
for the SearchPanel.

It also adapt related tests to reflect this change.

Task ID: 1917277
2019-05-23 13:12:58 +00:00
Pierre Paridans 71a2d7c06a [REF] web: don't destroy twice a widget's children
Widget class indirectly inherits from ParentedMixin (through
PropertiesMixin).

The Widget's children are destroyed in both the ParentedMixin and the
Widget's own destroy() method.

This commit prevents from trying to destroy already destroyed children
and specifically from looping again on those children (resulting into a
minor performance improvement).

closes odoo/odoo#32174

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2019-05-23 15:41:30 +00:00
Parth Choksi 00997c93a9 [FIX] web: pdf file not previewed
The pdf_viewer widget fails to load file and hence shows error.
This is due to the wrong controller called(wrong URI passed),
while loading a file using pdfjs.

For files other than images, /web/content controller should
be called since since odoo/odoo#31811.

This is similar to the enterprise fix 793c76298a2b301a2

task-1932190

closes odoo/odoo#33354

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-05-22 13:07:21 +00:00
Martin Geubelle c54caca54d [IMP] website: Cache translations forever
Generate a unique URL for translations and cache them forever in the
browser. This reduces the number of requests, in exchange for computing
the hash of the translations when the session object is added to the page
2019-05-22 07:52:07 +00:00
Vincent SchippefiltandJulien Mougenot 8a28cc22fd [IMP] base,web: Improve webclient startup
Today, some resources that varies very infrequentely are requested on
every page load: the menus, the translations and the qweb templates

After this commit, there will be 2 improvements that will make the
loading of the webclient faster:
1. cache almost static resources forever
when loading the /web/ page, the user session will
contain the cache key to be used to fetch these resources. As the content
of the resource itself it used to compute the hash, the request can be
put in cache by the browser forever (for a year).

The up side is that in general less requests are needed to load the web client
The down side is that the load time and number of queries of /web page
has increased to include what is needed to compute the hash of translations,
menus and qweb templates

2. trigger the loading of the menus before the download (and startup) of
the JS and CSS assets:
The menus contains the definition of the action, wich is the first thing
needed to load a page in odoo. Starting the loading of the menu much
earlier means that when they are not yet in the browser cache (see point 1),
the browser does not need to wait for the entire assets to be downloaded
and parsed before starting the 'load_menu' request, but instead start it
immediately and hold onto a promise to be used instead of the rpc 'load_menu'.

Because the request is done before anything else is loaded, including
JQuery, it is made in vanilla JS.

Co-authored-by: Julien Mougenot <jum@odoo.com>
2019-05-20 08:52:18 +00:00
Sébastien Theys d445f46806 [FIX] *: convert image route size param to int and use named param
* = tools, base, web, website_profile, website_slides

Before this commit it was impossible to pass those parameters in the URL because
they were received as string but expected as int.

The opportunity is also taken to properly use named parameters when calling
`image_process`.

closes odoo/odoo#33506

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-05-21 10:34:40 +00:00
Sébastien Theys 9dec7ba7e9 [IMP] web, *: add utils to get dataURL (base64) from file/blob
* = partner_autocomplete, point_of_sale, web_editor,
website_forum, website_slides

This can be used for example to preview an image from a file input field.

It can also be used to send the base64 content of the input by RPC instead of
having to rely on form submit as POST with multipart/form-data.

Technically wrap FileReader.readAsDataURL in a Promise.

This will also be used in task-1930726

PR: #33508

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-05-21 11:37:20 +00:00
Thanh Dodeur 923701851e [IMP] web: conserves record order in the search panel
After this commit, the order of the elements of the search panel
categories follow the original order received from the back-end.

This is achieved by getting the order from the Array received
from the backend instead of the dictionary used to store the record data.

Task: #1972698

closes odoo/odoo#33358

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2019-05-21 10:33:52 +00:00
Adrien Dieudonne e3a0217c63 [FIX] web: typo: missing bracket
This fix an issue in the mobile app in iOS.
Safari is less permissive and a blank page was shown.

closes odoo/odoo#33498

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2019-05-20 09:38:56 +00:00
Pierre Rousseau 23e5f93ca2 [FIX] web: re-highlight form-uri
Since ea1b3254bb, the phone widget was no more highlighted as it is not contain in a 'span'.
This commit reintroduce the correct behavior for the phone widget.

closes odoo/odoo#33460

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-05-17 10:44:16 +00:00
Barad MahendraandMohammed Shekha 894b9f53dc [IMP] web: editable list view when no access rights
Currently, an editable list view (`editable` set) makes its cells editable. However, if
the attribute `edit=false` is set (from context key or from access right restriction.
See _postprocess_access_rights method of `ir.ui.view` for more details), the list view
should not be editable, but is still.

This commit makes the 'editable' property of the listview checking the `edit` attribute
and provides some tests.

Task-32612

closes odoo/odoo#21613

Signed-off-by: Jérome Maes (jem) <jem@openerp.com>


Co-authored-by: Mohammed Shekha <msh@openerp.com>
2019-05-15 09:11:54 +00:00
Dharmraj Jhala 35b778590a [IMP] web: always use record data for signature widget 'full_name'
For signature field widget, we can set 'full_name' node option, which can be
used to auto fill the sign. However, current implementation for getting data
for field provided in 'full_name' (mainly, a string) has some flaws.

For example :
-In case of m2o fields, the string is not properly fetched due to different
structure than regular 'input' fields
- In case of x2m views inside a form view, field with same name can exist in
both parent record and child records. This is already the case with form view
of res.partner, where 'phone' field is there in both parent's form as well as
children's kanban view (for field 'child_ids').  With current implementation,
if we add signature on the form view, and  set 'phone' as 'full_name' node
option, instead of form view, we will get phone number from 'child_ids'.

This commit improves the behavior by getting data from the 'recordData' instead
of searching them from the DOM. To have recordData in it's latest state, we've
set 'resetOnAnyFieldChange' flag to true.

task-1948364

closes odoo/odoo#33105

Signed-off-by: Martin Geubelle (mge) <mge@openerp.com>
2019-05-16 09:15:13 +00:00
Dharmraj Jhala 7317f174c7 [IMP] web: add description to signature field widget
task-1948364
2019-05-14 16:16:50 +00:00
fja-odoo 46954178a9 [FIX] web: restore notifications about disconnections
The disconnected/connected notifications were broken due to changes in
the way the Notification template was loaded. We need it loaded in
assets as we cannot load it afterward if the server is disconnected.

This was broken by : https://github.com/odoo/odoo/pull/32793

closes odoo/odoo#33252

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-05-14 13:34:57 +00:00
Christophe Simonis 8dd5a85267 [MERGE] forward port branch saas-12.3 up to 60e71302a3 2019-05-13 15:26:12 +02:00
Christophe Simonis 60e71302a3 [MERGE] forward port branch saas-12.2 up to 243a4ae5cb 2019-05-13 11:02:27 +02: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
Christophe Simonis 243a4ae5cb [MERGE] forward port branch saas-12.1 up to 330b99f60c 2019-05-10 15:20:01 +02:00
Christophe Simonis cc3a2c1bf3 [MERGE] forward port branch 12.0 up to e11bacfe51 2019-05-09 21:07:44 +02:00
Priyanka Kakadiya ee94decd30 [FIX] web: disable sanitization for bootstrap popover
Since saas-11.3:
Bootstrap sanitizer sanitizes html and removes attributes which are not
defined in whitelist, here is the documentation link:
https://getbootstrap.com/docs/4.3/getting-started/javascript/#sanitizer

Restore sanitize=false for bootstrap popover.

A scenario where the sanitizer will break a popover: compare 2 products
and open Compare popover and try to delete a comparison item from the
popover -> item can not be deleted because data-product_product_id has
been removed by sanitizer and so the item can not be deleted because
deletion logic depends on data-product_product_id.

Reference commit: https://github.com/odoo/odoo/commit/36caf5fc16b5a95a0bf37f08f0caf974683b2df6

Closes https://github.com/odoo/odoo/pull/31961
task-1950702
2019-05-09 14:17:05 +00:00
Alexandre Kühn 893e07e590 [IMP] im_livechat,web: use nicer placeholders for livechat
In the context of a livechat session, a placeholder that looks like a
person is better than a generic "missing picture" one, when the user has
no public avatar.

In order to allow a different placeholder without exposing a public
placeholder parameter, a separate route is introduced for the
purpose of displaying user avatars:
/web/partner_image/<id>/<field>/<model>
and can be simplified to:
/web/partner_image/<id> for loading a partner avatar (`image_small`).

The common part of the /web/image route was moved into a helper
function that is not directly exposed.

Task-ID 1924666
Closes #32664

Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
2019-05-08 10:35:37 +00:00
Alexandre Kühn 9e067d7d9d [FIX] web: safe open image placeholder
Before allowing custom placeholders, make sure the placeholder images
are accessed safely, using the proper util methods.

Task-ID 1924666
Closes #32664
2019-05-08 10:35:37 +00:00
Nicolas Martinelli d809b47681 [FIX] web: month view drop
- Install the 'Maintenance' app
- Create a maintenance request, set a day and a duration of 6 hours
- Go the calendar view, month mode
- Move the maintenance request from one day to another

The duration is changed with a non-sense value.

In month mode, the hours are not represented in the calendar so it is
not possible to compute the `date_delay`. Moreover, when a record is
moved from one date to another (`_onDropRecord`) in month mode, there is
actually no point recomputing the duration; the `date_start` is enough.

Note that `date_delay` is used (at the time of writing) in 2 views and
absolutely not tested.

opw-1984637

closes odoo/odoo#33193

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-05-06 15:59:13 +00:00
Christophe Simonis 406b2850b5 [FIX] web: render new tests async
Oversight of previous forward-port.
2019-05-06 15:04:26 +02:00
Christophe Simonis a97037c6d4 [MERGE] forward port branch saas-12.2 up to 78b3b650b0 2019-05-06 12:27:51 +02:00
Lucas Perais (lpe) ddb8fc1f62 [FIX] web: checkbox in favorites menu: don't close on click
Following f4fbaf1efa
which changes the label/checkbox structure into:
```
<div class="custom-control custom-checkbox">
    <input type="checkbox" class="custom-control-input" id="customCheck1">
    <label class="custom-control-label" for="customCheck1">...</label>
</div>
```

So, before this commit, there may have been multiple input with the same Id.
The consequence is that, when clicking on a label, the browser would take the first Id it found
which was erroneous, because all checkboxes in Favorites menu had the same Id
In reality, the use case goes as:
- open a x2m,
- search more
- Favorites > Save current search
> click on one the two checkboxes
> The dropdown closed, without checking the box

After this commit, when clicking on the checkbox in the favorites menu
the checkbox is toggled and the dropdown stays. Also, the checkboxed have now unique ids

OPW 1974587

closes odoo/odoo#33032

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-05-06 15:33:48 +00:00
Aaron Bohy 32d696ec43 [FIX] web: blurry menu dropdown on chrome when zoom != 100%
This rev. disables Popper.js 3d transformation for positioning
bootstrap dropdowns in navbar, as this transformation causes a
rendering issue on webkit-based browsers (the text in the dropdown
is blurry).

See https://github.com/twbs/bootstrap/issues/23590

Note that it has already been disabled for the other menu dropdowns
(user menu, debug menu) by rev. 5373db1.

Another solution would have been to override the default value in
our bootstrap.js extension file, but for dropdowns that aren't in
the navbar, the dynamic positionning could be interesting.

Fixes #33096

closes odoo/odoo#33174

Signed-off-by: Martin Geubelle (mge) <mge@openerp.com>
2019-05-06 13:07:09 +00:00
Odoo Translation Bot 78b3b650b0 [I18N] Update translation terms from Transifex 2019-05-05 06:07:56 +02:00
Christophe Simonis 04acf0cc7c [MERGE] forward port branch saas-12.1 up to 2420492c26 2019-05-03 18:47:49 +02:00
Julien Castiaux baf3d39bf0 [FIX] web: Use Noto as fallback to Lato
Arabic customers are complaining the Lato font is very odd looking for
Arabic scripts. Furthermore, since #32312 Noto is used as the prefered
font to display arabic scripts.

The classes are used by the "Company Tagline" configured along with the
template in use in the general settings.

opw-1946109

closes odoo/odoo#33141

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-05-03 12:47:16 +00:00
Christophe Simonis 62017de41e [MERGE] forward port branch 12.0 up to d7c0c5c127 2019-05-03 09:16:50 +02:00
Julien Castiaux 4ae4aed254 [FIX] web: load binary data in separate http req
The `read` done by `_fetchRecord` in `basic_model.js` expicitly set a
`bin_size: true` in the context. That context option tells the backend
to send the size of the binary payload instead of the payload itself
thus slim the response size. Frontend widgets are then responsible to
fetch the actual payload in a separated http req.

The `search_read` done by `_searchReadUngroupedList` didn't set the
context option thus all the binary fields were sent b64 encoded along
with the `search_read` response.

opw-1963842

closes odoo/odoo#33014

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-05-02 07:30:02 +00:00
Julien Castiaux 81877310bc [FIX] web: ignore field message_attachment_count in debug menu
Open a record with a chatter (ie an opw task), add an attachment, enable
debug mode and click on "Set Defaults" in the debug tools, traceback.

The `message_attachment_count` field is a special view added by the
chatter on the form view. This field exists on the view but is absent on
the list of field listed by the XML file. Setting a default value on
that special field is not supported.

opw-1972372

closes odoo/odoo#33044

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2019-05-02 07:25:13 +00:00
Odoo Translation Bot c924356d9e [I18N] Update translation terms from Transifex 2019-05-05 01:35:12 +02:00
Christophe Simonis 3ca58705c9 [MERGE] forward port branch saas-11.3 up to 2c68df0ab4 2019-05-02 13:16:27 +02:00
Christophe Simonis 2c68df0ab4 [MERGE] forward port branch 11.0 up to 82c901c937 2019-05-02 10:59:21 +02:00
Odoo Translation Bot 3ac23bef79 [I18N] Update translation terms from Transifex 2019-04-28 01:34:21 +02:00