Commit Graph
131322 Commits
Author SHA1 Message Date
ryv-odoo c8cbf8cc0e [FIX] base, mail: fix multipart alternative order
After the refactor of mail sending with the newest python API
(18299d7e50),
the order of multipart/alternative was wrong for email.
Indeed, in the MIME protocol [1], for The Multipart/alternative subtype
the order is significant: "In general, user agents that compose
multipart/alternative entities should place the body parts in increasing
order of preference, that is, with the preferred format last".

This bug caused some issues with mail marketing (see related task)
with Gmail web client (see the plaintext instead of html mail).

The fix is to inverse the order of adding alternative in the mail
content.

[1] https://www.w3.org/Protocols/rfc1341/7_2_Multipart.html

TASK_ID : 2084989

closes odoo/odoo#38490

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-10-11 11:00:39 +00:00
qsm-odoo 9a07523e7b [FIX] web_editor: display snippet options in the correct order
closes odoo/odoo#38862

X-original-commit: 0a3966235f8d02b7d11fddeee7e4d71c64076a3c
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-10-16 10:06:24 +00:00
Géry Debongnie 258a04664a [IMP] web: increase file limit from 25mo to 64mo
The fieldbinary widget has an internal max upload limit set to 25mo.
This was set a long time ago, probably more than 5 years ago.  Since
then, a lot of things have changed and it may be more frequent for users
to hit the limit.  And it happens for some users, we had to increase
locally their limit.

Also, nginx is configured to accept files up to 64 mo, so it makes sense
that the web client also uses that same limit.

closes odoo/odoo#38856

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-10-16 09:25:09 +00:00
Hetal Dhanak ca3e898481 [IMP] purchase, purchase_requisition: supplier.info tree view
* use an editable tree to edit the supplier info
* keep the original forms because they're used in the "vendor pricelist"
menuitem
* updated tour
* change the position of requisition_id

Task-2029380

closes odoo/odoo#35972

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-10-16 09:44:51 +00:00
Quentin Nicolay d59b67a915 [FIX] web: add 'no_edit_color' option to many2many_tags
This option, if set to True, prevents the user from modifying the
color of the tags.

Part of task 2070454

closes odoo/odoo#38848

X-original-commit: a62b65a8f9114493064d4efae92825814a880c04
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-10-16 08:26:10 +00:00
William Henrotin 644663eb4a [FIX] mrp: rework of workorder planning
This commit redo the way workorders are planned on their workcenter
calendar. The resource_calendar_leaves introduced in 0679d0d is now linked
to the effetives dates (date_start and date_finished).
The planned dates copy their information onto effective date at the
workorder plannification or any modification before the actual production
(state = draft, pending or ready)

This way, the gantt view and calendar view display either the plannifaction
slot if the production isn't started yet and the effective production
time if it's done. The plannification is also impacted by validating
a production sooner than expected or cancelling it. In the first case,
the date_finished is set at 'now' and in the second case, all the dates
are emptied. The futur workorders will be planned on the newly recover
time slot.

This commit also fix the button_start() method that always rewrite the
date_start even if the production had already been started.

Task : 2082442

closes odoo/odoo#34038

Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2019-10-16 07:34:15 +00:00
William Henrotin e8a3fb9a0b [IMP] mrp: block usage of duplicate serial number
With this commit, the manufacturer will now be noticed earlier in
the process if he produced/consumed a serial number already produced/consumed in a
previous production. Before this commit, an error was triggered as
well but only at the very last step of the production.
This leaded to two issues :
 - The user had to unlock-edit-lock to update the wrong serial number
 - On large production, it was difficult to figure out which was/were
   the product(s) to fix.

The search on previous production is done each time the produce wizard is closed
or once the production is done on a workorder

Task 2002133
2019-10-16 07:34:15 +00:00
mreficent c789426076 [IMP] base: apply Many2oneReference in ir.model.data
closes odoo/odoo#38839

Signed-off-by: Adrian Torres (adt) <adt@odoo.com>
2019-10-15 17:56:10 +00:00
Arnaud Baes 1f1727c2e1 [IMP] mrp_subcontracting: Set subcontracting location a child of physical locations.
closes odoo/odoo#33490

Taskid: 1873106
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-10-16 06:09:02 +00:00
Arnaud Baes c8c500c64d [IMP] stock: Hide transit locations
All transit locations were set as active by default, confusing some users.
There are now set as active only when when a ressuply route is created
between some warehouses

TaskID: 1873106
2019-10-16 06:09:02 +00:00
Jigar Patel d0392a2f15 [IMP] stock: remove the "products" statbutton from the location form view.
It's purpose was redundant with the action listed in the
"actions" drop-down menu of the location view form

TaskID: 1873106
2019-10-16 06:09:02 +00:00
Jigar Patel 01f5550ee2 [IMP] stock: Rename default locations labels
TaskID: 1873106
2019-10-16 06:09:02 +00:00
Jigar Patel 316d5afdd3 [IMP] stock: add hierarchical view for stock location 2019-10-16 06:09:02 +00:00
Lucas Perais (lpe) f703271c0a [FIX] account: reconciliation widget fetch correct reconciliation models
Have a reconciliation model that applies to some particular journals
And that will match some of those journals' lines
The field journal should be filled too
(this field is only the default journal that a proposition will be filled with)

Open the reconciliation widget on a given journal, within the list of
possible journal (from the account dashboard)

Before this commit there was a crashed. This was caused by the fact that
one of the lines that should be displayed had a reconcile model that was not fetched beforehand

After this commit, there is no crash as all relevant reconcile
models are fetched

Note that, on reconcile models, the field journal_id is just there to prefill
the propositions it will create

corrects commit e5c8071484

OPW 2084942

closes odoo/odoo#38836

X-original-commit: c285d578cc497044e819c62d42373c29f87b1e93
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-10-15 17:39:43 +00:00
Olivier Donyand@alexkuhn ae82f17cc9 [FIX] bus,im_support: adapt im_support to bus changes
The im_support module was broken in 12.0 after bus refactorings between
11.0 and 12.0.

closes odoo/odoo#38838

X-original-commit: db37e0cedcd0da46bd57686a076a8165e60d6c3b
Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
Co-authored-by: @alexkuhn
2019-10-15 17:43:19 +00:00
Francisco Fernández @PlanetaTIC 607085166d [CLA] PlanetaTIC: Add JMPinyol as contributor
closes odoo/odoo#38829

X-original-commit: 62d7eaf865ca31574b8efb73d3cfb7836ed60da3
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-10-15 16:40:05 +00:00
Katherine Zaoral 252ae54c59 [FIX] l10n_ar: Properly compute fiscal position for Argentinian
companies.

We revert the change we apply in order to let the user to define their
own fiscal positions, now the fiscal position will be set depending on
the afip responsability.

With this change we fix the error that the fiscal position is properly
setted for the customers that are of type "Responsable Inscription" and
"Consumidor Final".

Before this change the "Compras / Ventas en el Exterior" fiscal position
was wrongly seted, now the fiscal position is leave empty so the related
invoice taxes are properly matched

closes odoo/odoo#38830

X-original-commit: 74f172041351e03f60b1aff0f0eb925e896cd1fa
Signed-off-by: Josse Colpaert <jco@openerp.com>
2019-10-15 16:47:01 +00:00
Martin Trigaux e7c70e3635 [FIX] packaging,doc: minimum python version is 3.6
In 12.0 it was 3.5 but for 13.0, it is acceptable 3.6.
Debian Buster has 3.7 and Ubuntu 18.04 LTS has 3.6
This will avoid undeterminist errors with OrderedDict

CentOS 7 still does not ship python3 by default but it is possible to
install it and CentOS 8 with python 3.6 was released in septembre 2019

closes odoo/odoo#38827

X-original-commit: 14e3e7524c2edd08ddf19afe512cb4462d070c0b
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-10-15 16:07:07 +00:00
Juan Fernando Cano González 024a0afd9f [CLA] Nanobytes signs Odoo CCLA
closes odoo/odoo#38822

X-original-commit: 17eb935f0999799c694681e9aa9b356525182462
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-10-15 15:18:57 +00:00
Martin Trigaux a0cd964c55 [FIX] event: print registrations without name
Before this commit, trying to print a registration without a name
specified (not required), was failing

Fixes odoo/odoo#38564

Replace and closes odoo/odoo#38582
Courtesy of Swapnesh Shah

closes odoo/odoo#38821

X-original-commit: a21a81e98c569098d254781318b0030f30b02181
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-10-15 15:17:17 +00:00
Adrian Torresandmreficent 73b18b30b5 [FIX] base: don't crash during CRUD if record does not exist
- Let a model M define a Many2oneReference field F1.
- Let a model N define a One2many field F2 whose inverse is M->F1
- Define a computed field N->F3 that depends on N->F2

If, for whatever reason, a recordset of M contains records that have
been unlinked already and we try to unlink them again, the system will
crash with a MissingException error.

This happened because, while most _modified_trigger cases cover the case
of a MissingException (i.e. record not in cache), the case for a
Many2oneReference didn't.

This is fixed by simply ignoring these "stale" records in the
_modified_triggers section for Many2oneReference fields.

closes odoo/odoo#38816

X-original-commit: f3b05032f0576befda4dca870718afd429c21b0f
Signed-off-by: Adrian Torres (adt) <adt@odoo.com>
Co-authored-by: mreficent <miquel.raich@eficent.com>
2019-10-15 14:33:07 +00:00
qsm-odoo b2a403efc7 [FIX] website_blog: make latest posts snippet multi-website aware
The snippet was using the posts of all websites and blog post creation
was suggesting all blogs. Now:

- On blog post creation only suggest the blogs of the current website
- In latest posts option, only suggest blogs of the current website
- In any case, latest posts only displays posts of the current website

Part of https://github.com/odoo/odoo/pull/38510
Related to task-2083198

closes odoo/odoo#38794

X-original-commit: 4be97b48861a6631fe465054c62baea65bfc1524
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-10-15 12:55:04 +00:00
qsm-odoo 93834a55e6 [FIX] website_blog: use viewref when rendering latest posts template
Indeed, a theme can declare its own latest posts template so it would
crash with ref instead of viewref.

Part of https://github.com/odoo/odoo/pull/38510
Related to task-2083198

X-original-commit: 755944f6b88b069515881c9ec58e72e7a0cdd762
2019-10-15 12:55:04 +00:00
wan 775b1156e3 [FIX] account: allow to reverse multiple moves at the same time again
The way the active_id(s) were retrieved made the wizard only take care
of one active_id. This prevented from reverse multiple invoices at the
same time.

closes odoo/odoo#38537

Fixes: #35759
X-original-commit: fe47011c3fdcec0bda5334f10679e853fe41e45a
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2019-10-11 17:42:20 +00:00
Arnaud Joset 85785187e6 [IMP] payment: group payment_ref and amount in payment_link wizard
payment_ref and amount are small fields that does not render well in large fields.

closes odoo/odoo#38287

Taskid: 2059972
Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2019-10-11 12:55:48 +00:00
Arnaud Joset 92c26dff56 [IMP] web: CopyClipboardCharLong widget for long strings
- The copy CopyClipboardChar widget is not nicely rendered for very long strings (e.g. URL).
 - This commit modify the behavior of the CopyClipboardChar widget to display it nicely win such cases.

TaskID: 2059972
2019-10-11 12:44:47 +00:00
svs-odoo f55adeaf34 [FIX] account: rename Suppliers into Vendors
For more consistency, as the menu item calling the corresponding action
is named "Vendors".

closes odoo/odoo#38783

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-10-15 10:47:20 +00:00
Yenthe666 485e3a7959 [IMP] website_crm_partner_assign: make partner level name required
closes odoo/odoo#38773

X-original-commit: dfc6d3ffb6813d5e7144c6b8e34f43f01e1de4ed
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-10-15 09:16:55 +00:00
Christophe Simonis 602f2ac529 [FIX] hr_holidays: force empty value in xml declaration
Ease module upgrade.

closes odoo/odoo#38757

X-original-commit: df680ad12d3bd46efe35a755ca46cf2b13148380
Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-10-15 07:09:16 +00:00
Lucas Perais (lpe) 2f40948022 [FIX] website: oe_no_empty only in edit mode
Test case;
The user as edition rights on the website
Install quotation builder
Have a sale order with many lines
Click preview > you end up on the portal view

Before this commit, there was a blank space just before the
sale order lines per se
This was because the sale order's lines website description
were in the dom and took some fixed space, which is a feature
meant for the edit mode by using the class oe_no_empty

After this commit, we restrict the effect of that class concerning
the fixed height only to edit mode
There is no more gaps in the sale order preview

In master, one should check whether the class / rule is still relevant

OPW 2082267

closes odoo/odoo#38435

X-original-commit: 4b177412235cdf3e62f5ff30c18246c003c25cc2
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-10-10 16:47:03 +00:00
Joseph Caburnay cb68960d49 [FIX] point_of_sale: delete pos.config
Since the ir.sequence records linked to pos.config records are on
delete restrict, it is necessary to delete the pos.config records first
before deleting the ir.sequence's linked to them.

closes odoo/odoo#38775

X-original-commit: cdfa415829fa06f2860d65054fd8534180c8526a
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2019-10-15 09:17:12 +00:00
Simon Lejeune 38711e9f9c [REF] repair: multi company
task-2081645

closes odoo/odoo#38294

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-10-15 08:49:24 +00:00
qsm-odoo aae20424fe [FIX] website_sale_product_configurator: fix continue shop
When selecting the "Continue shopping" option after adding a
configurable product from the products page with "Add to Cart" enabled
the top navbar was not updated.

Part of https://github.com/odoo/odoo/pull/37132

task-2070507

closes odoo/odoo#38732

X-original-commit: 433be848d4e2545a9962a54d2dba615b329f73de
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-10-14 15:06:21 +00:00
qsm-odoo a6507f0fa9 [FIX] website_sale_comparison: fix compare animate
The animation was not waiting for the target to be displayed.

Part of https://github.com/odoo/odoo/pull/37132

task-2070507

X-original-commit: fb00568464e8d2a39975c373016616a2970aa501
2019-10-14 15:06:21 +00:00
Andrea Grazioso (agr-odoo) 842ce44d61 [FIX] account: wrong error message on import
From Accounting Dashboard, under the kanban card "Customer Invoices"
click on "Upload Invoice" and submit an e-fff invoice (xml) which is
actually an invoice (e-fff type 380, should be uploaded under
"Vendor Bills" card). The server will reply "Cannot create an invoice of
type in_invoice with a journal having purchase as type." because it will
fetch the type not from the destination journal but from the guessed
journal.

opw-2083545

closes odoo/odoo#38762

X-original-commit: a12e29c963201add0ea6b15a1e8e19a6af1db032
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-10-15 07:51:14 +00:00
Sébastien Theys ab4a59b0ea [FIX] website, website_theme_install: fix theme selection in settings
Follow up of commit a3845ae3f0

Issue
=====

Since the above commit there is a confirmation dialog when clicking on a button,
for which the only options are to Discard or Cancel.

The problem is that when discarding it will revert the selected website back to
the default value. Therefore before the current commit it is impossible to
install a theme on a website other than the first.

Solution
========

The solution is to avoid showing this dialog when clicking on buttons for which
the result depends on the currently selected website. This leads to the same
behavior as what existed before the mentioned commit: the settings are
implicitly discarded because they are not saved, but at the time of the click
the transient model still holds the non-discarded value that the user selected.

This restores the "select a theme" feature, but also restores the unfortunate
side effect that the user might unknowingly loose all of his pending changes
when clicking on the button, but only for those two specific buttons.

Other considerations
====================

Saving instead of Discarding was considered but it is impossible to do because
saving might do a lot of changes that might even lead to the installation of
modules, so the settings page has to be reloaded to apply them, and then the
website field will be reset to its default value again.

Instead of changing website specific settings from the main settings, it was
considered to update them through a form view, but it is apparently too
complicated for on-boarding.

The last consideration was that the settings view should actually mark the
corresponding fields as unchanged when changing the website, but it is too
complex to implement for a case that is not supported in the first place,
especially for a fix in a stable version.

task-2083198

closes odoo/odoo#38745

X-original-commit: 2298ef19bcd9e7a14958dce9a93cea69258064d8
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2019-10-14 17:55:58 +00:00
Lucas Perais (lpe) f66c5c594a [FIX] portal: portal send mail with right email address
Go on the portal with a portal user
Drop a message in the chatter

The message is logged in the chatter from the right partner
Before this commit however, the email that was sent had
its address from of the OdooBot

After this commit, the mail is sent with the partner's email from

OPW 2074154

closes odoo/odoo#38553

X-original-commit: 2ce5d3840c7c43a2226b007a180cb91c5031312c
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-10-11 22:35:56 +00:00
Pierre Masereel 6800fcf3c1 [FIX] delivery: set carrier on order when carrier line added
When you are adding a line on your sale order that is a delivery line,
the carrier is not always set on the sale order which means that when
the carrier is not explicitly set on the sale order, the carrier won't
be set on picking created from the sale order.

When you are using the wizard on sale order, it works, but when the
carrier is selected on the e-commerce, it is not set on the sale order.

To avoid such difference in behavior, we are writing the carrier_id of
sale order in the function 'set_delivery_line' insread of the wizard and
e-commerce.

closes odoo/odoo#35855

closes odoo/odoo#38740

Original-signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
X-original-commit: a15f9921fa1ce92c41c263a8a2c6a32342a8cb1b
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2019-10-14 16:31:36 +00:00
Jinal Patel 5288816bae [IMP] hr_timesheet: improve 'Timesheet Entries' Report
- If the Timesheet entries all belong to the same project, the report
  title should be
  "Timesheet Entries for the name of the project Project" and here in
  this case no need to show the project column.
- Split the Project - Task column into two separate ones: one for the
  Project and one for the Task

task-2027729

closes odoo/odoo#38684

X-original-commit: 96d3bd7560f43847c758d149eaab14ecc9206058
Signed-off-by: Jérome Maes (jem) <jem@openerp.com>
2019-10-14 09:08:52 +00:00
Damien Bouvy 67a222cab6 [FIX] sale: correctly group invoices when invoicing multiple orders
It seems the grouping feature was lost during the accountpocalypse.

Add a test as long as I'm at it.

closes odoo/odoo#38500

closes odoo/odoo#38552

Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2019-10-14 09:03:05 +00:00
fw-bot 817ce6bd6b [FIX] web_editor: allow a snippet to use the same option multiple times
If two snippet options are declared using the same data-js="..." and
that they end up targeting the same snippet in some cases, only one of
those two snippet options was shown.

This case occurred in a theme (avantgarde) for the map snippet.

closes odoo/odoo#38551

X-original-commit: 2072bfd9981eebc8c8d8d03d2f44f0e4a2489692
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-10-11 22:35:19 +00:00
Alexandre Kühn 1049fabfa6 [FIX] mail: messaging ready after 1st chatter rendering
Revision on https://github.com/odoo/odoo/commit/9a66619db33fca5f0cb81d9f6bfeb0fb0290cf68

Commit above improves the web client startup by not having to wait
for discuss widgets to fully load beforehand.

However, it introduced an issue with chatter when the 1st rendering
happens before messaging becomes ready: it displays
"Creating a record..." instead of the whole history of messages.
This happens because when messaging is ready, it updates data from
the chatter but it does not trigger a re-render.

This commit fixes the issue by triggering a re-render on messaging
ready. When messaging is not ready, thread field now displays
"Loading..." instead of the message "Creating a record...".

Task-Id 2078193

closes odoo/odoo#38751

X-original-commit: 93bdd7c91095025f4d6e7a058e0ab1c4e1a0ad60
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2019-10-14 19:35:20 +00:00
Christophe Monniez ec48a8341d [FIX] packaging: include python3-xlrd in debian package
As the python3-xlrd package is available in Debian stretch and Ubuntu
bionic, there is no reason to not include it in Odoo debian package.

However, it cannot be used in Odoo 11.0 package as it does not exists in
Ubuntu Xenial.

ubuntu package:
https://packages.ubuntu.com/bionic/python3-xlrd

debian package:
https://packages.debian.org/stretch/python3-xlrd

closes odoo/docker#276

closes odoo/odoo#38746

X-original-commit: acf413df14f3206b9c852db98247631f297b7c9c
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2019-10-14 17:58:31 +00:00
svs-odoo 506d84a5fb [FIX] stock: quant list editable bottom
Before this commit, the editable quant list was editable by top, which
is not really pratical when the user creates (with the keyboard)
multiple quants tracked by SN because the focus always go back on the
top of the list. Now, this list is editable by bottom.

closes odoo/odoo#38743

X-original-commit: c7b069a16ae03066ed531a6b1da671ab994d0994
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-10-14 17:14:13 +00:00
Victor Feyens b27693d97d [FIX] product: disable variants duplication.
The product copy was fixed in https://github.com/odoo/odoo/pull/38303
but the result is still not intuitive.

You could duplicate one of the multiple variants of a template and see
another variant form opened than the one you just duplicated.

closes odoo/odoo#38739

X-original-commit: b64e2f93465f16112d719ed0a28c82051066dbf3
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2019-10-14 16:31:17 +00:00
Alexandre Kühn 7ecb8d3f61 [FIX] mail: discuss unstar all
Before this commit, when clicking on "Unstar All" from Discuss
'Starred' mailbox, it crashes with following error:

```
TypeError: unstar_all() takes 1 positional argument but 2 were given
```

This commit fixes this issue

closes #37994

closes odoo/odoo#38738

X-original-commit: ec330d1668640d3ae75e23a70695006a63dbe217
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2019-10-14 16:30:57 +00:00
Alexandre Kühn 787316cfec [FIX] mail: deletable attachments in attachment box
Revision on https://github.com/odoo/odoo/commit/e7aff236b8073b952a0e554d9897a8f88d5c4c91

Commit above remove cross icon on attachments from messages that are
not in the chatter, since this only makes sense in the chatter.

However, it also removed by mistake the possibility to delete
attachments from the attachment box in the chatter.

This happens because the template of attachments uses a newly
introduced contextual boolean `isDeletable`, and this is false by
default due to undefined being falsy.

This commit fixes the issue by explicitly enabling deletion of
attachments from the attachment box.

Task-Id 2081987

closes #38003

X-original-commit: 1a175686d493d9f289cf391b65a56adc80da82c2
2019-10-14 16:30:56 +00:00
Lucas Lefèvre d133df5819 [FIX] website: Display duplicate login error message
When you try to create two users with the same login, the shown error message is
the Postgresql integrity error instead of a nice (translated) validation error.
This happens since bf88f3e which changed the way error messages are translated.

The reason is the manually created unique index `res_users_login_key_unique_website_index`.
The error handling and translation mechanisms don't know it exists.
The index was created for performance reasons in commit b5a12b4 where the
original python constraint was replaced with this custom SQL index.

In this commit, the python constraint is re-introduced to remove the index hack,
but the implementation now uses a single SQL query, which should be quite fast.

closes odoo/odoo#38737

X-original-commit: 817a811ec98b0c313b12e6464b5e98ca432cb3fc
Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-10-14 16:30:38 +00:00
Lucas Lefèvre 8c15358e81 [FIX] web: Avoid blinking attachment box
Go to hr.applicant view form, Edit and change something.
Each time you change a field, the Attachment box in the chatter is toggled
(as if you were clicking on the small attachment button each time).
This a wrong behavior of the `open_attachments` option of the `mail_thread`
widget.
Opening the attachment box should be done at the widget initialisation,
not at every render.

closes odoo/odoo#38720

X-original-commit: 400a1f7bc3d00f5bc95bdbfe1dfadf9d251d808b
Signed-off-by: lul-odoo <LucasLefevre@users.noreply.github.com>
2019-10-14 13:05:08 +00:00
Pierre Masereel 52b3daf260 [FIX] pos_restaurant: floor plans deletion
When you try to delete a floor, an error is raised if a pos config has
an opened session. Even if the floor is not used in the opened pos
config.

The real goal of this constraint is to avoid deleting a floor plan
linked to a pos config having an opened session.

Github issue: https://github.com/odoo/odoo/issues/38581

closes odoo/odoo#38719

X-original-commit: 9ec5a4c0126db767e17fc352fa184e0ee2bcc7e7
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2019-10-14 13:03:57 +00:00