Commit Graph
126133 Commits
Author SHA1 Message Date
Christophe Simonis b42cd64ace [FIX] mail: do not try to send email to partners without email
As `formataddr` only accept strings as arguments, an exception was
raised when trying to notify a mailing list channel with followers
without email.

closes odoo/odoo#30492
2019-01-23 19:22:00 +00:00
Nicolas Seinlet 9254216843 [IMP] efficient total amount computation
Based on the stored computed amounts on lines,
it seems better to use read_group on lines instead
of recomputing the whole bunch of taxes and amounts.

closes odoo/odoo#30398
2019-01-23 09:10:16 +00:00
qsm-odoo d7acfdae2b [FIX] portal: restore BS3 clearing system for main frontend containers
BS3 used to add ::before and ::after elements on all containers so that
margins and floats are cleared inside containers. As lots of current
odoo layouts may rely on this for some alignments, this is restored (at
least for a while) here only for main containers of the frontend.

In master, we should use proper layouts to avoid the need of this.

task-1889238

closes odoo/odoo#30510
2019-01-24 11:30:30 +00:00
Nicolas Lempereur 1388b7f0d8 [FIX] base: remove copied views before uninstall
In dff64b6f7ca some copied views with no link to a module would be
removed after module uninstall.

But this has some side effects when the website module is being removed.

For example:

- website_theme_install, website are installed
- website is uninstalled (which will uninstall website_theme_install)
- website.theme_customize view can't be removed because it is used by
  copied view website_theme_install.customize_modal
- after uninstall _remove_copied_views will remove the view
  website.theme_customize but when trying to remove associated
  website.page will throw an error because website_page table does not
  exist

This issue does not happen if we uninstall first website_theme_install
then website (since like this the reference is not an issue).

The issue also happen with overriding views in theme_bootstrap and
possibly elsewhere.

With this changeset, copied views are removed before uninstalling module
data.

opw-1924714
closes #30191
2019-01-24 12:26:31 +00:00
Pierre Paridans 9ee099458b [FIX] mail: focus chatter composer on mobile
Sending a message on the chatter is painful as you need to scroll to see
the buttons and click to open the composer. Then again click to set the
focus in the composer (making the keyboard appear) and scroll again to be
able to write your message.

On a view form when clicking on the "New Message" or "Log Note" buttons the focus
should be put in the text field, then opening the mobile device keyboard
and scroll the view to make the text field visible.

NB: in some case on Android (both WebView and Google Chrome) the scrolling is
not operated correctly resulting into the text field being hidden behind
the keyboard. This issue looks related to some timing between the actual
focus() call and the keyboardi appearance triggered by the operating system.
Sadly we don't have any control on that part.

Related to task 1891955

closes odoo/odoo#29239
2019-01-23 13:55:49 +00:00
Laurent Smet 2bba89c4ad [FIX] account: Fix forward-port of ec25b9d01b
Since this commit has been wrongly forward-ported, the fix is still not deployed on 12.0.

closes odoo/odoo#30505
2019-01-24 10:08:44 +00:00
Yannick Vaucher 37cb987177 [FIX] tools: fix typo in help message
for --db_maxconn option

closes odoo/odoo#30433
2019-01-23 08:31:47 +00:00
Nicolas Martinelli 2cfbb8594b [FIX] website_sale_stock: product availability
- Install eCommerce, Inventory,
- Go to website setting and set availability of products as a "Show
  inventory on website and prevent sales if not enough stock"
- Create new service type product, and publish it
- Go to shop

The button Add to cart is disabled.

Apply this option to stockable products only.

opw-1931638

closes odoo/odoo#30444
2019-01-22 15:41:13 +00:00
Nicolas Martinelli 3eeb77414b [FIX] delivery: package UOM
Since it is now possible to select the default UOM, do not hardcode `kg`
in the view.

opw-1920809

closes odoo/odoo#30427
2019-01-22 11:19:41 +00:00
Jeremy Kersten 8f2267b512 [FIX] web_editor: hack o_switch input style
On Chrome, there are a rounding pixel that make the button ugly since several month.
Meanwhile to have a clean way to fix it, bypass the rounding pixel.

https://odoocdn.com/web/image/10933003/Selection_181.png

closes odoo/odoo#30452
2019-01-22 16:38:48 +00:00
Jeremy Kersten 9cfd1eefd8 [FIX] website: don't copy is_published
Before this commit, if you duplicate a published record on the website,
the copy was already published, while in most of case you need to update
it to adapt to the new content. There doesn't make senses to duplicate the
same content on a website and let the duplicate content.

Task-1930058
2019-01-22 16:38:48 +00:00
Nans Lefebvre d794cd616b [FIX] web: make the fields display without overlap in settings
The display of many fields in the setting overlaps other elements,
e.g. OnSIP WebSocket, Domain and VoIP Environment in General Settings.

We override the flex: 0 0 66,6% set by Bootstrap by flex: 0 0 auto
so that everything automatically looks nice.

closes odoo/odoo#30359
2019-01-21 08:03:04 +00:00
Babatope Ajepe 201f44380c [CLA] signature for ajepe
closes odoo/odoo#29545
2019-01-22 12:31:53 +00:00
Xavier Morel a313f342d3 [IMP] core: add force_save support to server-side form
Cf 3b3f6f04af for basic feature
description.

Task 1931580

closes odoo/odoo#30428
2019-01-22 11:12:39 +00:00
mreficent 23e0d2cc17 [FIX] base_gengo, pad, pos_cache: add missing _description on some models
closes odoo/odoo#30412
2019-01-22 11:16:33 +00:00
len-odoo e5486c12bc [FIX] osv: fix combination of unit domain
Combining a list of elements containing only the monoid's unit should return the
unit.

Since the unit is skipped, it would return an empty domain instead of the unit,
meaning that (0, '=', 1) could not be used in a group rule.

To test this, create a record rule on a model M with domain (0, '=', 1)
that applies to group G.
Log in with a user in group G and access model M; you can read everything
(provided no other record rule applies) whereas you should see nothing.

Because of expression.AND(global_domains + [expression.OR(group_domains)])
we want the empty domain to still be left untouched, even if it violates
the OR's unit rules (i.e. OR(empty, OR(R)) = OR(R) <=> OR(empty) = unit).
Meaning that no group rule would reduce to having a (0, '=' 1) group rule.
So in the end we don't really care about all that algebraic nonsense.

closes odoo/odoo#28765
2018-12-20 10:41:43 +00:00
Yenthe666 03291bdcc8 [FIX] website_forum: order forum votes from newer votes to older votes
closes odoo/odoo#30396
2019-01-21 10:08:15 +00:00
Martin Trigaux caaabadc66 [FIX] mail: do not download attachment content to list it
When creating the list of attachments, no fields information was given, making
the search_read read the content of each field, including the infamous datas
Already fixed at 73d9b9588f but the domain was not backported

Fixes odoo/odoo#30394

closes odoo/odoo#30415
2019-01-22 07:46:02 +00:00
Daniel Yang 50060a7d07 [CLA] signs the CLA for zyyang
closes odoo/odoo#30378
2019-01-22 07:05:16 +00:00
Alexandre Kühn 0d87b1ccea [FIX] mail: do not open document chat window without access rights
Before this commit, a user could unintentionally discard a
notification from a document that he does not have access
rights at the moment.

Steps to reproduce:

1. Setup:
- Odoo with multi-company
- Two companies: "MyCompany" and "SuperCompany"
- Two users "Admin" and "Demo", both have access to being in
  both companies
- "Demo" has Notification management in Odoo in the user preferences.
- "Admin" is logged in "MyCompany"
- "Demo" is logged in "SuperCompany"

2. Scenario:
- "Admin" mentions "Demo" in a log of a document from "MyCompany"
- "Demo" receives the notification and click on the notification
  from messaging menu.
> Dialog prompts that Demo does not have access to the document (OK)
> Empty chat window is open (not OK)
- "Demo" closes the chat window
> Notification is marked as read (not OK)

This commit fixes the issue by aborting the opening of a
chat window if the user does not have the access rights
at the moment. It should prevent marking the notification
as read by mistake by closing the chat window.

Task-ID 1931313

closes odoo/odoo#30414
2019-01-21 15:35:23 +00:00
Denis Ledoux 6355126ff1 [FIX] web: oversight during forward-port f854e01a98
pyeval is no longer there in 12.0.

it's pyutils for christ sake @kangol
2019-01-21 18:18:02 +01:00
Odoo Translation Bot 127fdea764 [I18N] Update translation terms from Transifex 2019-01-21 17:38:09 +01:00
Nans Lefebvre 0d6a796b57 [FIX] sale, crm: put the sales overview behind salesteam.manager group
If a user has no rights on sale, he should not see the sales menuitem
on the dashboard.
This is because the report_sales_team, which was set on a menu restricted
to managers, has been moved to a menu without groups.
We therefore set the group salesteam.manager directly on report_sales_team
to have the same rights as before.

Similarly, this same report is visible in the CRM app without manager rights,
so we put them explicitly on sales_team_menu_team_pipeline.

Also reverts commit 2cdc1cc9ce that put the groups
on the sales root menu.
It is unnecessary to do so, since when all submenus are hidden to a user,
then the app icon is automatically hidden to the user.
This practice allows customisations to put views accessible without any rights
on that specific app.
Since the sales.team manager has been put back on the correct dashboard,
this previous commit is now useless.

opw 1914373

closes odoo/odoo#30390
2019-01-21 08:11:42 +00:00
Nans Lefebvre 3bf2faca5d [FIX] web: make the module names not overlap in settings
The display of long module names, e.g. 'EMail Marketing' or 'General Settings',
overflows on the following line, resulting on the superposition of text.
We fix that.

closes odoo/odoo#30355
2019-01-18 12:36:01 +00:00
Graeme Gellatly 194fc8a136 [REF] stock_account: _run_fifo_vacuum: get moves to vacuum
Do not perform useless calls to `search`.

Closes #29962

closes odoo/odoo#30392
2019-01-21 08:51:30 +00:00
Sébastien Theys 1c5b28fbdd [FIX] sale_coupon(_delivery): fix coupon test with product configurator
The copy() is unnecessary, and it is introducing an issue because
product.template.attribute.value are not created correctly for copied templates.

The test can be done on the original data, the transaction is going to be
reverted either way.

closes odoo/enterprise#3301
2018-12-18 16:15:34 +00:00
Sébastien Theys 19d8d3a626 [FIX] sale_coupon(_delivery): fix coupon test with product configurator
The copy() is unnecessary, and it is introducing an issue because
product.template.attribute.value are not created correctly for copied templates.

The test can be done on the original data, the transaction is going to be
reverted either way.

closes odoo/enterprise#3301
2018-12-18 16:15:34 +00:00
wan 9ef7802520 [ADD] l10n_nl: tax codes for 9%
closes issue #29352
The Dutch taxes will change the low tax 6% to 9% on 01/01/2019. Please add these tax code in the system and also change the affected fiscal positions. Both 6% and 9% needs to exist during the transition period.

closes odoo/odoo#29374
2018-12-18 09:48:41 +00:00
Odoo Translation Bot 076c835544 [I18N] Update translation terms from Transifex 2019-01-01 02:42:55 +01:00
Thibault Delavallée cc217569b7 [FIX] base: fix name_search on res_partner when searching on linked users
Currently name_search on res_partner holds code to be done by a customized SQL
query allowing to speedup the search [1]. However when dealing with given args
there may be a crash if there is a domain based on user_ids fields.

Indeed this field is defined as auto_join [2]. It means the result of get_sql
returns where parameters based on joined tables. Those tables are not available
in the from clause in the original query.

This commit fixes that issue by correctly taking the from_clause from get_sql.
That way joined tables are available. Small update of the query is necessary
as fields are now res_partner.{id/email/vat/reference} as there may be several
tables linked in the query.

A test has been added to avoid regression.

[1] See https://github.com/odoo/odoo/commit/05ec12692f99b69924765fd0ce384632547f03f9 for a recent modification
    and implementation of this query, even if it exists since a looooong time
[2] See https://github.com/odoo/odoo/commit/db8203c27a21acdbcad2cf1c394b6fea3cf13688 for the auto_join addition

closes odoo/odoo#29827
2018-12-21 15:40:32 +00:00
David Tran 6bf8b25b70 [IMP] base: Vietnam Dong should have 1.00 as rounding.
No decimal part in Vietnam Dong (đ - Việt Nam Đồng)

closes odoo/odoo#29650
2018-12-19 14:24:43 +00:00
Denis Ledoux 5856dab380 [IMP] product: name_get, use mapped to gain some memory
This revision is related to
12df3c6a98

The above revision serve its purpose as well,
but by avoiding to store the result in a variable,
and using the records cache instead,
we gain some memory, which is noticeable
when there are hundred of thousands products.

The sudo() is important, as it must be the
same environment then the above call to read
to use the same cache.
Otherwise the values won't be in the cache
of self (without sudo),
and it will go get it and prefetch other fields
in the database.
2018-12-19 18:49:14 +01:00
Denis Ledoux 12df3c6a98 [FIX] product: name_get, products can share the same template
Oversight in revision
a91ffcf1a7

Multiple products can have the same template.

Passing multiple times the same template id
to the search domain to get the sellers
works, but better avoid the repetition
for the performances.
2018-12-19 18:28:23 +01:00
wan 06ad641b0a [ADD] l10n_nl: tax codes for 9%
closes issue #29352
The Dutch taxes will change the low tax 6% to 9% on 01/01/2019. Please add these tax code in the system and also change the affected fiscal positions. Both 6% and 9% needs to exist during the transition period.

closes odoo/odoo#29375
2018-12-18 09:42:42 +00:00
Lucas Perais (lpe) d3e84f80f4 [FIX] purchase: prevent div by zero in purchase.report
Spinoff of 6cd12694d8

OPW 1916964

closes odoo/odoo#29828
2018-12-31 08:47:16 +00:00
Wolfgang Taferner 138550fd2e [FIX] stock_picking_batch: do not lock batch model on transient model
closes odoo/odoo#29722
2018-12-23 07:57:27 +00:00
Odoo Translation Bot 912f88b980 [I18N] Update translation terms from Transifex 2018-12-30 03:12:33 +01:00
Nans Lefebvre 738e60c6eb [FIX] service: fix integrity error display
During the installation of a module, an IntegrityError can be raised,
e.g. if some module data already exists in the database
(as in the case of a module which uninstallation did not remove its data).

In Python2 it was possible to use such a psycopg2.IntegrityError with i[0]
to get its error message, while this raises an exception in Python3,
i.args[0] is needed.

As a result the log would contain an exception within an exception instead of
displaying an error to the user.

opw 1916374

closes odoo/odoo#29787
2018-12-28 14:27:11 +00:00
Andrea fe381f95b7 [FIX] stock: xrange->range in template report_location_barcode
closes odoo/odoo#29652
2018-12-19 15:10:13 +00:00
Anand Kansagra 24b88b6af9 [CLA] signature for anandkansagra
closes odoo/odoo#29709
2018-12-21 15:19:30 +00:00
Odoo Translation Bot 5d237b2037 [I18N] Update translation terms from Transifex 2018-12-23 03:12:41 +01:00
qdp-odoo 4fde773938 [FIX] account: don't propose partial reconciliation on blue lines
Create a vendor payment of 100€
Create a bank statement line with an amount lower than the payment
Open bank reconciliation view
Reconcile the bank statement line with the blue line of 100€, the triangle for partial reconcile appear.
Current behavior:
If you click the triangle, you can reconcile this payment with the statement line but it becomes unbalanced.

Expected behavior:
The triangle should not appear.

Fixes odoo#29654

closes odoo/odoo#29718
2018-12-21 15:53:21 +00:00
Pierre Masereel 696269bbc7 [FIX] iap: handle HTTPErrror and Timeout when contacting iap server
When the iap sever is called, it is possible that the request timeout
or that the webserver returns an error code (if the Odoo server is down
for example) and we should warn the user instead of throwing an
exception in a traceback

closes odoo/odoo#29667
2018-12-21 12:38:36 +00:00
Pierre Masereel f76a45a9d3 [FIX] iap: support dbuuid in authorize requests
In this commit: https://github.com/odoo/odoo/commit/a0b7802a5e7646a896f54cf125f0136ff489d4d9

We've added the possibility to send the dbuuid in the authorize request,
this as been added to allow to give free credits of a service to a
database.

As some services developped in 11.0 are using this mecanism, we have to
add that support in 11.0
2018-12-19 09:14:24 +00:00
Darshan Patel e9765d7f12 [CLA] Darshan Patel
closes odoo/odoo#29691
2018-12-20 16:17:00 +00:00
doun fba4ab8e5d [CLA] signature for doun
closes odoo/odoo#29009
2018-12-20 15:07:51 +00:00
Maxime Chambreuil f651597436 [CLA] Open Source Integrators signs Odoo CLA
closes odoo/odoo#29255
2018-12-20 15:00:14 +00:00
Martronic SA 75acfb1de9 [CLA] Martronic SA signs Odoo CCLA
closes odoo/odoo#29669
2018-12-20 13:01:02 +00:00
len-odoo 9186f433f1 [FIX] web: read records up to list limit
Fine-tuning of commit e7fab23420
In a one2many with more than one page with a limit of k records, add a line l.
It increments the list limit to k+1. Remove a line above (of index <= k).
It will try to load a line l' to replace it, that it will find on page 2.
However when deciding if it should read missing fields on that record, it will
scan at most u records, skipping virtual ids.
Here u is the min between the current number of lines and the list limit
without the temporary increase due to the added record.
Since there are at least two pages, u = k.
However since l is in the list at index k, then l' won't be read, and since it
was on page 2 its data hasn't been loaded.
Therefore the js would traceback when trying to evaluate it.

opw 1913361

closes odoo/odoo#29338
2018-12-19 13:03:46 +00:00
qdp-odoo 3d119415a2 [IMP] account: usability of payments
Backport of commit 771f65ecf5

Payments created without partner_type (field not required)
were previously not shown anywhere, as well as internal transfers.

opw 1910590

closes odoo/odoo#29647
2018-12-19 13:53:28 +00:00