Commit Graph
126133 Commits
Author SHA1 Message Date
Laurent Smet 379fc6b125 [FIX] account_accountant: Make transfer_account not required without chart template
required: [('chart_template_id','!=',False)] doesn't work because you need to fill the chart_template_id
to install a chart of accounts for your company. Then, the transfer_account becomes required before its installation
and then, you are not able to install a chart of accounts for your company.
2018-12-05 11:13:19 +01:00
RomainLibert 37212fe655 [FIX] lunch: fix lunch_supplier test
In https://github.com/odoo/odoo/commit/e8ac4d79964b852f21e272bc804d151b5b356791 we introduced an
error in the test_search_available_today which broke the test before 10
am everyday

closes odoo/odoo#29265
2018-12-05 10:10:09 +00:00
Jeremy Kersten 1c5ffe1737 [REF] website_forum: mass moderation, modern UI bs4 and clean type
Now forum only allow to post message of type 'question'.
New 'modern' UI with Bootstrap 4
New moderation modal for bulk spam

Co-authored-by: qha <qha@odoo.com>
Co-authored-by: qsm <qsm@odoo.com>
Co-authored-by: jke <jke@odoo.com>

Thanks to @qha-odoo for UI
Thanks to @qsm-odoo for reviewSsss

closes odoo/odoo#29235
2018-12-06 20:49:42 +00:00
qsm-odoo 08807fcba9 [IMP] website: keep social media popover on one row
Before this commit, the social media popover (used in forum but
available everywhere) may break over multiple rows if used on a relative
positioned small button. This however never occurred in standard <= 12.0
so we will consider this not a bug fix. This will however occur with
the upcoming forum refactoring, so we needed a fix for master.

This commit forces the social icons on one row and take the opportunity
to refactor the template to make a simpler and more beautiful popover
by using conventional icons and social media own colors.

closes odoo/odoo#29327
2018-12-06 18:09:54 +00:00
Christophe Simonis d4c65a7ede [MERGE] forward port branch 11.0 up to 2156af480f 2018-12-04 17:11:57 +01:00
Christophe Simonis 2156af480f [MERGE] forward port branch saas-15 up to 9bfc12cb3f 2018-12-04 16:17:49 +01:00
Christophe Simonis 9bfc12cb3f [MERGE] forward port branch saas-14 up to 69d342f54c 2018-12-04 14:59:04 +01:00
Christophe Simonis 69d342f54c [MERGE] forward port branch 10.0 up to 4629a4fb0e 2018-12-04 14:29:52 +01:00
Jairo Llopis 81c26383b0 [FIX] auth_ldap: Avoid sending email for newly created user
If installed along with `auth_signup`, it sends an email when creating a missing user authenticated through LDAP.

It is a confusing message that makes no sense, because the user is, from his POV, not actually creating a new user, but just authenticating with a new app with his known company-wide credentials.

Besides, that invitation leads the user to change his password in Odoo, although he probably doesn't want to do that and have a password for Odoo and another in the LDAP server.

The best option is to disable that email completely, which is what this commit does.

closes odoo/odoo#29243
2018-12-04 12:13:39 +00:00
Nicolas Martinelli d160454226 [FIX] base_vat: Albania
The module `vatnumber` (which is not maintained anymore) uses an
incorrect validation method for Albanian VAT numbers. Therefore, we use
the library `stdnum`, on which `vatnumber` relies for most cases.

opw-1912680

closes odoo/odoo#29280
2018-12-05 13:56:52 +00:00
Julien (juc) Castiaux 3b39c31adc [FIX] website_forum_doc: Not possible to change ToC order
opw-1913300

closes odoo/odoo#29263
2018-12-05 09:41:48 +00:00
Julien (juc) Castiaux fb1ef15a5a [FIX] l10n_be: Account 451200 must be reconciliable
opw-1913108

closes odoo/odoo#29251
2018-12-05 08:48:20 +00:00
Nathan de Pryck 7386292bce [FIX] account: access to aged receivable report leads to MemoryError
When analysing the code thanks to Pyflame it cames that the 'prefetch_fields()'
function was runing most of the time. In order to improve the global performance,
I change the context of the move_lines : 'prefetch_fields = False'. It permit to reduce the
time of computation of the prefetch_fields and to avoid the MemoryError.

N.B.: The database of the customer (on saas) contains 1.3 millions of entry and to reproduce the issue
I have to set the HardMemlimit to 0.9 Go and the SoftMemLimit to 0.5Go.

OPW-1910422

closes odoo/odoo#29231
2018-12-04 09:54:00 +00:00
Sébastien Theys dc4a9d3db7 [FIX] account,purchase,repair,sale,web: fix report layouts
Following BS4 migration and adding sections and notes.

=====

Document templates:

- Remove margin from <p> in "informations" to allow them to be
	correctly centered vertically on their container.

- Also add a mt- and mb- on their <div> to better handle them going to a new
	line when there are too many of them.

- Add class for section and note to be able to customize them in layouts.

- Add class for price_total to be able to customize it in layouts instead
	of relying on :last-child.

- Add "page-break-inside: avoid;" on the "total" table to not split it
	between pages when it can be avoided.

- Fix sale report template "Informations" to use col-auto just like invoice
	See 6b8d7bb6d6

=====

Boxed layout:
	- fix section & note style
	- fix borders in general
	- fix the total table

Background layout:
	- fix section style
	- fix the total table

Clean layout:
	- fix page number vertical align

task-1889346

closes odoo/odoo#27782
2018-12-03 13:16:52 +00:00
Laurent Smet 869f99b704 [FIX] account: Copy invoice reference to the move
The reference is not copied to the invoice move because the invoice needs the move to get the
right number and then, we need the invoice number to compute the reference.

So, this commit is required to copy the reference to the move after the invoice validation.

/!\ DO NOT FORWARD-PORT!
This behavior has been already fixed in 12.1 but with too much refactoring for a stable branch.

closes odoo/odoo#29391
2018-12-10 10:59:34 +00:00
Nicolas Lempereur b1dbe432f9 [FIX] web_editor: ace have line number+resize
After 11.0, in a code editor (ace editor) on the frontend we could not
resize the editor or see line numbers.

This happen since:

- in 64d47c0bc5 ace editor (used when editing code) was updated.
- in ajaxorg/ace@5bf78e09 the line number bar was set aria-hidden
- in 9de1bc0ee aria-hidden element were forcibly hidden

Thus the column of line number (and used for resizeing) in the code
editor was unwillingly hidden.

Since we don't want to make change in library, we fix this in our
custom CSS for the code editor.

opw-1912824
closes #29399
2018-12-10 16:39:44 +00:00
Christophe Monniez d9b49c8870 [FIX] web: allow string attribute on non stored fields in pivot view
Support for string attribute on fields in pivot view was added in 24f7c7ce7f
In some cases, the field is not stored and read_group method is
overridden to allow its use in a pivot view. Such a field does not
appear in the measures dict trying to set the string attribute, leading
to a client crash.

With this commit, the string attribute is set after the non stored
fields were added to the dict.

closes odoo/odoo#29393
2018-12-10 15:03:47 +00:00
Goffin Simon 0b12ad1260 [FIX] website_sale: Missing fields in the product form
Fine tuning of this commit: 7b20604f2e

Co-authored-by @atp-odoo

opw:1911612

closes odoo/odoo#29373
2018-12-10 08:23:49 +00:00
Juhil Somaiya 689cc4935c [FIX] mrp: fixed product inventory uom issue
Before this commit, we are getting error that product_uom must be
matched because when we're adding line to inventory after updating the
quantity, product_uom changes to Units.

After this commit, error will not be generated as the default value of
product_uom_id is removed.

Fixes #29305

closes odoo/odoo#29371
2018-12-10 09:14:14 +00:00
Lucas Perais (lpe) 17547c1717 [FIX] lunch: write function is multi
OPW 1912897

closes odoo/odoo#29281
2018-12-10 08:13:44 +00:00
Goffin Simon 6035112043 [FIX] hr_holidays: Wrong computation of leave duration
When all days in a calendar don't have the same schedule, it's wrong
to compute the leave duration with the average working time hour per day.

opw:1909145

closes odoo/odoo#29313
2018-12-06 14:45:18 +00:00
Odoo Translation Bot ec4ee14c89 [I18N] Update translation terms from Transifex 2018-12-09 01:16:26 +01:00
William Henrotin 33a6649aa4 [FIX] purchase_requisition: incorrect field
Before the fix we were requiring for product.supplierinfo.requisition_id
which is a non existing field of the model 'product.supplierinfo'. I
just change it then to purchase_requisition_id which is the required
field.

This triggered an error when you add a product selled by the defined
vendor for an aggreement type defined as 'Blanket order'.

opw-1914712

closes odoo/odoo#29342
2018-12-07 16:38:28 +00:00
len-odoo aed0a828e4 [FIX] barcodes: allow special keys input on firefox
Install stock_barcode.
It adds a barcode to the product quantity of the inventory adjustment view.
On firefox special characters are ignored (CTRL, BACKSPACE, Fn...)

closes odoo/odoo#29245
2018-12-07 13:48:57 +00:00
Lucas Perais (lpe) d40956c790 [FIX] account: install a chart of account on another company
1. Create odoo instance with "--without-demo=ALL" option.
2. Install Accounting module.
3. Add Chart of Accounts manually (e.g. code 111111 Bank and Cash and 222222 Other Income)
4. Create Journal.
5. Create Journal Entries.
6. Activate multi-company.
7. Set new company to current user and set the new company as current company.
8. Install accounting localization: Accounting >> Configuration >> Settings >> Install More Packages >> (install any localization module)

Before this commit, there was an error because when installing any module,
the environment in which it happens is in uid = 1 and doesn't have a context anymore
Thus, when arriving in the charts of accounts code, the env's user is still 1
Which doesn't mean anything in V12, since it is the system user

After this commit, the user is retrieved from the request

OPW 1911677

closes odoo/odoo#29310
2018-12-06 16:21:09 +00:00
Géry Debongnie 6d3ada178f [FIX] web: prevent crash when searching for escaped strings
Recent works in the search view (in 12.0) on dynamic filters had an
unfortunate effect: when the user tries to input escaped strings (for
example "test" in custom filters, there was a crash.

The reason is that the JS python parser (or more specifically, the
tokenizer) was unable to parse that as a string.  It worked before
because the web client sent the raw string to the server.  However, with
dynamic filters, this is no longer the case, and we need to parse
domains to be able to combine them.

In this commit, we modify the tokenizer to be able to work with escaped
strings.

closes odoo/odoo#29324
2018-12-06 15:16:32 +00:00
Toufik Ben Jaa 84b976fb7c [FIX] payment: process payments older than 10 minutes
- The payment transaction processing cron retrieves all the transactions
  that need to be processed.

  In some cases, it can causes issues when trying to process payments
  that are being process by the payment polling page after returning
  from the payment acquirer.

  To avoid this concurrency issues, the cron will only process payments
  that have been validated for at least 10 minutes.

closes odoo/odoo#29317
2018-12-06 14:09:24 +00:00
Nicolas Lempereur 89d3e2219c [FIX] website_sale: accessories button no all width
The cell containing "Add to Cart" button that adds suggested accessories
in the cart has col-* classes. Thus it there is "flex-item" CSS
properties that make no sense since there is no container and the
sibling are not flex items.

So the button tried to take 100% of width and this commit just fix its
proposed width to 25%. Before change width was 16.7% width for large
screen, 25% for medium screen and 33.3% for small screen. I choosed 25%
since it seemed a good default (we don't need 33.3% since .btn is
whitespace:nowrap so the size will be higher than 25% if necessary).

opw-1914994
closes #29287
2018-12-05 15:21:48 +00:00
Tejas Shahu 2a4c44bb4f [FIX] web: prevent crash in line chart
Before this commit:
While user was opening first time line chart graph, at that time undefined
label values were not being converted into undefined string due to misplace
code. So it was giving traceback error

After this commit:
Code has been moved to proper place.

Joint work with msh-odoo

Issue-ID: 1882328

closes odoo/odoo#29306
2018-12-06 10:38:44 +00:00
Laurent Smet 458b49241a [IMP] account: Improve matching communication rules
Suppose a statement line having 'SO022' as name.
Suppose a move having 'INV/2018/0001' as name and 'INV/2018/0001 SO022' as ref.

The previous behavior didn't work because '20180001 022' = ANY({'022'}) was False.

This commit changes the matching by computing the array in both size and checking the intersection.
{'20180001', '022'} && {'022'} is True

closes odoo/odoo#29299
2018-12-06 08:21:22 +00:00
Jeremy Kersten 8a0e42e8f4 [FIW] website_event_track: fix location order
Without this commit, each refresh of the agenda, will randomly show the locs.

-- Fix done in prod for oxp

closes odoo/odoo#29300
2018-12-05 08:54:19 +00:00
Jeremy Kersten ba7454eb08 [FIX] website_event_track: track.date is not required
Dont compare bool to datetime if not filled

TypeError: '<' not supported between instances of 'bool' and 'datetime.datetime'
2018-12-05 08:54:19 +00:00
Goffin Simon f86b9ff3c4 [FIX] base: Upgrading a module with deleted models
Steps to reproduce the bug:

- Write a model in lunch.py called "my.model"
- Install module Lunch
- Erase "my.model" in lunch.py
- Upgrade the module Lunch

A error was raised when processing function "_process_end" because
the ir.model.data record of "my.model" was not deleted

opw:1908813

closes odoo/odoo#29247
2018-12-05 15:39:02 +00:00
Nicolas Martinelli df3922f396 [FIX] account_payment: partial payment
- Activate Invoice Online Payments
- Create an invoice for 2000, make a partial payment of 500.
- Send the portal link to the client
- Open the portal link => the amount due is 1500
- Pay the invoice

The amount to pay is 2000 instead of 1500.

opw-1909118

closes odoo/odoo#29284
2018-12-06 07:17:12 +00:00
Cedric Snauwaert 053bb45706 [FIX] account: manual reconciliation auto assign partner is wrong
when selecting a line with a partner, all propositions for other partner dissapeared and we have no way in the manual reconciliation to remove the partner that is set up, so we removed the fonctionality to set the partner automatically when selecting a line in case of a manual reconciliation.

closes odoo/odoo#29289
2018-12-05 15:37:03 +00:00
Cedric Snauwaert 546c38d12c [FIX] account: manual reconciliation fix new icon
In the manual reconciliation widget, after a reconciliation with a writeoff is done, there is still an empty line displayed with the "new" icon. This commit removes the "new" icon on empty line.
2018-12-05 15:35:36 +00:00
Cedric Snauwaert 7b636f3342 [FIX] account: manual reconciliation with writeoff and currency was wrong
When trying to reconcile the following line with the manual reconciliation widget
(company currency in EUR)

Debit Credit Amount_currency Date        Currency
13.11    0          0        10/26/2018  /
0       34.16      -39       11/09/2018  USD

And a write off with the following value:
Debit: 21.05

The write-off created was not with the correct debit and the entries were not totally reconciled.

The reason being that the method was converting the 21.05 with the USD rate of today and changed the debit.

We should never convert debit/credit as debit/credit in the manual reconciliation widget is always displayed in company currency. However if all entries are with the same currency, the writeoff should also have that currency set.
This commit fixes this behavior.
2018-12-05 15:34:00 +00:00
Nicolas Seinlet 59c2559e97 [IMP] account: improved join
Joining on a case is far to be optimal. doing 3 left joins and a coalesce is faster.
partner_id is a required field in res.partner.bank, but some migrated database have
records in res.partner.bank model without id. To keep existing behaviour, the third
join (the one on the name) is kept for backward compatibility.

closes odoo/odoo#29276
2018-12-05 12:41:32 +00:00
Christophe Simonis 937d870ffc [FIX] account: correct reconcialtion widget tests
The widget expect a list of accounts to be defined.
2018-12-05 16:19:16 +01:00
Christophe Simonis b4c3268e38 [FIX] website_sale: convert price to company currency using the right method
Oversight of previous forward-port.
2018-12-05 15:26:14 +01:00
Christophe Simonis caf1837216 [MERGE] forward port branch saas-11.3 up to d4c65a7ede 2018-12-05 12:27:57 +01:00
Humberto Arocha 03c40e3104 [FIX] account: date in log must a string not a date object
Closes #29248

closes odoo/odoo#29262
2018-12-05 08:47:31 +00:00
len-odoo 97aec9f836 [FIX] account: hide meaningless measures from the pivot view
The fields amount_total, amount_total_signed, residual, residual_signed,
all sum values that are unsigned or in different units, as they may be in
different currencies.
Therefore their display in the pivot view can be confusing, misleading,
and may lead people to file bug reports.

Since support for hiding measures has been added in commit 24f7c7ce7f,
we remove these fields from view.

opw 1909046

closes odoo/odoo#29211
2018-12-05 08:15:21 +00:00
Lucas Perais (lpe) 332d43ebd4 [FIX] survey: adapt prefill controller to new date field
Try to print a survey answer which has a date question

Before this commit there was a traceback because the value_date
which is a Date field was not JSON dumpable

After this commit, the survey answer prints well

OPW 1914984

closes odoo/odoo#29250
2018-12-04 15:48:52 +00:00
Goffin Simon edc1cbc063 [FIX] stock: To prevent settig a wrong uom
Steps to reproduce the bug:

- Configure to use UoM
- Make an inventory adjustment for all product
- Select one product one the inventory line, and select the UoM

Bug:

All the UoMs were selectable but only the uoms in the same category of
the product are allowed.

opw:1911941

closes odoo/odoo#29238
2018-12-04 10:33:31 +00:00
len-odoo 24f7c7ce7f [FIX] web: add support for string and invisible attributes in pivot view
The pivot view may sum fields that are not really summable:
    unsigned values (e.g. in the case of refunds)
    values in different UOM, currencies (any different units really)
Which causes confusion when these fields are displayed.

We add support for the string and invisible attributes in the pivot view,
so that a field can be given a more informative name or hidden altogether.

opw 1909046

closes odoo/odoo#29144
2018-12-03 15:03:58 +00:00
Nicolas Martinelli cba55c12e4 [FIX] account: 'Load More' on Manual Reconciliation
In case there is a large amount of data to display, the 'Manual
Reconciliation' widget suffers from high CPU consumption, and therefore
slowness.

This is mainly due to the line rendering (function `_renderLines`).
Indeed, unlike the 'Bank Statement Reconciliation' widget which
retrieves the data partially, the 'Manual Reconciliation' widget
retrieves and renders all the data. No offset is implemented in this
case, neither for data retrieval nor rendering.

With this commit, we implement a partial rendering of the data
retrieved. This means that all data are fetched when loading the widget,
but only a part of it is rendered. We make use of the existing 'Load
More' mechanism to display more data. By default, 30 accounts or
partners are loaded.

By combining this with PR #28958, we aim to make the widget more usable
for large data volumes.

opw-1903575

closes odoo/odoo#28959
2018-12-03 09:57:07 +00:00
Odoo Translation Bot e0b1718e4a [I18N] Update translation terms from Transifex 2018-12-02 03:16:02 +01:00
lieyanqzu 849b169248 [CLA] Signature for lieyanqzu
closes odoo/odoo#29198
2018-12-01 04:54:24 +00:00
Nans Lefebvre ddc5cc186f [FIX] web: call _applyX2ManyChange with the correct viewtype
Have a one2many display records in a kanban subview,
which opens a form view when edited.
Edit a field displayed only on the form view.
A call to _applyX2ManyChange is done without giving it the viewtype argument,
therefore the fieldinfo is taken from the wrong view, traceback ensues.

opw 1914163

closes odoo/odoo#29607
2018-12-18 14:28:55 +00:00