Commit Graph
141473 Commits
Author SHA1 Message Date
Xavier Dubuc b0ae9777f0 [FIX] mail: handle traceback on need_moderation=false filter in discuss
Changed ValueError to UserError and return to raise so the user get a popup to
explain that this filter value is not supported instead of a traceback

task-2352688

closes odoo/odoo#61213

X-original-commit: f9ab590cd961026865808f4008bd45fc2afb6bed
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-11-02 17:44:06 +00:00
Benjamin Vray 2c21649d35 [FIX] web_editor: avoid traceback on form inputs double-clicks
Before this commit, double clicking on the border or on the padding of
a form input generated a traceback.

task-2312878

closes odoo/odoo#61201

X-original-commit: 904af21214a5a6924ec80b5690a523819aaec5f1
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-11-02 16:37:49 +00:00
qsm-odoo 265d8ce9d2 [FIX] website_form: fix form values reset on Firefox
Reseting the field should just be done through the form element's reset
method to let the browser do it properly, otherwise the browser may
validate the applied values (and for example mark the required field
as wrong (making them red)).

task-2312878

closes odoo/odoo#61200

X-original-commit: 7676fc069d8b6458d0fc1f8eafe087ce553743f0
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-11-02 16:37:27 +00:00
Laurent Smet 6b404c615d [FIX] l10n_de_skr04: Fix typo in account.account.template.csv
closes odoo/odoo#61198

X-original-commit: 1a8913aa6830618fd973e753d16f2392d0c30d85
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2020-11-02 16:23:42 +00:00
Laurent Smet dea2833029 [FIX] l10n_hu: Fix typo in account.account.template.csv
X-original-commit: f40b2483e170abca20349a21613b762b0b88b660
2020-11-02 16:23:41 +00:00
Benjamin Frantzen (bfr) d31e260646 [FIX] account_edi: prevent a failed edi import to be imported again
When creating an invoice from an attachment fails, we call super() which creates a new invoice and post the attachment to it without the `no_new_invoice` context key. This triggers an new import of the attachment.

closes odoo/odoo#61191

X-original-commit: 034625f2ade73f368f97e583b83db86372ae8001
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: bfr-o <bfr-o@users.noreply.github.com>
2020-11-02 15:50:56 +00:00
oco-odoo 84c14fde05 [IMP] account: better handling of journal codes when duplicating
Before that, even though the code contained something about it, the duplication of account.journal objects handled their code field pretty poorly (as it was trimmed to 5 characters), leading to situations where journals could have the same code, leading to possibility for account moves to have the same name.

This commit improves the SQL constraint testing journal codes so that they  must now be unique per company. We also recompute the code in a more advanced way so that journal duplications works as smoothly as possible.

Task 2346404

closes odoo/odoo#59791

Related: odoo/enterprise#14447
Related: odoo/upgrade#1880
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2020-11-02 15:46:15 +00:00
Andrea Grazioso (agr-odoo) b9d4976a97 [FIX] pos_epson_printer: disable cashdrawer when parent option is unchecked
Open POS Config
Enable the option 'Connect Devices'
In 'Epson Receipt Printer IP Address' write anything then focus out
Enable the 'Cashdrawer' Option
Empty 'Epson Receipt Printer IP Address'
Disable'Connect Devices'
Save

Blanking 'Epson Receipt Printer IP Address' leaving 'Cashdrawer' on
will lead to crash during the payment session if the user click on
'Open Cashbox' when using cash as a payment method.

'Cashdrawer' should be disabled automatically when needed.

opw-2367498

closes odoo/odoo#61086

X-original-commit: 6491f9b20570c374e464194cbce698b00c173847
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
2020-10-30 17:30:56 +00:00
IEL 33b35286cb [FIX] hr_holidays: hide Duration for half day leaves
STEPS:
* install hr_leaves
* allocate half days leaves
* start creating new time off, set [x] Half day checkbox

BEFORE: there is label "Duration", but no any fields for it

AFTER: hide Duration label

WHY:

* this bug came after improvements in https://github.com/odoo/odoo/commit/d2238de57630d58c4913ab44746476b83492c72f

---

opw-2370907

closes odoo/odoo#61181

X-original-commit: 47213962c8884125e8f68c7bd39e499a585d1345
Signed-off-by: Ivan Yelizariev // IEL <yelizariev@users.noreply.github.com>
2020-11-02 14:57:24 +00:00
Xavier Dubuc 3dd9c3b7f9 [FIX] mail: handle transient messages with (un)seen notions
task-2343887

closes odoo/odoo#61180

X-original-commit: 03481fd3df9bc53a17ba884ad4029ae46d7e54bf
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-11-02 14:56:57 +00:00
wan be2f050993 [FIX] account: view statement correct action
The dashboard "View Statement" action on bank journals was using the
`open_action` helper, but it was badly computed for journals with
`bank_statements_source` set to `online_sync`. We were directed to the
statement lines instead of the statements; and there was no other way to
go to the list of statements.

closes odoo/odoo#61190

X-original-commit: 78286851034b8f3ef4dcab78e50b7220c0bdd213
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
Signed-off-by: wan <william-andre@users.noreply.github.com>
2020-11-02 15:50:34 +00:00
Benjamin Vray 6a2dd450a7 [FIX] website: fix off canvas hamburger max height
Before this commit, the max height of the off canvas hamburger was the
same as the standard navbar-collapse (80vh) but in the case of an off
canvas hamburger menu we need a 100vh max-height to display it
properly.

task-2312878

closes odoo/odoo#61189

X-original-commit: 007580b2cd7329733f1e9b70ea95265080b7ccd8
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-11-02 15:49:50 +00:00
Martin Trigaux b5ab4a3aca [FIX] sale: revert cfc9abe14689d
Revert "[FIX] sale: correct _get_to_invoice_qty depends"
This reverts commit cfc9abe14689db82acf1872fa8d358662fc7e123.

While the field is indeed in the list of records, it's a big change of
behaviour.
Retroactively changing the invoicable lines of sale.order that are
closed is dangerous and can lead on unexpected behaviours.
Performances can also be bad when changing the product configuration
on a database with a lot of sale orders.

Changing the product configuration should only apply to future orders,
not past.

closes odoo/odoo#61168

X-original-commit: be13bc94c2ff51b99a4399be44a765d0b28202eb
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-11-02 14:04:48 +00:00
Goffin Simon c11179b0b4 [FIX] purchase: Smart button in contact view form
Steps to reproduce the bug:

- Let's consider a company contact C with two children CH1 and CH2
- Create a purchase order for CH1 and a subscription for CH2
- Archive CH1 and CH2

Bug:

The count of purchase orders in C was displaying 0 instead of 2

Same issue for the vendor bills

opw:2360155

closes odoo/odoo#61167

X-original-commit: b3e31f2680534382b048324cfcb8a6f6c457553f
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2020-11-02 14:04:26 +00:00
Goffin Simon 16d9ca17fc [FIX] crm: Opportunity Smart Button Incorrect Value
Steps to reproduce the bug:

- Let's consider a company contact C with two children CH1 and CH2
- Create an opportunity for CH1 and a subscription for CH2

Bug:

The count of opportunities in C was displaying 0 instead of 2

opw:237344

X-original-commit: d11fb611fed3a8541d03b7d3e49973ae7c16a768
2020-11-02 14:04:25 +00:00
Goffin Simonandnim-odoo 8ffac3464c [FIX] crm: Smart button for meetings not working
Steps to reproduce the bug:

- Let's consider a company contact C with two children CH1 and CH2
- Create a meeting for CH1 and a meeting for CH2

Bug:

The count of meetings in C was displaying 0 instead of 2

PS: set() is used to avoid to count several times the same event for a partner.

If for example CH1 and CH2 attend to the same event, only one event must be counted for the
parent C

opw:2360155

X-original-commit: 7449c8a6643477742616bf236f2f2c90aec68581
Co-authored-by: nim-odoo <nim@odoo.com>
2020-11-02 14:04:25 +00:00
Daniel DuqueandRaphael Collet 55bd019a62 [FIX] core: missing default values with inherits
Consider some model A that "_inherits" from model B, which itself
"_inherits" from model C.  Also consider a field F on model C, which is
inherited by both models B and A.  Now create a record from model A,
with a given record for model C, no record for model B, and a default
value for field F.  This should create a record in A, connected to a new
record in B, connected to the given record in C, and the default value
should be ignored, as a record from C is given.

Before this commit, the given record in C is modified with the default
value for F.  The default value is considered because no record is given
for B, and that value is used to modify the given record in C.  The fix
consists in discarding default values by considering potential ancestor
records when parent records are not given.

closes odoo/odoo#61165

X-original-commit: b83dfaa2c9bcc6bc7f8df19ed0e442554816709b
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
Co-authored-by: Raphael Collet <rco@odoo.com>
2020-11-02 13:53:36 +00:00
Daniel Duque 51ed48b1b6 [CLA] FactorLibre
X-original-commit: bec158627024f3ff6e7352cc8d4e91be9d807540
2020-11-02 13:53:36 +00:00
Nasreddin (bon) b85680a348 [FIX] portal_rating, rating: Wrong star rating number
Issue

	- Install 'eLearning' module
	- Go to 'Course' page on website
	- Open any course and click on 'Review' tab

	Rating star numbers are 2,4,6,8 & 10.

Cause

	Since this commit https://github.com/odoo/odoo/commit/e4a4ffb974ccde1842e1b2389450718f8576ad5b,
	odoo use a system of 5 stars instead of 10.

opw-2373115

closes odoo/odoo#61158

X-original-commit: e2e1ecd0de467cb97748092554c5abc3b0c9f993
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Signed-off-by: bon-odoo <nboulif@users.noreply.github.com>
2020-11-02 13:12:52 +00:00
IEL f7c5fb244f [REF] hr_holidays: remove readonly in labels
WHY: it's a copy-paste mistake and doesn't have any meaning, while makes code
less readable

closes odoo/odoo#61091

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-10-30 18:05:14 +00:00
Nasreddin (bon) 9b90b933ed [FIX] mail: mail not sent because partner not find in chatter
Issue

	Partner not found if multiple breakline in message.

Cause

	'\n' not replaced by '\n ' globaly.
        '<br/>' not replaced by '<br/> ' globaly.

Fix of this commit : https://github.com/odoo/odoo/commit/902302598e98efab52d61979e85def6d025ff2ab

opw-2322577

closes odoo/odoo#61145

X-original-commit: 64a1a7b78782cb255a47d2e7d55d605c8175b6ce
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: bon-odoo <nboulif@users.noreply.github.com>
2020-11-02 12:19:30 +00:00
nans 2c7f9f7553 [FIX] product: remove unused confusing variable
This variable has been unused since commit f3d6a54e36.

opw 2368733

closes odoo/odoo#61143

X-original-commit: 563253a8303723e3eb4217005bf518fdf6b3f9e3
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-11-02 11:54:10 +00:00
nans 922dbe7de0 [IMP] product: extract pricelist item price computation into its model
The pricelist item model (product.pricelist.item) has a compute_price field,
and the necessary fields to be able to compute the price of a product.
However, these fields are never used into the model itself;
the parent model (product.pricelist) actually makes the computation,
embedded into _compute_price_rule.
Because of this, it's not possible to inherit pricelist items.
It's also a better design, on object principles.
Last, it lighten a method that is still 130+ lines long.

opw 2368733

X-original-commit: 9cd0bf740706a64e49599111304a6fb5ec6d7287
2020-11-02 11:54:10 +00:00
Nicolas Galler 4f3af25a15 [FIX] stock: consistently use translated value for product description
Behavior prior to this commit:

In a multi-lingual setup, when entering a SO for a customer set in
a non-default language with a product that has translation in both
languages and is set up to replenish on order, the description in the
generated RFQ is duplicated, for example: "Product test Test Product in Dutch"

The problem stems from the fact that the description on the generated
stock move is set to the translated name of the product.  When
generating the PO, the stock move class removes the product name to
avoid duplicating the description, but it uses the non-translated name
in the comparison.

Behavior after this commit:

The description on the RFQ line is included only once (using the default
language for the database)

opw-2368562

closes odoo/odoo#61138

X-original-commit: d013f8641ae2ed8c12d30ba5650c8e6ff2f1d5fd
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-11-02 11:28:37 +00:00
Benjamin Vray 855cba11f6 [FIX] website_forum: fix link and media option in wysiwyg editor
Before this commit, link and media buttons of the wysiwyg editor
toolbar in the forum were never displayed. It's because we were not
using the right option names in the toolbar object.

Thanks to @kirtangajjar for initial bug fix.

Closes https://github.com/odoo/odoo/pull/53589
task-2369420

closes odoo/odoo#61098

X-original-commit: 88a693fa5b8852596e623e08f5eb846b9988b5d7
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-10-30 19:03:01 +00:00
Pierre Collinet (pic) c5b448552f [FIX] sale: forward port error
fix conflicts due to the new PR for the forward port created by the fw-bot

closes odoo/odoo#56121

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-09-10 12:54:08 +00:00
Pierre Collinet (pic) 365934bada [FIX] sale: Apply several fix on sales tour
1. Lead to loose the tour: Remove the step of the tour that asks
to set an address (the address is auto-completed at free trial
based on domain name).

2. Bug: At step 3, it redirects to the
invoice settings to select a localization, when you click on
"install more packages", you are sent back to the sales app.
--> this bug is related to res_config_settings.js from base addon.
I tried to fix this bug by adding a data-attribute "discard" in the
res_config_settings_views and checking this additional condition in
the js.

3. Bug: Tour blocks at last step "send by email" on quotation.
After clicking on "sent" on the pop-up, there should be rainbow
effect to mark the end of the tour.

4. Bug: Sale order line: fix the blue color on Invoiced Quantity
only, instead of the full line

5. Put the "sample product" in active= false (it's necessary for
the sample invoice but should not be visible to the user, they
should create their own)

6. Merge the 2 dates fields related to expected delivery on sale.order
--> since other modules extends this module, I made the field
expected_date invisible and put the same value in both fields. This
value is the max of the order_lines.expected_date

Taskid: 2277314
X-original-commit: b9ffda35ecf31f3af52bf04f23c6794429548d23
2020-09-10 09:44:37 +00:00
Benjamin Vray 641e967652 [FIX] website_forum: preserve user filters in URL
Before this commit, the parameter for user filters was not kept in the
url when navigating with the pager.

Closes https://github.com/odoo/odoo/issues/56248

closes odoo/odoo#61093

X-original-commit: c6a8be30c2b43d6462e365da6f3ec5aad32d1c08
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-10-30 18:24:07 +00:00
Tiago Santos 31bc9756a4 [CLA] Update Arxilead CLA
closes odoo/odoo#61080

X-original-commit: c691f971325c21aca47eb597a0fda248a621dc7e
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-10-30 16:41:28 +00:00
qsm-odoo 4436039f32 [FIX] base: fix positional branding when inherited t-field sibling
The xpath branding of a node which followed a t-field node which was
added by an inheritance view was not correct. E.g.

View 1:
```
<hello>
    <world id="1"></world>
    <world t-field="a"/>
    <world id="2"></world>
    <world id="3"></world>
</hello>
```

View 2 inheriting view 1:
```
<xpath expr="/hello/world[3]" position="after">
    <world t-field="b"/>
</xpath>
```

So the result is:
```
<hello>
    <world id="1"></world>
    <world t-field="a"/>
    <world id="2"></world>
    <world t-field="b"/>
    <world id="3"></world>
</hello>
```

Now the xpath branding of world id="2" was /hello[1]/world[3], which
is correct.

But the xpath branding of world id="3" was /hello[1]/world[5] which is
incorrect as it should be /hello[1]/world[4] (as related to the
original view). This was because inherited t-field did not carry any
information they came from inheritance (as "normal" nodes would).

The side effect of this was that the incorrectly marked node was not
possible to edit (and made the editor crash on save).

closes odoo/odoo#60976

X-original-commit: 07cf2b9520fc6c79a9a7ca39929bda0bfbe85e3a
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-11-02 10:34:54 +00:00
Antoine Guenet f88fd665a2 [IMP] web_editor: update Jabberwock library to commit 29b46ef
Changelog:
[ADD] DomHelpers: set class helper
[FIX] Readme: fix build instructions for Odoo
[FIX] EventNormalizer: Don't force a line break with [any key] + [ENTER]

closes odoo/odoo#60796

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2020-10-27 13:06:13 +00:00
Antoine Guenet 069d61cf5a [REF] web_editor, website: use editor helper setClass
This helper is the equivalent of jquery's `toggleClass` with a value for
the `force` attribute. I chose to name it `setClass` instead because
with that attribute it's technically not toggling: it's setting.
2020-10-27 11:25:46 +00:00
IEL 89e9ebdccf [FIX] pos_cash_rounding: fixup float_is_zero usage
WHY:

* float_is_zero doesn't work without second argument
  https://github.com/odoo/odoo/blob/c90427dfba26854cda5d54f813cccc4948685077/addons/web/static/src/js/core/utils.js#L59-L62
* the fixed line of code was introduced in #60642

closes odoo/odoo#61097

X-original-commit: 792ebaf8494a42f91e4251acf2f74f89ff9f5e6e
Signed-off-by: Ivan Yelizariev // IEL <yelizariev@users.noreply.github.com>
2020-10-30 18:57:19 +00:00
Goffin Simonandsmetl 0e4642db8f [FIX] account: Auto-complete with analytic account
Steps to reproduce the bug:

- Create a vendor bill VB1 with one line L1
- Set an analytic account AA on L1
- Post VB1
- Create a new vendor bill VB2
- Set VB1 on the field Auto-complete

Bug:

The created line L2 on VB2 had no analytic account

PS: In 12.0, the analytic account was kept when using Auto-complete field

opw:2359432

closes odoo/odoo#60962

X-original-commit: 5f46c50442dbe42bc534718719a6b19ee087eab0
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Co-authored-by: smetl <las@odoo.com>
2020-10-29 10:54:47 +00:00
Jeremy Kersten 6e6ea2d428 [FIX] website_mail_channel: _send_confirmation_email with company email
Public user by default don't have email. So when you try to subscribe to a
channel in public user (portal don't receive an email), the email cannot be
send and the user see a message:
  "Unable to post message, please configure the sender's email address.

closes odoo/odoo#60867

X-original-commit: 7e40af524cc1b23abab3140377d993f3e93c5cf0
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-10-27 18:47:14 +00:00
Nicolas Galler a14a8e47fe [FIX] website_form: prevent double clicking send
Behavior prior to the commit:

A user can double click the "Send" button when submitting a form on the
website.  Because the event handler is removed on the first click, the
second submission uses the browser default behavior and posts the form
to an incorrect URL, resulting in a 404 error for the user.

Behavior after the commit:

The button is disabled after the first click.

Note:

Using `.attr('disabled')` is sufficient both to disable the button and
to give the disabled visual on all browsers since IE9, but we keep
`.addClass('disabled')` and `.off()` for cases where the clickable is not a
`button` but a link.

opw-2356402

closes odoo/odoo#61111

X-original-commit: 0eed92da709dba843a7f2f82aee772313e3d4630
Signed-off-by: Nicolas Galler <nicocrm@users.noreply.github.com>
2020-10-31 21:47:16 +00:00
Rémy Voet (ryv) c7192d98ae [FIX] base: fix populate.randint tool
The randint generator generated always `None`
because the `return` was forget in method of `populate.compute`.
- Add a test for the randint tool, and fix the issue.
- Change the documentation of `_populate_factories` to be more
explicit about the custom generator.

closes odoo/odoo#61076

X-original-commit: 09d2ddecaf4fc6474c96acf1f4a12de4789caef8
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2020-10-30 16:38:57 +00:00
Sébastien Theys 1bdb557520 [FIX] mail: fix height overflow of mentions
Due to mentions being positioned inside thread view and messaging list (when in
chat window) and those two elements having `overflow: auto`, it is necessary to
give mentions an appropriate max height to prevent overflow.

This makes it necessary to add a scrollbar to the mention list, which makes
scrolling into view of active item necessary when navigating with the keyboard.

Also removed activating item on mouse over to prevent activation of wrong items
when navigating with keyboard if the cursor is unfortunately over another item.

task-2275828

closes odoo/odoo#61084

X-original-commit: 85384dd0bb8de5e98e585cb8610d58b11e601520
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-10-30 17:27:46 +00:00
Sébastien Theys b45b4acab6 [FIX] mail: fix width overflow of mentions
task-2275828

X-original-commit: be56641d88fe25bb048a174a327a8b2890e7ae0f
2020-10-30 17:27:45 +00:00
Achraf (abz) 69e3f42bbc [FIX] hr_holidays: Refuse approved time off
Issue

    - Install "Time Off"
    - Create new time off and approve it

    We can no longer refuse it

Cause

    The refuse button is invisible if the status is not equal to 'validate', in this case it is equal to 'validate1'

Solution

    Change the attrs to display the refuse button when the status is 'validate1'

opw-2361929

closes odoo/odoo#61079

X-original-commit: 80926f582d88aae359a6b35ea521026a3804ce00
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Signed-off-by: Achraf <abz-odoo@users.noreply.github.com>
2020-10-30 16:40:25 +00:00
Nasreddin (bon) 0edf1ce246 [FIX] web: add rtl management for resizable jquery-ui widget
Issue

	- Install "Project" modules
	- Set user language as "Hebrew"
	- Go to Project and open any project
	- Go to 'gantt' view
	- Try to resize a task

	Everything is reversed.

Cause

	Jquery-ui 'resizable' widget do not manage RTL feature.

Solution

	Update the the `position.left` props according to the language
	direction (LTR or RTL).

opw-2367692

closes odoo/odoo#61082

X-original-commit: 1f318d7c7aa66287c8756a89b49293b4e8c2217e
Related: odoo/enterprise#14507
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: bon-odoo <nboulif@users.noreply.github.com>
2020-10-30 16:47:13 +00:00
Romeo Fragomeli 930a1fedc5 [FIX] test_main_flows: fix main flow on Mobile (on changing month)
On mobile, when tours are run on changing month, the "Register Payment"
step often fails with the following error:
AssertionError: The test code "odoo.startTour('main_flow_tour')" failed
Tour main_flow_tour failed at step Register Payment (trigger:
.o_statusbar_buttons button:enabled:contains('Register Payment'))

Please note before going further:
* The main flow is a tour. The tour manager waits for the trigger and
  the extra trigger to be reachable before executing the step.
* On mobile the status bar buttons are wrapped in a dropdown.
  So the stepUtils.statusbarButtonsSteps is composed by two actions:
  1 - Open the dropdown if present.
  2 - Click on the button.

Before this commit, the extra trigger doesn't look like the best one:
when this tour is executed during month change, the account
module has to perform some heavier (and longer) processes.
When the "Validate" call button is made (previous step), a lot of RPC
are made and, usually, the previous extra trigger works fine.
But for some reasons, the _renderStatusbarButtons is called
between the two steps in the statusbarButtonsSteps.

So this is the flow:
- Running the tour until...
- Click "Validate" button (this generates a bunch of RPC).
- Open the dropdown.
- Some RPC respond, which refresh the "state" and call _renderStatusbarButtons
  (dropdown is not open anymore).
- Try to click on "Register Payment" => BUG
  (button is present but not visible, so unreachable).

After this commit, the extra trigger is changed to force waiting for
the RPC that change the "state" and call _renderStatusbarButtons
before executing the "Register Payment" step.

closes odoo/odoo#61085

X-original-commit: dacc1703c486c8affb44df679ab5e8e2ba724867
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Signed-off-by: rfr-odoo <rfr-odoo@users.noreply.github.com>
2020-10-30 17:28:09 +00:00
Xavier Dubuc e0d849ba7c [FIX] mail: make only composer as fixed in chatter
task-2282325

closes odoo/odoo#61077

X-original-commit: 9d90fd9a2a65ab1ff338bb109426ca93075937fa
Related: odoo/enterprise#14506
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-10-30 16:39:24 +00:00
Sébastien Theys 06ca3e8d0d [FIX] mail: remove chat window auto-focus on click
This causes more trouble than it's worth, especially with mobile keyboards.
It also prevents from selecting any text in chat window threads.

task-2372553
Part of task-2277543

closes odoo/odoo#61078

X-original-commit: 4ec26d985f33e1fa391c312b89fc611b8d688c96
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-10-30 16:40:03 +00:00
Sébastien Geelen (sge) 71b3fc7c17 [IMP] web_editor: update Jabberwock library to commit 43a10003
Changelog:
[FIX] List: Keep lonely containers in LI if they have attribute(s)
[ADD] Core: handle triple-click delete special case
[FIX] formattingSpace: properly ignore empty text and hidden inputs.
[FIX] should use the dev mode with mobile and multi devices in same time
[FIX] DomEditable: remove flickering in browsers without auto-completion
[FIX] DomLayout,KeyMap: remove flickering on delete, backspace, enter...
[REF] Core: merge .eslintignore inside .eslintrc.js
[REF] Core: remove odoo webpack build

closes odoo/odoo#61074

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2020-10-30 15:57:44 +00:00
Sébastien Geelen (sge) 1457b75aea [FIX] web_editor: Fix description toggle in pricelist snippet 2020-10-30 15:55:27 +00:00
Nicolas Martinelli 5a262f7b79 [FIX] sale_stock: prevent incorrect computation of kits
- Activate UoM
- Create 3 products: AB, A & B
- Create a kit BoM for AB
  - 1 units of A
  - 1 kg of B
- Sell 1 unit of AB, confirm

The error "The unit of measure Units defined on the order line
doesn't belong to the same category...".

This happens because `_compute_quantity` is called on `stock.moves`
related to different products.

As a first step, we simply keep only the moves of the same product,
meaning that the `qty_available_today` and `free_qty_today` are not
supported for kits.

opw-2372676

closes odoo/odoo#61071

X-original-commit: 15368c6d1316d43b1591b88e4d5786d86403f8a1
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-10-30 15:54:51 +00:00
Laurent Smet 095fb9d6c4 [FIX] account: Check the exchange diff journal only when needed
When the exchange difference journal entry shouldn't be created, don't check its configuration in order to avoid an UserError in single-currency company.

closes odoo/odoo#61047

X-original-commit: 3ab451f3c4ce8dd42337f43628c1335d2caee011
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2020-10-30 13:20:27 +00:00
Christophe Monniez abf3a8afd2 [FIX] l10n_ch: use an absolute path for ch flag
When printing an invoice with an iban qrcode using l10n_ch module, a
little ch flag appears in the center of the qr code.

When odoo is started from elsewhere than the root of the odoo code, the
flag does not appear. The cause is that a relative path is used to find
the flag image.

With this commit, an absolute path is computed to find the flag.

closes odoo/odoo#61048

X-original-commit: d33785032b1ca2c6e1d4ade7e174d024fae9a151
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2020-10-30 13:20:49 +00:00
Achraf (abz) 716ea67582 [FIX] account: Reconcile payment from the manual reconciliation
Issue

    - Install "Accounting"
    - Go to "Configuration/Reconciliation Models"
    - Create new reconciliation model "Test" with "620000 Bank Fees" account
    - Go to "Customers/Payments" and try to reconcile a payment via "Manual Operations"
        by clicking on "Test" button
Cause

    This instruction "st_line.company_currency_id.is_zero(residual_balance)"
    needs at least one element in st_line

Solution

    Skip this instruction if "st_line" is empty

opw-2370034

closes odoo/odoo#61045

X-original-commit: 161a6c494a412097468fca214817c42f022d29e2
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Signed-off-by: Achraf <abz-odoo@users.noreply.github.com>
2020-10-30 12:33:27 +00:00