Commit Graph
117599 Commits
Author SHA1 Message Date
mreficent c45a4e8f83 [FIX] account: remove duplicated code
https://github.com/odoo/odoo/commit/42e74aae51904955e725e4a96e39eb2bd60f3019 was a backport of https://github.com/odoo/odoo/commit/7544c22de9a4cea028ff8fe63931bf68573e0821, and thus generated a duplicated code.

closes odoo/odoo#30318
2019-01-17 13:45:20 +00:00
Christophe Simonis 19558129f0 [MERGE] forward port branch saas-15 up to c0471dd857 2019-01-17 19:07:34 +01:00
Christophe Simonis c0471dd857 [MERGE] forward port branch saas-14 up to 17adccd95c 2019-01-17 18:07:26 +01:00
Christophe Simonis 17adccd95c [MERGE] forward port branch 10.0 up to 50bae1c0c5 2019-01-17 17:08:39 +01:00
Julien (juc) Castiaux 71c4c13996 [FIX] web_editor: save less file
Modifying less files and saving them using the web editor can raise
and error. The error is due to the way odoo save the modified file.

It extends the view containing the URL of the file by filtering views
related to the xml bundle id and keeping those that have the said URL
in their content.

This lookup fails to give just one result in case there are multiple
file containing the said URL. This fix change the filter from a
bare `if url in view.arch` to a correct xpath lookup.

The "/web/static/src/variables.less" less file was one of the
problematic files.

opw-1889794

closes odoo/odoo#30186
2019-01-17 15:19:54 +00:00
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
wan 50bae1c0c5 [FIX] account: journal dashboard graph wrong value
OPW 1918926

Current behavior:
  The sql query groups by date,id in a intermediary table instead of the result. This allows to get data in the wrong order if the statements were not produced sequentially. The fill values are computed in the wrong order and may override correct values.

Desired behavior:
  There is no override of the values correctly computed.

closes odoo/odoo#29936
2019-01-17 12:37:36 +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
Lucas Perais (lpe) ba39efdfc6 [FIX] base: merge contacts linked to by an o2m field with caps
Define a field on a model as:
- o2m to res.partner
- the field's column, hence its name, has capital letters in it
(studio does that)

create two objects of that class, each one linked to a different partner with the new o2m

merge the partners

Before this commit, the object linked to the second partner, was deleted
This was because merge partner sql requests did not quote the column name

After this commit, the second object still exists

This commit is tested in v12.0 with PR #30300 only. In v10.0 it is not testable as
the model concerned is in CRM, and that no new fields in business modules can be added in stable

OPW 1925060

closes odoo/odoo#30301
2019-01-17 09:59:23 +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
Julien (juc) Castiaux 357b374a7e [FIX] mail: URL with semi-colon
When posting a URL containing a semicolon, odoo stops the link
before the semicolon instead of continuing the link to the end
although it is a valid characters in URL (see RFC-3986)

e.g. the url "example.com&foo;bar" matches "example.com&foo"
     instead of the whole link

opw-1918367

closes odoo/odoo#30198
2019-01-15 09:02:12 +00:00
Nicolas Martinelli 180ace7b1b [FIX] product: unwanted attribute values in name
- Create the following attributes with values:
  Size: S, M, L, XL
  Color: Black, White
- Create a product template with the following attribute values:
  Size: S, M, L, XL
  Color: Black

The `name_get` of `product.product` returns `Name (SIZE, Black)` while
it should only return `Name (SIZE)`.

When using `attribute_id.value_ids`, the list of values contains all
possible values of the attribute, not only the values which apply to the
given product. In this case, it contains 'Black' and 'White', therefore
the condition `> 1` is verified and the attribute is kept for display.

We go back to the original filtering, and add `attribute_line_ids` in
the list fields read in order to avoid prefetching.

opw-1922140
opw-1922447

closes odoo/odoo#30273
2019-01-16 14:48:33 +00:00
Joren Van Onder 302d8a5264 [FIX] point_of_sale: allow refunds on non-cash journals
Cherry pick of 5b769650d6 in version 11.0

A customer can pay an order with a non-cash journal (e.g. a credit
card through a stand-alone terminal).

When this order has to be refunded later it should be possible to do
so on that same journal.

Some code prevented this from happening, notably a check in
order_is_valid which explicitly prevented this for an unknown
reason. There is no explanation in the
commit (4647f896a4) introducing that.

This commit allows the following:

1. input what you want to refund with a negative qty
2. click 'Payment'
3. click the Credit Card (type Bank) journal
4. (amount is auto-populated)
5. click 'Validate'

opw-805302
opw-1913731

closes odoo/odoo#30218
2019-01-16 14:19:13 +00:00
Nicolas Martinelli 614babd1e7 [FIX] account: bank statement with many AML
- Create a bank statement with more than 80 lines (therefore more than
  80 AML)
- Reconcile the lines
- Go back to the bank statement, and try to add a new line

An error arise:
"You cannot do this modification on a posted journal entry, you can just
change some non legal fields"

The error arise on the `move_line_ids` field on which the web client
tries to write.

Actually, this field is hidden since it is only used in the domain of a
stat button. We can make it read-only.

opw-1921138

closes odoo/odoo#30266
2019-01-16 11:09:21 +00:00
Iryna Vyshnevska 92e4c4c347 [CLA] signature for ivyshnevska
Backport to 10.0 of 3b14a7daa6

closes odoo/odoo#30090
2019-01-16 10:03:03 +00:00
Manuel Vázquez Acosta 6ac32c655e [FIX] survey: don't disclose the survey via print
To avoid bigger changes, only verify if the login is required.
A proper refactoring has been implemented in master at 9771fdfe8f

Closes odoo/odoo#30166
2019-01-16 12:51:43 +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