Commit Graph
159845 Commits
Author SHA1 Message Date
qsm-odoo f697decd51 [FIX] portal: use proper muted color for portal chatter published dates
The color that was used for portal chatter published dates was the muted
color that we use at some places in the backend. The portal screens
being frontend screens, it of course did not work with all website color
schemes.

This simply uses the `$text-muted` color to fix the issue. This probably
needs refactoring in master to avoid those extra CSS rules that could
simply be gone with proper bootstrap XML structures.

opw-3146164

closes odoo/odoo#117233

X-original-commit: 29d691327317600ddf2116b7c02709bbeb6cae5b
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2023-03-30 20:03:32 +02:00
David b43716af45 [FIX] sale_loyalty: prevent sending coupon message on failed sale confirm
There can be multiple causes that could prevent a sales order gets
confirmed when we push the *Confirm* button. This can be common when
extension modules come to play.

The simplest way to reproduce it (no extra modules needed) would be to
make an automated action on sale.order with a criteria that could avoid
the confirmation throwing a UserError.

The coupon email would be sent anyway as we can't rollback a mail
sending once it's gone away but it wouldn't be valid as the process
stopped after it.

So we want to prevent sending that mail if the sale.order can't be
confirmed.

TT42124

closes odoo/odoo#117215

X-original-commit: 2e5c0bf6568f9ed12a0a93d1519bdee75c5eec80
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-03-30 18:59:11 +02:00
Leonardo Pavan Rocha 1fbe56df36 [FIX] calendar: fix videocall location is always readonly
After https://github.com/odoo/odoo/pull/102967, a readonly="1" was added in the
videocall_location field. This forces the field to be readonly instead of
taking into account the readonly domain set in the attrs.

closes odoo/odoo#117214

X-original-commit: 459d5d75edafc2f8796006308e15940889c7dcb6
Signed-off-by: Arnaud Joset <arj@odoo.com>
Signed-off-by: Leonardo Pavan Rocha <lpr@odoo.com>
2023-03-30 18:59:08 +02:00
Leonardo Pavan Rocha 0d7ebeac42 [FIX] calendar: convert relative URLs to absolute
In case the videocall_location was a relative URL, the link wouldn't work
properly. This commit fixes this by converting all URLs to absolute
automatically. Note that this only works for http and https protocols. If
using proprietary schemes such as :skype is desired, this implementation
should be done in the respective module.

X-original-commit: 16fb60e193d0c79333d95ef2f31f0ec01830571f
Part-of: odoo/odoo#117214
2023-03-30 18:59:08 +02:00
Alexandre Kühn 96ebb86201 [FIX] mail: CTRL-C content in chat window from home menu
Before this commit, when in home menu with a chat window,
it was not possible to copy content in conversation with
CTRL-C.

This was due to keydown event being intercepted by the hidden
home menu input.

This commit solves the issue by not propagating keydown events
above chat window, so it's not intercepted by the home menu for
his input.

closes odoo/odoo#117211

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-03-30 18:59:05 +02:00
Arthur Detroux (ard) 1ebcdb0023 [FIX] website, *: check access rights to display elements in New+ modal
*: website_blog,website_event,website_forum,website_hr_recruitment,
website_livechat,website_sale,website_slides

Prior to this commit, elements inside the New+ modal had a `isDisplayed`
property that was meant to be changed by the patches done by each
module. Unfortunately, this was forgotten in the refactor done in [1]
and more precisely when the component was introduced in [2].

This commit fixes that by checking the access rights of the user on each
individual model used on the create form.

[1]: https://github.com/odoo/odoo/commit/31cc10b91dc7762e23b4bde9b945be0c4ce3fe3b
[2]: https://github.com/odoo/odoo/commit/ca2e143d54622d598201826a2cd669bad64b205d

opw-3198700

closes odoo/odoo#117206

X-original-commit: 58704cb7615addd7d40291431e05a894776320d8
Related: odoo/enterprise#39066
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2023-03-30 18:58:59 +02:00
Valeriya(vchu) 305aac3045 [IMP] sale: promote create_invoices button
create invoice is a common action in sales orders listview that should be promoted for the better user experience

task-3037442

closes odoo/odoo#116495

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-03-30 18:58:54 +02:00
hiroh-odoo 647cf8fe63 [IMP] project: prevent opening form/list view from reporting
Before this commit open the form/list view from reporting views when clicking
on the graph and pivot.

This commit prevents the opening of the form/list view from reporting.

task-3166747

closes odoo/odoo#113362

Related: odoo/enterprise#37402
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-03-30 18:58:51 +02:00
Vincent Larcin 20f938bd10 [IMP] project: add fields to burndown chart search view
This commit removes some field from the burndown chart search view that
were previously removed from the task search views.
It also adds a few fields present in the task search views but missing
from the burndown chart.

Enterprise: https://github.com/odoo/enterprise/pull/36804

Task-3142077

closes odoo/odoo#112194

Related: odoo/enterprise#36804
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-03-30 18:58:43 +02:00
Alexandre Kühn 43bc9897e3 [FIX] mail: read more/less link on message of type notification
Read more/less requires content being `t-ref="body".
It was not properly set for messages of type notification, thus
skipping the read more/less insertion in the content.

closes odoo/odoo#117203

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-03-30 17:58:07 +02:00
Christophe Monniez e878843ee0 [FIX] requirements: fix jinja version for py 3.11
The pinned version of markupsafe for python > 3.10 is incompatible with
the pinned version of jinja.

With this commit, the Jinja version is pinned to follow Debian bookworm
version when python > 3.10 which should fix the issue.

closes odoo/odoo#117191

X-original-commit: 548d177e16f364b35f61f861df132dfcedc71e28
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2023-03-30 17:58:04 +02:00
Ivan Yelizariev 94cf6128df [FIX] *: fix css issue with labels in Settings page
Settings page lacks a space between some labels and corresponding selection
input. Example: label *Digest Email* and default value *Your Odoo Periodic
Digest*.

Fix it by adding margin via mr8 class

Code analysis
=============

v15 has margin:
https://github.com/odoo/odoo/blob/eee0a77619b0cef70272b24f6ff663210e94eb1e/addons/web/static/src/legacy/scss/form_view.scss#L673

while v16 doesn't have it
https://github.com/odoo/odoo/blob/3ee5d7a0fbccae5f742e1aba8d3d24f8bab3cbdd/addons/web/static/src/views/form/form_controller.scss#L605

v16 was refactored first https://github.com/odoo/odoo/commit/8fa6e923d0fc8695d92e0b114e230d3abab7d9bc

- margin: 0 $o-form-spacing-unit 0 0;
+ margin-right: $o-form-spacing-unit;

but then it was completely removed
https://github.com/odoo/odoo/commit/fb629dc91df1720cb0658d3e9f946a4fda83fbd0

opw-3115232

closes odoo/odoo#117187

X-original-commit: b87e214e7b6ea23aa187f87f922ef8f077393e9a
Related: odoo/enterprise#39054
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Signed-off-by: Ivan Elizaryev (iel) <iel@odoo.com>
2023-03-30 17:57:58 +02:00
Maruan Aguerdouh (magm) 345fdee4fb [FIX] mass_mailing: fix traceback when creating a mailing campaing with filters
Steps to reproduce:

- Get Marketing Automation module and mass_mailing module
- Go to Marketing Automation > Configuration > Favorite filters
- Create a new filter with for example, Recipient Model as Contact and
the domain to be 'Name contains test'
- Now we go back to Campaigns (Inside Marketing Automation) and create a
new campaign with the filter that we have just created.
- Create a new activity for this campaign with any mail template and
save it.
- Now just pres "start" to start the campaign.
- After that you can also use "Launch a test" to see the trace-back.

Issue:

We receive a trace-back when we try to access to a value of a undefined
object. That it is launch whenever we have a campaign with filters.

Solution:

Added the handling of the case when the inputElement is undefined.

opw-3146908

closes odoo/odoo#117185

X-original-commit: b5b0d665ef2ea492bf7f9823da7f7982b0ddefa6
Signed-off-by: Thiry Renaud (reth) <reth@odoo.com>
2023-03-30 17:57:55 +02:00
Didier (did) bb8017707c [FIX] mail: restore the ability to disable link preview
Before this PR it was not possible to disable the link preview by setting
`mail.link_preview_throttle` to 0. This feature was lost in the refactoring.

This PR reintroduce this feature.

closes odoo/odoo#117101

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-03-30 17:57:53 +02:00
Valeriya(vchu) 8a3af894f4 [IMP] sale: add placeholder for order many2one fields
make clear for the user that the keyboard can be used for the search

task-3175239

closes odoo/odoo#116546

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-03-30 17:57:47 +02:00
Lucas Lefèvre 052dadfc5b [REF] spreadsheet: introduce @odoo/o-spreadsheet module
Using o-spreadsheet features and functions is done using
the same import module as if it was installed from npm.

Additionaly, by adding the library as dev dependency in package.json[1], IDEs can
now leverage Typescript types for autocomplete and type checking.
The "alpha" release tag is always the lastest master version.

[1] enable web tooling `addons/web/tooling/enable.sh` ;)

closes odoo/odoo#115972

Related: odoo/enterprise#38471
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2023-03-30 17:57:44 +02:00
Julien Van Roy 209da20bda [IMP] account_edi_ubl_cii: create partner at import if not retrieved
When importing a vendor bill/invoice, a matching partner is searched. If
no match is found, a new partner will created.

task-3141337

closes odoo/odoo#117168

X-original-commit: 08a6bbd92276f92f215d3225f3f14ae8a908f034
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Julien Van Roy <juvr@odoo.com>
2023-03-30 16:23:13 +02:00
Brice bib Bartoletti 9e949bb0bf [REF] account,l10n_eu_oss: query tag easily
The aimf of this commit is to make the query of a specific tag with a
specific sign easier by avoiding all the filtering in
`expression._get_tax_tags().filtered(lambda t: t.tax_negate)`

With this commit, we just leverage the existing filtering on domain to
only get the desired tag.

no-task

closes odoo/odoo#117167

X-original-commit: 6eb53a3802d24e283b8334b6f245ffe87dddcbe8
Related: odoo/enterprise#39044
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
2023-03-30 16:23:10 +02:00
Victor Piryns (pivi) 1adaaba90e [FIX] (sale_)project(_purchase): proj.prof. w/ AA distr. for inv/bills
Current behaviour:
The project profitability panel doesn't take into account the AA
distribution of the project's AA for solo invoices and bills.

Expected behaviour:
It should take the distribution set into account.

Steps to reproduce:
- Install Accounting, Sales, Project, Purchase
- Settings > Activate AA
- Create a new project with a new AA for it.
- Create a new bill or invoice, on the line set the 2 AA, one with
  the project's AA with some X%, and the other AA is irrelevant (the
  sum of all AA on the line should be 100%)
- Confirm the invoice/bill
- Go to the project profitability report (project updates), see that
  we have 100% of the line value that contributed, when it should have.

Reason for the problem:
The contribution of the AA was not taken into account when computing
the project profitability for solo invoices/bills (invoices/bills
w/o SO/PO respectively)

Fix:
Additionally get the analytic_distribution when fetch the
account_move_lines to compute the project's profitability.

Affected versions:
- 16.0
- saas-16.1
- saas-16.2
- master

opw-3246199

closes odoo/odoo#117163

X-original-commit: c3c66d05d039514c9dd02ebdede20a3dff757728
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Signed-off-by: Piryns Victor (pivi) <pivi@odoo.com>
2023-03-30 16:23:04 +02:00
Andrea Grazioso (agr-odoo) 406ec9dcdf [FIX] account: analytic plan match
Settings>Accounting, activate analytics
Create an Analytic Plan:
  - Default Applicability: Optional
  - Add 1 applicability line:
    - Domain: Vendor Bill
    - Product Category: All / Saleable / Office Furniture
    - Applicability: Mandatory
Create a vendor bill, fill partner, billdate and create a line without
product
Save and Confirm

Action will be blocked with message:
"One or more lines require a 100% analytic distribution."
This should not occur as the mandatory applicability should not match
the bill

opw-3189829

closes odoo/odoo#117162

X-original-commit: c4f90cf7b116fbec8516659475c4e1160a00b2f1
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Grazioso Andrea (agr) <agr@odoo.com>
2023-03-30 16:23:01 +02:00
Julien Banken 53d0b30c53 [IMP] base: add codeview option on action helper form
When editing an action using the dev options, one may need to update the
action helper of the current action. Currently, the html field used to
edit the action helper does not have the "codeview" option. As a result,
the raw html of the action helper can not be edited easily. To solve
that problem, this commit will simply add the "codeview" option on the
html field.

task-3252414

closes odoo/odoo#117032

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-03-30 16:22:58 +02:00
niyasraphy 6805d2f0f4 [FIX] point_of_sale: traceback on clicking view button in cash register
before this commit, open a pos session form, click on
cash register smart button and if you click on view
button, traceback is shown.

* open a pos session
* click cash register smart button
* click view button under ID column
* traceback is shown

after the commit, on clicking view button traceback wont
be shown and view will get opened.

closes odoo/odoo#116897

X-original-commit: 5ce6bdb3ba0f098177022fcdd7dfad3f1c27aae6
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
2023-03-30 16:22:54 +02:00
Michael (mcm) 8da2b52333 [IMP] web: introduce overlay service
This commit adds a new service "overlay" that will be used as a base
for other service which displays a component on foreground like
"popover" or "dialog". The services "popover", "dialog" and "effect"
already uses this new service to have a common container.

The "overlay" service also fix a stacking context issue that could
happen when a popover opened a dialog and this dialog then opened
another popover thanks to the common container.

task id: 3233266

closes odoo/odoo#115308

Related: odoo/enterprise#38786
Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
2023-03-30 16:22:51 +02:00
Renaud Thiry 035057a522 [IMP] mail: track contact address
Currently there is no way of knowing who changed the address
of a partner. This field is of high importance and should be
tracked to be able to follow who is editing it.
As addresses are represented with a bunch of fields, tracking
them individually would result in weird-looking tracking
messages with each value stacked on top of the other.

To avoid this, we take advantage of the fact that tracking can
be used on non-stored compute fields to log any change as a
change over the full address.

The full address is derived from the contact_address field to
take advantage of the existing regional formatting of addresses.
It is however modified to replace return to lines with commas to
accomodate the formatting of tracking messages in the front-end.

task-3165293

closes odoo/odoo#114695

Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2023-03-30 16:22:45 +02:00
Hubert Van de Walle (huvw) 15a202c976 [FIX] stock: PopoverWidgetField json parsing error without value
Steps to reproduce
==================

- Access a company with no records in transfer model (IT Company, SE Company, etc.)
- Go to transfers menu
- Click Studio
- Click form view button
- Click view tab on the left
- Click Show invisible elements
- Error "The requested change caused an error in the view. It could be because a field was deleted, but still used somewhere else"

Cause of the issue
==================

Since we are not editing an existing record, the PopoverWidgetField
component is loaded without a field value (it is an empty string).

This means that JSON.parse will fail

opw-3249161

closes odoo/odoo#117148

X-original-commit: ddb36467b401ec401b813182d172f5aab329baa7
Signed-off-by: Tiffany Chang <tic@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
2023-03-30 15:09:50 +02:00
FrancoisGe 6718f001b9 [FIX] web: resequence x2m in dialog form view
Before this commit, in the form view dialog of an x2m, resequencing an
x2m will cause a crash.

Why:
The basic_relatonal_model passes the wrong view type to the basic_model
when resequencing. In this case, we want to use the form view.

How to reproduce:
- Going into a form view with an editable x2m
- Open a record of the x2m in a form view dialog with an x2m containing
  a handle field
- Change the order of the records using the handle field (resequence)

Before this commit:
    A crash is displayed

After this commit:
    The records have been resequenced correctly.

closes odoo/odoo#117145

X-original-commit: 003e6f27db767cd80758b868c8afbf73b78f1abe
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-03-30 15:09:47 +02:00
Jinjiu Liu 51179c706f [FIX] web_editor: translate and add translations for placeholders
Reproduction:
1. Switch to French, create a /heading 1, and input nothing
2. The placeholder “Heading 1” is not translated

Fix: add translate function around the terms and manually add the
translations in pot

Note: since OdooEditor.js is under web_editor/static/lib/web-editor,
only the js code under /static/src/ is considered for translation export
The translation is manually added with specific path. In Odoo 16, the
path is changed to /static/src/ and translations can be exported
correctly. The translation code paths added here should be changed in
Odoo 16

Related PR adding translations: https://github.com/odoo/odoo/pull/93272

opw-3224482

closes odoo/odoo#117142

X-original-commit: 5f297854348e073a3915bca5cec13066f6abe90e
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2023-03-30 15:09:44 +02:00
Andrea Grazioso (agr-odoo) b26d7d19ba [FIX] l10n_din5008: missing partner info from header
Install german localization
Select DIN5008 for the document layout
Print an invoice

After 5030a0c199
In the report header information about the partner are replaced by
company info

opw-3208615

closes odoo/odoo#117065

X-original-commit: bed793c82cd8810ba3fe3aac9ee67691a1b39122
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
Signed-off-by: Grazioso Andrea (agr) <agr@odoo.com>
2023-03-30 15:09:36 +02:00
Chenyun Yang 0a87304ff0 [REF] spreadsheet: spreadsheet models
This commit refactors the current model structure of spreadsheet-related
module. Data fields are integrated into an abstract model
`spreadsheet.mixin` and all sub-models are inherited from it. This way
we can group all decode/encode logics into one place.

task 3222572

closes odoo/odoo#116498

Related: odoo/upgrade#4473
Related: odoo/enterprise#38692
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2023-03-30 15:09:33 +02:00
zel-odoo fa006f2bbe [IMP] mail: ChannelSelector improvements
1. Display no result when having no matched results.
2. Hidden when clicking outside of the field.
3. Be visible when clicking inside the field.
4. Add related tests

task-3208033

closes odoo/odoo#116214

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-03-30 15:09:20 +02:00
Vincent Larcin 641766bd20 [IMP] project: add sudo in project.task write dict comprehension
All write operations on the `project.task` model are slowed down significantly
by a dict comprehension mapping tasks to their user_ids because of the access
rules checks. By adding a sudo to that dict comprehension, this commit makes it
bypass those checks and speeds it up.

Task-3164004

closes odoo/odoo#115037

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-03-30 15:09:17 +02:00
Samuel Degueldre 25cbd9c4e7 [REF] point_of_sale, pos*: convert ProxyDevice to ES6 class and service
*: pos_epson_printer, pos_restaurant, pos_six

This commit continues the work of reducing the reliance of the pos
modules on legacy features from the JS framework, such as core.Class and
mixins, by converting the ProxyDevice class to ES6 (and renaming it
HardwareProxy, to avoid confusion with DeviceProxy from iot). It also
makes it available as a service in the new environment so that we can
hopefully get rid of the legacy environment in the near future.

closes odoo/odoo#114821

Related: odoo/enterprise#37991
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-03-30 15:09:14 +02:00
Pratik Awasthi 87941198a5 [IMP] project: improve menu for my tasks and all tasks
Purpose:
- In the project, My Tasks and All Tasks menu are related to the task model so
 having two main menus for the same model which display almost the same
 thing would not be great for UI and it'll not look good if we add another menu
 in the future or via customer customization.

So in this Commit:
- We have added a menu named Tasks which has 2 sub-menus My Tasks and All Tasks
 which would be great to display tasks

task-3180910

closes odoo/odoo#113335

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-03-30 15:09:05 +02:00
Rohitkumar (roku) 21f9219dff [IMP] sale_(project),hr_timesheet: generic UX improvement for project
Purpose of this commit to improve generic usage of project app.

So in this commit done the following changes:
  - the sequence field should not be optional for project.task.type list view
  - move the fa-play icon next to the remaining hours widget in kanban view
  - add filter and separator for burndown chart search view
  - transform the 'milestones' stat button into 'x Milestones /n y Reached
  - change the recurrence banner
  - add the placeholder for the label_tasks field 'e.g. Tasks'

task-2947481

closes odoo/odoo#99528

Related: odoo/upgrade#3872
Related: odoo/enterprise#31047
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-03-30 15:08:56 +02:00
Kartik Chavda 81be161fae [IMP] {hr,sale}_timesheet: compute total time wo checking security rules
Before this commit total time on timesheet for projects and
invoices computed according to user's access to timesheet and
security rules on account.analytic.line are quite complex.

So, in this commit compute those fields with sudo to ease the
perfomance of project and sale apps.

task-2890184

closes odoo/odoo#99372

Related: odoo/enterprise#30950
Related: odoo/upgrade#3843
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-03-30 15:08:48 +02:00
Didier (did) 533e0451aa [IMP] mail: populate data for discuss
This PR add a populate command for models `mail.channel`, `mail.channel.member`
and `mail.message`.
It will only create channel of type `channel` and `group`.

I used this bash function to quickly delete/create a database and populate it.

```bash
 # Quickly drop the current db (it use the git branch name as database name) and
 # create a new one that will be populated.
 # usage: odoo-populate model_name size
odoo-populate() {
    dropdb $(git branch --show-current)
    odoo -i mail --stop-after-init
    ./odoo-bin populate --models $1 --size $2 -d $(git branch --show-current) --addons-path=~/projets/pro/odoo/addons,~/projets/pro/enterprise --c ~/projets/pro/.odoorc
}
```

closes odoo/odoo#115827

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-03-30 12:54:30 +02:00
Prakash PrajapatiandAudric Onockx 484d7ec78a [IMP] project: add some extra fields in project populate data
In this commit, we added extra fields: company, partner, users

Task-3082060

closes odoo/odoo#109844

Related: odoo/enterprise#34515
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Co-authored-by: Audric Onockx (auon) <auon@odoo.com>
2023-03-30 12:54:25 +02:00
Didier (did) 312dfc3731 [FIX] mail: remove now useless comment
Since the rename of partnerRoot to odoobot (https://github.com/odoo/odoo/pull/116823), this comment is now irrelevant.

closes odoo/odoo#117102

Signed-off-by: Stockbauer Matthieu (tsm) <tsm@odoo.com>
2023-03-30 10:54:10 +02:00
FrancoisGe a2342f636c [REF] web,crm: remove allow_group_range_value
The allow_group_range_value option is used in one arch of a kanban in
CRM. We therefore believe that this is not standard behaviour.
So we decided to move this logic to the custom view that uses it.

Part of Task: 3179751

closes odoo/odoo#117023

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-03-30 10:53:59 +02:00
Ivan Yelizariev 81ec49ef38 [FIX] sale_management: ignore quotation template on eCommerce sales
Quotation templates feature simplifies creating Sale Order on backend.
To make the process even faster, Odoo allows set up Default Quotation Template,
which is applied automatically on every new quotation. However, it doesn't make
sense to apply quotation templates for orders created by eCommerce users.
Particularly, it leads to an error if quotation template has recurrence.

Fix by ignoring default quotation template on eCommerce sale orders.

STEPS

1. Create a sale template with a recurrence
2. Set this sale template as the default sale template in settings
3. Go to /shop page and add any product to cart that is not recurring
-> The sales order will be created with the default template's recurrence
4. Try to pay & confirm the order
-> Error when trying to make an order with recurrence and no recurring product

opw-3115232

closes odoo/odoo#116913

X-original-commit: 1d083cad6fe9a5e2356e53ac922c8ff9e75d52f6
Signed-off-by: Ivan Elizaryev (iel) <iel@odoo.com>
2023-03-30 10:53:56 +02:00
Noe Antoine 52a02c81fc [IMP] sale_crm: show cancelled quotes from lead stat button
In order to be able to see all quotes linked to a crm lead,
we now allow cancelled quotes in the domain of leads of the
stat button action.  The cancelled ones are not shown
until the 'quotations' filter is removed in the search.
Also, cancelled ones are not accounted for in the counter.

To do that, we create a specific domain method for the action,
and override it in sale_renting_crm to exclude rental orders.
The _get_lead_quotation_domain is not directly modified as one
would also need to exclude cancelled quotes in _compute_sale_data.
Also, we cannot add an expression.OR method in the action
code, because the domain is extended in sale_renting_crm and the
domain order of operation could include cancelled rental orders,
which is not desired.

Task-3237734

closes odoo/odoo#115864

Related: odoo/enterprise#38957
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-03-30 10:53:48 +02:00
Alexandre Kühn e4537f7fc6 [IMP] mail: several emoji picker improvements
- Bigger and centered emojis in grid
- Better visual clue of focused input from search icon
- No search screen with icon + text
- Consistent sizing of emoji picker in case of failure
- Added basic test for active highlighted category

closes odoo/odoo#117001

Signed-off-by: Debondt Didier (did) <did@odoo.com>
2023-03-30 09:49:52 +02:00
nda-odoo 7fca8f2eaa [FIX] sale: set default filter for sale report
Before this commit, no default date filter was set on the report.
For older databases, it results in a systematic heavy query.

opw-3134913

closes odoo/odoo#116770

X-original-commit: b8b75d5bdd8901d2c8fcd54d63c78c0d36254933
Signed-off-by: nda-odoo <nda@odoo.com>
2023-03-30 09:49:50 +02:00
Nicolas (vin) 2104df1ab0 [FIX] account: tax total computation fix
Fixes an issue with the tax total computation that would happen
if the tax of type group has the same tax_group_id as one of the
children taxes.
This would lead to a tax total computation where the other child
of the tax will be summed into the child sharing the same tax
group.
As it is no longer possible to set a tax group id on a tax of
type group, we do not need to take it into account when computing
the tax total anymore.

To reproduce before the fix:
    - Make a bill with the Australian tax au_tax_purchase_10_service_tpar_no_abn.
    - Save.
    - You will notice that the amount in the tax total widget for the tax
      "GST 10%" is wrong as it takes into account the amount of the other
      tax.

After the fix, the amount will not be wrongly grouped anymore. And the
tax total will correctly represent what is in the line_ids.

Task id # 3252271

closes odoo/odoo#117093

X-original-commit: aa736d7d0189784e6ff81b7acfcd0ac0e1cbe6b7
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Nicolas Viseur (vin) <vin@odoo.com>
2023-03-30 08:50:08 +02:00
Thibault Francois 352f87585d [FIX] mail: fix missing recipient data
Use case
--------
If the a user has partner_share set to NULL not to 'false'
he will not receive any notification

The orm consider False and NULL value as False for boolean field,
the query that fetch the recipient data should have a consistent
behavior

closes odoo/odoo#117083

X-original-commit: a50fbd1f9404fd05eb576474eb3d10c94d37aa52
Signed-off-by: Thibault Francois <tfr@odoo.com>
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-03-30 08:50:05 +02:00
Nikunj Ladava 65190c9d72 [IMP] survey: add tooltip for presenter on live survey
While presenting a survey, sometimes it is good to know what content
will be next. However, this is not possible currently.

This commit improves the behavior to display a tooltip msg on the right
arrow so that the presenter/speaker knows what is next.

Task-2791000

closes odoo/odoo#97713

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-03-30 08:49:57 +02:00
det 4cc2cb93da [IMP] account: mark invoice as sent once pdf generated
Before this commit, the invoices were marked as sent only when
sending them via email or post.

After, it is mark as sent once the PDF is being generated via the
send&print wizard, as it becomes computed based on the presence of
the PDF.

Rational, we want to consider a generated invoice via the
send&print wizard as being sent as it can be printed/downloaded.

This also makes the invoice available in the portal.

closes odoo/odoo#117085

X-original-commit: 9e656aabe4f6840ee5c200a21832dad958ea6892
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Detry Thomas (det) <det@odoo.com>
2023-03-30 07:54:04 +02:00
gawa-odoo 8d25a5b18c [FIX] account: add category to analytic lines
When creating analytic lines from bills or invoices, the category is not put on them.

opw-3214062

closes odoo/odoo#117056

X-original-commit: 7729b5bf006d0a988ce84e2f953749866fae7b16
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Wala Gauthier (gawa) <gawa@odoo.com>
2023-03-29 23:37:33 +02:00
Laurent Smet 3f77621324 [REV] account: Revert https://github.com/odoo/odoo/commit/687f479297fcaa047cd26a34883e7de11b3d3dea
When creating an invoice from e-commerce, the invoice is not sent by mail but the user must be able to see it from the portal.

closes odoo/odoo#117033

X-original-commit: 61d3b9d7186eb82b3227c65c26f629672f99d446
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
2023-03-29 23:37:25 +02:00
william-andre 11476ac267 [IMP] account: add index for gap detection in list view
The computation of `<account.move>.made_sequence_hole` on the list view
takes a non negligible time (about 1/4 on test server), for instance on
* Accounting > Vendors > Bills
* Accounting > Customers > Invoices
* Accounting > Accounting > Journal Entries

The less sequence resets there are (yearly reaset instead of monthly, or
even no reset at all), the worse this gets.
For instance, the plans below are generated on a journal with ~35k
`account.move.line` (and 10M in total) using the same sequence prefix,
you can see that the first plan needed to remove everything after the
index scan whereas the second plan has the right row directly.

Plan Before
===========
```
 Nested Loop Left Join  (cost=198.96..1160.00 rows=1 width=4) (actual time=3557.525..3557.528 rows=0 loops=1)
   Output: this.id
   Filter: (other.id IS NULL)
   Rows Removed by Filter: 80
   ->  Merge Join  (cost=198.53..271.00 rows=41 width=21) (actual time=0.360..0.873 rows=80 loops=1)
         Output: this.id, this.journal_id, this.sequence_prefix, this.sequence_number
         Merge Cond: (company.id = this.company_id)
         Join Filter: ((company.fiscalyear_lock_date IS NULL) OR (this.date >= company.fiscalyear_lock_date))
         ->  Index Scan using res_company_pkey on public.res_company company  (cost=0.26..81.53 rows=16 width=8) (actual time=0.007..0.013 rows=2 loops=1)
               Output: company.id, company.fiscalyear_lock_date
         ->  Sort  (cost=198.27..198.46 rows=76 width=29) (actual time=0.350..0.474 rows=80 loops=1)
               Output: this.id, this.company_id, this.journal_id, this.sequence_prefix, this.sequence_number, this.date
               Sort Key: this.company_id
               Sort Method: quicksort  Memory: 31kB
               ->  Index Scan using account_move_pkey on public.account_move this  (cost=0.43..195.89 rows=76 width=29) (actual time=0.029..0.329 rows=80 loops=1)
                     Output: this.id, this.company_id, this.journal_id, this.sequence_prefix, this.sequence_number, this.date
                     Index Cond: (this.id = ANY (...))
                     Filter: ((this.sequence_number <> 1) AND ((this.name)::text <> '/'::text))
   ->  Index Scan using account_move_sequence_index on public.account_move other  (cost=0.43..21.67 rows=1 width=21) (actual time=0.076..44.451 rows=1 loops=80)
         Output: other.journal_id, other.sequence_prefix, other.sequence_number, other.id
         Index Cond: ((other.journal_id = this.journal_id) AND ((other.sequence_prefix)::text = (this.sequence_prefix)::text))
         Filter: (this.sequence_number = (other.sequence_number + 1))
         Rows Removed by Filter: 34298
 Planning Time: 2.250 ms
 Execution Time: 3557.579 ms
```

Plan After
==========
```
 Nested Loop Left Join  (cost=198.96..371.96 rows=1 width=4) (actual time=0.607..0.608 rows=0 loops=1)
   Output: this.id
   Filter: (other.id IS NULL)
   Rows Removed by Filter: 80
   ->  Merge Join  (cost=198.53..271.00 rows=41 width=21) (actual time=0.336..0.359 rows=80 loops=1)
         Output: this.id, this.journal_id, this.sequence_prefix, this.sequence_number
         Merge Cond: (company.id = this.company_id)
         Join Filter: ((company.fiscalyear_lock_date IS NULL) OR (this.date >= company.fiscalyear_lock_date))
         ->  Index Scan using res_company_pkey on public.res_company company  (cost=0.26..81.53 rows=16 width=8) (actual time=0.007..0.010 rows=2 loops=1)
               Output: company.id, company.fiscalyear_lock_date
         ->  Sort  (cost=198.27..198.46 rows=76 width=29) (actual time=0.325..0.329 rows=80 loops=1)
               Output: this.id, this.company_id, this.journal_id, this.sequence_prefix, this.sequence_number, this.date
               Sort Key: this.company_id
               Sort Method: quicksort  Memory: 31kB
               ->  Index Scan using account_move_pkey on public.account_move this  (cost=0.43..195.89 rows=76 width=29) (actual time=0.026..0.305 rows=80 loops=1)
                     Output: this.id, this.company_id, this.journal_id, this.sequence_prefix, this.sequence_number, this.date
                     Index Cond: (this.id = ANY (...))
                     Filter: ((this.sequence_number <> 1) AND ((this.name)::text <> '/'::text))
   ->  Index Scan using account_move_sequence_index3 on public.account_move other  (cost=0.43..2.45 rows=1 width=21) (actual time=0.003..0.003 rows=1 loops=80)
         Output: other.journal_id, other.sequence_prefix, other.sequence_number, other.id
         Index Cond: ((other.journal_id = this.journal_id) AND ((other.sequence_prefix)::text = (this.sequence_prefix)::text) AND ((other.sequence_number + 1) = this.sequence_number))
 Planning Time: 2.766 ms
 Execution Time: 0.648 ms
```

closes odoo/odoo#116973

X-original-commit: 1a1742cd825ef9c44ac185ce076cce5f1f789c01
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
Signed-off-by: William André (wan) <wan@odoo.com>
2023-03-29 23:37:23 +02:00