Commit Graph
140385 Commits
Author SHA1 Message Date
Romain Estievenart f00fcbfca6 [FIX] web: datepicker inside a dropdown
Steps to reproduce:

1. Go to Project
2. Filter > Add custom filter > Last Updated on
3. Click on the date field and use the date picker to change the value
4. The dropdown is closed and you lost your selection => BUG

This bug was due to a conflict between owl and bs dropdown (e4f87710),
to prevent this bug, we added a check to ensure there are no open
bootstrap calendar inside the current dom.

Note that if you click outside the dropdown, the datepicker is already
closed when you go through this code. It means that the datepicker will
not be present in the DOM anymore and the dropdown can be closed too.

opw-2373573

closes odoo/odoo#61262

X-original-commit: 73dfc1f7a8e2197fcdd4053ec57c260576593a15
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Signed-off-by: res-odoo <res-odoo@users.noreply.github.com>
2020-11-03 12:50:41 +00:00
Thibault FrancoisandAlex Tuyls 0356e543c2 [FIX] odoo_referral(_portal): remove referral
Remove referral feature.
remove odoo_referral and odoo_portal feature

closes odoo/odoo#60927

X-original-commit: dda0bb499b0964b3a1750431255ecfef6cc9eb46
Related: odoo/upgrade#1889
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: Thibault Francois <tfr-odoo@users.noreply.github.com>
Co-authored-by: Alex Tuyls <alt@odoo.com>
2020-11-03 10:20:42 +00:00
Rémy Voet (ryv) 725232bb1a [FIX] purchase: fix bug in purchase list overview
In the overview of purchase, click on "To Send" will raise a traceback.
Fix the clean of 2d2783d7ee .

task-2372196

closes odoo/odoo#60916

Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2020-10-29 10:06:56 +00:00
Pierre Masereel 30139007f9 [FIX] point_of_sale: validate pickings when kits are sold
When you are selling a kit in point of sale, the genrated picking is not
validated.

It is not validated, because the moves are not confirmed, before we set
a quantity done, and so the moves are not exploded and it result to the
impossibility of  calling action_done on the picking.

To avoid this problem, we are confirming the moves created, and then set
the quantity done on the moves generated from the
confirmation.

closes odoo/odoo#61260

X-original-commit: 4f2f347c8b21b78efaa702d1b3c91b7f88dd88e0
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2020-11-03 12:35:41 +00:00
Julian Roussieau 093e86cde6 [FIX] stock_dropshipping: singleton in dropshipping rules
When you want to obtain `dropship_picking_type`, it is possible to have
several results. This will lead to an error when doing
`dropship_picking_type.id`.

```
dropship_picking_type = self.env['stock.picking.type'].search([
    ('company_id', '=', company.id),
    ('default_location_src_id.usage', '=', 'supplier'),
    ('default_location_dest_id.usage', '=', 'customer'),
])
```
The fix ensures that `dropship_picking_type` contains only one element.

closes odoo/odoo#61256

X-original-commit: 3e3b1b335ced1ff20129172e6a7b2b0dcbe1a20d
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
2020-11-03 12:09:30 +00:00
Josse Colpaert ffcc8b9e77 [FIX] l10n_it_edi: ondelete param on one2many does not make sense anyways
closes odoo/odoo#61211

X-original-commit: cea51cfc4b00eff472bf0ba3d61704fb8537e9c6
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2020-11-02 17:29:03 +00:00
Martin Trigaux 51527987c0 [FIX] base: verify the rights on individual records too
The access rights of a model was checked but not the records themself.
In case a user has access to a model but not to a specific record, he
should not be able to execute a server action on it.

Correct the ir.rule on private partners to be also verified for other
operations than read.
While it was not possible to actually write on it (due to side effects
of ORM where write implies a read operation),
check_access_rule('write') was working on a private address

closes odoo/odoo#61253

X-original-commit: b0028c05d6ba9c67f16992ddb446eea6a854d099
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-11-03 11:48:41 +00:00
Martin Trigaux 73830169d5 [FIX] base_automation: access action fields using sudo
The user executing an action triggering an base automation may not
have access to the base.automation record itself (regular employee or
portal)

Added test test_on_create_restricted failed before this patch as the
portal does not have the rights to read the base.automation record

Fixes odoo/odoo#59680

X-original-commit: 33a7142f298eeda7808d6d07e80231836442a0ce
2020-11-03 11:48:40 +00:00
IEL 3c7694b409 [FIX] *: fix image parsing error on saving res config
WHAT: apply 93a7695f65baf00d1f82481d6a2a97e6c11940a8 for all res.config.settings
menus

WHY: the same reason as in 93a7695f65baf00d1f82481d6a2a97e6c11940a8:

	When saving, a read is called. By default, read has
	bin_size to true to avoid performances issues.
	It will return the image size instead of the content

it may lead to image dissapearing or "Incorrect padding" error

HOW:

    find . -iname "*.xml"|xargs grep "\"context\".*'module'" -l | xargs sed -i "s/\(\"context\".*'module'.*\)\}/\1, 'bin_size': False}/"
    git checkout  -- addons/base_setup/views/res_config_settings_views.xml

---

PR for General Settings: https://github.com/odoo/odoo/pull/47297

opw-2346644

closes odoo/odoo#61215

X-original-commit: 7c55efa88b72bd1f3f0f32f7f738e2fda5aa4abd
Related: odoo/enterprise#14547
Signed-off-by: Ivan Yelizariev // IEL <yelizariev@users.noreply.github.com>
2020-11-02 18:25:20 +00:00
Nicolas Martinelli 39ab53a4d6 [FIX] sale: down payment translation
- Set a customer language to a different language, e.g. French
- Create a SO, add a product and validate
- Create a down payment

The down payment invoice is partially translated in French.

This was first solved in fc659d3f78 but broken in
0e73eca1364c8e0df93cd.

opw-2365982

closes odoo/odoo#61207

X-original-commit: f10b98d1776659f291b2f7f8a4a2111e4f106667
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-11-02 17:10:14 +00:00
Arnold Moyaux a021d627f1 [FIX] stock: perf run scheduler multi company
Usecase to reproduce:
- 10 company having 10 000 moves in state 'confirmed', 'partially_available'
- Run scheduler manually (without cron)

It will takes a huge amount of time.
It happens because the run scheduler wizard will call run_scheduler
as sudo for each company (passing company as arg).

run_scheduler will try to assign move that could be reserved. However
the domain in order to search move do not include the company_id and
search for every company.

Following upper usecase:
Instead of running action_assign 10 times on 10 000 moves, it will
run action_assign 10 times on 100 000 moves.

Databases with multi companies and having a lot of stock will have a
scheduler speedup from this patch.

Thanks "Rémy Voet <ryv@odoo.com>" for finding this issue.

opw-2328707

closes odoo/odoo#61183

X-original-commit: a21f9876b5b9d01380d03d638deb48cd091f26e7
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2020-11-02 15:16:06 +00:00
Achraf (abz) d36c51d082 [FIX] sale_stock: resize quantity widget
Issue

    - Use runbot with all modules/duplicate DB-all
    - Open a sale order randomly and enable every columns on Order Lines
    - Press "CREATE" button
    - Add "[E-COM11] Cabinet with Doors" to the products

    The widget is not visible

Cause

    There are too many columns

Solution

    Increase the width of the widget

opw-2342149

closes odoo/odoo#61210

X-original-commit: f1a1cf87efc184dfe8f266729e5923994d224ce5
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Achraf <abz-odoo@users.noreply.github.com>
2020-11-02 17:22:01 +00:00
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