Commit Graph
140385 Commits
Author SHA1 Message Date
Didier (did) c4723ddfa7 [FIX] mail: channelId undefined on the message_seen_indicator model
message_seen_indicator model doesn't have a field threadId, it use channelId.
channelId is required since it's use inside the _createRecordLocalId function

closes odoo/odoo#59493

X-original-commit: f82396cba884604603eea38e291422faebea2f58
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-10-08 10:32:42 +00:00
Ronald Portier 3c0c9ea2c2 [CLA] Update Therp BV CLA.
closes odoo/odoo#59486

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-10-08 09:57:32 +00:00
Nasreddin (bon) 5c27b57ef9 [FIX] pos_restaurant: Error when adding product after printing the bill
Issue

	- Install "Point of sale"
	- Create a new one.
	- Activate the "Is a Bar/Restaurant" feature and save
	- Activate the "Bill Printing" feature then save
	- Start a new session
	- Add a product A
	- Click on "Bill" then "Print"
	- Then click on "Ok" to go back to order
	- Add a product B

	Error is raised ("Cannot read property 'add_product' of null").

Cause

	Trying to add a product to an order who is destroyed
	if the bill has been printed.

Solution

	If the bill is printed (and not the receipt), set '_printed' of
	the current order to 'false', therefore it will add the product
	to the current order.

opw-2341115

closes odoo/odoo#59465

X-original-commit: 6683a9929d68be956854000fa9b3e9f99ceecdfb
Signed-off-by: bon-odoo <nboulif@users.noreply.github.com>
2020-10-08 08:28:01 +00:00
Xavier-Do c24c2338ac [IMP] loading: check missing ir_model_access per module
Since e1a5ed51db, missing ir_model_access are warned at the end of an install.
Unfortunately, it is still possible that a module add a model and another module add the corresponding ir_model_access.
Since runbot install all module at once, this won't be spot until a single module build is ran when each module is
installed independently.

This commit proposes to move the check at the end of each module.
This commit also format the log in orther to ease copy/paste of proposed rules in case of multiple new models
and add module to xmlids.

Note that the log may be repeated multiple times if multiple modules redefine this model.

Linked to #59193

closes odoo/odoo#59213

Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2020-10-06 16:27:26 +00:00
qsm-odoo e10913daf7 [FIX] website: allow transparent menu to work with hamburger templates
For those templates, the transparent option was broken at some point:
we have to detect the hamburger is opened so that it is not transparent
anymore when opened.

Part of https://github.com/odoo/odoo/pull/59349
task-2327741

closes odoo/odoo#59471

X-original-commit: c3524b1cdc63eae0d30d8f435e8bb9a541c88f06
Related: odoo/design-themes#396
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-10-08 08:57:20 +00:00
qsm-odooandCocographique 65e38a66fd [FIX] website: fix header position in 'Hamburger Full' template
Part of https://github.com/odoo/odoo/pull/59349
task-2327741

X-original-commit: 5b0797e450cfcd620d72b58bc82689936bb5b71d
Co-authored-by: Cocographique <nmi@odoo.com>
2020-10-08 08:57:20 +00:00
Cocographique a763c880a4 [FIX] website: add missing styles for social media icons
Part of https://github.com/odoo/odoo/pull/59349
task-2327741

X-original-commit: 68e86e7838a9c158b0c9e6191890de47f5e671f7
2020-10-08 08:57:19 +00:00
Benjamin Vray 7d9c8e9779 [FIX] website: hide "add images" button when not in edit mode
Hide the add images button of the gallery snippet when not in edit
mode.

task-2312878

closes odoo/odoo#59470

X-original-commit: abc61b9e50f7006805dfd038d937464eeb5d424a
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-10-08 08:56:58 +00:00
Kamesh Patel 721c9f7d90 [FIX] im_livechat: fix traceback when clicking on create button
Before this commit:

When trying to create a record in the live chat it shows traceback.
because the record.id is an object but it requires an integer value.

After this commit:

No traceback while clicking on the create button.

Explanation:

Following commit 488e334fc8
`onchange` methods must handle being called on new record.

Task-2347091
opw-2350463

closes odoo/odoo#59462

X-original-commit: 96d0627a966bfa0e71e5350277d306c0e08cc131
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-10-08 08:12:40 +00:00
qsm-odoo 5a594fd8a7 [FIX] website: properly set button font family for navbar buttons
Since 13.0, the website menu can contain text and buttons through
mega menus, which created inconsistencies on the way the "navbar font"
configuration works. Indeed, when setting the "button font", navbar
buttons were updated too... except if that "button font" was equal to
the "text font", in that case those buttons used the "navbar font", so
not logical at all.

This commit solves the problem by only using the navbar font to
style bootstrap nav links, which is the common content of mega menu
snippets anyway but this has a side-effect: text-in-navbar font
may change from navbar font to text font which is acceptable as the 14.0
was released very recently. Sorry for the inconvenience if any, but it
felt important to fix the problem that way for the new static content
of header templates.

closes odoo/odoo#59459

X-original-commit: 31bfb5075063070d24a607ed47da6bdd8207aa5a
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-10-08 07:45:14 +00:00
Nicolas Martinelli 87b8408f24 [FIX] mrp: group operator of duration per unit
The Duration Per Unit should be averaged, not summed.

opw-2353041

closes odoo/odoo#59446

X-original-commit: 54b40f1eb096ea9531f1f9b0478937536c8292fc
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-10-07 16:35:49 +00:00
qsm-odoo 4ac67279c7 [FIX] web_editor: restore adding bg video in some context
Since [1] the feature was broken because of a traceback which occured
while trying parse a background image URL of an element which is not
in the DOM.

[1]: https://github.com/odoo/odoo/commit/7558dcce791f707e3f3470835133f91ec7ff074f

closes odoo/odoo#59440

X-original-commit: 9c2d02f6e78a01eca02de90dd9406effa0308d27
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-10-07 15:45:04 +00:00
lejeune quentin f951b9ae81 [FIX] point_of_sale: Fix http.py.iotpatch
`http.py` had been modified so the file could be patched correctly with
    the previous version of the `http.py.iotpatch` file

closes odoo/odoo#59439

X-original-commit: 1cde9f5fde19f8dba3a9720bc9eb71b7a74c4d72
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
2020-10-07 15:44:36 +00:00
Antoine Prieels 2f7f9095d7 [FIX] hw_drivers: Don't crash if remount fails
We sometimes encountered IoT Boxes crashing because the remount failed.
As this isn't a big issue, we won't check the return value of the call
to `mount`.

closes odoo/odoo#59438

X-original-commit: 5f9874da0f5f5b27c546cd248d08299f0e65544b
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
Signed-off-by: Antoine Prieëls <aprieels@users.noreply.github.com>
2020-10-07 15:44:11 +00:00
William Henrotin 0c6d8ecfaf [FIX] mrp: no finished move management
This commit makes sure we do not try to update the quantity on a
finished stock move (during record production or confirming the produce
wizard) if there is no finished move available.

Closes #57227

closes odoo/odoo#59430

X-original-commit: 141df3b398aee2bac10e3ce94e15bb4bd14d17af
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
2020-10-07 15:00:34 +00:00
Adrian Torres 7a82891c59 [FIX] base_import_module: avoid accessing deleted columns
Commit 59eee6ba5f introduced a cleanup
mechanism for external data modules being uninstalled from a database,
this meant deleting the ir.module.module entry created when first
installing the aforementioned external module.

However, the above patch has one small oversight: the access of the
`imported` field introduced by the `base_import_module` module is done
after the `super().module_uninstall()` call which, in the case of the
uninstall of the `base_import_module` module, will delete the `imported`
column and the following call to filtered will fail because the column
has already been deleted and the registry hasn't been reloaded yet.

The solution to this, as explained in the code comment, is to simply
compute the `modules_to_delete` before the call to `module_uninstall()`.

closes odoo/odoo#59418

X-original-commit: c0226087b82ffda3971bb953d8d00b8c5e67642c
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
Signed-off-by: Adrian Torres (adt) <adt@odoo.com>
2020-10-07 13:25:32 +00:00
Rémy Voet (ryv) 6d01060ca4 [FIX] purchase_stock: avoid write in compute.
Calling write in a compute won't works (and shouldn't) if there is any
automated action in the model. fix this issue in the
compute of `_compute_qty_received`.

task-2351175

closes odoo/odoo#59421

X-original-commit: b7cc3b068f685d1339f9fe7e47d0c564de1708e7
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Signed-off-by: Rémy Voet <ryv-odoo@users.noreply.github.com>
2020-10-07 13:49:32 +00:00
Samuel Degueldre 5e811936c7 [IMP] web_editor: replace some bottom shape colors with transparent
Previously, rainy 05 and wavy 06 had a bottom color with a hard edge.
This means that in order to not have a harsh color transition in the
section, the user would have to match the bottom color to the background
color of the section or vice versa. This commit makes it so that this
color is transparent by default instead. This means that the user can
now simply choose the background color and have the same result, without
having to configure two separate colors.

Part of: odoo/odoo#58333

closes odoo/odoo#59420

X-original-commit: 8e6728f7fa486e264737ce068f637c8a76fdb7d9
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-10-07 13:49:09 +00:00
Samuel Degueldre 0f7a7639d1 [FIX] web_editor: various shapes fixes
This commit fixes a number of shapes, usually the problems were with
imperfect joints between connecting shapes, shapes being cut not close
enough to the edge, or shapes using embedded PNGs for shadows instead of
using SVG filters.

Part of: odoo/odoo#58333

X-original-commit: ac82407b259eab929486bf0a333a48bc507efa60
2020-10-07 13:49:09 +00:00
qsm-odoo cfd63a2b35 [FIX] web_editor: reduce clickable area of checkboxes in editor panel
Before this commit the clickable zone of a checkbox in the editor was
all the width of the panel.

After this commit, the clickable zone is only the label width + the
checkbox width. Also, the active and hover states of the label have been
removed to not confuse the user.

task-2312878

closes odoo/odoo#59406

X-original-commit: 61ffe97d03deae0aee72568311c453d1cd3470c8
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-10-07 12:10:31 +00:00
Sébastien Theys 4b90cb958e [FIX] mail: clean up relations between chatter and thread
This will prevent various flicker when using previous/next.

task-2243518

closes odoo/odoo#59411

X-original-commit: 415683c575c1b6ce3e0591a65df20d687790dd18
Related: odoo/enterprise#13885
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-10-07 12:57:01 +00:00
yhu-odoo 03f898c5dd [FIX] purchase_stock: disable links on vendor delay report
Disable the link on the vendor delay report graph view, as it leads us
to a undesired list view.

Task 2346121

closes odoo/odoo#59410

X-original-commit: 29e7e70e9452f354247f98412d925d1f17e5f86b
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2020-10-07 12:56:33 +00:00
svs-odoo b2de706ae6 [IMP] purchase_stock: hide replenishment origin
When a Purchase Order is created by the replenishment report, doesn't
pass the origin ("Manual Replenishment" or "Replenishment Report").

task-2328830

closes odoo/odoo#59398

X-original-commit: 170729ee58b199041d7545e7789ac9474e86f998
Related: odoo/enterprise#13876
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
2020-10-07 11:22:58 +00:00
svs-odoo 9178d9f9c7 [IMP] stock: popover widget new forecasted report
In the replenishment view, the popover widget allows to open the product
forecasted report.
Before this commit, it opened only the forecasted report graph.
Now it opens the new forecasted report (graph + operations table).

Also, moves the widget next to the forecast qty field.

task-2328830

X-original-commit: 36af5e95eddaa18886c9584865e5620494c93e16
2020-10-07 11:22:57 +00:00
svs-odoo 410d287a71 [FIX] mrp: don't copy workorder duration
Before this commit, when copy a workorder, the real duration was copied
too, which is unwanted.

task-2328830

X-original-commit: 6063bf7576a0abf975c2668ebacb6ad68c24315e
2020-10-07 11:22:57 +00:00
svs-odoo 6d0e11a89b [IMP] mrp: optional hide on fields
Optional hide on `bom_product_template_attribute_value_ids` ("Apply on
Variants") BOM's component lines list.
Optional hide on `lot_ids` field in MO's component lines list.

task-2328830

X-original-commit: 48710bf6f50514aa0c95104989eb44450ce59529
2020-10-07 11:22:56 +00:00
svs-odoo e9f304fc1f [IMP] stock: hide picking type field
Hides the `picking_type_id` field when creating a new transfer if it is
set by default.
As this field is automatically set when coming from a list of a specific
transfer type or when asking to create directly a specific transfer type
this field is superfluous in these cases.

task-2328830

X-original-commit: c26ec70c61f51e6dc30c460c1b60f0d9ff3286a8
2020-10-07 11:22:56 +00:00
svs-odoo 2b6ce56289 [IMP] mrp: default prod. tmpl. ids in the context
Add a `default_product_tmpl_ids` in the context on the BOM operations
field. The purpose is to have the product set by default when creating a
new operation's step.

Used by 91e53397812e707611d2f430c7d534e215f8fd4f (enterprise)

task-2328830

X-original-commit: 7fe3ce4a1b2c43188b907fdec0553cf995e57bab
2020-10-07 11:22:55 +00:00
svs-odoo af81f0201a [FIX] mrp: editable WO time tracking tree
The time tracking list view in the work order form view should be
editable but wasn't.

X-original-commit: b843880b9995831947170c372639caffe1fdadfd
2020-10-07 11:22:55 +00:00
svs-odoo 6c087f2043 [FIX] mrp: MO's byproduct moves
Before this commit, there was some bugs with MO by-product moves:

  - When creating a new MO, if user deletes the byproduct move(s) then
    save, the byproduct moves will be come back.

  - With a newly created MO, in edit mode, increase the qty. to produce:
    -> Creates a new byproduct move with updated quantity to produce
       instead of update the existing one.

These issues was due to the fact when computing the byproduct moves on a
virtual record, the original move in `move_finished_ids` and its
counterpart computed in `move_byproduct_ids` have different virtual id
and so aren't considered as the same move.

X-original-commit: c1768d00e8eb76af32ead10f75ce3d09a5aefac9
2020-10-07 11:22:54 +00:00
Kamesh Patel 1d0ecb31fa [FIX]*: clear breadcrumb when redirecting to activities from systray
* mail,calendar,note

Before this commit:

When accessing activities from the systray, any existing breadcrumb-item should
be clearer.

After this commit:

Clear breadcrumb-item when access activities from the systray.

Task-2342246

closes odoo/odoo#59396

X-original-commit: 6dd181c789d22f99073fcd0a9b0fa2edccdfe0fc
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-10-07 11:17:38 +00:00
IEL f1da6f61e1 [FIX] account: call tearDownClass explicitly
It's needed only on using skipTest in SavepointCase.setUpClass.

From docs https://docs.python.org/3/library/unittest.html#unittest-skipping:

> Skipped classes will not have setUpClass() or tearDownClass() run.

This may lead to running out of available sql connections. It mostly happens in
odoo.sh, which has max connections set to 16, while default value is 64

Fixes #56636
opw-2345762

closes odoo/odoo#59388

X-original-commit: b7f922050217634cdf85d15cae62b78fa3ce1834
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-10-07 10:50:56 +00:00
Anh Thao Pham (pta) 2a3e69c72a [FIX] delivery: hide Print Return Label for non-incoming picking
"Print Return Label" button on a Transfer is showed when `is_return_picking` field is True.
But `is_return_picking` is True for any picking that is a return of another picking, making
the button visible for the return of a return, when it should not as it is an outgoing picking.

opw-2312425

closes odoo/odoo#59387

X-original-commit: f54f485cc6b0eb6c25a2753ca2c764a32eb18f66
Signed-off-by: Anh Thao PHAM <kitan191@users.noreply.github.com>
2020-10-07 10:49:48 +00:00
yhu-odoo 9547813e8e [FIX] purchase_stock: compare only date in on-time delivery
Previously, when compute on-time delivery, we compare the date_planned
on PO line with the date on stock.move. Since they are both datetime,
the product that delivered on the scheduled date may be considered delay
because of the 'time' part is late, which is normally not what we want.
In this commit, we only compare the date part of them to decide whether
it's late or not.

Task 2346121
PR #58653

closes odoo/odoo#59386

X-original-commit: 86af7c647fe56f776c6cebc22dd5856577878980
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2020-10-07 10:35:37 +00:00
yhu-odoo f928606a12 [IMP] purchase_stock: show better when no on-time delivery data
Previously, when no on-time delivery data, we should 100%. Now we show
"No data" to make it more clear.

Task 2346121
PR #58653

X-original-commit: 8179dd974f23d8bb8c15e0ab72072fffb0866b38
2020-10-07 10:35:36 +00:00
std-odoo 0586097ab1 [FIX] website_jitsi: do not update participant count when leaving
Purpose
=======
There's one special case for the participant count update.

When we leave a room, if we are the last participant, we directly
update the participant count without waiting for the cool down (because
the participant might change the page and so the JS might not be loaded
anymore).

But, Jitsi made a change and now, when we hanging up the room, when
the event "videoConferenceLeft" is called, we are the only participant
in the list even if they're still other people in the room. So every
time someone hanging up the room, he will send the "zero participant"
update.

As we can not properly fix it (and be sure it will be "future proof"),
we dropped this update.

So now, some empty rooms might be marked as having one participant,
but no room will be marked as having zero participant if they are not
empty (and we prefer this behavior than the opposite).

Task-2350117

closes odoo/odoo#59378

X-original-commit: 84575078b80a7bf865ed52d1682548af3346ec14
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-10-07 10:21:51 +00:00
Nicolas Galler 91bd2b8c38 [FIX] account: avoid multiplying rounding error on unit price.
Do not round the unit price when calculating the company currency price
used to calculate the tax.  This avoids rounding errors when the company
currency amount has been calculated based on a converted (and rounded) unit
price.

Corrects a regression bug introduced in 13.0.  The behavior has been
corrected in 14.0 by a more extensive rework of the accounting module
(commit id 419d4bbee0 among others).
This fix seeks to correct the bug with minimal impact.

In version 12.0, the tax amount was calculated strictly based on the
total amount, which avoided compounding the rounding issue but had some
other problems (see https://github.com/odoo/odoo/issues/35358).

In version 14.0, the problem does not exist.  This commit only includes
the unit test.

Current behavior before PR:

For example: 20000 @ 2.82 with a rate of 1.1726 gives a
tax amount in foreign currency of 11844, which is 10100 in company
currency.  But if the company currency amount is calculated
based on a unit price of 2.4 (rounded converted amount of 2.82), the
calculated tax amount will only be 10080 in company currency.

Desired behavior after PR is merged:

Tax amount is calculated based on the total amount in the foreign
currency, not the amount based on the rounded unit price.

opw-2340933

closes odoo/odoo#59365

X-original-commit: 14c86a020429dfc6b545b65b89cbc7e3828dc557
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Signed-off-by: Nicolas Galler <nicocrm@users.noreply.github.com>
2020-10-07 09:41:50 +00:00
Swapnesh Shah 73be30d3a3 [FIX] mrp: hide Unit Cost on BoM Structure report
Before this commit, Label *Unit Cost* was displayed in the footer for *BoM Structure* report which is not displaying any cost Information.

With this commit we hide *Unit Cost* on  *BoM Structure* report.

closes odoo/odoo#59356

X-original-commit: 9ec465e7d3937450bad795cdb69eae52b540b994
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2020-10-07 09:22:10 +00:00
xO-Tx 47806eb87f [FIX] web_editor: fix empty media dialog save issue
when media dialog launched for the first time (with no selected
media attachment), "FileWidget.selectedAttachments" contains a default
object {url:... , alt:...} (default attachment already on the target),
and the click on "Add" button will cause a backtrace since the code on
"_save" method tries to access "image_src" attribute on all selectedAttachments
elements including default one.

The simplest solution would be to check if the object already has
an "image_src" attribute.

task-2312878

closes odoo/odoo#59351

X-original-commit: ecffbe4060eea98d3444f308bcd28bfb9287e1c3
Signed-off-by: Samuel Degueldre <sdegueldre@users.noreply.github.com>
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-10-07 08:52:41 +00:00
Jérémy Hennecart 02b08cbdf8 [IMP] website_event: fill attendee info if available when registering
To ease the process of the registration to an event, we prefill the first row
which holds the info of the attendee (name, email, phone), if they are available.
In most cases, the attendee:
- Take a ticket for himself
- Take a ticket for someone he's responsible of
- Take a ticket for someone else who doesn't want to be troubled by that
(ex: an assistant of a CEO)

task-2346145

closes odoo/odoo#58829

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-10-07 09:04:47 +00:00
Xavier Dubuc 265b1f92d3 [IMP] mail: test new message separator in some edge cases
task-2348620

closes odoo/odoo#59286

X-original-commit: 53ed641a60e6d572a12d96406b64af5b55fe177e
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-10-06 13:33:11 +00:00
Anh Thao Pham (pta) 68cf175e07 [FIX] sale: fix untaxed_amount_to_invoice field computation
- Go to Invoicing > Configuration > Taxes
- Create a Tax and enable "Included in Price" in Advanced Options tab
- Go to Sales and create a Quotation:
  * Add an Order Line with the created Tax
- Save & Confirm
- Edit the Quotation to set a delivery quantity, then save
- Go to Sales > Reporting > Sales:
  * Display row by "Order #"
  * In Measures, add "Untaxed Amount to Invoice"
- Check the values for the create SO
The amount for "Untaxed Amount to Invoice" is the amount with taxes included.

It is due to the fact that untaxed_amount_to_invoice field of sale.order.line is computed
from price_reduce field.
As price_reduce is computed from price_unit, if there is a tax that is included in the price,
price_reduce will also contain the tax in its value.

opw-2347571

closes odoo/odoo#59334

X-original-commit: 8c54ed42eef16817f198f10697820eddcc7d0c74
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
Signed-off-by: Anh Thao PHAM <kitan191@users.noreply.github.com>
2020-10-07 06:40:47 +00:00
Swapnesh Shah 84f8651135 [FIX] purchase_account: consider archived valuation layers
Before this this commit there would be `ZeroDivisionError` if product is archived.

Steps to Reproduce Issue:
   Create product with AVCO and Automated Valuation
   Create PO and Received all Quantities
   Archive Product
   Create Bill and Post

   There will be Traceback
   ```
File "/data/build/odoo/addons/purchase_stock/models/account_invoice.py", line 84, in _stock_account_prepare_anglo_saxon_in_lines_vals
    valuation_price_unit = valuation_price_unit_total / valuation_total_qty
ZeroDivisionError: division by zero
   ```

Now we consider Archived `stock_valuation_layer_ids` as well.

closes odoo/odoo#59317

X-original-commit: bedbc577d13148527fa9bab104eaf67b3ffba34f
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2020-10-06 16:34:15 +00:00
Thibault Delavallée c5a7b1f8a6 [IMP] crm: improve handle_salesmen_assignment performances
Handle salesmen allows to assign responsible to leads using a round robin like
algorithm. Currently a write on each lead is done to update its team and
responsible, even if number of leads is far greater than number of available
users to assign.

Current implementation can be simplified by doing one write per sales person
to assign on its batch of leads, or a single write if no salesmen has to be
assigned.

Performance counter on a mass convert wizard on 50 leads show that we gain
about 9% of queries (125 on 1471) with this simple optimization.

Task ID-2351604
PR #59084

closes odoo/odoo#59324

X-original-commit: 973a2998666813ca4fbe90f1b486c1b18091c4e7
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-10-06 17:38:01 +00:00
Thibault Delavallée 9a22e636f9 [IMP] crm: move and add some test for lead user assign
Purpose of this commit is to

  * move tests about mass management of leads (mass assignment + mass convert
    wizards) in its own file to ease writing of tests;
  * add some performance tests :

   * performance for assignment;
   * performance for convert wizard in mass mode;

Task ID-2351604
PR #59084

X-original-commit: 950dd491bc4b680e0bcfab83815313e909a3c282
2020-10-06 17:38:00 +00:00
Julien Mougenot 07a0a0f5bc [FIX] web: Disables pager on enter
Before this commit, the pager component would only quit the edit mode if
its value changed when hitting Enter.

Now, when pressing Enter while the pager value did not change, it will
leave the edit mode and trigger a "pager-changed" event regardless.

Task 2318738

closes odoo/odoo#59285

X-original-commit: a3197283d52bfda399ce45b7d5a52406885336d0
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-10-06 13:29:28 +00:00
Priyanka Kakadiya 5d7165d4f2 [FIX] web: send utc date to server from daterange widget
When manually updating the time on a daterange widget, the value sent to the
server is not converted to UTC and is sent as it appears on the input.

currently daterange widget send datetime value as it is, written in input field
if manually entered, so if user set 10:00:00 so while sending data it will be
send as it is 10:00:00 so when next time record reloaded after save, it will
display 15:30:00 if timezone UTC+5:30.

Instead, change the string date to moment object with current user timezone.
so that datetime send to server is UTC time and when next time it is loaded
it adds user timezone difference, so if timezone is UTC+5:30 and user enters
10:00:00 then while sending data to server it sends 04:30:00 and when displayed
again after reload it adds +5:30 timezone difference.

LINKS

PR #50132
Task 2240378

closes odoo/odoo#59263

X-original-commit: a029fca2d0def06ea3f67270f0e1d654d49a0c57
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-10-06 12:27:26 +00:00
817ce7ae5a [FIX] web: hide action button when no action
Before this commit: the action menu registry items were rendered
regardless of their inner state. The problem is that these item
components can choose not to render themselves, leading to a blank
dropdown menu if no other item was present.

To fix this, the "getProps" function of the registry has been altered to
act as validation: the item will not be rendered if the return value is
falsy. The function has also been made asynchronous to allow RPC calls.

This solution is still flawed and hides a bad design choice which is to
register components and not items or item getters; this API is too
complex for its use case(s) and adds pointless depth to the DOM. The
shape of the registry should be simplified in an improvement in master.

closes odoo/odoo#59259

Task: 2325587
X-original-commit: 45c7d881a5d130f6b3222749c8c87b6c6b45e910
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Co-authored-by: Julien Mougenot <jum@odoo.com>
Co-authored-by: Mohammed Shekha <msh@odoo.com>
2020-10-06 11:38:27 +00:00
Swapnesh Shah 6715804764 [FIX] hr_expense: fixed typo
closes odoo/odoo#59328

X-original-commit: a72e448a035067465c733ece3d0c9219d1cda360
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-10-06 19:00:16 +00:00
Harpritsinh Sisodiyaandjpr-odoo 7c3cb51e52 [FIX] web_editor: fix oe_structure view that are not in extention mode
Issue occurs due to the way we compute the default value in base ir ui view.
The method _compute_defaults don't set extention mode under some condition
even if we provide an inherit_id view.

This commit double fix it, we use now self.env['ir.ui.view'] to create the
new view and so always compute the mode based on 'if inherit id or not'.
Second fixes is to explicitely set mode manually as 'extention'.

before commit:
when you drop snippet to blog sidebar and click save button.
The changes of user is not visible in sidebar because view created in mode
'normal' and not 'extention'

task-2311520
closes odoo/odoo#55908

closes odoo/odoo#59318

X-original-commit: a944ce9beaaf984a7b1282785d03d4bfc8220f18
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Co-authored-by: jpr-odoo <jpr@openerp.com>
2020-10-06 16:35:59 +00:00