Commit Graph
127612 Commits
Author SHA1 Message Date
Stefan Rijnhart 4d8b0b723b [FIX] base: don't hardcode the new admin user id
There is no longer a priviledged user and the user named "Administrator" may
not have the id 2.

Instead of hardcoding an id, uses a group-based check

Remove the global variable ADMINUSER_ID to ensure nobody is using it (as it can
be a source of bugs when base.user_admin is not ID 2)

closes odoo/odoo#27432
2018-10-23 14:40:02 +00:00
Nicolas Martinelli 0530b36a2d [FIX] purchase: matching domain
The domain used for the `purchase_count` variable should be in line with
the domain used to retrieve the PO list at
https://github.com/odoo/odoo/blob/68dafa0620fb8e36c9a1a58da0668bede2c3699b/addons/purchase/controllers/portal.py#L50

opw-1894625

closes odoo/odoo#28096
2018-10-24 09:11:50 +00:00
Goffin Simon 274f956f8d [FIX] stock: Lot/Serial Number not displayed
The field lot_name is not initialised in many cases.

Steps to reproduce the bug:

- Set your user in the group called "Display Serial & Lot Number in Delivery Slips"
- Create a new stockable product P with setting tracking "by unique serial number"
- Create 10 serial numbers for P
- Purchase 10 units of P and select the 10 serial numbers created
- Create a SO where I selected 1 unit of P with its serial number and confirm it
- Go to the delivery slip and print the delivery slip

Bug:

The serial number was not printed in the delivery slip.

opw:1900735

closes odoo/odoo#28076
2018-10-24 08:11:32 +00:00
Lucas Perais (lpe) 796b45afd6 [FIX] point_of_sale: right negation syntax in xml JS
f4bfc90755 reverted a bunch of commits,
including a legit bugfix in a XML for JS templates

This commit re-does that bugfix

OPW 1895212

closes odoo/odoo#28062
2018-10-23 12:24:54 +00:00
qdp-odoo 68dafa0620 [FIX] l10n_ch: fix swiss QR Code crap
The specifications of this feature have not been frozen yet and the feature is not expected before mid-2020. Merging it in stable was premature.
There's now an ir.config.parameter to hide the feature until really needed: a field in the accounting settings will be added in a next version to show it, in the meanwhile people can manually add the parameter to use/test the QR code.

Also fixed all 3 typos/grammar errors in the single sentence message displayed when some pieces of information were missing while printing the QR code

Also fixed the place where the Swiss options for the ISR are displayed in the accounting settings (under 'invoices' instead of 'fiscal periods')

Also fixed a 'not-a-multiple-of-4' indentation.

closes odoo/odoo#28035
2018-10-23 07:21:02 +00:00
Nicolas Lempereur dd94d06727 [FIX] web,base: report body rtl/ltr of language
Currently, the RTL/LTR direction of a report is the language direction
of the current user printing the report.

So for example a customer invoice in french can be RTL and a customer
invoice in arabic can be LTR.

With this changeset we keep a reference to the body language and use it
to choose direction later on.

opw-1890833
closes #27878
2018-10-23 15:51:16 +00:00
Toufik Ben Jaa 15f387fbe5 [FIX] auth_signup: invalid value on field signup_valid for non superuser
- The field `signup_valid` was computed and stored using the `superuser`
  env, which causes issue since it means the value was computed for the
  wrong environment.

  Using a compute_sudo instead of manually calling `sudo()` fixes the
  issue.

  e.g: reading signup_valid using a regular user (non superuser) will
       always return False, while doing it as the superuser will return
       the correct value.
2018-10-17 14:54:12 +02:00
Romain Derie a5a86c4d11 [FIX] website_sale_wishlist: prevent product to be added more than once
The add to wishlist button will only be disabled once the RPC gets back to the
client.
Thus, the button being grayed out will occur depending of the connection speed.
If the RPC does not get back almost instantaneous, the user will be able to
click multiple times on the button and add the product more than once.

This commit fixes that behavior by disabling the button when the user click on
it.

Closes #27489, closes #27735
2018-10-17 09:49:22 +00:00
Pierre Masereel 498dbc548b Revert "[FIX] product_form: remove hs code and duplicate internal note"
The field hs_code has been removed but will be used in future tasks and
customers have already filled this field.

So we set it back in a sperate module to respect our stable policy.

This reverts commit 2d738f8563

closes odoo/odoo#28071
2018-10-23 12:25:09 +00:00
Pierre Paridans 60d3fc736c [FIX] partner_autocomplete: autocomplete not defined in mobile
Bugfix to prevent traceback in mobile apps due to override
of Many2one widget with native implementation.
Happens in every form view containing a partner field.

Implemented as defensive programming.
The goal of the included test is to prevent a silent error for the
webclient. It doesn't test the actual behavior in mobile (where there is
no DOM for Many2one).

Task #1896641

closes odoo/odoo#27967
2018-10-23 16:58:58 +00:00
Nicolas Lempereur a4f34c6480 [FIX] web_tour: tooltip message over document viewer
Currently:

- normal modals have a z-index of 1050 ($zindex-modal)
- chat window have a z-index of 1051
  ($zindex-model + 1 == $o-mail-thread-window-zindex)
- document viewer modal have a z-index of 1052
  ($o-mail-thread-window-zindex + 1)
- tour tooltip ball and messages have a z-index of 1051 ($zindex-modal)

A tooltip ball is in the DOM next to the element that is pointed out, so
if the element is inside a document viewer modal we see the ball.

But a tooltip message is positioned inside the body, so if we hover a
ball inside the document viewer modal, the tooltip message is behind the
modal.

In this commit, we set tooltip to bootstrap $zindex-tooltip value (1070
a of now).

opw-1893035
closes #27928
2018-10-23 08:49:52 +00:00
Romain Derie 4900f1824f [FIX] website_sale_stock: hide website field from picking form view
With multi-website enabled, the website field in the picking form view would
appear alone in the top right. (As company_id does if multi-company but as
website is a related (grayed out) most of the time empty it looks weird)

task-1894793

Note that in master the website field will be back in a refactored form view

closes odoo/odoo#27950
2018-10-23 09:19:03 +00:00
Nicolas Lempereur a03b967aa9 [FIX] web: restore CSS kanban AttachmentImage field
Modification in 60aa9ffd0 of web module kanban_view.scss contained
unused CSS style and style that affected usage of AttachmendImage field
in a normal kanban view.

The correct code was added in commit 6e12372 in composer.scss of mail
module.

opw-1892053
closes #27923
2018-10-23 11:33:53 +00:00
Adrien Dieudonne ee622b9b66 [FIX] mail: schedule an activity button not visible in mobile
Before this commit, text color was in grey because of a css
inherited rule applied by Bootstrap when there is no href attribute.
In mobile, text color was in white as the background and it was not
possible to see the text.

Now, we transform this link into button to restore the previous
behavior and keep it visible in mobile.

closes odoo/odoo#28061
2018-10-23 11:43:05 +00:00
Martin Geubelle 717111479b [FIX] web: do not block tour with blockUI
A previous rev. odoo/odoo@2672143 has prevented a tip to be consumed
in automated tours when blockUI was displayed.

This condition is not exactly correct. A blockUI element can be displayed
on any node, not only the webclient (which is the case when calling
`framework.blockUI`. This is the use case we want to deal, not the others.

So the tip cannot be consumed only with `o_ui_blocked` now.

closes odoo/odoo#28060
2018-10-23 10:23:06 +00:00
Robot Odoo f1abe19067 [FIX] auth_ldap: missing model description
Missing model description produces a warning when the module is installed

closes odoo/odoo#28047
2018-10-23 13:22:31 +02:00
Alexey Pelykh e658cb8c32 [FIX] auth_ldap: missing _description on res.company.ldap
Produces a warning when installed
2018-10-23 10:32:29 +00:00
Alexey Pelykh a5d22c2aec [CLA] Brainbean Apps OU signs Odoo CCLA 2018-10-23 10:30:12 +00:00
Kishan Gajjar 3a28e507da [FIX] website_sale: BS4, restore UI for customize dropdown
closes odoo/odoo#28009
2018-10-22 05:48:17 +00:00
Robot Odoo e63d319656 [MERGE][FIX] test(_mass)_mail: simulate email sending in performance tests
Commit 356a421 introduced a hook to avoid sending emails while
installing application data. However we have to carefully re-activate email
sending in tests that depend on them especially performance tests.

Performance counters are updated to match current runbot state for both
community and enterprise.

Mass mailing performance class is made a direc child of TransactionCase
to ease manipulation and be able to use patch.

This merge is related to task ID 1902307 and is mainly a fix and better use
of https://github.com/odoo-dev/odoo/commit/356a42166082f9448b7e82393caeb00839be8c8f.

closes odoo/odoo#28027
2018-10-23 11:24:25 +02:00
Thibault Delavallée 82329eab64 [REF] test_mass_mailing: make performance test class child of TransactionCase
It eases manipulation and lessen overhead. Performance tests should be self
contained as much as possible.

Commit linked to task ID 1902307.
2018-10-23 08:44:08 +00:00
Thibault Delavallée 0b8a409580 [IMP][FIX] test_mail: correctly simulate email send in performance tests
Commit 356a421660 introduced a hook to avoid sending emails while
installing application data. However we have to carefully re-activate email
sending in tests that depend on them especially performance tests.

This commit also update performance counters to match the current state of
counters as it was not totally updated.

Commit linked to task ID 1902307.
2018-10-23 08:44:03 +00:00
Gustavo Valverde d75de9ae53 [FIX] base: set Monday as first day in es_DO
This complies with ISO 8601 and it's also the first working day in the country.
Also used for payroll computations.

closes odoo/odoo#28041
2018-10-23 07:19:16 +00:00
Adrian Torres 2693918903 [FIX] xmlrpc: properly marshall date & datetime objects
Before this revision, trying to read a Date field using xmlrpc would
result in a marshalling error.

This is due to the fact that 960360afe4
changed the internal value of Date/Datetime fields to hold
datetime.date/datetime objects.

The xmlrpc layer is capable of converting datetimes to the XML
datetime representation, but this is not possible for datetime.date
objects.

In order to solve this, the Marshaller class used by python's
xmlrpc.client is overridden and monkey-patched, allowing to convert
datetime.date / datetime.datetime objects into properly formatted
strings.

opw-1896364

closes odoo/odoo#28022
2018-10-22 12:22:59 +00:00
Robot Odoo ddc531a35a [IMP] snailmail: Change formatting of address in snailmail
The previous format displayed the fields 'street' and 'street2' on two different line, making the address too big for the address area allowed by Pingen.

--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

closes odoo/odoo#27841
2018-10-23 00:28:03 +02:00
Arnold Moyaux abb4b142ea [FIX] mrp: duplicate raw moves
Usecase to reproduce
- Enable multi locations, multi routes
- Check mrp 3 steps on warehouse
- Create a MO

Raw moves are duplicated. It happens due to commit aeb038747f
The purpose of the commit was to split the rules from SAM to stock.
The pull rule should be in manufacture route and the push rule on the
warehouse. However the push rule was not correctly copied and created a
push rule from prod to sam instead of sam to stock.

Fixes #27962

closes odoo/odoo#27965
2018-10-19 12:13:26 +00:00
Rémi Rahir 5032828d5a [FIX] snailmail: instable behaviour on print
Since commit b6a981405e we require a
certain key in the context to apply the custom snailmail report layout.
This was badly managed and would eventually confilt inside the modal
that links snailmail and the mail composer.

This fix stabilises the biehaviour by properly propagating the context
key.
2018-10-19 08:36:16 +00:00
Antoine Prieels (ANP) 218fbaf90b [IMP] snailmail: Change formatting of address in snailmail
The previos format displayed the fields 'street' and 'street2' on two different line, making the address too big for the address area allowed by Pingen.
2018-10-19 08:36:16 +00:00
Goffin Simon ff610cec4f [FIX] sale: Signature not displayed on report
The signature never appeared in the report_saleorder_document when printing
or downloading the document.

opw:1892612

closes odoo/odoo#27948
2018-10-18 14:43:45 +00:00
Christophe Simonis b81c2bce84 [MERGE] forward port branch saas-11.4 up to 3c108977c1 2018-10-22 16:59:51 +02:00
Martin Trigaux 933165ec3a [FIX] models: restore warning on wrong record
Was lost during d5b687a48f

Set the module name in the context to be able to detect errors in xml and csv import

closes odoo/odoo#27680
2018-10-21 08:41:22 +00:00
Odoo Translation Bot de265ce63e [I18N] Update translation terms from Transifex 2018-10-21 01:25:56 +02:00
Xavier Morel 238e561ad9 [FIX] website: current website caching
Not taking fallback in account means incorrect values can get cached/retrieved
on fallback v not fallback cases

closes odoo/odoo#27989
2018-10-19 15:28:43 +00:00
Martin Geubelle 1dcddbd022 [FIX] account: allow invoice report modification
The invoice lines table in the invoice report was using a `t-attf-class` where
it is not needed. It could be simplified with `class` instead.

This small simplification allows the user to modify the table with the Report
designer in Studio.

closes odoo/odoo#27978
2018-10-19 12:20:50 +00:00
Robot Odoo 489408bf26 [MERGE] website, *: fix some snippet options
* web_editor

See sub-commits for details.

closes odoo/odoo#27969
2018-10-19 15:36:30 +02:00
qsm-odoo 932fdb4e24 [FIX] web_editor: hide link buttons duplicates instead of removing them
For example, if primary = alpha, the primary button option is removed
in the link dialog. When editing a primary button, this lead to broken
behaviors. Hiding the button does the trick.
2018-10-19 09:58:00 +00:00
qsm-odoo b154709645 [FIX] website: remove useless select-class class 2018-10-19 09:27:29 +00:00
qsm-odoo 74086da371 [FIX] website: clone correct slide on addition
When adding a new carousel item, the first one was duplicated instead of
the active one.
2018-10-19 09:27:28 +00:00
qsm-odoo 3704e9583b [FIX] web_editor, website: remove traces of CKE 2018-10-19 08:37:01 +00:00
qsm-odoo aa2f86b14c [FIX] website: border/rounded/shadow options were not working together 2018-10-19 08:37:01 +00:00
qsm-odoo 720a129544 [FIX] website: make rounded option work with jumbotron 2018-10-19 08:37:01 +00:00
qsm-odoo 2d4c3bf662 [FIX] website: increase compatibility with previous column system
Before 12.0, snippet columns were using col-md instead of col-lg.
Also, this improves efficiency and readability.
2018-10-19 08:37:01 +00:00
Lucas Perais (lpe) 4e72669cc8 [FIX] auth_signup: compute signup_valid in sudo
Before this commit, the signup_valid field was miscomputed
probably due to some env mayhem.
Hence the banner with the link to reset the password was never shown

After this commit, the field is well computed, and the banner displays

OPW 1894390

closes odoo/odoo#27901
2018-10-17 14:30:22 +00:00
Christophe Simonis 1810f6be4c [FIX] core: early fail on missing foreign records
When installing/updating a module, verify existence of foreign records
before updating them.  Also handle forcecreate=False records.

Also fix misprefixed XML id in sale_quotation_builder.

closes odoo/odoo#27659
2018-10-19 11:23:47 +00:00
Robot Odoo 78537943b9 [MERGE][FIX] livechat, *: open livechat from URL
*: mail, web

This fixes the following issues:

### 1. Livechat menu was not visible when accessing from the customer URL

The customer URL is obtainable by following those steps:

- Access `/web`
- Click on Live Chat app
- Open a Live Chat Channel
- Click on "Widget" sheet
- Access livechat from (2nd) "Copy Text" button

This is due to missing JS modules in the external lib, such as the root widget.

### 2. The position of the buttons "Copy Text" is modified on pressing 'ALT'

This is caused by the keyboard navigation overlay that changes the CSS
position of the parent of the overlay element. It sets the position to
`relative`, so that the overlay exactly covers the element. However, if the
element had a position `absolute`, changing it to `relative` may re-position it
somewhere else on the page.

In fact, it is not necessary to set the CSS position to `relative` in this case,
because the overlay has CSS position `absolute`: an element with `absolute`
will match the size of the parent if the parent is also `absolute`.

Task-ID 1885445

closes odoo/odoo#27578
2018-10-19 13:37:08 +02:00
Mohammed Shekha a4bcbecff1 [FIX] web: keyboard overlay with position absolute
Before this commit, when an element with access key has a CSS
position absolute , pressing the key 'ALT' to show the access
key overlay may break the position of the element.

This is due to altering the CSS position of the element which the
overlay is attached to: it becomes `relative`, so that the overlay
takes the whole size of the attached element.

In case of an absolute element, it should not become relative,
otherwise its position on the document may be completely different.
Since the overlay has position `absolute`, if its parent has also
position `absolute`, then keeping both with position `absolute` will
let the overlay take the size of the parent, without changing the
position of the parent.

Task-ID 1885445
2018-10-19 09:23:21 +00:00
Mohammed Shekha 10cf85e4c5 [FIX] mail: ignore popover if bootstrap not available
Before this commit, there may be a silent crash when accessing the
livechat from the customer URL, e.g.
`http://mycompany.odoo.com/im_livechat/support/1`.

This issue occurs when bootstrap popover lib is not available.
This does not occur if one tab of the current browser has this lib
loaded. To reproduce this issue, open the customer URL from another
browser:

1. Access to `/web` from any browser (e.g. Chrome)
2. Go to Live Chat app
3. Select a livechat channel
4. Go to sheet page "Widget"
5. Copy text of the customer URL (2nd "Copy Text")
6. Paste the URL in a different browser (e.g. Firefox)
7. Open the livechat menu
8. Inspect dev tools

=> It will complain that `popover` is not a function.

We would like to keep the livechat lib as small as possible,
so instead of importing the boostrap lib, we simply prevent
the logic that generates the issue.

Task-ID 1885445
2018-10-19 09:07:24 +00:00
Prakash PrajapatiandMohammed Shekha 8929960492 [FIX] im_livechat, bus: open livechat from customer url.
Before this commit, there was no livechat menu when accessing it from
the customer URL, e.g. `http://mycompany.odoo.com/im_livechat/support/1`)

This is due to missing JS modules, such as the root widget.

Also, the crosstab polling directly requires the session module,
because the public root widget does not return the session module
from the OdooEvent `get_session`.

Task-ID 1885445

Co-authored-by: Mohammed Shekha <msh@openerp.com>
2018-10-19 09:05:17 +00:00
TWA 972c8e9ff5 [FIX] web: File upload input on_clear event not propagated
The handler function was used directly in the code. The MouseEvent wasn't provided in that case.
This FIX split the handler function and the processing function so that it doesn't interfere.

closes odoo/odoo#27929
2018-10-18 08:55:07 +00:00
Adrian Torres 0ac93c3828 [FIX] loading: set dbdemo if demo install success
opw-1896028

closes odoo/odoo#27945
2018-10-19 07:42:30 +00:00