Commit Graph
122759 Commits
Author SHA1 Message Date
qsm-odoo d7acfdae2b [FIX] portal: restore BS3 clearing system for main frontend containers
BS3 used to add ::before and ::after elements on all containers so that
margins and floats are cleared inside containers. As lots of current
odoo layouts may rely on this for some alignments, this is restored (at
least for a while) here only for main containers of the frontend.

In master, we should use proper layouts to avoid the need of this.

task-1889238

closes odoo/odoo#30510
2019-01-24 11:30:30 +00:00
Nicolas Lempereur 1388b7f0d8 [FIX] base: remove copied views before uninstall
In dff64b6f7ca some copied views with no link to a module would be
removed after module uninstall.

But this has some side effects when the website module is being removed.

For example:

- website_theme_install, website are installed
- website is uninstalled (which will uninstall website_theme_install)
- website.theme_customize view can't be removed because it is used by
  copied view website_theme_install.customize_modal
- after uninstall _remove_copied_views will remove the view
  website.theme_customize but when trying to remove associated
  website.page will throw an error because website_page table does not
  exist

This issue does not happen if we uninstall first website_theme_install
then website (since like this the reference is not an issue).

The issue also happen with overriding views in theme_bootstrap and
possibly elsewhere.

With this changeset, copied views are removed before uninstalling module
data.

opw-1924714
closes #30191
2019-01-24 12:26:31 +00:00
Pierre Paridans 9ee099458b [FIX] mail: focus chatter composer on mobile
Sending a message on the chatter is painful as you need to scroll to see
the buttons and click to open the composer. Then again click to set the
focus in the composer (making the keyboard appear) and scroll again to be
able to write your message.

On a view form when clicking on the "New Message" or "Log Note" buttons the focus
should be put in the text field, then opening the mobile device keyboard
and scroll the view to make the text field visible.

NB: in some case on Android (both WebView and Google Chrome) the scrolling is
not operated correctly resulting into the text field being hidden behind
the keyboard. This issue looks related to some timing between the actual
focus() call and the keyboardi appearance triggered by the operating system.
Sadly we don't have any control on that part.

Related to task 1891955

closes odoo/odoo#29239
2019-01-23 13:55:49 +00:00
Laurent Smet 2bba89c4ad [FIX] account: Fix forward-port of ec25b9d01b
Since this commit has been wrongly forward-ported, the fix is still not deployed on 12.0.

closes odoo/odoo#30505
2019-01-24 10:08:44 +00:00
Yannick Vaucher 37cb987177 [FIX] tools: fix typo in help message
for --db_maxconn option

closes odoo/odoo#30433
2019-01-23 08:31:47 +00:00
Nicolas Martinelli 2cfbb8594b [FIX] website_sale_stock: product availability
- Install eCommerce, Inventory,
- Go to website setting and set availability of products as a "Show
  inventory on website and prevent sales if not enough stock"
- Create new service type product, and publish it
- Go to shop

The button Add to cart is disabled.

Apply this option to stockable products only.

opw-1931638

closes odoo/odoo#30444
2019-01-22 15:41:13 +00:00
Nicolas Martinelli 3eeb77414b [FIX] delivery: package UOM
Since it is now possible to select the default UOM, do not hardcode `kg`
in the view.

opw-1920809

closes odoo/odoo#30427
2019-01-22 11:19:41 +00:00
Jeremy Kersten 8f2267b512 [FIX] web_editor: hack o_switch input style
On Chrome, there are a rounding pixel that make the button ugly since several month.
Meanwhile to have a clean way to fix it, bypass the rounding pixel.

https://odoocdn.com/web/image/10933003/Selection_181.png

closes odoo/odoo#30452
2019-01-22 16:38:48 +00:00
Jeremy Kersten 9cfd1eefd8 [FIX] website: don't copy is_published
Before this commit, if you duplicate a published record on the website,
the copy was already published, while in most of case you need to update
it to adapt to the new content. There doesn't make senses to duplicate the
same content on a website and let the duplicate content.

Task-1930058
2019-01-22 16:38:48 +00:00
Nans Lefebvre d794cd616b [FIX] web: make the fields display without overlap in settings
The display of many fields in the setting overlaps other elements,
e.g. OnSIP WebSocket, Domain and VoIP Environment in General Settings.

We override the flex: 0 0 66,6% set by Bootstrap by flex: 0 0 auto
so that everything automatically looks nice.

closes odoo/odoo#30359
2019-01-21 08:03:04 +00:00
Babatope Ajepe 201f44380c [CLA] signature for ajepe
closes odoo/odoo#29545
2019-01-22 12:31:53 +00:00
Xavier Morel a313f342d3 [IMP] core: add force_save support to server-side form
Cf 3b3f6f04af for basic feature
description.

Task 1931580

closes odoo/odoo#30428
2019-01-22 11:12:39 +00:00
mreficent 23e0d2cc17 [FIX] base_gengo, pad, pos_cache: add missing _description on some models
closes odoo/odoo#30412
2019-01-22 11:16:33 +00:00
len-odoo e5486c12bc [FIX] osv: fix combination of unit domain
Combining a list of elements containing only the monoid's unit should return the
unit.

Since the unit is skipped, it would return an empty domain instead of the unit,
meaning that (0, '=', 1) could not be used in a group rule.

To test this, create a record rule on a model M with domain (0, '=', 1)
that applies to group G.
Log in with a user in group G and access model M; you can read everything
(provided no other record rule applies) whereas you should see nothing.

Because of expression.AND(global_domains + [expression.OR(group_domains)])
we want the empty domain to still be left untouched, even if it violates
the OR's unit rules (i.e. OR(empty, OR(R)) = OR(R) <=> OR(empty) = unit).
Meaning that no group rule would reduce to having a (0, '=' 1) group rule.
So in the end we don't really care about all that algebraic nonsense.

closes odoo/odoo#28765
2018-12-20 10:41:43 +00:00
Yenthe666 03291bdcc8 [FIX] website_forum: order forum votes from newer votes to older votes
closes odoo/odoo#30396
2019-01-21 10:08:15 +00:00
Martin Trigaux caaabadc66 [FIX] mail: do not download attachment content to list it
When creating the list of attachments, no fields information was given, making
the search_read read the content of each field, including the infamous datas
Already fixed at 73d9b9588f but the domain was not backported

Fixes odoo/odoo#30394

closes odoo/odoo#30415
2019-01-22 07:46:02 +00:00
Daniel Yang 50060a7d07 [CLA] signs the CLA for zyyang
closes odoo/odoo#30378
2019-01-22 07:05:16 +00:00
Alexandre Kühn 0d87b1ccea [FIX] mail: do not open document chat window without access rights
Before this commit, a user could unintentionally discard a
notification from a document that he does not have access
rights at the moment.

Steps to reproduce:

1. Setup:
- Odoo with multi-company
- Two companies: "MyCompany" and "SuperCompany"
- Two users "Admin" and "Demo", both have access to being in
  both companies
- "Demo" has Notification management in Odoo in the user preferences.
- "Admin" is logged in "MyCompany"
- "Demo" is logged in "SuperCompany"

2. Scenario:
- "Admin" mentions "Demo" in a log of a document from "MyCompany"
- "Demo" receives the notification and click on the notification
  from messaging menu.
> Dialog prompts that Demo does not have access to the document (OK)
> Empty chat window is open (not OK)
- "Demo" closes the chat window
> Notification is marked as read (not OK)

This commit fixes the issue by aborting the opening of a
chat window if the user does not have the access rights
at the moment. It should prevent marking the notification
as read by mistake by closing the chat window.

Task-ID 1931313

closes odoo/odoo#30414
2019-01-21 15:35:23 +00:00
Denis Ledoux 6355126ff1 [FIX] web: oversight during forward-port f854e01a98
pyeval is no longer there in 12.0.

it's pyutils for christ sake @kangol
2019-01-21 18:18:02 +01:00
Odoo Translation Bot 127fdea764 [I18N] Update translation terms from Transifex 2019-01-21 17:38:09 +01:00
Nans Lefebvre 0d6a796b57 [FIX] sale, crm: put the sales overview behind salesteam.manager group
If a user has no rights on sale, he should not see the sales menuitem
on the dashboard.
This is because the report_sales_team, which was set on a menu restricted
to managers, has been moved to a menu without groups.
We therefore set the group salesteam.manager directly on report_sales_team
to have the same rights as before.

Similarly, this same report is visible in the CRM app without manager rights,
so we put them explicitly on sales_team_menu_team_pipeline.

Also reverts commit 2cdc1cc9ce that put the groups
on the sales root menu.
It is unnecessary to do so, since when all submenus are hidden to a user,
then the app icon is automatically hidden to the user.
This practice allows customisations to put views accessible without any rights
on that specific app.
Since the sales.team manager has been put back on the correct dashboard,
this previous commit is now useless.

opw 1914373

closes odoo/odoo#30390
2019-01-21 08:11:42 +00:00
Nans Lefebvre 3bf2faca5d [FIX] web: make the module names not overlap in settings
The display of long module names, e.g. 'EMail Marketing' or 'General Settings',
overflows on the following line, resulting on the superposition of text.
We fix that.

closes odoo/odoo#30355
2019-01-18 12:36:01 +00:00
Graeme Gellatly 194fc8a136 [REF] stock_account: _run_fifo_vacuum: get moves to vacuum
Do not perform useless calls to `search`.

Closes #29962

closes odoo/odoo#30392
2019-01-21 08:51:30 +00:00
Nicolas Martinelli 0fa969a4a7 [FIX] sale: attachment name
- Create a SO, keep it as draft
- Click on 'Send by Email'

The name of the attached PDF file contains `_draft`.

This doesn't really make sense anymore, since the SO will be set to
'Sent' right after sending. Therefore, if sending a second time,
`_draft` won't be added to the filename.

opw-1930282

closes odoo/odoo#30367
2019-01-18 15:35:08 +00:00
Nicolas Martinelli c15551a3f2 [FIX] crm: default CRM team
Keep the default value for the default CRM team (False) since leads are
not activated by default.

opw-1929489

closes odoo/odoo#30360
2019-01-18 14:08:22 +00:00
Christophe Simonis d657d6457f [FIX] website: update *all* views, not only website ones
closes odoo/odoo#30369
2019-01-18 16:34:08 +00:00
Nicolas Martinelli 5291b8c1a4 [FIX] account: Journal Items link
- Activate debug mode
- Go to the Accounting Dashboard
- In Vendor Bills, click on 'Journal Items'

A crash occurs because of the concatenation of a `bool` and `str`.

In this case, the `action['help']` is `False`.

closes odoo/odoo#30351
2019-01-18 12:02:28 +00:00
Lucas Perais (lpe) 897834f406 [FIX] base: res_users form message partner active correct condition
Before this commit, the condition and the field on which it applied were wrong
That is, when both the user and the partner were inactive, the message saying that
the partner was still active displayed anyway

After this commit, we show the message only when the user is inactive but its
directly related partner is still active

OPW 1928247

closes odoo/odoo#30337
2019-01-18 10:07:26 +00:00
Nans Lefebvre 5607620623 [FIX] web: make the progress bar handle False as selection value
Fine-tuning of commit 92b4e2e866,
itself a performance fine-tuning of commit b7e2d47596
which added progress bar support for selection fields.
However it assumed that every record had a value in the selection,
whereas False is (nearly) always a possible value.

opw 1916472

closes odoo/odoo#30322
2019-01-17 14:52:25 +00:00
Nans Lefebvre 4ff88dac2e [FIX] mail: allow the followers list to be scrolled
The follower's list has an ancestor (the o_chatter_topbar) that has a 33px size.
Thus it has not been given any max-height, so that it can overflow
that 33px limit.
But it also means that it can overflow the screen, without any scrollbar,
so long lists are unreadable and unusable.

We set the max-height to a reasonable value, allowing for scrollbars.

opw 1922062

closes odoo/odoo#30211
2019-01-18 12:24:23 +00:00
Christophe Simonis 6e5ac01160 [FIX] web: correct forward-port of 187c32c2c7 2019-01-18 15:27:22 +01:00
Christophe Simonis f854e01a98 [MERGE] forward port branch saas-11.3 up to 4aa153e65c 2019-01-18 10:58:41 +01:00
Christophe Simonis 4aa153e65c [MERGE] forward port branch 11.0 up to 19558129f0 2019-01-17 20:49:36 +01:00
Christophe Simonis 19558129f0 [MERGE] forward port branch saas-15 up to c0471dd857 2019-01-17 19:07:34 +01:00
Christophe Simonis c0471dd857 [MERGE] forward port branch saas-14 up to 17adccd95c 2019-01-17 18:07:26 +01:00
Christophe Simonis 17adccd95c [MERGE] forward port branch 10.0 up to 50bae1c0c5 2019-01-17 17:08:39 +01:00
Julien (juc) Castiaux 71c4c13996 [FIX] web_editor: save less file
Modifying less files and saving them using the web editor can raise
and error. The error is due to the way odoo save the modified file.

It extends the view containing the URL of the file by filtering views
related to the xml bundle id and keeping those that have the said URL
in their content.

This lookup fails to give just one result in case there are multiple
file containing the said URL. This fix change the filter from a
bare `if url in view.arch` to a correct xpath lookup.

The "/web/static/src/variables.less" less file was one of the
problematic files.

opw-1889794

closes odoo/odoo#30186
2019-01-17 15:19:54 +00:00
Nans Lefebvre ba41c3c1cc [FIX] base: disable prefetching during module uninstall #2
Create any module that inherit 'res.lang'.
Define any new field that is added with that inheritance.
Install that module. Then try to uninstall it. Traceback ensues.

When trying to write 'state': 'uninstalled' on the module,
the prefetching tries to read a column that has been deleted
by the _module_data_uninstall.

opw 1917369

closes odoo/odoo#30176
2019-01-17 15:08:31 +00:00
Jorge Pinna Puissant e6b5a0e2eb [FIX] payment: Acquired deployed in production
Before this commit, in the config bar (Sales or Invoicing) when you configure a payment
acquirer,  it was deployed in test mode, and not in production mode. Note that, the config
bar wizard asks for the production credentials.

Now, when you configure a payment acquirer, from the config bar, the acquirer is deployed
directly in production mode.

opw-1918412

closes odoo/odoo#30319
2019-01-17 14:25:25 +00:00
Denis Ledoux 8865d63134 [FIX] res_partner: a partner is portal if he has no employee users
Currently, a partner is considered a portal
if he has no users
or
if at least one of his users is portal.

This causes problems if an employee has two users,
one portal, one employee
and gets notified in a thread (e.g. @ Marc demo):
The email sent won't contain the action buttons (e.g. view opportunity)
because the employee is considered as portal.

A partner of an employee can have multiple users
linked if at some point two partners were merged,
and the partners had each a user, one a portal
and the other an employee.

This revision changes this behavior,
to consider a user as not portal (employee)
if one of its users is not a portal (an employee).

This is uniform with to the behavior of the
`share` field of `res.users`,
which is `True` when the user is part of the group employee.
```
user.share = not user.has_group('base.group_user')
```

opw-1914103

closes odoo/odoo#30314
2019-01-17 13:08:35 +00:00
Nicolas Martinelli 4da161244d [FIX] stock_account: ctx after group by
- Set valuation to FIFO
- Make a PO for a product
- Validate the picking
- Execute the Inventory Valuation report
- Apply group by Category
- Click on the 'Valuation' info button

A traceback occurs because of the usual `group_by` context key which is
kept.

opw-1918915

closes odoo/odoo#30313
2019-01-17 13:00:47 +00:00
Lucas Perais (lpe) 0dd38282c3 [FIX] crm: test lead from email needs second company
Because of a742813c36fc8cdf4e41c72e00944b6901be6017.
Apparently when crm is installed alone, there is only one company

closes odoo/odoo#30312
2019-01-17 12:53:08 +00:00
wan 50bae1c0c5 [FIX] account: journal dashboard graph wrong value
OPW 1918926

Current behavior:
  The sql query groups by date,id in a intermediary table instead of the result. This allows to get data in the wrong order if the statements were not produced sequentially. The fill values are computed in the wrong order and may override correct values.

Desired behavior:
  There is no override of the values correctly computed.

closes odoo/odoo#29936
2019-01-17 12:37:36 +00:00
Lucas Perais (lpe) 187c32c2c7 [FIX] web: pivot correct context after reload
Open a pivot view with default filters automatically activating
Disable those filters

Change the groupBys on the rows and cols of the pivot

Save your result as a favorite filter

Before this commit, the filter did not contain the context information for columns groupby
Also, the search view did not exploit the context of the new filter as it should be

After this commit, the flow works as expected

OPW 1913732

closes odoo/odoo#29415
2019-01-17 12:37:25 +00:00
Jorge Pinna Puissant 91fb15510f [FIX] hr_timesheet: task view in mobile
Before this commit, there were not specific view for the mobile devices.
The analytic account views were used.

Now, there are specifics views for the timesheet in the tasks.

opw-1913371

closes odoo/odoo#30309
2019-01-17 12:26:20 +00:00
Hardik Prajapati 81c090751f [FIX] mrp: Barcode on Manufacturing Order Report
opw-1925956

closes odoo/odoo#30304
2019-01-17 12:17:33 +00:00
Nans Lefebvre 01cd87794d [FIX] web: remove the report_layout from studio selectable widgets
Open studio to modify the widget displaying a relational field.
The report_layout widget can be selected, say, to display payment terms.
Obviously it doesn't make sense.

We remove its supported field, as the field is not generic
(indeed there is only one use for it in the codebase).

opw 1919369

closes odoo/odoo#30303
2019-01-17 10:19:23 +00:00
Lucas Perais (lpe) 15cd94b746 [FIX] base: merge contacts linked to by an o2m field with caps
Define a field on a model as:
- o2m to res.partner
- the field's column, hence its name, has capital letters in it
(studio does that)

create two objects of that class, each one linked to a different partner with the new o2m

merge the partners

Before this commit, the object linked to the second partner, was deleted
This was because merge partner sql requests did not quote the column name

After this commit, the second object still exists

OPW 1925060

closes odoo/odoo#30300
2019-01-17 12:30:20 +00:00
qsm-odoo 606bae9e92 [FIX] web_tour: ensure Tip template is loaded
The 500 page has `session.is_frontend === undefined` as it has its own
whole HTML template.
In that case, the ajax.loadXML is not done, making the tour crash when
visiting a 500 error page.

This is needed for #29957 that has a test tour on 500 error page.

closes odoo/odoo#30240
2019-01-17 11:53:09 +00:00
Lucas Perais (lpe) ba39efdfc6 [FIX] base: merge contacts linked to by an o2m field with caps
Define a field on a model as:
- o2m to res.partner
- the field's column, hence its name, has capital letters in it
(studio does that)

create two objects of that class, each one linked to a different partner with the new o2m

merge the partners

Before this commit, the object linked to the second partner, was deleted
This was because merge partner sql requests did not quote the column name

After this commit, the second object still exists

This commit is tested in v12.0 with PR #30300 only. In v10.0 it is not testable as
the model concerned is in CRM, and that no new fields in business modules can be added in stable

OPW 1925060

closes odoo/odoo#30301
2019-01-17 09:59:23 +00:00