Commit Graph
122380 Commits
Author SHA1 Message Date
Sébastien Theys 4e01d5f702 [FIX] sale: fix indent of product configurator templates
This will make the diff of the following commit easier to read.
2018-12-18 13:02:06 +00:00
Sébastien Theys dc1b20f484 [FIX] sale,website: fix variant alert style
It should be warning instead of danger, and use appropriate BS4 classes.

Without this commit, the resulting style might be wrong with some themes.
2018-12-18 13:02:06 +00:00
Sébastien Theys 9e71571999 [FIX] website_sale: fix product variant image zoom
The product image zoom was computed in the start method, and an "on load" event
was set in some but not all cases.

This commit makes sure the load event is always set, to correctly recompute the
zoom feature when the image is later changed (for example, changing variant).
2018-12-18 13:02:06 +00:00
Sébastien Theys 87d75f78d6 [IMP] web_tour: allow simulating click without leave
This is important if the mouse must stay on the element after it has been
clicked. This is the case for the product image zoom, which will be tested in
the following commit.
2018-12-18 13:02:06 +00:00
Sébastien Theys bb8e6e7a82 [IMP] product: improve variant demo data
Activate variant by default with demo data: since we have demo data creating
variants, the database will be more consistent if the option is also activated
by default. It also allows to gain time when making a demo or testing feature
using them on a new database.
2018-12-18 13:02:06 +00:00
Sébastien Theys f763193374 [FIX] sale_quotation_builder: remove warning when installed
We don't need to clutter the interface with this warning once the module is installed.
2018-12-18 13:02:06 +00:00
Sébastien Theys 42ded05f4b [FIX] base: fix print pdf with --test-file command 2018-12-18 13:02:06 +00:00
mgh-odoo 6be0cdef98 [FIX] web: remove extra space in kanban dragging images
While dragging kanban record which have a cover image set, the kanban view
creates extra space, which makes it difficult to properly target a
position.

This is because of a jquery.ui issue for sortable when helper=clone is used.
In that case, then jquery.ui sortable will create a clone of current element
after hiding it. Note that jquery.ui tries to get height to current dragged
element after making it hidden(display: none) and display: none, so the element
does not return actual height and hence it gives innerHeight which considers
height of the image also and extra space is generated.

An alternative solution is to add start event in sortable option and
1) show ui.item
2) get height of the element and
3) hide ui.item, which gives proper height of the current dragged element

But removing helper=clone will also fix the issue and is not actually required.
Note that some special care had to be done to prevent the click from the
drag and drop operation to actually open the record.

Related to task: #1865788
Closes: #25734

closes odoo/odoo#29642
2018-12-19 10:28:17 +00:00
Martin Trigaux fa98749154 [I18N] export 12.0 source terms
Update to reflect the recent code changes

closes odoo/odoo#29636
2018-12-19 08:50:10 +00:00
Goffin Simon 4612d50bae [FIX] stock_account: No returned value for function _run_valuation
This commit 9eac6c6377 expects a returned value
from function called "_run_valuation".

But this function always returned None.

opw:1907021

closes odoo/odoo#29302
2018-12-06 09:45:09 +00:00
celm1990 b750c78b91 [FIX] web: translate terms on search view
Group by options for fields date and datetime was untranslated
Add call to translation method _t

closes odoo/odoo#29490
2018-12-18 16:48:46 +00:00
Nicolas Martinelli 16c1c89e46 [FIX] payment: manual acquirer
Raise an error if no manual acquirer could be found for the current
company instead of crashing.

opw-1915813
opw-1917979

closes odoo/odoo#29608
2018-12-18 12:53:31 +00:00
Mathieu Duckerts-Antoine 7618f84beb [FIX] web: sort pivot rows in comparison mode
Before this commit, it was not possible to sort
the rows of a pivot view while in comparison
mode. This fix makes it now possible. Note that
in comparison mode, a click on a header of type
"measure" will sort the rows according to the
column values coming from the data of interest.

closes odoo/odoo#28411
2018-12-18 12:56:06 +00:00
Jorge Pinna Puissant c7a307ffd2 [FIX] account: Two actions same name
opw-1917444

In the "Chart of Accounts" view, the action to view journal items show
up twice. This was because, two action windows had the same name, one
is for view journal items, and the second one is for view jounral items
for Tax Audit.
After this commit, the second action is named
"Journal Items for Tax Audit".

closes odoo/odoo#29597
2018-12-18 10:04:09 +00:00
Jeremy Kersten 7afaf2c277 [FIX] website: seo - fix translation for seo modal
Lang / Context is implicitely added in the query using this._rpc

Before this commit if you set the title 'Title 1' for your website in the main
langage and after edit the title as "Title 2" in another language, it was the
main title that was replaced instead of the translation.

Now we use this._rpc that bind automatically the context and so the current lang
that we are editing.

closes odoo/odoo#29596
2018-12-18 09:22:49 +00:00
qsm-odoo e1990d267c [FIX] sale: use theme design for optional product modal
Since the product configurator task, the optional product modal was
always using the backend style instead of the theme style.

task-1911015

closes odoo/odoo#29587
2018-12-17 15:46:19 +00:00
len-odoo 71ae0eac33 [FIX] im_livechat: fix table layout overflowing with long URL/words
Ignorant fools have been saying for more than a decade that <table> elements
should not be used for layout.
Once again, Odoo proves them wrong. You just need the right css.

opw 1914139

closes odoo/odoo#29498
2018-12-13 09:16:31 +00:00
Toufik Ben Jaa b49d5388ff [FIX] mail: crash on mail resend
- When resending a failed mail the code could crash.
  The issue is caused by the fact that calling `_get_recipient_data`
  with the parameter `pids` only, returns as the partners' groups the
  value `None`.

  The codes that uses the result of this method consider the groups as
  an iterable and crash when trying to iterate on a `NoneType`.

  OPW-1916498

closes odoo/odoo#29408
2018-12-11 08:32:12 +00:00
Nicolas Martinelli c819fc69ee [FIX] fields, test_impex: export Datetime
- Set a TZ on the user different from UTC
- Export a record containing a datetime, e.g. the Order Date of a SO
- Import the file

The Order Date is changed on the record.

The data export is always in UTC, but the data import takes into account
the user TZ, which explains the difference.

There is no good way of solving this in stable. We have 3 choices:
1. Do nothing: the flow export then import the same data is broken, as
   explained above.
2. Export in the user TZ: if the file is imported in a third-party
   software, we break the flow.
3. Import in UTC: if the file is generated from a third-party software,
   we break the flow.

Whatever the choice is, we either break a flow or keep an inconsistent
behavior. We choose option 2, assuming that in most cases the user wants
to export the data in his TZ, therefore keeping the values displayed. We
only do it in v12 in order to mitigate the impact on existing
installations. A proper fix should be discussed for v13.

opw-1915631

closes odoo/odoo#29576
2018-12-18 07:13:34 +00:00
Nicolas Martinelli dc9e87baa6 [FIX] test_impex: use context provided
The `export` method accepts a `context` parameter, but doesn't use it.
This actually hides an incorrect test: when exporting in French, `Bar`
should be exported as `titi`.
2018-12-17 13:37:32 +00:00
Lucas Perais (lpe) 8a1f9f09c2 [FIX] account_facturx: pass all fields to compute_all in xml template
continuing commit 8f4b98e67f

OPW 1914928

closes odoo/odoo#29572
2018-12-17 10:16:18 +00:00
Jorge Pinna Puissant 9d0d5b6e8c [FIX] account: change accounting plan access
opw-1916511

When you try to change the accounting plan it sets off an access error.
To change the accounting plan it must delete and create some records in
the model 'ir.property' and none of the current security groups have
access to do it.

This issue was not present in the version 11.0 because in that version
the administrator was also the super-user.
In version 12.0 the administrator and the super-user were dissociated.

This was changed to level-up (sudo) the rights of the administrator
when the ir.property are deleted.

Note that, this fonction have two pre-existing constraints to avoid
issues when configuring an accounting plan: it can only be changed if
there are not alredy existings accounting entries;
and only the administrator can change it.

closes odoo/odoo#29493
2018-12-14 09:23:10 +00:00
Nicolas Martinelli 5f4a945182 [FIX] modules: load demo data fallback
- Create a new DB with `base_automation`, without demo data
- Switch to developer mode
- Go to Settings, then 'Load demo data', validate

A traceback occurs.

An error since the demo data in `base_automation_demo.xml` are pointing
to `model_base_automation_lead_test`, which is a test model. It is
therefore not created whithout demo data. The error is:

```
bad query: b'RELEASE SAVEPOINT "5159....."'
```

However, that's not the real crash. Indeed, in case the installation of
demo data crashes, `demo_failure_todo` is supposed to handle the
situation like a boss. But in this case, the DB cursor seems unusable.
Therefore, the following crashes like a gros caca:

``` python
todo = env.ref('base.demo_failure_todo', raise_if_not_found=False)
```

Solution: use a new cursor.

opw-1916918

closes odoo/odoo#29528
2018-12-13 18:22:34 +00:00
Odoo Translation Bot 3ce5c8bebd [I18N] Update translation terms from Transifex 2018-12-16 01:18:51 +01:00
Lucas Perais (lpe) 8f4b98e67f [FIX] account_facturx: template should compute taxes with partner
Otherwise account_tax_python will crash if 'partner' triggers a condition

OPW 1914928

closes odoo/odoo#29539
2018-12-14 10:09:01 +00:00
Lucas Perais (lpe) 7bc849c3a6 [FIX] account: journal dashboard shows invoices and refund for given journal
Have an invoice and a credit not in one journal
Go on the dashboard for journals

Before this commit, the count of invoices in draft took into account
both invoices and credit notes, while clicking on the button to see the invoices/credit notes
only showed invoices

After this commit, clicking on the button show both invoices and credit notes

It is worth noting that this is the behavior in v11.0
And that the way the dashboard is computed cannot allow to differentiate
within the kanban records, invoices and refunds as two separate buttons

OPW 1916135

closes odoo/odoo#29482
2018-12-12 15:46:30 +00:00
len-odoo f3b341b6b9 [FIX] fleet: make _name_search not override driver_id in domain
The _name_search did override the domain's search
by OR'ing it with a loose condition on the driver_id.
As a result if an upstanding Odooer added a strict filter on the driver_id,
it was ignored in favour of the loose one.

opw 1915639

closes odoo/odoo#29515
2018-12-13 11:57:38 +00:00
Jeremy Kersten 206e0b71ac [IMP] website_sale: add warning when editing billing and shipping address
In case you edit your shipping address (that is the same for billing) you don't always
undersantad that you are editing at the same time the billing address.

opw-1914185

closes odoo/odoo#29484
2018-12-13 10:18:00 +00:00
Nicolas Martinelli fe2dd27dea [FIX] purchase: RFQ vs PO
Set the appropriate label in the portal depending on the PO state.

opw-1915230

closes odoo/odoo#29477
2018-12-13 08:38:36 +00:00
Lucas Perais (lpe) 15bcae2dc0 [FIX] web: action manager fullscreen toggle
From a standard view with the main menu (what is called a target=current action)
open a target=fullscreen action
Then, go back to the first action, with the breadcrumbs for example

Before this commit, the original view was displayed fullscreen,
which impaired business navigation because the main menu was not there anymore

After this commit, the original view has the main menu

OPW 1906373

closes odoo/odoo#29096
2018-11-28 12:23:41 +00:00
Jorge Pinna Puissant 651a11588f [FIX] product: fix pricelist view on mobile phone
opw-1914133

The list of pricing in the product view was generate by default on
mobile phone. It only displayed a list with the product name.
After the commit, a kanban view is displayed. The view shows the
same informations on the mobile phone than on PC.
The princinglistitem's form view was adapted for a mobile phone use.

closes odoo/odoo#29429
2018-12-13 08:35:09 +00:00
wan 7854c651e3 [FIX] account: fix _toggle_reconcile_to_false() on empty recordset
When the method _toggle_reconcile_to_false was called on an empty recordset (e.g existing account is imported with reconcile=False and the field was already False), an SQL error was raised.

Fixes #29326

closes odoo/odoo#29458
2018-12-12 13:31:19 +00:00
Romain Derie 9c4eab3ef4 [FIX] website: ensure only editor can force website with URL 'fw'
Before this commit, everyone could use the `fw` query string to force a
website during the dispatching. Plus, it would not require multi-website to be
enabled (multi-website only display UI elements, it does not affect behaviors
as they are already triggered even if multi-website is disabled).

This was intended but caused an issue for public users.
Indeed, the code that would force a website during the http dispatching would
be executed in `_add_dispatch_parameters`, after the auth methods.

Then, the request.uid would be the one from the website we were leaving and not
the one of the website we are forcing.
Public user would then not be recognized as such (if both websites have their
own public user) and would have interface glitchs (considered as connected).
Note: Next reload or page navigation would set the request.uid correctly.

Now:
To avoid such a behavior, we decided to allow only designer user to be able to
switch website with the `fw` query string, and only if multi-website is
enabled.
Note: The designer group check is done on the leaving website and not the
      forcing one as `_add_dispatch_parameters` is executed after auth methods.
      There is no way to check with which user the user will be logged on the
      forcing website (Public, Same user, different user?).
      Also, it would have to handle the same domain/different domain.

Step to reproduce:
  - Activate multi-website
  - Activate multi-company
  - Create SiteA and SiteB
  - Create CompanyA and CompanyB
  - Set CompanyA on SiteA and CompanyB on SiteB
  - A new public user will be bootstraped for CompanyB
  - Optionnaly, setting manually a different public user for CompanyB will do
    the same.
  - Go to website 1, request.uid is PubUserA and request.website is SiteA
  - Navigate to website 2 with `?fw=2` in URL, request.uid will be PubUserA and
    request.website will be SiteB.
    This is wrong, request.uid should be PubUserB as we are on SiteB

This will result in multiple bug, mainly the non logged user will see the
dropdown in the navbar as if they were logged in showing 'PubUserA'.

Fixes #27998

closes odoo/odoo#29136
2018-12-12 14:21:53 +00:00
Jeremy Kersten dc30b955e0 [FIX] website: don't show switcher website if only 1 website
In some case, you can have multi website enabel with only 1 website:
    - If you create a second and deleted it.
    - Or after a migration to check common view and specific view e.g.

In this case, before this commit, you have switcher of country that is just
an empty dropdown.

closes odoo/odoo#29481
2018-12-12 15:47:55 +00:00
Romain Derie b9b1c08837 [IMP] base: add key in ir.ui.view search view
With multi-website support, the `key` field is more important than ever as it
kind of replace the xml_id behavior.

Thus, on the ir.ui.view list view it is common to search on `key`. Having it in
the search bar is mandatory.

closes odoo/odoo#29417
2018-12-11 10:39:55 +00:00
Jeremy Kersten a5f4195432 [FIX] report: don't call subst() if not defined
In case you are printing in html a report with minimal layout, you will have an error
since the function is not defined, but called by the onload of the body tag.

Now we don't call subst if it is not needed (and so not declared)

closes odoo/odoo#29341
2018-12-07 09:05:42 +00:00
Jeremy Kersten 8a05ad7843 [FIX] web: remove report_assets_common JS from minimal_layout
This assets has a lot of JS that is loaded by wkhtmltopdf without any reasons.
Wkhtmltopdf don't like long js to load (it is why subst has been write inline)

This commit allow to print again (on slowly server) several documents in the
same pdf. Before this commit, the JS was not loaded before the default js-delay
and so the subst function never called with as result a pdf of only 1 page.

After this commit you can again print several documents in the same pdf and
subst function is applied.

opw-1909000

courtesy of @beledouxdenis that help to debug this error since it is only
reproductible on paas server.

This commit follow the same logic that commit odoo/odoo@3c61ee5
And issue wkhtmltopdf/wkhtmltopdf#2083 is not yet fixed
2018-12-07 09:02:14 +00:00
Toufik Ben Jaa 37fa21a2af [FIX] account: avoid crash when request not bound to database
- When installing account using a request (e.g. http route auth set to `None`) not bound to a database,
  the installation fails.

  To avoid this, we check if the request we are using is bound to a
  database, if not, the fallback code is executed.
2018-12-12 15:19:25 +01:00
XavierDo 54ad2f57ce [FIX] mail: avoid to post multiple join message on channel
When a new user is subscribed to a channel, (multi-user, without emails)
a message is posted on this channel.

The mechanic used for that is unfortunately not very reliable
Javascript will call channel_join_and_get_info every time a channel
is added (client side) even if the user is already in the channel.

This fix simply check that the action_follow actually add the
user to the channel before sending the message.

We should avoid to call channel_join_and_get_info in this case and only call
channel_info but this fix will temporary fix the issue.

closes odoo/odoo#29441
2018-12-11 17:36:04 +00:00
Antoine Prieels (ANP) e81ef3a603 [FIX] snailmail: Do not resend letters in state 'error' in cron
closes odoo/odoo#29456
2018-12-12 09:36:36 +00:00
Nicolas Martinelli 047e2b28de [FIX] mail: keep context when sending a message
When sending a message through the chatter, the user context (including
the language) is not sent to the server. This causes issues to render
the mail templates in the appropriate language.

closes odoo/odoo#29422
2018-12-11 13:32:37 +00:00
Christophe Simonis 34d35632b6 [FIX] sale: correct value in context used by test 2018-12-11 20:13:08 +01:00
Christophe Simonis 069278b652 [MERGE] forward port branch saas-11.3 up to 55dafc20f6 2018-12-11 18:51:05 +01:00
Christophe Simonis 55dafc20f6 [MERGE] forward port branch 11.0 up to 7e5d5045bf 2018-12-11 17:06:48 +01:00
Christophe Simonis 7e5d5045bf [MERGE] forward port branch saas-15 up to 1ace2ed88b 2018-12-11 16:20:34 +01:00
Christophe Simonis 1ace2ed88b [MERGE] forward port branch saas-14 up to 5a147acf1b 2018-12-11 15:11:32 +01:00
Goffin Simon 43b86aa704 [FIX] website_sale_comparison: Tuple index out of range
Some product template with attributes never have variants because
the attributes have the field 'create_variant' set to 'no_variant'
So "Tuple index out of range" was raised due to these kind of products.

opw:1911962

closes odoo/odoo#29428
2018-12-11 13:35:53 +00:00
Christophe Simonis 5a147acf1b [MERGE] forward port branch 10.0 up to f69c004795 2018-12-11 14:33:39 +01:00
Romain Derie f69c004795 [FIX] website_membership: correctly check if customize view is active
Commit 5804246e0f introduced some improvements to speed up performances.
One of them was to check if a customize_show view was active or not but the
condition was on view.customize_show instead of view.active.

Thus, as that view is always a customize_show, the condition would always be
met.

closes odoo/odoo#29414
2018-12-11 10:23:50 +00:00
Arnold Moyaux b0d79b9802 [FIX] stock, mrp: log less activity on PC type
Usecase to reproduce:
- Set manufacture step to 2 or 3 steps
- Create a MO
- Go on the PC picking and validate some quantities w/h BO

Traceback because there is no documents to log the activity.

It happens because the function used in groupby and sorted
(in the method _log_less_quantities_than_expected) expect a picking.
The purpose of _log_less_quantities_than_expected is to generate
an activity on the next picking in order to notify that some quantities
will be missing due to the cancelation of the back order. In order
to find the following picking it uses the destination moves from the
current's picking moves.

	Picking w/h BO		Next Picking (activity to post)
		|			|
	      moves -----------> destination moves

However in the case of 'pick components' picking type(PC) the destination
moves are linked to a manufacturing order and not a picking. So it
_log_activity_get_documents return an empty parent since picking_id is
False.

In order to fix it, _log_activity_get_documents only add the tuple
(object where the activity should be log, responsible for the activity)
if the object is not False. It also add a hook in order to add
(mo_id, repsonsible) during _log_less_quantities_than_expected on top
of (picking_id, repsonsible) in order to log activity on MO directly
linked to PC.

This commit also add a missing precision_rounding in backorder
confirmation

opw-1908753

closes odoo/odoo#29385
2018-12-10 12:43:39 +00:00