Commit Graph
147686 Commits
Author SHA1 Message Date
David Beguin fd75481d52 [IMP] survey: add background option per section
This commit adds the background per section feature.
If the section to display has a background image configured, the background
will be refreshed using that section background image.
If the section has no background, the survey background is used.
The background is refreshed at the same time that the next question is loaded.

To ease technical maintenance and to keep it simple, the background is always
faded out/in at each page change only if there are some sections on the
survey that has a specific background image. If no background image are set on
the survey sections, the background will never be faded out.

Note: The next section to display depends on free text (section with
description) configuration and on conditional questions.
The next section to display can be the next question's section or directly
the next question itself (if the question is a section).

This section's background image implementation works both for the regular
survey form as well as the "live session" mode of the survey module.

Task-2225393

closes odoo/odoo#79156

Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2021-11-30 11:20:45 +00:00
David Beguin d5ea0bf26b [IMP] survey: reload the survey where the user left it
When going back, after this commit, the last displayed page is saved in order to
reload the survey exactly where the user left it, instead of loading the survey
at the latest question of the survey displayed to the user.

Typically, if the user goes back and leave the survey on question 4, after
reaching the question 7, instead of reloading the survey on question 7,
the survey will be reloaded on question 4, where the user left the survey.

Task-2225393

Part-of: odoo/odoo#79156
2021-11-30 11:20:45 +00:00
Thibault Libioulle be23e7436d [IMP] resource: speedup tests
This commit replaces the setUp method by a classmethod in order to speed
up the tests.

PR: #77362

task-2646630
2021-11-30 12:20:31 +01:00
Thibault Libioulle 6d41b7ec7e [IMP] resource: add the false key to work intervals batch
The False key is always added in attendance and leave intervals batch
but is not added in the work_intervals batch.

To give a more smooth API, this commit aligns work_intervals behavior
with the two other methods behavior, regarding the added False key.

Furthermore, we avoid to deal with a resource_list of two empty
recordsets, in the case where the resources parameter is None or empty
recordset.

PR: #77362

task-2646630
2021-11-30 12:20:31 +01:00
Federico (fega) e81788f877 [FIX] point_of_sale: solved 'false' is shown as name in the template
Before this comment if a client had no name, false
was displayed instead of an empty string in the
user list.

Steps to reproduce:
1) Take a database with PoS.
2) Change a contact type to Delivery Address and then remove its name
3) Open PoS and click on the Customer.

Result:
- In the name column 'false' is shown instead of ''

If there's no name I'm showing an empty string

opw-2683482

closes odoo/odoo#80557

X-original-commit: 0482c6ffe5fafe9c76debe92ac0b458d36d1ecdb
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2021-11-30 10:22:15 +00:00
David Beguin ff4ca4fa90 [IMP] sale: apply salesman group on utm campagins counter and apply compute sudo
The goal is that the counter on the smart button can display the conmplete
information ("this campaing generated 500k€, no matter if you can acces or not
the records behind this number").
Once the user clicks on the smart button, them can only see the records he has
access to.

Task-2516278
COM PR: odoo/odoo#76934
ENT PR: odoo/enterprise#21055

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-11-29 20:11:24 +00:00
David Beguin 73399ddc1c [IMP] web: add setting subtitle style
In order to add subtitle to settings subsections,
this commit adds style to h3 in settings style sheet.

Task-2516278
COM PR: odoo/odoo#76934
ENT PR: odoo/enterprise#21055
2021-11-29 20:11:23 +00:00
Munaf Khan b296e076d4 [IMP] mass_mailing: enable audience segmentation
Right now, in our mass mailing, marketing users refine the audience they are
going to reach with our beautiful domain selector/editor. The problem here
is that the criteria that 'filters' audience can be very common and might be
used in many mailings.

Such filters have to be re-created manually each time they are needed unless
one duplicates a sent mailing. Another possible workaround is to access this
form view while in debug mode so that one can copy and paste those domain
expressions. Unfortunately, none of those solutions are either ideal or
convenient. Especially during the onboarding where new users are not very
familiar with those notions yet.

This commit allow users to save filters on the mass mailings. That way
favorite filters can be re-used on the next mailing. For that, we added
a new model 'mailing.filter'. We do not use existing 'ir.filter' model as
its usage is not completely the same and as we do not want to bloat view
filters with filters created on the fly in marketing application. This new
model contains the following fields:

 - name (given by user while saving the filter)
 - mailing_domain
 - mailing_model_id (m2o for the recipient model)
 - mailing_model_name (technical name of recipient model)

Users can create the filters by setting domain and then hitting hollow star
icon next to 'Filter' m2o and saving it with the name they want. Same way
to delete the saved filter, user simply have to click the filled star icon
when filter is already set. This is done through a new widget that adds its
own behavior on top of m2o widget.

The saved filters can be also managed with a new menu named 'Favorite Filters'
under 'Configuration' menu of Email marketing.

Task-2092853

closes odoo/odoo#70859

Related: odoo/enterprise#21049
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-11-29 19:01:43 +00:00
Thibault Delavallée 072522a3e0 [FIX] mass_mailing: correctly set triggers
Some stored mailing fields should use the real mailing_model_id many2one
field for triggers and not sub-fields of it. As those are not stored this
may lead to unwanted writes.

Followup of odoo/odoo#41877

Spotted during Task-2092853

Part-of: odoo/odoo#70859
2021-11-29 19:01:42 +00:00
Louis Wicket (wil) cab6ab715c [IMP] mail: rename test models
Rename models 'test.*' to 'Test*' in order to be consistent with the new
naming convention for javascript models.

Part of task-2701674.

closes odoo/odoo#80562

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-11-29 18:08:07 +00:00
Jerome (jev) 172e1a1679 [FIX] point_of_sale: better error when closing with invoices not posted
A pos.session cannot be closed if there is any draft|cancel account.move
associated to one of its pos.order.
The check is done during the reconciliation.

This commit checks the invoices state at the very beginning of the closing
and gives a more complete error message with the invoices name and state.
With this info, the customer can check the invoices without asking the support.

Steps to reproduce:
- Have a V14 with point_of_sale and account_accountant (It is not reproducible in V13)
- Go to Point of Sale / Configuration / Point of Sale
	- Open a pos.config PC
		- Check "Invoicing"
- Go to Point of Sale
	- Open a pos.session PS related to PC
		- Process a sell until the payment screen (pos.order PO)
		- At the payment screen, select any customer and invoice the order
		- Validate
		- Close PS
- Go to Point of Sale / Orders / Orders
	- Open PO
		- Open the invoice associated
			- Click "Reset to draft"
- Go to Point of Sale / Sessions
	- Open PS
		- Click "Close session & Post entries"

opw-2658654

closes odoo/odoo#80553

X-original-commit: a5310a85461f5e7fc150f8b98c9f0e0d0434e9db
Signed-off-by: Masereel Pierre <pim@odoo.com>
2021-11-29 17:15:02 +00:00
Katherine Zaoral b2d54a2109 [ADD] l10n_ar: update unit tests common
For things to be used in l10n_ar_reports

closes odoo/odoo#80550

X-original-commit: 31d856ca9fbc1540839f08dfaede0dc0d844dd88
Related: odoo/enterprise#22592
Signed-off-by: Josse Colpaert <jco@openerp.com>
2021-11-29 17:14:57 +00:00
Krina Oza b1b6ccc85d [FIX] hr_holidays: add default filter
Currently, in the overview page of timeoff, in gantt view all
records of the company are displayed. The purpose of this commit
is to improve the loading time by displaying less information
also remove "by employee and time off type" from reporting.

So in this commit, added a default filter "My Department" on
overview page and removed "by employee and time off type" from
the menu "reporting".

closes odoo/odoo#80542

Task-id: 2695774
X-original-commit: ede8331294ebd163af93c8c02eacfbffccfa97c6
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2021-11-29 16:28:10 +00:00
sofiagvaladze 704ad908a1 [FIX] hr_holidays: restrict creation of allocations
Purpose: It does not make much sense to create allocations of such an
Time Off Types that don't require allocation.

task - 2658250

closes odoo/odoo#80541

X-original-commit: 69cee9c13b1d5267b74a9f107bae85ea1c42aa38
Related: odoo/enterprise#22589
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2021-11-29 16:28:05 +00:00
Julien Castiaux 12589081b0 [FIX] base: cron "run now" button runs without ctx
Change the lang of your user, translate the name of some records (e.g.
translate the "Customizable Desk" product to "Bureau personnalisable")
and create a cron that simply log the name of that record. Schedule the
cron to be automatically executed, check the created log entry (setting
> technical > logging) it is the default english name. Go back to the
cron, click "run now" contextual button, check the created log entry: it
is the translated name.

When they are automatically executed by the cron worker, crons run with a
minimal context without lang. When the user clicks on the "run now"
button his context was wrongly used while executing the code.

Closes #45388

closes odoo/odoo#80532

Signed-off-by: Julien Castiaux <juc@odoo.com>
2021-11-29 16:27:58 +00:00
Alfredo Zamora 745f884670 [CLA] Signature for fredzamoabg
closes odoo/odoo#80539

X-original-commit: 9631f3d1c97c2d6a96cb21a8381665c007db7f23
Signed-off-by: Arnold Moyaux <arm@odoo.com>
2021-11-29 15:41:03 +00:00
Alfredo Zamora bcbd60dc77 [FIX] stock: stock.picking.state to draft associating existing picking to a computed field
X-original-commit: 86315761dc154e55dd464a6945eea4ac178fb602
Part-of: odoo/odoo#80539
2021-11-29 15:41:03 +00:00
Horacio Tellez 5badb3fca8 [IMP] payment(_*): normalize logs across all acquirers
The logs for payments contain the transaction reference whenever possible.
Before logs for transactions contained the reference or the id of the
transaction in an inconsitent way. No transactions are identified by
reference whenever possible.

The logs for payments for the same function on different acquirers should
have the same format. Same flow step for different acquirers had
information passed in different formats. Now at each step of a transaction
flow log messages have the same format regardless of the acquirer.

Overall the payment logs should have an uniform format. Hopefully
understanding log messages related to transactions should be easier, as
now log format is independent of the acquirer and transaction are easily
identified by reference.

Task - 2545450

closes odoo/odoo#79547

Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2021-11-29 15:40:54 +00:00
Benjamin Vray e717ccd353 [IMP] website: redesign the toggle switch
This commit redesigns the toggle switch in website to make it clearer
and prettier.

task-2586313

closes odoo/odoo#77392

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-11-29 15:40:50 +00:00
thcl-odoo 0aa9925caf [FIX] sale_timesheet_margin: prevent cost override on product service
Current behavior :
a) For a service product with Invoicing Policy set to Prepaid/Fixed Price, when we create a Sales Order with this product and change his Cost with a custom value and confirm the SO, the product's cost is overridden by the product's default cost.
b) If we create a service, with Invoicing Policy set to Prepaid/Fixed Price, its cost will be 0 even if we update it in the SO

Steps to reproduce :
1. Install Sales and enable Margins in app's settings
2. Install Timesheets
3. Get a service type product with Invoicing Policy set to Prepaid/Fixed Price
4. Create a Sales Order
5. Add the service product from step 2
6. Change his cost
7. Confirm the SO

for b) , similar steps just create a new product (on the fly for example) and change the product type to Service then save.

Reason :
a) After adding this line (https://github.com/odoo/odoo/blob/15.0/addons/sale_timesheet_margin/models/sale_order_line.py#L13 - commit 8bbbc69e40) the purchase price was recalculated when it should be, which resulted in an override with the standard product price
b) When a service with Invoicing Policy set to Prepaid/Fixed Price is created, it will be considered as linked to timesheets and the cost will be 0, waiting to be recalculated with the linked timesheets (which won't happen because no linked timesheet will be created)

Details :
For b), I added a condition on the service policy because, according to this declaration https://github.com/odoo/odoo/blob/f81063382d551261801288b66e4d75303a05cbb4/addons/sale_timesheet/models/product.py#L11-L12, a service whose invoicing policy is set to Prepaid/Fixed Price will have its delivery method set to 'timesheet' and will therefore be considered as linked to a timesheet (which is false in this case) which will result in a cost equal to 0

OPW-2689756

closes odoo/odoo#80537

X-original-commit: e260a97392e698c88741be713a6b8cc2dc3c74a1
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2021-11-29 14:55:35 +00:00
Lucas Perais (lpe) 73cf808201 [FIX] web: legacy compatibility: transmit all props to the action
Make a legacy widget trigger a do_Action with `this.do_action`
in the options, pass the usual options for the doAction itself plus a props object in it.

Before this commit, the action did not receive all the props.

After this commit, it does.

closes odoo/odoo#80450

X-original-commit: 6607244762355377ac4532302d15dac20a99f79f
Related: odoo/enterprise#22552
Signed-off-by: Mathieu Duckerts-Antoine <dam@odoo.com>
2021-11-29 14:55:28 +00:00
Yannick Tivisse c2f450a7ad [FIX] web: Fix access right issues on external layout prining
Purpose
=======

If the user doesn't have access to ir.ui.view (aka no admin or
website access rights), printing a report with a configured
external layout will lead to a traceback, as it's forbidden
for the use to read on the field "key" on the related ir.ui.view.

As we only want to retrieve the view key, this is safe to use
sudo at that point.

closes odoo/odoo#80528

Taskid: 2701251
X-original-commit: 3891ab34740a86a5e795b9fbcb3fb998d705985e
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-11-29 14:08:52 +00:00
Xavier BOL (xbo) 428721d28a [FIX] project: remove duplicate filter in rating.rating search view
Before this commit, the `Last 30 days` filter is duplicate in the search
view of rating.rating in `Reporting > Customer Ratings` menu of Project
app.

This commit removes the duplicate one.

Part of task-2671848

closes odoo/odoo#80506

X-original-commit: 492ab65c2dad6ce65e27e266777f13a8ba1f8acb
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2021-11-29 14:08:49 +00:00
Adrien Minet 2a090cbb9b [FIX] sale: down payment invoice has correct company
How to reproduce:

- Have a databas with 2 companies (A and B)
- Create and confirm a sale with company A
- Switch to company B
- Create a down payment invoice.

Bug:

When generating an invoice from a sale, the company of the invoice
should always be the one from the sale.

closes odoo/odoo#80523

Opw: 2631354
X-original-commit: a345d2f4a45179b1c3cecb5be983d3ef2435d0f8
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2021-11-29 13:09:55 +00:00
Antoine Guenet 5d184c5fd8 [FIX] web_editor: apply changes on exit code view
When leaving the code view, we need to apply its html to the editable.
This failed in mass_mailing because the editor rolled back the changes
due to the top element being unremovable. To avoid that, we set the
`skipRollback` argument of `historyStep` to `true` and thereby trust the
user's changes.

task-2701024

closes odoo/odoo#80522

X-original-commit: 17f0ca0d6b7a583192caa33bb9d3e35c72256d4e
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Signed-off-by: Antoine Guenet <age@odoo.com>
2021-11-29 13:09:51 +00:00
Ricardo Gomes Rodrigues (rigr)andDaniel Reis 88b4431c1c [FIX] base_vat: only use VIES service for company VAT numbers
Some countries, such as Portugal, persons also have VAT-like tax
numbers, that can be used in invoices, just like company VAT numbers
can.

However, the VIES service does not work for these person VAT numbers,
only for companies.

This fix ensures that VIES validation is only used for companies.

closes odoo/odoo#80521

X-original-commit: 87028f8b08628b8c643d84b0c19810470f540533
Signed-off-by: William André (wan) <wan@odoo.com>
Co-authored-by: Daniel Reis <dreis.pt@hotmail.com>
Co-authored-by: Ricardo Gomes Rodrigues (rigr) <rigr@odoo.com>
2021-11-29 13:09:47 +00:00
Hardik Prajapati 1b3b1ce89f [FIX] web: fixed word breaking in pie chart tooltip of graph view
Currently, words are not breaking properly when reaching at the
end of a line in the pie chart tooltip. It happens because of the
'word-break: break-all;' property used in the o_tooltip_legend class.
and this property breaks the words at any character to prevent overflows.

So this commit fixes the issue by removing the word-break property
so that the CSS automatically applies the default line break rules.

TaskID-2677129

closes odoo/odoo#80512

X-original-commit: 5dfd66f03e914fad58deeb45fcc31210293ae162
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2021-11-29 13:09:44 +00:00
Kevin Baptiste 28a3bdbc4e [FIX] hr_holidays: show Dashboard data in mobile
The number of leaves taken / available was no longer available
in mobile.

closes odoo/odoo#80513

Taskid: 2701070
X-original-commit: 3c68b1cad227235a915b4908b6d73aee030e54bc
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2021-11-29 12:08:42 +00:00
Alexandre Kühn 93716bec8f [IMP] mail: do not use component.el in tests
Omission of some tests that still use `component.el`.
In preparation of using OWL v2 in discuss code.

Task-2694242
Task-2701230

closes odoo/odoo#80507

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-11-29 12:08:35 +00:00
Pierrot (prro) 6018b33952 [FIX] point_of_sale: select general type journal in view
The changes brought with
https://github.com/odoo/odoo/commit/6420b6d778ad24b9b441a7158ba85bc96ba5b60f
changed the default PoS journal's type for `general` instead of `sale`,
but no changes were made to the type's domain in the pos setting's view,
preventing the user to choose that journal again once it has been changed.

opw-2677130

closes odoo/odoo#80505

X-original-commit: 1d99c87b6747199368516dfd236ab2eb3d02fb4f
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2021-11-29 11:22:32 +00:00
Fabio BarberoandMohammed Shekha 1863ebc0aa [FIX] web: avoid _reset crashing because of empty parameters
Purpose
=======
Avoid displaying a traceback when editing a partner in form view.
This was observed in crm -> Sales Teams -> Clicking on a member to save
and pressing "save" (which returned a javascript traceback in master).
The same error was also observed in mass_mailing, when editing the
responsible of a mailing list.
This was due to the ev parameter being undefined in method _reset.
A simple check has been added to see if the event is defined.

Task-2694067

closes odoo/odoo#80504

X-original-commit: 88044fa003b3f17d2003bffb810965854427cbd3
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Co-authored-by: Mohammed Shekha <msh@odoo.com>
2021-11-29 11:22:28 +00:00
Rémy Voet (ryv) c3399b5470 [FIX] base: fix performance scalability of create
Issue:
------
The `create` method (models.py) doesn't scale correctly
(with huge number of values) when compute store no-readonly
field(s) are in values (at most one).
It is due to the method `protecting` (api.py) which has a
bad complexity in the `create` situation
(list of (field, records) pairs as argument):

O(r²) with `r` = number of record containing the protected field:
List of `len(r)` send to `protecting`,
loop of this list (`r` factor), loop on fields (constant factor),
create a new frozen set with the previous one (`r` factor).

Fix:
----
Decrease the complexity to O(r) by creating a map of set of ids by
protected field which allows avoiding recreating a new frozenset
for each record (update with tuple of one inside => O(1)).

Performance gain:
----------
For a very simple model with only one compute store no-readonly field,
and all `create` `values` contains this field.
+--------------+---------------+---------------+---------------+----------------+
|   Batch ->   |     1000      |     10000     |    30000      |     80000      |
+--------------+---------------+---------------+---------------+----------------+
| Before (sec) | 0.083 ± 0.006 | 1.433 ± 0.091 | 8.764 ± 0.609 | 94.428 ± 3.021 |
| After (sec)  | 0.069 ± 0.003 | 0.706 ± 0.006 | 2.188 ± 0.076 | 5.875 ± 0.104  |
+--------------+---------------+---------------+---------------+----------------+

closes odoo/odoo#80437

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2021-11-29 11:22:24 +00:00
Joseph Caburnay 7f2eda43ce [FIX] point_of_sale: localeCompare is not a function when name is false
When the loaded res.partner has `name` = false, the call to localeCompare
fails because boolean doesn't have the method. Note that `name` field
of res.partner can be false because no default is specified in its
declaration in the base module.

closes odoo/odoo#80501

X-original-commit: 9b4daee15f901f53239fffdf27a9b42c78dac3e5
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
2021-11-29 10:34:00 +00:00
dht-odoo 2816537999 [FIX] mass_mailing: fix the tour bubble for mailing creation
We introduced a tour for email marketing (see commit[1]) which has one
important step, that asks user to create a new Mailing. However, the
selector for this step is generic, which makes the tour bubble appear
on every other installed app's kanban view create button.

Moreover, recently we've recently, for the mailing we've moved to
list view as landing view which previously used to be kanban view.

This commit fixes above issues by adding proper selectors for the
step (list view instead of kanban view) and by adding a new class
to mailing tree view named `o_mass_mailing_mailing_tree`. We provide
this class as extra_trigger for the tour step, so that it can target
the button specific for the tree view of the mailing.

commit[1] - c15f9ef

TaskID-2583760

closes odoo/odoo#80500

X-original-commit: c47bd34293aef5d3359911c3b6bf0da40288d6f5
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-11-29 10:33:57 +00:00
qsm-odoo b7e128a34c [FIX] web_editor: improve error message in HTML/SCSS editor
Before this commit, when the user made an error in the HTML/SCSS editor
(most of the time due to user pasting HTML code while our code excepts
*XML*), the user was stuck most of the time because the error indicator
did not always appear. And even if it did, it disappeared on scroll and
the user had to guess where to click to show the error message.

Now, the UI for the error is way clearer, with the error message opening
itself directly and pointing at the line where the error occurs. The
UI of that error message is now more robust (even though suffering
because of the ace editor which likes to re-render itself at unknown
times). The error message is also still not super clear (default error
message given by the browser) although some parsing is now done on it to
try and display it better.

task-2698641

closes odoo/odoo#80499

X-original-commit: 0d2dbb663653659c8afbf3a515444a6db633fbf9
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-11-29 10:33:54 +00:00
qsm-odoo 044d0a7908 [FIX] website: change default scss file displayed in SCSS editor
By default show the user_custom_rules.scss one as some people would
write rules in user_custom_bootstrap_overridden.scss otherwise, not
reading the comment inside explaining how that file should be used.

task-2698641

X-original-commit: d465b333a403807f09cdd49078f87b102595994e
Part-of: odoo/odoo#80499
2021-11-29 10:33:53 +00:00
qsm-odoo 2075ddf065 [FIX] web_editor: prevent crash when going to unlisted editor file
When switching to files that can only appear in debug mode in the HTML /
SCSS editor and editing them, the page reloads... and crash for no
reason. This was because the filter that allows those files to appear
is lost after reloading, now we simply ignore the file switch if not
present in the default filter.

task-2698641

X-original-commit: ef8b153a6ed80ff6e551b6eee9bc0f53a012e360
Part-of: odoo/odoo#80499
2021-11-29 10:33:53 +00:00
Laurent Smet 75c7ac3e5e [FIX] sale: Hide partner_shipping_id field on vendor bill form
Bug introduced by:
https://github.com/odoo/odoo/commit/bc131c0cfb51c953de8ec41fb820c8c7831eefb5

closes odoo/odoo#80477

Issue: 2668902
X-original-commit: 62f796faa17734ced22ed8ed885c8b575904f1c9
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Olivier Colson <oco@odoo.com>
2021-11-29 09:36:51 +00:00
Mathieu Duckerts-AntoineandAndrea Grazioso 4aa85d304a [FIX] web: pivot: keep subTrees in comparison mode
Before this commit, when comparing a period P of reference to another one,
some rows with only data comming from P would not always be presented
in the table. The problem used to manifest only when loading at least to
level at the same time (starting from Total or any header via expand all).

The reason is the following:
- the data comming from P are processed first: starting from somewhere
  in the trees of headers, some nodes linked to the data comming from P
  are progressively created with no children at first, then the children
  (if any) are added later and so on progressively.
- the data comming from the other period is processed and nodes are
  created with no children and so on in the same way, clearing possibly
  all the node children comming from P.

For example, with
  a row groupby = [field_a, field_b],
  a group [v, v1] from P
  a group [v, v2] from the other period,
a node corresponding to v would be added, then a node child for v1.
Then the node for v would be recreated with no children, then a node child
for v2 would be created. leading to a tree of row headers of the form
Total > v > v2.

Note that it was not affecting the measure values for the displayed rows
since those measures are stored separately from the tree and are linked
to the nodes via some ids.

We fix the problem by avoiding the recreation of a node if it already
exists.

opw-2635113

closes odoo/odoo#80468

X-original-commit: 364475b5da3d4aaa87db715f0c0bbaa9dd3e05c8
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: Andrea Grazioso <agr@odoo.com>
2021-11-29 09:36:48 +00:00
Adrien Widart a8d350fe11 [FIX] stock: add required fields to SML's kanban view
When using a mobile, scanning a product to manage a delivery won't work

To reproduce the error:
(Need stock_barcode. Use demo data)
1. In Operations Types, edit "Delivery Orders":
    - Enable "Show Detailed Operations"
3. Create a planned delivery order DO:
    - 1 x [FURN_1118] Corner Desk Black
4. Mark a Todo
5. Switch to a mobile view
6. Edit DO and scan 601647855640 (i.e., the barcode of FURN_1118)
7. Save DO

Error: An error is displayed "The operation cannot be completed [...]
Model: Product Moves (Stock Move Line) (stock.move.line), Field: From
(location_id)"

The kanban view does not include both `location_id` and
`location_dest_id` although they are required

OPW-2688915

closes odoo/odoo#80470

X-original-commit: 248f659615a2934df7b5ee83734aa78508987fdb
Signed-off-by: Adrien Widart <awt@odoo.com>
2021-11-29 08:50:19 +00:00
Daniel Reis 2264fcc8fd [FIX] l10n_pt: wrong P&L, fix account types
closes odoo/odoo#80487

X-original-commit: 284e1e891eb673e962c4918dbb881db9d3b494a6
Signed-off-by: Josse Colpaert <jco@openerp.com>
Signed-off-by: Florian Gilbert <flg@odoo.com>
2021-11-29 08:06:24 +00:00
snd 102e7d8c35 [FIX] account_journal: ignore line_section and line_notes in account_control
When using account control on a journal, line_section and line_note do not
block the process even though they are not in the allowed accounts (they
don't have an account at all).
But when adding new accounts in the account_control_ids field, the
constraint is triggered by those lines.
This PR makes the constraint ignore those lines when assessing if
there's an issue.

opw-2677597

closes odoo/odoo#80313

X-original-commit: 9a42ebf1d9d482b031bc5bb7839cc9a8a09090ea
Signed-off-by: Florian Gilbert <flg@odoo.com>
2021-11-29 07:21:05 +00:00
lejeune quentin 4e823affb9 [FIX] point_of_sale: Add DNS server in the IoT
Currently the resolv.conf file saved when building the image
is not applied because the file is rewritten on each startup.

This commit modifies the name of the file so that the nameservers
are added when starting up when generating the resolv.conf file
We remove the domain localdomain because it is useless in this situation.

Now with this list of DNS servers, they allow other DNS server
to be used if the local DNS server does not resolve the domain.

closes odoo/odoo#80475

X-original-commit: 25c3cb0aea3b001d84a5e33dc0e52cfd8fbf6456
Signed-off-by: Masereel Pierre <pim@odoo.com>
2021-11-28 08:13:43 +00:00
Martin Trigaux cd464d84d7 [FIX] sale: render the report as superuser
Same as 5dde19c92ecee, sudo is not enough but the report needs to be
rendered with the user 1.
The access token proves the user has the access, the fact that he is a
portal, employee or public should not change the result

closes odoo/odoo#80491

X-original-commit: 66ab2ae213f05b055a032d0810de1de9334741ac
Signed-off-by: Toufik Benjaa (tbe) <tbe@odoo.com>
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-11-26 20:37:46 +00:00
Hubert Van de Walle (huvw) 4a1a912c88 [FIX] portal: duplicated project invitations
Steps to follow

  - Share a project task
  -> The invitation message is duplicated

Cause of the issue

  `partners` can be empty
  -> `not partners` is then falsy

Solution

  Check the default parameter with `is None`

opw-2698724

closes odoo/odoo#80476

X-original-commit: 9514e76e21fe346ea3aee0458ad170b24f09d67e
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
2021-11-26 17:25:47 +00:00
jbw 5063948519 [FIX] account: fix _is_end_of_seq_chain exception when sequence is empty
Prevent calling _get_sequence_format_param() with None as parameter in _is_end_of_seq_chain() when sequence is empty.
Would cause an error when deleting an invoice with an empty sequence.

closes odoo/odoo#80467

Task: 2697771
X-original-commit: 6a5aab047c1e540505ba84a1ef2dcc3356e89708
Signed-off-by: William André (wan) <wan@odoo.com>
2021-11-26 16:42:22 +00:00
qsm-odoo 8ff5ab4d6c [FIX] website: review pages and features screen of the configurator
Now allow to scroll through the pages and features without hiding the
"Build my website" button on small (or zoomed) screens.

task-2670809

closes odoo/odoo#80466

X-original-commit: 8fe2674f013408d7d1449fddc7d18728cef69281
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-11-26 16:42:18 +00:00
Arthur Detroux (ard) b501e8accf [FIX] web_editor: make snippet list always full height
Before this commit, when a tour tooltip was located in the snippet
list, it could cause an overflow that would partly hide the tip and
would bug out when being hovered.

With this commit, the list is made full height, simplifying the look
and giving enough space for the tip to not overflow.

task-2670809

X-original-commit: d8c25d400af61bdfb4afd9d7921c3e93745f2407
Part-of: odoo/odoo#80466
2021-11-26 16:42:18 +00:00
Arthur Detroux (ard) c17ea66ee3 [FIX] web_editor: fix gradient slider infinite resize and safari support
Prior to this commit, if three colors were selected for a gradient and
the user would click on the third color, if that color had a value of
100%, in some conditions the picker would resize infinitely.
Also prior to this commit, the color picker slider was not supported
well under safari.

This commit fixes the SCSS rules in order to fix those behaviours.

task-2670809

X-original-commit: 5a91d8b00c35cb597b0ee5f5ec8605e4589f81c9
Part-of: odoo/odoo#80466
2021-11-26 16:42:18 +00:00
Arthur Detroux (ard) bcee349dc4 [FIX] website: restore scrollbar for some menus
After [1], the dropdown menu of the main navbar for some menus
(e.g customize on /shop) didn't have scrollbars anymore, making it hard
to navigate on smaller resolution devices.

This commit restores that.

[1]: https://github.com/odoo/odoo/commit/1971bf39810468b2b67e2ecd3c86c663d5cffcfd

task-2670809

X-original-commit: b46d2ad7c6b225ae34594991d5189672b95fc3cc
Part-of: odoo/odoo#80466
2021-11-26 16:42:17 +00:00