Commit Graph
122661 Commits
Author SHA1 Message Date
Jeremy Kersten bdbca1cdca [FIX] website_forum: add level field in gamification form view 2019-01-15 17:12:12 +00:00
Nicolas Lempereur 535da9e78c [FIX] web: no ResizeObserver video error on chrome
When displaying a video, with the browser window at a certain size, or
resizing it (or opening developer tools) we could the following error:

 "ResizeObserver loop limit exceeded"

This can be reproduced in chromium just with this JS code:

  window.onerror = function(e){ console.log(e); };
  document.body.innerHTML = '<div><video controls src="v.webm"/>';

The issue only happen if:

- the video server does not support HTTP range requests
- the controls are displayed on the video
- browser size is in problematic size/resized to problematic size

And the error is raised in window.onerror but not displayed in the
developer console.

With this change, we ignore these errors until fixed in chromium.

chromium bug tracker: https://crbug.com/809574

opw-1928512
closes #30239
2019-01-15 17:01:57 +00:00
Aurélien Warnon b654fabe04 [FIX] event_sale: fix event registration confirmation modal
Task #1910927

Purpose
=======

When confirming a sale order with event tickets, a modal is supposed to be shown to be able to
confirm the event registration.

That modal was not shown anymore.

To solve it, we split the '_action_confirm' to run the actual business of the event_sale module,
which is '_update_registrations', and moved the action returned in the regular 'action_confirm' method.

closes odoo/odoo#29997
2019-01-09 08:50:45 +00:00
Anshuman Sharma cd1d9824ab [FIX] website: solve alignment bugs in onboarding
- Fix the position of 'Add to menu' toggle button in new page dialog
- Properly align tip icon in the welcome message

task-1895287

closes odoo/odoo#29403
2019-01-16 10:16:44 +00:00
Toufik Ben Jaa 7f524c393d [FIX] payment: display payment tokens for form acquirers
- The method `_get_available_payment_input` that returns the available
  payments acquirers and the payments tokens for a specific user never
  returns the payments tokens linked to a non s2s payment acquirers.

  This is wrong, the payments tokens should always appears no matter
  what are the acquirers' payment flow.

  The payment flow is used only to specify where the customer should
  input his credit cards details, either on Odoo or on the payment
  acquirer's website (or popup).

  Once a token is created, it is safe to process it since no credits cards
  details are stored on the Odoo database.

closes odoo/odoo#30258
2019-01-16 09:45:38 +00:00
Nans Lefebvre ba65d0e259 [FIX] mrp: show correct number of attachments on bom lines
Display a BoM.
On BoM lines, there is an attachment feature that creates a mrp.document,
which is basically a container for an attachment.
This commit fixes the view which displayed 'no attachment' when there were some
and vice versa.
It also fixes the computation of the number of attachment: the displayed view is
on mrp.document, but the computation is done on ir.attachment.
As a result if there are other unrelated attachments (such as digital files)
they would be counted but not displayed.

opw 1923441

closes odoo/odoo#30208
2019-01-15 12:21:07 +00:00
lejeune quentin c516cb90af [ADD] IoT : Add printer compatibility with the LPD protocol
closes odoo/odoo#29875
2019-01-15 15:23:24 +00:00
lejeune quentin b314a970f8 [FIX] IoT : Remove inactive Timesyncd service 2019-01-15 15:23:24 +00:00
lejeune quentin e5c62987b4 [FIX] IoT : HTTPS disable certificate verification by URLLIB3 2019-01-15 15:23:24 +00:00
lejeune quentin 15dd1c6b3f [FIX] IoT : Listen port 80 with nginx and add iot.jpg
nginx server can answer of requests on port 80
for the https we test if image iot.jpg exist to know if this ip is a IoT Box
2019-01-15 15:23:24 +00:00
lejeune quentin e7993f2faa [IMP] IoT : Allow to configure CUPS server
We can modify printers or CUPS configuration
These modifications will be save on IoT Box
2019-01-15 15:23:24 +00:00
lejeune quentin 071587b3c1 [FIX] IoT : Change build version 2019-01-15 15:23:24 +00:00
lejeune quentin ef38f32447 [FIX] IoT : Organization of installed packages 2019-01-15 15:23:24 +00:00
Josse Colpaert 271282289a [FIX] IoT : IoT Box image update fix
The update does not work anymore on the IoT Box,
probably because the structure of the branch is
a bit different now.  It starts to download everything
instead.

We did not use 'git archive' because this does not work
on GitHub and downloading a zip would always have everything
inside.  This way, we keep the original method, even with
diverged branches.
2019-01-15 15:23:24 +00:00
Toufik Ben Jaa df39431fc0 [FIX] account_payment: validate s2s payment transaction
- If a customer pays an invoice using a credit card, the payment is
  taken in account but the invoice validation isn't processed until the
  Payment Processing cron do it.

  We want the invoice to be validated as soon as possible.
  To do so, we need to redirect the customer on the payment processing
  page that take cares of validating the payments.

  OPW-1913876

closes odoo/odoo#30217
2019-01-15 10:09:42 +00:00
Nicolas Martinelli 0f0ad7d1d4 [FIX] account: default account
When importing an invoice without specifying the type, the invoice type
is set to `out_invoice`, but the account set is the supplier account.

At this point, the invoice type is simply undefined (`False`). It will
be set by default at creation to `out_invoice`. Therefore, we reach the
`else` condition which uses the supplier info.

We simply inverse the condition, so it creates a consistent object.
However, it raises a bigger question about how the action context should
be kept at invoice. We won't address it :-)

opw-1925547

closes odoo/odoo#30154
2019-01-11 15:36:39 +00:00
Martin Trigaux 1e224d244c [I18N] export 12.0 source terms
Mostly following changes at 7f8631a913

closes odoo/odoo#30072
2019-01-15 15:15:34 +00:00
William Henrotin 6118b7a4a4 [IMP] mrp: missing pdf report
On a manufacturing order, there is no way to print a pdf report that
gather all finished products. This new report show product, quantity as
well as the lot barcode and name.

Task : 1923216

closes odoo/odoo#30011
2019-01-16 07:08:30 +00:00
Lucas Perais (lpe) ac7a02d60a [FIX] mass_mailing: unsubscribe page clearer
When arriving on the page to unsubscribe from mailing lists,
it was unclear whether the checkboxes were to mean "unsubscribe to this list"
or "subscribed to this list"

With a little string helper, it is clearer

OPW 1922308

closes odoo/odoo#30227
2019-01-15 13:44:18 +00:00
Swapnesh Shah 896ed33c77 [FIX] hr_holidays: Add missing parameters in method
closes odoo/odoo#30124
2019-01-10 18:09:01 +00:00
Alexandre Kühn abeb75ae60 [FIX] mail, im_livechat: no loose of livechats on page refresh
Before this commit, when livechat operators had chats in the
Discuss app and reload their page, they could loose some
pinned livechats.

This problem only occurred on livechat conversations when both
users are authenticated. Any two-user channels should always
be pinned by default, which is the case for internal chats.
This logic was applied on channels with type `chat`, but this
is ignored with livechats because they are channels of type
`livechat`.

This commit fixes the issue by defining internal chats and
livechats as `chat`. Any chat conversations are automatically
pinned when a message is posted, including livechats.

Note that before this commit, the livechats were visually
pinned in the Discuss app, although the server did not consider
them as pinned. The client-side code always assume conversations
are pinned, which is why a page refresh looks like a loose of
previously pinned conversations.

opw-1919327

closes odoo/odoo#30200
2019-01-15 12:17:24 +00:00
Robot Odoo dc12f7e06c [MERGE/FIX] web_tour,*: remove step delay in tests
For historical reasons, the tour manager executed each step of tour
in a setTimeout (10ms). When a step could be executed (i.e. when
its trigger selector has a match in the DOM), the element matching
its trigger was saved as a jQuery element (the $anchor), and in the
setTimeout, the action (e.g. click) was performed on that element.

However, it could happen that, after the delay, the $anchor was no
longer in the DOM, either because
 1) the tip selector had no match anymore, meaning that the element
    had been removed from the DOM meanwhile
 2) the tip selector still had a match in the DOM, but that element
    had been rerendered meanwhile
Case 2) occured sometimes when the main_flow_tour was executed in
community, when trying to open a Manufacturing Order after having
reloaded the Manufacturing Order list view (because the row of the
order to open that was saved as $anchor was the one of the list
before the reload, and that list was re-rendered during the delay).

This rev. removes the default delay of 10ms, but the feature is
kept such that one can still manually run a tour slowly (e.g. to
debug or to make a demo). It also adapts some tours that didn't pass
anymore without the delay, and it fixes a bug in the kanban view that
has been spotted thanks to the delay removal.

closes odoo/odoo#30106
2019-01-15 15:30:01 +01:00
Aaron Bohy 070bd40f64 [FIX] website_sale(_wishlist): adapt tours to delay removal
After the delay removal, those two tours failed for the same
reason. They made a research on the /shop page with a specific
product name, and then opened that product.

With the delay, the page was reloaded with the new search, and we
clicked on the product after the reload.
Without the delay, we directly click on the product (which is in
both case already displayed even before searching), and then the
page is reloaded, so the product is never opened and the tours
fail.

This rev. adapts those tours to either wait for the page to be
reloaded before clicking on the product, or simply remove the
searching step when the requested product is actually the first
one.
2019-01-14 11:31:55 +00:00
Aaron Bohy 18cb7192b7 [FIX] test_main_flows: remove patches due to tour manager delay
Since the removal of the delay in the tour system, some patches that
had been done to make the tour pass (all the time) can be removed.
2019-01-14 11:31:55 +00:00
Aaron Bohy b3f1081082 [FIX] web: form: call discardChanges while saving
Before this rev., there was a race condition when the user did
some changes on a form view (triggering an onchange), saved and
clicked on the breadcrumbs to leave the form view (before the
onchange returned). As a consequence, the dialog telling the user
that there are pending changes was displayed. This mostly occured
on the main_flow_tour since the removal of an unnecessary check,
and could be reproduced manually on a slow network.

Basically, the check if there were pending changes was done too
early (before the view was actually saved).
2019-01-14 11:31:55 +00:00
Aaron Bohy 141c9a0ced [FIX] web: kanban: quick create columns and records
This rev. fixes a concurrency issue in the kanban view spotted by
the Project tour and the removal of the delay in the tour system.

Let's assume the following scenario in a kanban view grouped by a
many2one field with at least one column and with the quick create
feature enabled:
- quick create a new column
- before the column is actually created, click on CREATE in the
  control panel to create a new record

Before this rev., the record quick create widget was opened
directly, but as soon as the column was created, the view was
re-rendered, and the quick create widget was lost.

This rev. forces the column to be created (and the view to be
re-rendered) before opening the record quick create.
2019-01-14 11:29:53 +00:00
Aaron Bohy b4387108de [FIX] web_tour: clear call stack between each step
This rev. concerns automatic executions of tours. It makes each
step executed in a setTimeout, thus ensuring that the call stack
has been emptied before executing the next step (which is the case
when the user manually executes the flow).
2019-01-14 11:29:53 +00:00
Aaron Bohy 6f7f235799 [FIX] web_tour: remove delay in test mode
For historical reasons, the tour manager executed each step of tour
in a setTimeout (10ms). When a step could be executed (i.e. when
its trigger selector has a match in the DOM), the element matching
its trigger was saved as a jQuery element (the $anchor), and in the
setTimeout, the action (e.g. click) was performed on that element.

However, it could happen that, after the delay, the $anchor was no
longer in the DOM, either because
 1) the tip selector had no match anymore, meaning that the element
    had been removed from the DOM meanwhile
 2) the tip selector still had a match in the DOM, but that element
    had been rerendered meanwhile
Case 2) occured sometimes when the main_flow_tour was executed in
community, when trying to open a Manufacturing Order after having
reloaded the Manufacturing Order list view (because the row of the
order to open that was saved as $anchor was the one of the list
before the reload, and that list was re-rendered during the delay).

This rev. removes the default delay of 10ms, but the feature is
kept such that one can still manually run a tour slowly (e.g. to
debug or to make a demo).
2019-01-14 11:29:53 +00:00
Martin Trigaux e24ab17d38 [FIX] web: do not open first app if no app
On an instance with only web installed.
A non-admin use had an error as trying to open the first app (which does not exists)

closes odoo/odoo#29687
2019-01-04 10:16:06 +00:00
Martin Trigaux 0ecaf53726 [FIX] mass_mailing_crm: add missing tag in template
There is already a %endif tag but no matching % if
The template failed to render, unexpected tag endif

closes odoo/odoo#30210
2019-01-15 08:23:47 +00:00
stanisljevic e6e1220950 [CLA] Sasa Stanisljevic signs the CLA
closes odoo/odoo#30165
2019-01-14 13:39:39 +00:00
qdp-odoo 98313838da [FIX] account: aged partner report
The aged reports were wrongly taking the previous day of the requested date to compute the different report periods.
E.g: An aged balance requested for the 31-12-2018 was excluding entries made on the that exact date and was starting from the 30-12-2018

closes odoo/odoo#30195
2019-01-14 14:33:52 +00:00
Jörg R Schumacher 500b0191ab [CLA] signature for Jörg R Schumacher
closes odoo/odoo#30192
2019-01-14 14:48:28 +00:00
Dipak Shah 8b7687cf7d [CLA] signature for dipsshah42
closes odoo/odoo#30139
2019-01-14 15:50:30 +00:00
Julien (juc) Castiaux bbde951495 [FIX] account: send invoice from view list bypass config
When selection an invoice in the view list and send it from the
"action > send" button, the checkbox for the print option is
not checked according to the configuration.

This fix remove the context that was forcing the print checkbox on
false.

opw-1927126

closes odoo/odoo#30175
2019-01-14 12:48:43 +00:00
Nicolas Martinelli 8057b739af [FIX] product: weight unit
Since commit 52a85e57b9, it is possible to configure the
weight unit. Therefore, we should not hardcode `kg` anymore.

opw-1919821

closes odoo/odoo#30147
2019-01-14 10:37:45 +00:00
Nicolas Martinelli 023869970c [FIX] hr_holidays: days allocated
- Go to Leaves > Managers > All > Allocations
- Create an allocation for:
  Leave Type: Legal Leaves
  Mode: By Department
- Validate

When going to the Legal Leaves form view, the days allocated are not
shown.

This is because the domain is too restrictive. The allocation has a
`date_from` which is `False`, since it is only set for Accrual leaves.

We adapt the domain accordingly.

opw-1921338

closes odoo/odoo#30152
2019-01-11 14:58:16 +00:00
Lucas Perais (lpe) 8da3f0c873 [FIX] crm: create lead from email in right sale team and company
crm lead is created with a default company_id which is the current company of the user

When creating a lead from email, this logic doesn't hold, especially in v12.0
where the __system__ user is not someone real

In that case, we retrieve the company from the sales team

OPW 1918837

closes odoo/odoo#30146
2019-01-11 13:36:02 +00:00
Géry Debongnie 4a3f04bcc5 [FIX] web: add exponential backoff strategy for lost connection
Before this commit, the web client had a naive strategy to handle lost
connections: it tried to poll the server every 2 seconds until a rpc
succeeds.

This works quite well from the perspective of the user, but may be a problem
from the perspective of the server.  If a server is down for a longish period,
then each users active tabs will then perform a request every 2 seconds. This
means that the server will be progressively hammered by many requests, which
will clutter the logs, and make it more difficult to gracefully recover.

With this commit, we simply exponentially increase the delay each time, and add
a little jitter to give a better distribution.

closes odoo/odoo#30136
2019-01-11 10:55:19 +00:00
Christophe Simonis 83f5dc8e35 [FIX] account: do not set unknow field when creating invoice
The field `reference_type` has been removed with b5bb5bd421

Adapt newly forward-ported test to not use this field.
2019-01-14 11:31:16 +01:00
Christophe Simonis 6a0675d36d [MERGE] forward port branch saas-11.3 up to e033114879 2019-01-11 18:56:24 +01:00
Christophe Simonis 57ccf70a32 [DOC] install: update info about wkhtmltopdf
Followup of 3b85900faf

Courtesy of Swapnesh Shah (@sswapnesh)
2019-01-11 18:35:32 +01:00
Pierre Rousseau 700191514e [FIX] partner_autocomplete: ignored field is sent to view
The field ignored is set in javascript on company object to filter the
ones we want to show. As it is not an odoo field, it triggers a
traceback when the trigger_up 'field_changed' is called.

OPW-1921568

closes odoo/odoo#30153
2019-01-11 15:04:34 +00:00
Yannick Tivisse 9172d63424 [FIX] l10n_be_hr_payroll: Fix 9c5f930
Purpose
=======

Since 9c5f930, the double holiday is computed from the wage with holidays.

When we compute the employer costs, we should take the original wage,
not the adapted one, to keep fix employer costs, whatever the amount
of days the employee takes.

closes odoo/odoo#30149
2019-01-11 14:25:42 +00:00
Jorge Pinna Puissant 7825d00827 [FIX] sale: standardise SO addresses btw portan and report
opw-1918789

Before this commit, the addresses (invoicing and shipping) in the SO wasn't displayed in the
same way in the portal and in the report.

Now, the addresses are displayed in the same way in both the portal and the report.

closes odoo/odoo#30093
2019-01-11 12:41:12 +00:00
Nicolas Lempereur adb52c5d08 [FIX] web: show page number in report
Following 4a3fd02af4 on the portal when displaying an invoice we may get
a report_type variable (with value 'html' or 'pdf') on the portal.

This was used to not display the page number when checking the report,
but when the report is printed in the backend this report_type was unset
so the page number was mistakenly removed too.

With this changeset, the report alway know if he is pdf, html or text
and only print the page number if it is of type pdf.

opw-1924729
closes #30095
2019-01-11 13:20:21 +00:00
Romain Derie be6f1aa179 [FIX] website: fix the card collapse opening on debug error 500
Since panel collapse became card collapse while migrating from BS3 to BS4 with
commit 59237ea819, it is impossible to open the card content.

Indeed, there was already data-parent attribut pointing to inexisting DOM
element. This was not an issue in BS3 but BS4 is not working with it.

closes odoo/odoo#30142
2019-01-11 12:26:04 +00:00
Christophe Simonis e033114879 [FIX] sale_timesheet: correct test
Since 5efec7ccdd, ProjectPlan widget
expect actual html.
2019-01-10 18:54:48 +01:00
Christophe Simonis d11dc31e7a [MERGE] forward port branch 11.0 up to 617652bbfe 2019-01-10 17:59:26 +01:00
Christophe Simonis 617652bbfe [MERGE] forward port branch saas-15 up to 9878db14f5 2019-01-10 17:00:16 +01:00