Commit Graph
124195 Commits
Author SHA1 Message Date
Toufik Ben Jaa 079a3b602b [FIX] mail: add index on message_main_attachment_id
- When deleting attachments, the foreign key constraints on
  `message_main_attachment_id` are triggered which could take
  a lot of time to be computed.

closes odoo/odoo#28358
2018-11-02 11:49:43 +00:00
Romain Derie 1d0e49bcff [FIX] web_unsplash: wrong doc links
Doc links were created before the doc, then the doc was merged under a
different URL.

This commit corrects the links to the Unsplash documentation.

closes odoo/odoo#28355
2018-11-02 10:31:49 +00:00
Nicolas Martinelli 6604f7aef1 [FIX] hr_attendance: multiple scans
- Open the Attendance kiosk mode
- Scan an incorrect barcode

It's not possible to scan any barcode anymore.

If the barcode is incorrect, we need to add back the event listener.
Moreover, the RPC introduced with bbc7e9586d is not necessary if
we retrieve the barcode thanks to the existing RPC call.

opw-1878632
opw-1888402

closes odoo/odoo#28354
2018-11-02 10:43:38 +00:00
Joren Van Onder 5ae32d659b [FIX] account_check_printing: allow users to configure check layout
52a8ed3c0c made related fields readonly by default. 3f4f77fd9d
attempted to identify all fields that needed readonly=False but missed
this one.

closes odoo/odoo#28343
2018-11-01 23:06:56 +00:00
Martin Trigaux f590b15a6b [FIX] hw_blackbox_be: grep mac address
In the previous debian version, the output of ifconfig was:
ifconfig eth0   Link encap:Ethernet HWaddr b8:27:eb:d6:03:8d

now is
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        ether b8:27:eb:d6:03:8d  txqueuelen 1000  (Ethernet)

closes odoo/odoo#28320
2018-10-31 15:21:26 +00:00
Christophe Simonis 5e055a2afd [MERGE] forward port branch saas-11.4 up to f6ca72b3ce 2018-11-02 10:52:55 +01:00
Olivier Dony 4867776540 [FIX] bus: never GC during requests
Running the bus garbage collector synchronously during the handling of a
request can stall the request for a very long time.

Instead, we add this step to the existing auto-vacuum scheduled job that
handles this kind of housecleaning. It brings another interesting bonus:
it can be scheduled outside of peak hours, which will avoid blocking other
bus-related transactions (the GC deletes a lot of rows and takes a lot
of exclusive locks in the database)

closes odoo/odoo#28326
2018-10-31 22:23:34 +00:00
Adrien Dieudonne 94b82bce6d [FIX] web: remove debug in timezone_mismatch test
Before this commit, a blank page was shown when tests
were running in /web/tests.

closes odoo/odoo#28319
2018-10-31 14:21:48 +00:00
qsm-odoo 912d4c2d41 [FIX] web_editor: fix automatic editor context for RPCs
With https://github.com/odoo/odoo/commit/55131b8f5becdd3d4776f4c3e7e4288a0b185706,
we automatically add the known editor context (containing lang,
website_id, etc) when using the `this._rpc` method. Some RPCs needed
however to explicitely not send a value from this automatic context...
but this was not correctly implemented. This can now be achieved by
using the `noContextKeys` key in the `this._rpc`'s *options* parameter.

closes odoo/odoo#28322
2018-10-31 15:50:45 +00:00
qsm-odoo b2584e141b [FIX] website_sale: BS4, restore collapsible categories design
Closes https://github.com/odoo/odoo/issues/27970

closes odoo/odoo#28317
2018-10-31 12:40:27 +00:00
David Beguin c28ae53417 [FIX] mail : fix traceback while creating invalid blacklist email address
The objective of not creating the record if the email was invalid
was to avoid crash on import. But if the number of record created does not
match the number of record that would have been created (see in flush()
in models.py), this cannot work.

Also, it's necessary to tell the user that his import file has an error
and where. This is why a UserError must be returned.

Task ID 1902139
Closes PR #28011
2018-10-31 10:51:56 +00:00
Emmie He 1f16c2aabe [FIX] website_sale: make extra step work in cart checkout
In v11, when we add the extra step in website checkout and
then click 'proceed to checkout', user will be directed to address
(even when there is default address detected), and then extra step,
and in the end confirmation.
But in v12, when extra step is enabled, user  will be sent
directly to confirmation after clicking 'proceed to checkout'.
They can click 'extra info' to fill out the information,
but I imagine user would easily ignore that option.
It seems the express checkout implementation ignored extra_info route.

closes odoo/odoo#28122
2018-10-24 17:40:34 +00:00
Swapnesh Shah d5c09fad4e [FIX] account: correct typo in warning message
closes odoo/odoo#28218
2018-10-31 07:56:20 +00:00
qsm-odoo 78e3330d02 [FIX] website: fix parallax snippets' structure
Some of our new snippets for 12.0 uses parallax. Those were not using
the exact structure required by parallax which *may* lead to unexpected
results when playing with the related options.

closes odoo/odoo#28299
2018-10-30 17:10:56 +00:00
qsm-odoo 385ed7bd86 [FIX] website_sale: review shop cart summary
On the payment page, a cart summary appears on the right. This summary
is still not visually perfect and the design will be improved in master.
This commit however restores what can be considered as a bug with a
minimal diff:

- "I have a coupon" message was glued to the card border
- If a product name was long, the table was very small on Firefox as the
  name broke accordingly while it was very large on Chrome.

Also see https://github.com/odoo/odoo/pull/28245/files

closes odoo/odoo#28286
2018-10-30 13:59:41 +00:00
Swapnesh Shah 297edf8d49 [IMP] website: make website name required
The website_name field is a related towards a required field.
Saving a res.config without a value raise an error.

closes odoo/odoo#27907
2018-10-30 15:58:19 +00:00
mreficent 66e7ac21fd [FIX] account: allow to write on multiple records
Ensure the write method in account.journal is working with multiple records.
The for loop indicates it was the intention to be used on several records but
self was still used instead of journal
Some methods like _update_mail_alias work with an ensure_one

closes odoo/odoo#28246
2018-10-30 15:15:15 +00:00
Adrian Torres 4584aed5e5 [FIX] account: avoid computing uom price if no product
Before this commit:

* Enable UOMs
* Create a new invoice and invoice line
* Set *only* the uom field of the invoice line
* Singleton expected error

This happens because the method _compute_price of `uom.uom` expects a
singleton, however since no product has been defined yet, it gets an
empty recordset which of course doesn't comply with self.ensure_one(),
raising a Singleton Error.

Functionally speaking, it makes sense to define a product before
choosing an uom, however a Singleton Error is an unexpected error, so
instead of doing that, we only calculate the price_unit if a product has
been chosen.

Fixes #28269

closes odoo/odoo#28278
2018-10-30 10:07:35 +00:00
Swapnesh Shah cf866c3247 [IMP] hr_timesheet: make timesheet_encode_uom_id required in config
The related field `timesheet_encode_uom_id` is required
on the company, but not on the settings.
This commit makes it requried through the view to
avoid a confusing SQL error message for the end user.

Closes #27645
2018-10-30 11:02:25 +00:00
qsm-odoo 2768da5ce4 [FIX] website: fix ace editor interactions with other widgets
- The affix navbar went over the ace editor, preventing to save/close
- The ace editor went always under the new content menu

Now:
- The affix navbar is always under the ace editor
- The ace editor closes when the new content menu opens
- The new content menu closes when the ace editor opens

closes odoo/odoo#28251
2018-10-30 10:30:49 +00:00
Julien (juc) Castiaux b89ddff009 [FIX] sale: Wrong expected delivery time for orders with services
When doing a sale order containing product and services, the
computed minimal expected delivery time was using the customer lead
time of the services (which is always 0) instead of the minimum
customer lead time of the products.

To reproduce:
1) Install Sales and Delivery Cost.
2) Go to the sales settings and enable the "Delivery Date" option.
3) Set a customer lead time on a product.
4) Create a quotation with that product, any service and a
   delivery method.
5) Validate the quotation and the delivery.
6) The "Expected Time" written in the "Other Information" tab of
   the sale order doesn't match the minimum delivery expected time.

opw-1902858

closes odoo/odoo#28208
2018-10-29 10:08:15 +00:00
David Monjoie fb204253bb [FIX] web: fix save search in search more modal
When searching for records in a modal (ex: m2o "Search More"),
clicking on "Save current search" had no effect.

Task 1894915.

closes odoo/odoo#27931
2018-10-29 14:40:44 +00:00
Adrian Torres 8cecb88c27 [FIX] digest: check field existance
This commit fixes the following bug:
* On a new DB, install account
* Settings > Technical > Email > Digest emails
* Open Weekly Digest, set Next Send Date to current day
* Settings > Technical > Scheduled Actions > Digest Emails
* Run manually

AttributeError: 'res.company' object has no attribute
'resource_calendar_id'

The field resource_calendar_id is added in the module resource.
The module digest does not have resource in its dependency.
In stable version, have a silent fallback on UTC if the field is not present.
The right dependency should be added in master.

closes odoo/odoo#28244
2018-10-29 13:32:21 +00:00
RomainLibert 9ee9546d59 [FIX] hr_holidays: fix crash when accrual update allocations for multiple employees
In case we create an allocation in byTag, byDepartment or byCompany, we
need to pass the accrual flag to the children of the first allocation
and only update the children allocations (namely the byEmployee
allocations only).
Otherwise the accrual allocation will fail

Closes: #27971
opw-1895302

closes odoo/odoo#28012
2018-10-22 08:05:34 +00:00
Alexandre Kühn 17bb0ca443 [FIX] mail: mark as read only when accessing to chatter
Before this commit, the user could not receive any notification
from the chatter of a document when having Notification Management
set to "Handle with Odoo".

This problem occurs when the user opens (or has opened) the document.
Any messages received from the document are automatically marked
as read, so it removes the notification right after receiving it.

In order to no longer have this issue, the user had to reload all
pages that have opened this document.

This commit slightly changes the behaviour of the chatter, so that
it automatically marks it as read only when accessing the document,
but not when the document is open (or has been opened). Consequently,
if the user has opened the document and then receives a notification
from this document, it won't automatically mark it as read.

Task-ID 1895359

opw-1890556

closes odoo/odoo#28114
2018-10-26 08:39:39 +00:00
Hardik Prajapati b650dc7a21 [FIX] sale: Duplicate field VAT in report_invoice_document
Removed vat field from inherited invoice template to avoid a duplication.

opw:1903782, 1903149

closes odoo/odoo#28249
2018-10-29 12:51:41 +00:00
Lucas Perais (lpe) d94e8a06d1 [FIX] account: invoice computed reference supports sequence suffix
Set a suffix on the sequence that will determines an invoice's move's name

Validate an invoice

Before this commit, there was a traceback because the regex that matches the invoice number
did not match anything due to the suffix

After this commit, it works as expected

OPW 1903326

closes odoo/odoo#28241
2018-10-29 10:02:01 +00:00
Adrien Dieudonne 497dfb6917 [MOV] web, base_import: mobile tests should be in mobile suite
This fix some inconsistent error on runbot.

In mobile, some views* depend on 'jquery.touchSwipe' library which
is lazy loaded. As a result, the views become asynchronous...
It's why this library is already loaded before running tests in the
mobile test suite. So we can continue to use synchronous views whether
in mobile tests or not.

But some mobile tests weren't in mobile suite...
In desktop, 'jquery.touchSwipe' is lazy loaded and the first test will
load it for others. It's why the first one has to be asynchronous:
https://github.com/odoo/odoo/commit/da7b59045d246c159f93bc75e3f19c6b1221d31c

The inconsistency comes from the fact that all tests are sequential but
we can't garantee the execution order. So, if the test mentionned is not
the first executed one, an error will occur because the view is not
asynchronous.

Now, all mobile tests are moved in mobile suite to be sure that
'jquery.touchSwipe' is loaded.

We also set the default value for size_class because we want a
coherent environment. It is very rare to find mobile devices with
more than 474px wide.

*: form_view, kanban_view, res_config_settings

closes odoo/odoo#28195
2018-10-29 10:25:05 +00:00
Robot Odoo f2932f9f0a [FIX] procurement_jit, stock: unreservation
We fix two problems with the 'unreserve' function on picking and sale order,
When a sale order is edited, we perform 'do_unreserve' on picking, it is not necessary and make us loose the done quantity put on the picking so we remove it.
When we unreserve a picking having a package level added through a put in pack or automatically added on reservation, the package level is set back to draft instead of being removed

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

closes odoo/odoo#28188
2018-10-29 13:20:17 +01:00
Pierre Masereel 5954cd563e [FIX] stock: remove level package when unreserve if necessary 2018-10-29 10:50:21 +00:00
Pierre Masereel da2abe6a2c [FIX] procurement_jit: do not unreserve picking
When a quantity is increased in SO, the related picking is unreserved
then re-assigned, we can just call assign, as we don't want to lose what
has already been done in the picking.

As the decreased quantity on SO is not propagated on move, not
unreserving won't cause trouble.
2018-10-29 10:49:24 +00:00
Simon Lejeune d5c31e231a [REV] mrp: block updating live BoM
This reverts commit d78b6f5e25.

This constraint is considered too harsh. It was applied to circumvent
inconsistencies when a bom is modified while being used in a
manufacturing order and the user chose to update the quantity to
produce. The current code will look at the existing move if no
intermaddite post of inventory was done else look at the new bom.

A code to re-construct the original BoM from the stock moves isn't easy
to write to handle all cases, one particularly complicated is the
deletion of bom lines of the same product.

We also considered to block the update qty button if the bom is modified
after the create date of the MO, but if we have to read all the bom
lines of all the sub bom in a computed field it may be slow on large
databases.

We thus chose to remove the constraint and think of a better approach in
a future version.

task 1891407

closes odoo/odoo#28155
2018-10-25 12:25:50 +00:00
Thibault Delavallée 5494b0bc3e [FIX] mail: do not prevent record update due to automated activities
Currently creating activities assigned to user not having to the document
raises an Error as people should not have activities they cannot handle
directly on a document they cannot access.

In some cases activities are created through business flow, like automatic
activities creation when creating leave requests. Assigning an activity
to someone that has no access to the document should not prevent from
creating the leave request.

This commit therefore does not check assigned user access on automated
activities to avoid having blocked business flows.

This commit is linked to task ID 1903484.

closes odoo/odoo#28139
2018-10-25 09:29:10 +00:00
mreficent 44b51d4491 [FIX] mail: blacklist form view creation date visibility
closes odoo/odoo#27947
2018-10-18 14:41:11 +00:00
Andrey Troitskiy ea21f0bce5 [CLA] signature for troizky
closes odoo/odoo#28201
2018-10-29 09:13:59 +00:00
Lucas Perais (lpe) eaedfe4074 [FIX] web: display of timezone mismatch select widget
On the user's preference, change the timezone to one that is different
from the browser.
Save the form.

Go back to the user's preferences.

Before this commit, every timezone was displayed inside the span that contain
the warning icon, and leaked everywhere on the form view.

This was because of the joint action effects of commits:
86897ca167
4dfabb8f7a

Which provoked the field to be re-rendered in edit mode,
but with an $el on which a span was added. `<option/>` elements
were then added to both `<select>` and `<span>`
This did not happen before v12.0

After this commit, there is no display glitch

OPW 1895088

closes odoo/odoo#28108
2018-10-29 08:36:33 +00:00
Gabriela Mogollón e6bb3eb3e0 [IMP] l10n_mx: Add advance accounts on the chart template definition
closes odoo/odoo#28165
2018-10-25 17:29:12 +00:00
Odoo Translation Bot 29dc21ae4b [I18N] Update translation terms from Transifex 2018-10-28 01:25:21 +02:00
Robot Odoo 88a9ebdb00 [FIX] account: fix onboarding issues
* fix in the accounting config bar ('add a bank' and 'fiscal year' steps)
* better display names and icons for vendor bills uploaded manually (moved some code that was previsouly only done in document_account for vendor bills created through the DMS)

closes odoo/odoo#27882
2018-10-27 00:12:37 +02:00
eco-odoo 4eeaf6c0e2 [IMP] account: set default vendor_display_name for uploads
Previously a default name was set only for vendor bills created from
emails.

Task: 1893079
2018-10-26 13:36:26 +00:00
eco-odoo 4312c1786d [FIX] account: mark configuration bar bank step done
When a new bank account was created manually, the step was not marked as done.
2018-10-26 13:36:26 +00:00
eco-odoo b2a14dda03 [FIX] account: onboarding fiscal year step various issues
Design: remove empty space in the dialog form.
Opening date:
-fix move line not created introduced by c4b9c51abf. This prevented saving the opening date;
-set default date to start of current year.
Add a validation on fiscal year last day:
-the automatic calculation was removed in 90cdc91638 but no validation was set;
-the help message became irrelevant;
-the fiscal year end date was set as readonly in 52a8ed3c0c and not fixed in 3f4f77fd9d.
2018-10-26 13:36:26 +00:00
Romain Derie 40c6bc3ad2 [IMP] web_unsplash: Implement Beacon Alternative and credit Unsplash
Unsplash API requirements does not directly allow to store their images on
our server (We should use hotlinking unless the image is edited (cropped etc)).
Still, they have the `Image Beacon Alternative` to allow to store their images
on our server if we really need it with our use case.

With the Beacon Alternative, we should ping Unsplash server to notify an image
view.
To do so, we need to be able to recognize Unsplash imagesin the DOM, this is
why we are now using /unsplash/ in the URL.
The Unsplash image name should be the image ID as it will be the identifier
needed to ping their server.

This commit also adds credit to Unsplash in the media dialog next to the
unsplash input search.
It also add the `w-100` on the media dialog card as we lost that UI behavior
from BS3 to BS4.

opw-35060

closes odoo/odoo#27377
2018-10-26 10:13:07 +00:00
Xavier Morel 8c9174ff80 [FIX] base: handling of *_view_ref in SSF
The feature was not tested, and as it turns out completely broken:

* the non-raw string means the "backrefs" were really interpreted as
  octal literals
* the second backref was entirely wrong

Also add all loaded views to the field descriptor in case we might
have a use for it (and because inline sub-views are always stored on
the descriptor).

closes odoo/odoo#28194
2018-10-26 11:39:53 +00:00
Thibault Delavallée bf65793b31 [REF] mail: rename blableblu
Some people do not understand the old forgotten langage coming from R'yleh
sub-city of Helk'Yizrk. Let us use standard naming then.

closes odoo/odoo#28196
2018-10-26 12:39:18 +00:00
Christophe Monniez e0219c7f39 [FIX] tests: avoid remaining requests
From times to times, warning are seen on the runbot during HttpCase
tests with the chrome headless browser.

Those warning are about Odoo trying to join remaining requests threads.
In the dumpstack, the thread seems blocked in the werkzeug
handle_one_request method, when trying to read the HTTP request line.

One explanation could be that Chrome opens a pre-connect socket for
a future use. When the HttpTest cleans the browser, the page stops
loading but (probably) keeps the socket open for a while.

That could explain the problem.

With this commit, a timeout is set on the request handler,
in the hope that it closes the pre-connect socket too.

Cheery-pick of f9ee8cf to avoid runbot_merge failures.

closes odoo/odoo#28193
2018-10-26 11:42:03 +00:00
len-odoo 46f48c35a0 [FIX] survey: replace the native datetimepicker by an Odoo-styled BS one
Commit: a034a17d37
with a starking lack of foresight, erroneously put a native input date.
It wrongly assumed that the text input was a text input instead of a BS
datetimepicker, which was broken when upgrading BS3 to BS4.
Which means that it wasn't styled as the rest as Odoo, as well as not being
configurable, not working on some browsers, and subject to locale errors.

We fix the DOM so that the BS datetimepicker is correctly applied.

Related to 9a6cd4e41dda56c4f454ed898ed17adad0d8556f

closes odoo/odoo#28135
2018-10-25 08:19:22 +00:00
Géry Debongnie f0a7d69dcf [FIX] web_tour: only allow one active tip at once
Before this commit, the code for the tour system was kind of naive and
simply activated tips for each tour.  This was not really an issue,
since most user install one app at a time, so they had the time to
follow a tour, and when they install the next app, it is no longer
active.

However, since we activated the multi-app feature in our website, it now
happens that multiple apps are installed at once.  Because of this, this
commit is now necessary.

closes odoo/odoo#28178
2018-10-26 08:30:48 +00:00
Nicolas Seinlet 0e948f6f35 [FIX] mail_bot: call super and append result
Instead of using an or which is a nightmare for PostgreSQL
in this use case, call super and simply append odoobot to
the result.

closes odoo/odoo#28017
2018-10-22 10:15:28 +00:00
len-odoo 25e82a5c68 [FIX] website: fix the date picker widget on the publish page dialog
When updating to BS4, the datetimepicker library was updated to
tempusdominus.js.
It expects the DOM to be slightly different to apply correctly.

opw 1896103

closes odoo/odoo#28073
2018-10-25 09:03:16 +00:00