Commit Graph
121428 Commits
Author SHA1 Message Date
Pierre Pizzetta a211c1493a [CLA] pierre-pizzetta signs Odoo CLA
closes odoo/odoo#27759
2018-10-17 08:41:56 +00:00
mgh-odoo cb8dcb5913 [FIX] web: avoid margin on top of list view in mobile
When header was too long, the text was breaking into next line.
We want to avoid this behavior in mobile because it causes
a big margin on the top of the list view.

This issue was probably caused by the upgrade of Bootstrap.

task-1878252

closes odoo/odoo#27927
2018-10-18 08:44:22 +00:00
Nicolas Martinelli 1f409dcea7 [FIX] base: do not crash if rtlcss.cmd is not found
closes odoo/odoo#27926
2018-10-18 08:14:29 +00:00
David Beguin 56832de6fd [FIX] website_mass_mailing : Fix is subscriber to filter on opt_out
since the opt_out per mailing list, to check if an email address is
subscribed to a mailing list, this cannot be done at contact level
but at the many2many contact-list level.

Fix Task ID : 33224

closes odoo/odoo#27899
2018-10-17 14:31:37 +00:00
David Beguin 01f642c17c [FIX] account, portal : align invoices counter and view domains
The idea of removing the domain was to have the portal views based
only on access rights and rules. We were just not really consistent
in not removing the domain on the counter. If the user has the right
to see also supplier invoices, it makes sens to let the user see
them in the portal. The domain on the counter is then here removed
to align both counter and views.

Fix commit 9434f7b64e
Closes PR #27583
Link to Task ID 30985
2018-10-09 15:15:52 +00:00
Xavier Morel 1ef791d1de [FIX] base_import: date(time) columns matching
* actually pass the flags as flags in re.sub, passing re.IGNORECASE
  as *count* doesn't actually ignore case
* ensure the entire string is matched by the pattern, or we'll get
  shortest-matching-pattern which is *not* what the later strptime
  will do

closes odoo/odoo#27925
2018-10-18 08:05:18 +00:00
Robot Odoo 3df7757e8d [FIX] base, doc: RTLCSS on Windows
RTLCSS is not working on Windows for several reasons:
- the executable is called `rtlcss.cmd`
- rtlcss is not available in the System Path; it is only available in
  the User Path

closes odoo/odoo#27896
2018-10-18 08:00:54 +02:00
Nicolas Martinelli 47dad7285a [FIX] doc: RTLCSS on Windows
The System Environment's variable `PATH` must be modified manually to
support RTLCSS.
2018-10-17 13:39:15 +00:00
Nicolas Martinelli 177ea3b96d [FIX] base: RTLCSS on Windows
RTLCSS is not working on Windows for several reasons:
- the executable is called `rtlcss.cmd`
- rtlcss is not available in the System Path; it is only available in
  the User Path

In this commit, we correct the first issue.

opw-1892952
2018-10-17 13:23:08 +00:00
Romain Derie 3c11cf926c [FIX] website: only one website on dashboard if no multi-website
If multi-website is disabled, we still show all the websites on the website
analytics dashboard.

This commit will only show one website if multi-website is disabled

closes odoo/odoo#27737
2018-10-17 09:12:20 +00:00
Mathieu Duckerts-Antoine aaa5ea920d [REF] doc: update search view documentation
closes odoo/odoo#27893
2018-10-17 13:03:28 +00:00
Mathieu Duckerts-Antoine ebd23f36fb [REF] doc: update search view documentation
closes odoo/odoo#27893
2018-10-17 13:03:28 +00:00
Aaron Bohy bd004ac75e [FIX] mail: chatter in x2many form view
Since rev. 755a8d815a, it crashed when the user tried to open an
x2many record in form view (thus in a dialog), if there was a
chatter in that form's arch.

This was because the wrong viewType was used (for instance, list
or kanban instead of form), to look into fieldsInfo, and thus the
chatter fields couldn't be found.

opw 1891378
opw 1892520
opw 1893100

closes odoo/odoo#27844
2018-10-17 08:44:49 +00:00
Mathias Markl a1e052a4b4 [CLA] signature for keshrath
closes odoo/odoo#27816
2018-10-17 09:21:55 +00:00
qsm-odoo cc780b5974 [FIX] website: allow to add/remove tabs in the new "Tabs" snippet
closes odoo/odoo#27815
2018-10-15 16:15:01 +00:00
David Monjoie ea1ad98354 [FIX] web: css fixes for Firefox
- fix statusbar overflowing on the right and triggering a scrollbar
- fix background of the trash icon of the editable list remove
  button which was white rather transparent
- fix cursor that was not properly displayed as pointer when on
  top of the trash icon, while it properly transformed in the td

closes odoo/odoo#27806
2018-10-15 14:18:05 +00:00
David Monjoie 3ed45466f1 [FIX] web: fix menu app button when menu_id can't be inferred
There used to be no processing done at all when loading the client
from an url missing a menu_id and from which the menu could not
be inferred from the action_id. This resulted in the app name
button in the menu being empty but still present and not bound to
any action. Clicking on it triggered a traceback.

This commit stops ignoring the case when the menu cannot be
inferred from the action and hides the entire menu and submenus
for this particular action. They will be restored when entering
an action from which a proper menu can be inferred.

closes odoo/odoo#27791
2018-10-17 11:39:41 +00:00
Swapnesh Shah 44287eb719 [FIX] doc: correct links to categories
Was pointing to a file that no longer exists

Fixes odoo/odoo#27741

closes odoo/odoo#27755
2018-10-17 10:03:25 +00:00
Swapnesh Shah e6e0d7ae78 [FIX] base,mail: do not include field attachments in attachment_count
The _search was already excluding these attachments but not the read_group
Avoid the read_group from mail to search on all existing attachments

Fixes odoo/odoo#27673

closes odoo/odoo#27698
2018-10-17 11:38:17 +00:00
Cedric Snauwaert c41b469cb1 [FIX] account: reconciliation tour sometimes fails on removing line step
Problem is due to how the tour are implemented and is somehow difficult to reproduce. When a step is running: we first verify that the element is visible, then we store that element in web_tour.tip, the problem come later in the '_to_next_running_step' function that use _.delay to simulate a delay before clicking on the element. After the delay, the element that was stored in web_tour.tip.$anchor lost his bindings resulting in a click event that is not triggered. Therefore a solution is to run own function in the step and trigger the click manually.

closes odoo/odoo#27798
2018-10-15 12:17:29 +00:00
Carlos Fonseca 2aeb6d6a29 [FIX] account: add enterprise widget on settings in taxcloud
The module account_taxcloud was moved to enterprise but it's being promoted on
account settings as a community feature

closes odoo/odoo#27647
2018-10-17 09:01:57 +00:00
Martin Trigaux e3ff3b14dd [FIX] mass_mailing_sale: use if condition
There was already an endif but no linked if clause making the rendering crash

closes odoo/odoo#27876
2018-10-17 08:56:47 +00:00
Jeremy Kersten 1ccd148775 [FIX] website: multi website - auto public user
Before this commit
When user was in company A and try to create a second website for company B an
error was raised, because the search from user in company A don't find a public
user in company B and the same default user (public-user@company-B.com) was
created again before to be catched and raised by the sql contraint login_key.

Now we use '-' instead of '_' to avoid parser of email to detect it as invalid

After this commit, we don't have anymore the error:
    - 'You can not have two users with the same login!'
 or - 'Login must be a valid email address'

opw-1891315

closes odoo/odoo#27873
2018-10-17 08:52:58 +00:00
Luis Torres a66d42ff34 [FIX] account, membership: Fix use of date.min() in place of '0000-00-00'
Avoid traceback by:

TypeError: '>' not supported between instances of 'datetime.date' and
'str'

After that was migrated the use of native date/datetime for
Date/Datetime fields.

Based on
https://github.com/odoo/odoo/commit/960360afe478a8f7b9c456721b5591154952a37d#diff-dd671a54296b170ea1393dca1a5f7798L348

closes odoo/odoo#27819
2018-10-15 21:34:37 +00:00
Romain Derie b48d2b6b5e [FIX] website: Remove related website menus on module uninstall
Commit 850e1675eb improved the website.menu creation on module install
(eg: /shop for website_sale).
This commit aims to do the same on module uninstall.

Before this commit:
Uninstalling a website module would uninstall its website.menu (/shop) stored
on the default menu tree.
But the copies of that default menu, on websites, would remains.
Indeed, there is no direct link between the default menus and its copies.

More annoyingly, installing that website module again after uninstalling it
would create a new copy of the default menu, resulting in multiple same menus
on website.

Now, if the menu to be uninstalled is in the default tree menu, we remove all
its copies (the website.menu having that same URL).

Closes #27488, closes #27721
2018-10-12 12:11:09 +00:00
Robot Odoo 2e8712f859 [MERGE] mail: fix some moderation issues
This fixes two issues:

1. non-working moderation in chat window

Moderation on chat windows were not working: it was displaying
the moderation checkbox and decisions next to pending moderation
messages, but none of them were working in a chat window.
Those features should only work with the Discuss app.

2. cannot see self-authored, pending moderation messages

When a non-moderator user was posting a message in a moderated
channel and refreshes the page, he would no longer see his messages
that are pending moderation. Those messages should stay visible for
the author until a moderator makes a decision, e.g. reject the message.

Task-ID 1887963

closes odoo/odoo#27640
2018-10-17 10:52:17 +02:00
qdp-odoo 14884a18b4 [FIX] account_bank_statement_import: fix traceback on bank accounts creation
This completes the patch landed at https://github.com/odoo/odoo/commit/ac65a6df6d8461173d4059d0c431c90ae0622218 which was correct, except for that condition.

Fixes #27423

closes odoo/odoo#27870
2018-10-17 06:54:23 +00:00
Julien (juc) Castiaux 9d470c2097 [FIX] mail: replace "create_user_id" by "user_id" in My Act & tree
opw-1886369

closes odoo/odoo#27849
2018-10-16 13:04:37 +00:00
Florent de Labarre a858e4956c [FIX] hr_holidays: singleton error
Closes #27862

closes odoo/odoo#27866
2018-10-17 06:19:54 +00:00
Christophe Simonis 6d3477cbb7 [FIX] base: do not enforce module state in module declaration in xml file
Modules are automatically created with adequate state by introspecting
the addons available in addons-path during database initialization.
Auto-installable modules are also marked as `to install` at the same
time.

However, forcing their state as `uninstallable` will forbid them to be
installed.

This is the case of `web_mobile`.

The solution is to simply let the modules created via xml to have a
default state of `uninstallable`.

Moreover, this is a better default value.

closes odoo/odoo#27852
2018-10-16 13:04:03 +00:00
Denis Ledoux 3823dcacef [FIX] http, server: cross-platform memory limit management
This revision aims to support the memory limits
on Linux, Windows and MacOSX according to their own spefication
regarding their memory management.

Among others, it brings the possibility to
use the multi-workers mode on Windows and MacOSX.

e.g.
- Windows does not support `resource`,
  and therefore we skip to set the hard limit
- MacOSX allocates a large virtual memory for each process
  even if the memory is not actually used,
  and therefore using the VMS to limit the memory is pointless
  as it will always exceeds the default soft memory limit.
  We therefore choose to use the RSS to limit the memory

closes odoo/odoo#27848
2018-10-16 15:37:40 +00:00
qsm-odoo 574450bad8 [FIX] theme_bootswatch, *: prevent website to interfer with bootswatch
* website

Default web_editor/website colors and other bootstrap related variables
took precedence over some bootswatch overriddes. While we have the
control with Odoo themes, theme bootswatch is a library we do not want
to modify. This commit removes the web_editor and website customizations
when bootswatch is installed.

Closes https://github.com/odoo/odoo/issues/27821

closes odoo/odoo#27855
2018-10-16 14:26:37 +00:00
Alexandre Kühn 7b91a6483a [FIX] mail: simplify channel domain for message_fetch
It was simplified by https://github.com/odoo/odoo/commit/84af9382e2315964209bb065945b5d9116ddb11a
but the forward-port somehow failed.
2018-10-16 07:29:08 +00:00
Alexandre Kühn d3ceaa3adc [FIX] mail: improved message_fetch for moderated channels
There was two issues with the previous code:

	1. It was using a weak heuristic to determine whether the
	   current thread is a channel (ID is a number)
	2. For any channel, it was always passing `moderated_channel_ids`
	   with some values to the server, even though the channel
	   is not moderated at all.

This commit solves both issues by passing `moderated_channel_ids`
only for moderated channel. Also, this logic has been moved from
SearchableThread to Channel, since moderation makes only sense for
channels and channels are aware of whether they are moderated or
not.
2018-10-16 07:29:08 +00:00
Alexandre Kühn 4531348ff0 [FIX] mail: fetch self-authored, pending moderation messages
Before this commit, when a non-moderator user posts a message in a
moderated channel and refreshes the page, he could no longer see his
messages that are pending moderation.
2018-10-16 07:29:07 +00:00
Alexandre Kühn c0c2590a40 [FIX] mail: no moderation in chat window
Before this commit, a moderator of a moderated channel could see
commands on 'pending moderation' messages in a chat window, although
none of them work in chat windows.

Those commands only work in Discuss. Making them work in chat windows
is not trivial, because some code must be redesigned for this.

This commit disables moderation commands in chat window. Moderators
of such channel now see 'Pending moderation' on such messages in
chat window, and mouse-hovering on this annotation tells the user
to moderate those messages in the Discuss app.

Task-ID 1887963
2018-10-16 07:29:07 +00:00
Alexandre Kühn 510065ab67 [FIX] mail: remove outdated parameter in static xml comment 2018-10-16 07:27:44 +00:00
qsm-odoo 3b4eeee5ca [FIX] website: restore carousel item behavior
The animation that made all the carousel items have the same height
automatically was broken. This commit fixes it and improves its behavior
during edition.

closes odoo/odoo#27801
2018-10-15 13:20:29 +00:00
Nirali Sapra 4595c1b2bc [FIX] crm: correct typo
Change text in Website Lead Generation view

opw-1893403

closes odoo/odoo#27717
2018-10-16 15:36:34 +00:00
Nicolas Martinelli 5f0be01323 [FIX] purchase_stock: no destination address
- Create a product sold by Dropshipping
- Create a SO, validate
- Validate the corresponding PO
- On the picking, print the 'Picking Operations' or the 'Delivery Slip'

There is no delivery address printed.

The root cause of the issue is that the field `dest_address_id` of the
PO is empty. This is because `partner_dest_id` is not used anymore since
1e160dffd3.

opw-1892990

closes odoo/odoo#27850
2018-10-16 13:12:41 +00:00
Dharmraj Jhala 50b506996d [FIX] website: hide 'DateRangeButtons' inside SearchView on small device
In website dashboard, 'DateRangeButtons' are pushed into control panel's
SearchView and breaks the UI in small devices.

This commit fixes the issue by hiding them in small devices.

task-1884038

closes odoo/odoo#27082
2018-10-16 12:08:54 +00:00
Sébastien Theys 96ef4885a7 [FIX] website_theme_install: fix theme install/upgrade/remove
The goal of this commit is to handle 3 cases:
===============================================================================

- Correct loading of downstream themes for existing themes at (auto)install

  eg. If we have `theme_A` loaded on a website and we install `website_sale`,
    then `theme_A_sale` must also be loaded automatically on that website.

- Allow migration of every theme/website from the command line -u

    When there is such an explicit upgrade, the Odoo framework was already
    handling the upgrade of the modules, but it did not take care of reloading
    the appropriate themes on the websites using them.

- Allow upgrade of only one theme from the interface

    When using the UI to upgrade a theme, we want the user to be able to upgrade
    only the current website and not any other. This will upgrade the modules
    of all themes in the stream, but reload them only for the current website.

===============================================================================

- Move install/upgrade logic into the `write` method to automatically take
    advantage of base features such as correct order of dependencies.

- Create methods to correctly compute the dependency stream of a theme:
    upstream, downstream, and both ways.

    Upstream: limited to modules with name starting with `theme_`.
    Downstream: limited to modules with name starting with current theme name.

- Change `_update_records` method to better look for dependencies

- Change `button_choose_theme`:
    - Always upgrade the stream before installing a new theme.

- Move `_convert_to_base_model` logic into `theme_models.py`

================================================================================

There are a lot of flows to take into account, some of which may be combined
with others.

- Dependencies such as website_sale or website_blog can be:
    - already installed when loading a theme
    - (auto)installed later when the theme is already in use

  theme_A_sale and/or theme_A_blog has to be loaded on every website using
  theme_A as soon as it is needed.

  Not all themes have such dependencies.

- A theme can have other themes as dependency.
    - The proper dependency chain must be taken into account when installing
      or upgrading.

- Some themes do not have any dependency at all (theme_default, theme_bootswatch).

- Different websites can use the same theme.
    - All of them have to be upgraded when using -u
    - Only the current website must be upgraded when doing it from the UI

- Different websites can use different themes, including intermediary themes.
    eg. - website1 may use theme_A
        - website2 may use theme_B (depending on theme_A)

  Moreover, theme_A and theme_B might have downstream themes such as
  theme_A_sale and theme_B_sale (which depends on theme_A_sale).

In that case it is important when manipulating theme_B to also take into account
the relation it has with theme_A_sale even though theme_A_sale doesn't start
with the same name as theme_B and it is not in the direct stream of theme_B.

Authored by @seb-odoo with contributions from @dbh-odoo and @JKE-be
and precious help from @rde-odoo

PR: #27511

closes odoo/odoo#27838
2018-10-15 10:45:36 +00:00
Nicolas Martinelli de9437dad7 [FIX] account: display Account Holder
Make sure to hide the Account Holder field only when coming from a
Parter view, where it is pre-filled thanks to the context key.

opw-1892758

closes odoo/odoo#27832
2018-10-16 08:02:15 +00:00
Adrien Dieudonne 59b7dec69c [FIX] web: line chart x ticks labels overlapp
Before this commit, we tried to hide some labels depending
of the available size of the graph.
However, it doesn't worked when the graph is updated.

A much simpler solution is to use the scale’s automatic tick
generator implemented in D3.
So, in this commit, we realized that 'tickValues' is unnecessary
because data are passed correctly (see 'svg.datum(data);') and
labels are defined in 'ticksLabels'. There is nothing else to do.

We had to remove the skipped test because 'renderEnd' is not triggered
for line chart. We need to update nv.d3.

We already tried to fix this issue in the following commit:
https://github.com/odoo-dev/odoo/commit/c4937132a38873761fa0ac0b41c983b917cb52f1

Documentation:
https://github.com/d3/d3-axis#axis_tickValues

closes odoo/odoo#27828
2018-10-16 06:37:27 +00:00
Humberto Arocha 77a5afb58e [IMP] l10n_mx: Add stock accounts on the chart template definition
Closes #27746

closes odoo/odoo#27824
2018-10-16 06:13:28 +00:00
qsm-odoo f31ce5dc5e [FIX] web_editor: snippet options were not working if not pure text
Some snippet options uses an image or icon as description instead of
text (like the gradient option in some themes). Those were not working
anymore as the user click was considered on the image/icon instead of
the option itself.

closes odoo/odoo#27807
2018-10-15 14:15:06 +00:00
Nicolas Martinelli b532af7932 [FIX] pos_sale: report currency
- Set the compay currency in USD
- Set the rate of USD to 1.0, the rate of EUR to 2.0
- Create a EUR pricelist and associate it to the POS
- Sell a product in the POS at 200 EUR (= 100 USD)
- Go to Sales > Reporting > Sales

The POS order is evaluated at 200 EUR instead of 100 USD.

Since the sales report has been merged among the various sales channels,
we must keep the same logic when it comes to currency conversion.

opw-1890778

closes odoo/odoo#27786
2018-10-15 11:28:20 +00:00
Denis Ledoux b34b7d4270 [FIX] server.py: resource is not available on Windows
Rev. dcb56412d6
introduces limits for the threadedserver

It uses `resource` to set the hard limit,
but unfortunately `resource` is not available on Windows.

As in the GeventServer, we therefore set the resource
hard limit within a `if os.name == 'posix'` block,
as in rev.
c68b41bff2
2018-10-16 12:14:46 +02:00
Humberto Arocha f472ea705a [FIX] l10n_mx: Base Tax Received Account
Added account to cash basis and assign. On taxes with Tax Due Based on
Payment has been added as now is compulsory.

Closes #27739

closes odoo/odoo#27823
2018-10-16 06:02:50 +00:00
Julien (juc) Castiaux 71f188082f [FIX] mail: unicode character in email cannot be parsed
Sending email to addresses containing unicode characters
cannot be parsed by python and result in a UnicodeEncodeError.

This PR catch that specific exception and output a meaningful
error message.

Decision has been taken to not trigger any error message
client-side has it would have needed modifications on some
sensitive low-level backend code.

To reproduce:
- Configure odoo so it uses an email server
- Send an invoice to a partner whoose email address contains
some unicode characters (exemple: æøåÇÀ@example.com)

opw-1892409

closes odoo/odoo#27804
2018-10-15 13:42:58 +00:00