Commit Graph
117586 Commits
Author SHA1 Message Date
Nans Lefebvre ba41c3c1cc [FIX] base: disable prefetching during module uninstall #2
Create any module that inherit 'res.lang'.
Define any new field that is added with that inheritance.
Install that module. Then try to uninstall it. Traceback ensues.

When trying to write 'state': 'uninstalled' on the module,
the prefetching tries to read a column that has been deleted
by the _module_data_uninstall.

opw 1917369

closes odoo/odoo#30176
2019-01-17 15:08:31 +00:00
Lucas Perais (lpe) 187c32c2c7 [FIX] web: pivot correct context after reload
Open a pivot view with default filters automatically activating
Disable those filters

Change the groupBys on the rows and cols of the pivot

Save your result as a favorite filter

Before this commit, the filter did not contain the context information for columns groupby
Also, the search view did not exploit the context of the new filter as it should be

After this commit, the flow works as expected

OPW 1913732

closes odoo/odoo#29415
2019-01-17 12:37:25 +00:00
Jorge Pinna Puissant 91fb15510f [FIX] hr_timesheet: task view in mobile
Before this commit, there were not specific view for the mobile devices.
The analytic account views were used.

Now, there are specifics views for the timesheet in the tasks.

opw-1913371

closes odoo/odoo#30309
2019-01-17 12:26:20 +00:00
Christophe Matthieu 586dc9e025 [FIX] web: can reopen ModelField selector widget
Before this fix, in studio when the user select the field then focus out
then focus in and selected a child field, an exception is triggered because
the last page is visible but the data are removed.

backport of 12.0's 9eef25ae0a

opw-1928453
closes #30277
2019-01-16 16:18:59 +00:00
Nicolas Martinelli 4c93e4be0d [FIX] event_sale: ticket
- Create a SO with an ticket for an event, confirm
- On the attendees wizard, click on 'Apply'

The event ticket is remove from the registration.

This is because the event ticket wasn't saved when creating the
registration line.

Complement of commits 7492c97bf4 and 0717bb6c0d

opw-1920464

closes odoo/odoo#30262
2019-01-16 10:47:40 +00:00
Jorge Pinna Puissant 6c47c68eb7 [FIX] hr_org_chart: undefined manager name in breadcrumbs
Before this commit, in the organization chart, when a manager that have too many
subordinates, and we want to view all the subordinates clicking the '...' button. There was
an error in the breadcrumbs, the text 'Undefined' was shown in the place of the manager's
name.

Now, the breadcrumbs shows the name of the manager.

OPW-1923990

closes odoo/odoo#30231
2019-01-16 09:35:35 +00:00
Nicolas Martinelli b876cb397d [FIX] website: null type redirection
Commit 68e9d5504c makes the redirection type mandatory, which is
logical. Since we can't add such a constraint in stable, we make the
field required in the view and assign a default value (in case the
module is not upgraded, which is very likely to be the case).

opw-1924983

closes odoo/odoo#30252
2019-01-16 07:51:53 +00:00
Nicolas Martinelli ae6545ccd5 [FIX] account: numerous reconciliation models
- Create many reconciliation models (more than 100)
- Try to create a manual reconciliation entry

The reconciliation models buttons are displayed on top of all fields,
making it impossible to encode any data.

We limit the size of the `div` to 54 pixels, which corresponds to 3
lines of buttons. All buttons are still accessible thanks to a
scrollbar.

opw-1890781

closes odoo/odoo#30212
2019-01-15 12:15:24 +00:00
Lucas Perais (lpe) 8e87075724 [FIX] sale: inline form SO contains price_total
When removing the editable attribute on the list view
of th o2m towards order_line, when adding a line,
the price_total of the line was neither computed nor sent to the onchange
of the sale order

now it is

OPW 1914740

closes odoo/odoo#30234
2019-01-15 14:28:01 +00:00
Nans Lefebvre 1e966452ff [FIX] l10n_be_invoice_bba: fix mail template
The field reference_type has been renamed invoice_reference_type in v11.
The selection value 'bba' for that field has been renamed 'structured'.
We update the template to reflect these changes.

Discovered thanks to a forward port of that field up to v12.

closes odoo/odoo#30224
2019-01-15 12:50:44 +00:00
Christophe Simonis 4f2f299534 [MERGE] forward port branch saas-15 up to 3374ac805f 2019-01-15 15:08:01 +01:00
Christophe Simonis 3374ac805f [MERGE] forward port branch saas-14 up to 28785f21e4 2019-01-15 11:45:44 +01:00
Christophe Simonis 28785f21e4 [MERGE] forward port branch 10.0 up to 6edfadbdd2 2019-01-15 10:48:11 +01:00
larisa 6edfadbdd2 [FIX] hr_payroll_account: correct account move lines creation
The super call of action_payslip_done executes the method compute_sheet.
Without this compute_sheet call, there is no salary lines and no accounting
move is created.

closes odoo/odoo#29737
2019-01-14 15:16:44 +00:00
Manuel Vázquez Acosta 9c6d969775 [CLA] Add Larisa to Merchise Autrement. 2019-01-14 15:05:40 +00:00
Jeremy Kersten 6e3661d53f [FIX] payment_sips: allow to customize key_version
Some sips provider don't use 2 as key_version.
E.g. mercanet uses '1' as production key.

Now we allow to override it in Ir Config Parameter for stable version.

Todo:
Need to make it customizable by end user into the configuration of acquirer.

Courtesy of BEK for reporting

opw-1916316

closes odoo/odoo#30185
2019-01-14 12:27:09 +00:00
Aaron Bohy dec9f7c4ce [FIX] web: one2many list: quickly switch between pages
Before this rev., a crash might occur when the user quickly
switched twice between pages (e.g. go to page 2, then page 3) on a
slow network.

In the given example, when data of page 2 returned, the list was
re-rendered. Unfortunately, the offset of that list' datapoint was
already changed due to the switch to page 3, meaning that the view
tried to render a page that wasn't loaded yet, leading to a crash
if there were modifiers to evaluate, or to empty records being
displayed.

This rev. ensures that the view is rendered with the data of the
page it expects.

closes odoo/odoo#30150
2019-01-11 14:36:13 +00:00
Lucas Perais (lpe) c99e1facf9 [FIX] purchase: in a x2m fields in tree must be in form too
On the PO form view, change the order_lines inline view:
- the tree becomes not editable
- allowed modes are tree,form

Add a new order line, the form view of order_lines opens up
Modify some stuff, then save and new

Before this commit, it crashed because some fields were expected in the tree view
that were not defaulted in the form view by the JS framework.

After this commit, this flow doesn't crash because we make sure every field
in the tree view is present in the form view

OPW 1917111

closes odoo/odoo#30219
2019-01-15 10:26:55 +00:00
Andreas Perhab 9916c30da8 [FIX] web_planner: test should not assume url parameter order
test_web_planner throws errors like this on some environments:
AssertionError:
'/web#action=135&view_type=list' != '/web#view_type=list&action=135'

the urls in web_planner are created with a dict for the parameters to
create the urls. dicts are unorderd up to python 3.5. (see
 https://www.python.org/dev/peps/pep-0468/)

As the urls /web#action=135&view_type=list and
/web#view_type=list&action=135 are equivalent we now test if the
parameters are the equal in the url regardless of their order.

closes odoo/odoo#30138
2019-01-11 14:05:04 +00:00
Christophe Simonis 9878db14f5 [MERGE] forward port branch saas-14 up to a449b063b0 2019-01-10 16:59:00 +01:00
Christophe Simonis a449b063b0 [MERGE] forward port branch 10.0 up to 5f12e244f6 2019-01-10 16:58:38 +01:00
Laurent Smet ec25b9d01b [FIX] account: Prevent crash when having custom coa
- Create manually an account.payment after having created manually some journals
(without installing a coa).
- Install a module containing a coa and calling try_loading_for_current_company or depending
of other module doing such things.

=> Crash because company.chart_template_id is not set.

-opw: 1921711

closes odoo/odoo#30117
2019-01-10 13:53:14 +00:00
Nans Lefebvre a7cbac305e [FIX] web: reset offset in the search more view dialog
Start on the modal obtained by a "search more". The offset is never reset.
So suppose you are on page 2, looking at record 81-160.
Do a research that gives less than 80 records.
The result of the search is nothing, since is has been done with a 80 offset.
It should be reset to 0 when we do a new search.

opw 1920826

closes odoo/odoo#30109
2019-01-11 15:07:40 +00:00
Nans Lefebvre f8e953fdd6 [FIX] base: set related crud_model_name on the correct field
Create an automated action that creates a new record (of target crud_model_id).
Try using a link_field_id: nothing appears to be selectable, even if some fields
satisfy the intended conditions.
The issue is that the crud_model_name field was related to crud_model_id.name,
instead of the correct crud_model_id.model (note the apt naming).
Note that in the onchange the value of crud_model_name was correctly set to
crud_model_id.model, adding to the confusion.

opw 1910671

closes odoo/odoo#30145
2019-01-11 08:56:02 +00:00
Christophe Simonis 5f12e244f6 [IMP] base: compute implied groups in SQL
SQL improve the speed of the implied group
VS the orm version.

closes odoo/odoo#30108
2019-01-10 13:48:40 +00:00
Christophe Simonis 96e800703b [MERGE] forward port branch saas-14 up to 390d8594b0 2019-01-10 13:22:07 +01:00
Christophe Simonis 390d8594b0 [MERGE] forward port branch 10.0 up to b131658966 2019-01-10 11:33:40 +01:00
Jorge Pinna Puissant b131658966 [FIX] account: error in Base amount tax
opw-1917605

Before this commit, when accounting is set to global rounding, the base
amount per tax is not correctly calculated.

Now, the Base amount per tax is calculated adding the rounded lines.

To test this issue, you need to set to global rounding and create a
customer invoice with the following lines :
line 1 = Qty:40; unit price:2.27; tax:15%; discount: 10%
line 2 = Qty:21; unit price:2.77; tax:15%; discount: 10%
line 3 = Qty:21; unit price:2.77; tax:15%; discount: 10%

When the invoce is printed, you would notice that the amount is 186.43
and it should be 186.42.

closes odoo/odoo#30021
2019-01-08 13:13:36 +00:00
qsm-odoo 42230ed22e [FIX] website_sale: make eCommerce animations work in all browsers
The eCommerce sometimes animates product images when they are put in
the cart / wishlist / comparison panel. Those animations did not work
on Firefox and IE and made strange scrollbars appear instead.
2019-01-08 14:02:01 +01:00
Christophe Simonis e1c7fefe89 [MERGE] forward port branch saas-14 up to cdb0c08cb9 2019-01-07 17:30:57 +01:00
Christophe Simonis cdb0c08cb9 [MERGE] forward port branch 10.0 up to d4024a713c 2019-01-07 17:30:11 +01:00
Francisco Fernández d4024a713c [CLA] PlanetaTIC signs Odoo CCLA 2019-01-07 15:34:10 +01:00
Lucas Perais (lpe) 0e0c726805 [FIX] purchase: don't change status when writing a note through the composer
Have a RFQ in draft. Log a note or send a new message, but use the full composer to do it.

Before this commit, the RFQ was set to sent

After this commit, it stays rightfully in draft
It is mark as sent, only if the button SEND RFQ is used

OPW 1908094

closes odoo/odoo#29902
2019-01-04 13:18:14 +00:00
Jorge Pinna Puissant 9cf6662880 [FIX] account: compute_fiscalyear_dates non leap years
Before this commit, when the fiscal year was setting to 29/02.
The function that compute the fiscal year dates gives an error.
This occurs when the date passed as parameter wasn't a leap year.

Now, for the non leap years we use the 28/02.

opw-1917035

closes odoo/odoo#29932
2019-01-04 10:23:44 +00:00
Alexey Pelykh 1ffc485689 [FIX] hr_holidays: extra space in state check
The condition was never validated

closes odoo/odoo#29898
2019-01-04 10:18:30 +00:00
Alexey Pelykh 11e5688d0f [CLA] Brainbean Apps OU signs Odoo CCLA 2019-01-04 10:18:24 +00:00
Raphael Collet a07a076c45 [FIX] models: avoid prefetch hell when reading fields
The method `read()` may be very slow when reading relational fields and
computed fields, because the computed fields can be computed on a recordset
that is larger than expected.

The issue occurs on model 'res.partner' when reading fields 'child_ids' and
'purchase_order_count', for instance.  Suppose we read those two fields on a
partner with 1000 contacts.  First, the one2many field is read from the
database and stored to the cache; the latter adds the value ids to the
prefetching of 'res.partner'.  Then, the fields are fetched from the cache.
When 'purchase_order_count' is accessed on the partner, the field is computed
on all its children as well...

closes odoo/odoo#29867
2019-01-03 12:45:48 +00:00
Denis Vermylen e1767490e9 [FIX] purchase: loading time on partners with many children
When loading a partner form view, the ORM prefetches the computed fields
purchase_order_count and supplier_invoice_count for all the related
partners as well (parent, children, ..).

Instead of reading the orders and invoices once per partner, we group
them all together.

opw 1919933

closes odoo/odoo#29788
2019-01-02 16:08:55 +00:00
Raphael Collet 1b434ed8c3 [FIX] models: make prefetching more specific in read()
Commit a07a076c45 restricts the prefetching to
`self` when accessing the fields to return.  This is too restrictive, as it
cancels prefetching of secondary records in computed fields.  In this commit we
limit the scope of the restriction to `self`'s model only; this fixes the
original issue without impacting other models.

closes odoo/odoo#30133
2019-01-11 11:01:22 +00:00
Aurélien Warnon e2bdb65321 [FIX] website_slides: hide slide download button if not available
Task #1923443

Purpose
=======

The slides on the website showed the 'download' button regardless of the value of the 'download_security' field.
If the value is 'none', meaning that the slides are never downloadable, the button should be hidden.

closes #29904

closes odoo/odoo#30051
2019-01-10 14:52:15 +00:00
Christophe Simonis 6e933e42ef [MERGE] forward port branch saas-14 up to a80bde859c 2019-01-02 11:44:07 +01:00
Christophe Simonis a80bde859c [FIX] base: correct res.partner name_search
Oversight of previous forward-port when adapting cc217569b7
2019-01-02 11:12:37 +01:00
Christophe Simonis 015f2582ad [MERGE] forward port branch saas-14 up to 1d672b33a7 2019-01-02 10:50:46 +01:00
Christophe Simonis 1d672b33a7 [MERGE] forward port branch 10.0 up to 9ef7802520 2019-01-02 10:49:56 +01:00
Nans Lefebvre 874425c69e [FIX] stock_account: fix default field value in wizard
Default time was set to default=fields.Datetime.now() instead of
default=lambda self: fields.Datetime.now(),
resulting in a discrepancy when printing the report.

opw 1917523
2018-12-28 15:19:15 +01: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