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
closesodoo/odoo#79156
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
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
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
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
closesodoo/odoo#80557
X-original-commit: 0482c6ffe5fafe9c76debe92ac0b458d36d1ecdb
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
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>
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
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
closesodoo/odoo#70859
Related: odoo/enterprise#21049
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
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
Rename models 'test.*' to 'Test*' in order to be consistent with the new
naming convention for javascript models.
Part of task-2701674.
closesodoo/odoo#80562
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
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
closesodoo/odoo#80553
X-original-commit: a5310a85461f5e7fc150f8b98c9f0e0d0434e9db
Signed-off-by: Masereel Pierre <pim@odoo.com>
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".
closesodoo/odoo#80542
Task-id: 2695774
X-original-commit: ede8331294ebd163af93c8c02eacfbffccfa97c6
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Purpose: It does not make much sense to create allocations of such an
Time Off Types that don't require allocation.
task - 2658250
closesodoo/odoo#80541
X-original-commit: 69cee9c13b1d5267b74a9f107bae85ea1c42aa38
Related: odoo/enterprise#22589
Signed-off-by: Kevin Baptiste <kba@odoo.com>
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#45388closesodoo/odoo#80532
Signed-off-by: Julien Castiaux <juc@odoo.com>
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
closesodoo/odoo#79547
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
This commit redesigns the toggle switch in website to make it clearer
and prettier.
task-2586313
closesodoo/odoo#77392
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
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
closesodoo/odoo#80537
X-original-commit: e260a97392e698c88741be713a6b8cc2dc3c74a1
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
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.
closesodoo/odoo#80450
X-original-commit: 6607244762355377ac4532302d15dac20a99f79f
Related: odoo/enterprise#22552
Signed-off-by: Mathieu Duckerts-Antoine <dam@odoo.com>
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.
closesodoo/odoo#80528
Taskid: 2701251
X-original-commit: 3891ab34740a86a5e795b9fbcb3fb998d705985e
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
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
closesodoo/odoo#80506
X-original-commit: 492ab65c2dad6ce65e27e266777f13a8ba1f8acb
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
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.
closesodoo/odoo#80523
Opw: 2631354
X-original-commit: a345d2f4a45179b1c3cecb5be983d3ef2435d0f8
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
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
closesodoo/odoo#80522
X-original-commit: 17f0ca0d6b7a583192caa33bb9d3e35c72256d4e
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Signed-off-by: Antoine Guenet <age@odoo.com>
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.
closesodoo/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>
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
closesodoo/odoo#80512
X-original-commit: 5dfd66f03e914fad58deeb45fcc31210293ae162
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
The number of leaves taken / available was no longer available
in mobile.
closesodoo/odoo#80513
Taskid: 2701070
X-original-commit: 3c68b1cad227235a915b4908b6d73aee030e54bc
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Omission of some tests that still use `component.el`.
In preparation of using OWL v2 in discuss code.
Task-2694242
Task-2701230
closesodoo/odoo#80507
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
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
closesodoo/odoo#80505
X-original-commit: 1d99c87b6747199368516dfd236ab2eb3d02fb4f
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
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
closesodoo/odoo#80504
X-original-commit: 88044fa003b3f17d2003bffb810965854427cbd3
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Co-authored-by: Mohammed Shekha <msh@odoo.com>
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 |
+--------------+---------------+---------------+---------------+----------------+
closesodoo/odoo#80437
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
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.
closesodoo/odoo#80501
X-original-commit: 9b4daee15f901f53239fffdf27a9b42c78dac3e5
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
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
closesodoo/odoo#80500
X-original-commit: c47bd34293aef5d3359911c3b6bf0da40288d6f5
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
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
closesodoo/odoo#80499
X-original-commit: 0d2dbb663653659c8afbf3a515444a6db633fbf9
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
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
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
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
closesodoo/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>
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
closesodoo/odoo#80470
X-original-commit: 248f659615a2934df7b5ee83734aa78508987fdb
Signed-off-by: Adrien Widart <awt@odoo.com>
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
closesodoo/odoo#80313
X-original-commit: 9a42ebf1d9d482b031bc5bb7839cc9a8a09090ea
Signed-off-by: Florian Gilbert <flg@odoo.com>
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.
closesodoo/odoo#80475
X-original-commit: 25c3cb0aea3b001d84a5e33dc0e52cfd8fbf6456
Signed-off-by: Masereel Pierre <pim@odoo.com>
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
closesodoo/odoo#80491
X-original-commit: 66ab2ae213f05b055a032d0810de1de9334741ac
Signed-off-by: Toufik Benjaa (tbe) <tbe@odoo.com>
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
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
closesodoo/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>
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.
closesodoo/odoo#80467
Task: 2697771
X-original-commit: 6a5aab047c1e540505ba84a1ef2dcc3356e89708
Signed-off-by: William André (wan) <wan@odoo.com>
Now allow to scroll through the pages and features without hiding the
"Build my website" button on small (or zoomed) screens.
task-2670809
closesodoo/odoo#80466
X-original-commit: 8fe2674f013408d7d1449fddc7d18728cef69281
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
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
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
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