Commit Graph
127710 Commits
Author SHA1 Message Date
Victor Feyens 29ce2cab28 [DOC] Base : ir.actions.server : fix wrong docstrings.
Wrong since 8fa9f7d6d4 refactoring 
ir.actions.server.
2019-09-18 08:54:18 +00:00
Victor Feyens 96e208c191 [DOC] Ir Actions Server documentation
Since commit 8fa9f7d6d4 refactoring the
actions server, the documentation was outdated.

This commit removes and fixes the documentation on ir.actions.server.
Also adds the display of the docstring of the IrActionsServer class from
odoo.addons.base.models.ir_actions.

Solves #31044
2019-09-18 08:54:07 +00:00
Victor Feyens 240e2d51ea [REM] unused odoo/doc/reference/test-report.txt 2019-09-18 08:53:57 +00:00
Victor Feyens b94b08e579 [DOC] ir.actions.act_window.view 2019-09-18 08:53:48 +00:00
Victor Feyens dc350c503a [DOC] sphinx warning removal 2019-09-18 08:53:38 +00:00
Victor Feyens da01e44bb7 [DOC] fix module.rst 2019-09-18 08:53:27 +00:00
Victor Feyens 004f9e09da [DOC] https links for sites supporting https 2019-09-18 08:52:50 +00:00
Victor Feyens 87003e214e [DOC] batch of UI, Https, linter corrections 2019-09-18 08:52:34 +00:00
Victor Feyens 0ddeb22095 [DOC] actions : add ir.cron documentation 2019-09-18 08:48:28 +00:00
Christophe Simonis 5c89830885 [FIX] digest: do not reset config parameters on update
The `forcecreate=0` is required because the ICP will be deleted when set
to `False` (which is quite frequent for a boolean).

closes odoo/odoo#37103

X-original-commit: 255a12931d2a22dfadb1455a5dfc0a5e2f37b730
Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-09-18 18:41:01 +00:00
Nicolas Lempereur af163d5a9e [FIX] website: boxed title style for splitting
When a title with boxed style (border arround title) is split (by doing
normal ENTER (and not shift ENTER which work as expected)) the title
being in inline-block for styling purpose, this give odd results (of
several title boxes on the same line).

With this commit style is changed so split title are on different lines.

opw-2070611
closes #37084

Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-09-18 13:17:18 +00:00
Jigar Vaghela 1ad8c88eb3 [IMP] l10n_in: use a tax group insted of repartition line for SGST and CGST
need seperate lines with different labels(SGST and CGST) on the invoice report and pos receipt
so use a tax group instead of repartition line

closes odoo/odoo#37080

Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2019-09-18 12:46:16 +00:00
Alexandre Kühn 9a66619db3 [FIX] mail: no wait init_messaging before loading webclient
Before this commit, discuss widgets had to wait for the route
`mail/init_messaging`. This behaviour slowed down the loading of the
web client.

This commit solves the issue by rendering discuss widgets even when
`mail/init_messaging` hasn't been resolved. For instance, the
messaging menu displays a spinner until messaging becomes ready.

Task-Id 2072835

closes odoo/odoo#37031

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2019-09-18 10:07:20 +00:00
Lucas Perais (lpe) 3dd2e7c2ef [FIX] website_event_questions: filter hiding cancelled registration
Before this commit, there was no way in the event question report
to filter out cancelled registration

After this commit, we introduce a filter for it

OPW 2072973

closes odoo/odoo#37032

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-09-18 07:10:48 +00:00
Julien Mougenot 31ec900bb0 [FIX] web: list selectors synchronisation
Changed the way the header selector behave when the selection changes.

Before this commit, the header selector was only checked when clicked and
was unchecked as soon as any other record was unchecked.

Now, the header selector reflects the current visible selection:
if all of the other visible selectors are checked, it will be checked.

Folded records are not considered visible, thus only records from active groups
and from the current pager will be taken into account.

closes odoo/odoo#36522

Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
2019-09-18 08:24:32 +00:00
Julien Mougenot ca4e158a8e [FIX] web: handling of invalid formats in list views
Added handling of invalid format types in multiple edition in list views.

Before this commit, in multiple edition, a field that was edited with an invalid value format
(e.g. a numeric field receiving a string value) didn't trigger a field_changed and no prompt
was shown; the record was simply idle with an dirty value.

Now, the list controller also listents for set_dirty events and automatically triggers
an error modal + discards all changes when receiving one.
2019-09-18 08:24:32 +00:00
Vincent Schippefilt 28e52c605d [FIX] snailmail: support write with multiple records 2019-09-18 08:24:32 +00:00
Julien Mougenot d261d42d9b [FIX] web: list: m2o doesn't trigger fieldChange when empty
Gives time to the user to enter an actual value in m2o in list views.

Before this commit, emptying a many2one field (selecting all > BACKSPACE or DELETE)
triggered instantly a field_change. This was an issue in multi edition as a field
changed triggered instantly a save on selected records without giving time to the
user to enter a new value.

Now, many2ones only trigger a fieldChange when selecting a new valid value.
2019-09-18 08:24:28 +00:00
Aaron Bohy bb85f963b5 [FIX] web: list: multi edit boolean with ENTER
This rev. solves the similar issue as 801c603218, but with boolean
fields.

Scenario: select several records, select a boolean cell, press
enter to change the boolean value.

Task 2068280
2019-09-18 08:24:13 +00:00
Aaron Bohy 3b4cc84c1c [FIX] web: list: multi edition: disable onchanges
Onchanges make no sense in multi edition as they would be computed
on the 'reference' record (the one use to edit), but applied on all
selected records. This rev. simply disables them in that case.

Task 2068280
2019-09-18 08:24:13 +00:00
Julien Mougenot a7782cadbe [FIX] web: lists: focus last edited cell
Gave back focus to the last edited cell to increase usability with key nav.

Before this commit, after saving several records with multi edition in a list,
focus was lost (given to the body).

Now, last edited cell is given back the focus after multi editing.
2019-09-18 08:24:13 +00:00
Aaron Bohy af65475a4c [FIX] web: list: multi edit input of date(time) fields
The Date(Time)Fields listen to 'input' and 'change' events (like
all InputFields) to keep track of changes. However, the datepicker
already listens to the 'change' event. As a consequence, in multi
edition in a list view, if the user changed the value of a
date(time) field by directly editing the input, the fieldChanged
event was triggered twice, and there were 2 dialogs asking the user
if he wanted to save the change.

This rev. makes the Date(Time)Fields stop listening themselves to
'input' and 'change' events, and instead completely rely on the
datepicker widget.

Task 2068280
2019-09-18 08:24:13 +00:00
Aaron Bohy ac85176ce8 [FIX] web: date(time) fields: trigger fieldChanged once
Before this rev., the 'fieldChanged' event was triggered each time
the user selected a value (a day, an hour, a minute or a second) in
the datepicker. This means that if there was an onchange on the
field, a lot of RPCs could have been done when a user set a
datetime. In addition, in a list view with multi edition, the user
was asked to save the changes at each step of the datetime
selection, making the feature unusable.

Task 2068280
2019-09-18 08:24:13 +00:00
Aaron Bohy 90fe1bbe33 [FIX] web: list: disable record selectors when editing
Having those inputs enabled can lead to weird situations where a
record has been modified but can't be saved anymore (because the
user clicked on one of those record selectors to focusout the edited
row). Also we don't want the user to start multi-editing a field,
then change the selection, and then validate the changes.

Task 2068280
2019-09-18 08:24:13 +00:00
Julien Mougenot 9371721fcb [FIX] web: list: multi edition only between selected records
Before this commit, if a record was selected and another one was edited,
it was considered as multi edition.

Now, the multi edition only works if the edited record is included in the
selection; else it will be the only edited record (single edition).

Task 2068280
2019-09-18 08:24:13 +00:00
Aaron Bohy 3c68347c15 [FIX] web: list: multi edit: do not create new row
...when validating last row by pressing ENTER.

In single edition, we automatically add a new row when the user
edits the last one and presses ENTER. This is something we don't
want in multi edition.

Task 2068280
2019-09-18 08:24:13 +00:00
Julien Mougenot 01d7077bdd [FIX] web: readonly many2one in list views
Fixes the way many2one fields are rendered in editable list views.

Before this commit, many2ones in readonly mode would render as links
and their widget would be considered as active even though you couldn't
edit it.

Now, they are rendered as plain text and act the same way as readonly char fields.
2019-09-18 08:24:02 +00:00
Julien Mougenot 8c6de8c452 [FIX] web: list: clicking discard doesn't trigger an onFieldChange
Fixes the way records are discarded in list views

Before this commit, clicking the "Discard changes" button in a list view
after editing a record triggered both the "field changed" and the "discard changes"
methods (resulting in 2 modals opening).

Now, all fieldChanges are prevented when trying to click "Discard changes",
and are re-applied if the click was unsuccessful (lifted left mouse button somewhere else).

Task 2068280
2019-09-18 06:11:03 +00:00
Aaron Bohy fc52cae034 [FIX] web: list: multi edition: force write same value
Let's assume an editable list view with a many2one field and 2
records: the first one has value 1, the second value 2. The user
selects all records and wants to set their many2one to value 1. It
edits the first one, sets 1 and validates the confirm dialog.

Before this rev., it didn't save anything because the 'reference'
record (the one used to edit), didn't actually changed, as we reset
the same value.

This rev. forces the write the new value on all selected records in
that case.

Task 2068280
2019-09-18 06:11:03 +00:00
Julien Mougenot c3ac181665 [FIX] web: no selected records after multi edition
Backport of 4b7ba864d0

After editing multiple record, we want don't want any
record selected. This commit ensures that.
2019-09-18 06:11:03 +00:00
Julien Mougenot e00121d500 [FIX] web: multi edition in editable listviews error handling
Backport of 10eaf74230

Fixed crashes/incorrect behaviours in multi edition in the list views.
The solution to these problems was mainly to refactor the function
used to save multiple records.

Before this commit:
- Cancelling the confirmation dialog in multi edition caused
the edited record to be editable but disabled
- Saving an empty field in multi edition triggered a JS error
- Static confirmation message ("saving 0 valid records")

After this commit:
- Ability to cancel confirmation
- Proper error display when trying to save empty fields
- Message consistent with the situation
2019-09-18 06:11:03 +00:00
Julien Mougenot 69dfa4ad87 [FIX] web: fixed crash in editable grouped lists
Backport of 1f2c64013

Adding a line in grouped listviews caused a crash in some cases.

Steps to reproduce:
- go in any grouped editable list view
- click on any "Add a line" cell, but not on the link itself
- press ENTER

Before this commit:
A crash occured. Unable to add a new line. Needed to refresh the page.

After this commit:
Line addition functionnality properly working even when selecting the outer cell
2019-09-18 06:11:03 +00:00
Julien Mougenot d201802abe [FIX] web: prevent unwanted click on enter keypress
Backport of 801c603218

Pressing ENTER on a button element triggers an additionnal 'click' event.
Since this 'unwanted' click caused some issues in a few cases, we prevent it.
Moreover, there isn't currently any known case in which this event is useful.

Before this commit:
No modification of the initial behaviour on ENTER key

After this commit:
ENTER key pressed in abstract fields has its default behaviour suppressed
2019-09-18 06:11:03 +00:00
Lucas Perais (lpe) 3c867d7c95 [FIX] website_sale: cart recovery email should display the right lines
Before this commit, the cart recovery email displayed all lines of the order

After this commit, the email only shows relevant lines, that is
excluding deliveries for example

OPW 2072814

closes odoo/odoo#37025

X-original-commit: 234c3f56f4c03281f068981cd5af6bc8f5956334
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-09-17 13:48:53 +00:00
Lucas Perais (lpe) 99e4b042e4 [FIX] payment, payment_stripe_sca: multiwebsite base_url
Have a multiwebsite setup
have stripe installed for one of the two websites

Make an order on that website and try to pay with stripe

Before this commit, the transaction doesn't come back to odoo's
payment success controller
This was because the return url was set to the web base url ICP

After this commit, the payment success page is opened as we took
the request's url as the return url

OPW 2070428

closes odoo/odoo#37024

X-original-commit: 937b5c076e7175bec664ed0cf4b77505e342f1e2
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-09-17 13:48:34 +00:00
Alex Tuyls 0d7ef88299 [FIX] event: allow ics file with public user
If you register online on a free event, there is an
access rights error when trying to download the ICS file
if you are connectd with public user.

`if not event` part is pointless, if event cannot be resolved,
@http.route would return a 404 anyway.
`if not event.registration_ids` does not make sense from a
functional point of view: there is no problem in generating
an .ics file for a public event that has no registrations (yet)
and the button we use to generate the .ics file is displayed
after the registration anyway.

opw-2066847

closes odoo/odoo#37012

X-origin-commit: f4ca5897df9295b684bcbfcafd98fbde2f8bf673
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-09-17 13:33:08 +00:00
Goffin Simon d3d21d2a64 [FIX] auth_signup: Not possible to send message in a task from the portal
Steps to reproduce:
- Let's consider the portal user Pu, the project Pr and the task Ta
- Add Pu as a follower of Pr
- Log as Pu and open Ta
- Try to post a message

Bug:

An access error was raised due to the rule "res_partner: portal/public: read
access on my commercial partner".

opw:2070320

closes odoo/odoo#36960

Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2019-09-17 13:07:20 +00:00
Hardik Prajapati 80132ad9a6 [FIX] account: 'Auto-Validate' entries are not linked to it's reconcile model
'Journal Entries' stat button on 'Configuration/Accounting/Reconciliation Models'
do not consider entries which are automatically validated.

closes odoo/odoo#36169

Task: 2056926
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2019-08-28 09:06:14 +00:00
Xavier-Do d8ce75466e [FIX] base: fix rte translator timeout
In some cases, after installing a new language in rte_translator tour,
some query using ir_translation table will become very slow.

Identified query:
SELECT res_groups_users_rel.uid, res_groups_users_rel.gid
FROM res_groups_users_rel, "res_groups" LEFT JOIN "ir_translation" as "res_groups__name"
ON ("res_groups"."id" = "res_groups__name"."res_id"
AND "res_groups__name"."type" = 'model'
AND "res_groups__name"."name" = 'res.groups,name'
AND "res_groups__name"."lang" = 'en_US'
AND "res_groups__name"."value" ! '')
WHERE 1=1 AND res_groups_users_rel.uid IN (2) AND res_groups_users_rel.gid = res_groups.id
ORDER BY COALESE("res_groups__name"."value", "res_groups"."name")    OFFSET 0´

During post_install this query will become slower (between 0.7 and 2 seconds) ~50%
of the time, when this usually take less than 0.1 second.

For some tour step, this query is executed several times, making a simple
/web loading going from less than one second to more than 10 second, breaking the tour.

The main intuition behind that would be that the query plan completely fails,
mainly because postgress is to busy and doesn't have time to launch an analyse
when runbot load is high.

This commit proposes to execute a manual ANALYZE on ir_translation table
after a new language is installed. Tested with 40 builds, rte_translator never failed
with this fix.

cherry-pick of fc5934dc45

closes odoo/odoo#37013

X-original-commit: 57f91453cb567d8a7a29137b321a630fe0dbb9a6
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2019-09-17 12:40:41 +00:00
Nans Lefebvre 66e1049d85 [FIX] sale: get correct journal to create corresponding invoice
Be in company C1. Create the invoice I for a SO in company C2.
The invoice is created on the default account.journal for C1.
This happens when e.g. C2 is a child company of C1.
Then I is accessible from C1, but not from C2
as reading the journal violates the multi-company record rules.

Note that if company_id == False, then
self.env['account.invoice'].with_context(company_id=company_id)
    .default_get(['journal_id'])['journal_id']
returns False, and in that case, it would raise below.
To keep with the existing behaviour, we put a fallback on
self.env.user.company_id.id
which means that the values we pass are:
'company_id': False, 'journal_id': J for some J in company C
which is flaky, but won't trigger any extra errors.

opw 2068291

closes odoo/odoo#37002

X-original-commit: 427280d9760a71e6ca2961bcf4a2f9f157e6dddd
Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-09-17 11:36:57 +00:00
Alexandre Kühn d82db0a6bd [FIX] im_livechat: show message history
Revision on https://github.com/odoo/odoo/commit/923fb7aa05f0e9e0e67440073993ec36bb0f5f53

Commit above fixed an issue since v11.0 that display duplicated
messages on a website livechat window.

Forward-ported broke the livechat in v12.0 due to refactoring of mail
https://github.com/odoo/odoo/commit/cd34f6de727d5b3858420cff3c9d3c5995c4e75c

This commit correctly adapts fix for v12.0+.

opw-2070911

closes odoo/odoo#36947

X-original-commit: 86e9545bc338ac13d7b5d2b54d2a2af7a0e81fc8
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2019-09-16 12:39:16 +00:00
Goffin Simon 9d25ad574f [FIX] stock: route_id required when creating stock.rule
Steps to reproduce the bug:
- Let's consider that warehouse A resupplies from warehouse B
- A has Outgoing Shipments in one step
- B has Outgoing Shipments in two steps
- Change Outgoing Shipments of B in one step

Bug: An integrity error was raised because route_id field is required
on model 'stock.rule'

PS Inspired from function create_resupply_routes

opw:2069163

closes odoo/odoo#36991

X-original-commit: 2a87b56efab1246fa85c1b507322e0909db3dd20
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2019-09-17 09:53:52 +00:00
Nicolas Martinelli 2c7ab92ae4 [FIX] account: existing_accounting function takes forever for large db
Some operations call the WizardMultiChartsAccounts.existing_accounting
(file chart_template.py), such as going to the settings of the Accounting app.

This function tests whether any lines are present in several tables related
to accouting.

Before this commit:

a search is performed throughout the tables and takes forever for a large db.
Partner reports: "with current code, a customer with 12M account move lines
gets an out of memory error after the screen has sat for 10 minutes - this is
because the code is doing a read on every row in the account move line just to
see if the user company has a record".

After this commit:

with limit=1, the search stops after only one line is found in any table.

closes odoo/odoo#36975

Opw: 2066938
X-original-commit: 80563819ae93c00d171935f1d1cded33de15ba21
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-09-16 17:17:44 +00:00
oco-odooandNicolas Lempereur fa9beab3ea [FIX] account: dashboard: Center the empty dashboard message horizontally when the setup bar is displayed on a small screen
Before that, when using a small screen (with width <= 768 px) and
showing the accounting dashboard of a company without any chart of
accounts installed, the icon and message prompting to install a chart of
accounts was displayed in the lower left corner, instead of being
horizontally centered.

closes odoo/odoo#36974

X-original-commit: 4999f47d7e283c6a5799e68f2b0e1351638e17a3
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Co-authored-by: Nicolas Lempereur <nle-odoo@users.noreply.github.com>
2019-09-16 16:07:09 +00:00
Laurent Smet f1ae4bd207 [FIX] account: Only sum posted entries to compute amount_due for partners
-Create a random journal entry affecting the partner A, using a receivable/payable account.
-Let the journal entry in draft.
=> The amount set on the line must not be sum in the partner's amount_due.

closes odoo/odoo#36973

X-original-commit: 3ab4589ff444da9889ac922ac9d7ba6c8e8638bc
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-09-16 16:05:49 +00:00
Andrea Grazioso (agr-odoo) 8cae5b36cf [FIX] sale_mrp: test for split delivery issue
Following 40487aca5c there was an issue
where a delivery could be splitted because of mrp specific code.

This test checks that when creating a sale order including a level 3
bom (MTO) the delivery is one, containing the correct products

closes odoo/odoo#36961

X-original-commit: c07ecea7923c1609c4461fadbc61040e9fd3d86a
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-09-16 13:43:42 +00:00
Nicolas Lempereur 80b1c12f09 [FIX] account: invoice pivot do not display unsigned
On the pivot view, there is the following unsigned measure fields:
"account_tax" and "account_untaxed".

It can cause mistakes since for example the sum of a invoice an its
full credit note should be zero, but here it will be double the amount.

So here we complete 97aec9f8 for two fields that were still available.

opw-2071027
closes #36940

closes odoo/odoo#36971

X-original-commit: 2dc8e2feec9e5b604e0c0acae52562822a113342
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-09-16 14:59:08 +00:00
Lucas Perais (lpe) fa283d3d4e [FIX] web: progress bar feature
The progress bar was pretty broken before this commit.

> It was not possible to input the value as text
> Moving the progress bar to modify value and saving crashed
> modifying the max value crashed
> The whole feature was ill-defined

With this commit, we fix the crashed. It is now possible to write the field
behind the progress bar by moving it in RO mode
or by typing the input in RW mode
*if it is the value we want to write on*

It it is the max value that the field targets, we can do it in RO and RW mode,
only with the input as text

Note that this works *only if* the editable option on the widget is set to true

OPW 2061846

closes odoo/odoo#36928

closes odoo/odoo#36970

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-09-16 15:28:25 +00:00
RomainLibert 416f179442 [FIX] web: pass the context when executing an action
In case you have a button of type action, the controller is doing an rpc
on the model using the right method, but in this rpc, the context is not
passed.

This creates a translation problem (nothing is translated) since the
language is not defined in the context.

Task Id 2062419
Closes #36189

closes odoo/odoo#36969

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-09-16 15:03:35 +00:00
Nicolas Martinelli 3198705e30 [FIX] payment_stripe_sca: do not redefine _get_stripe_api_url
There is no need to redefine `_get_stripe_api_url` by adding `https`
since all existing calls to the method programmatically add it already.

Therefore, we use the same approach: we add `https://`, then join the
URL.

opw-2031745

closes odoo/odoo#36957

X-original-commit: 0412786486462423c91afc1c5a4dcb25886827e4
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-09-16 13:31:25 +00:00