Commit Graph
150523 Commits
Author SHA1 Message Date
Aurélien Warnon aa66cdc596 [IMP] survey: rework survey.user_input views
PURPOSE

Globally improve the main survey.user_input form view to make it more user
friendly.
This includes fields move, new computed fields, a ribbon, ...

SPECIFICATIONS

- Make the Survey User Input model support mail.thread and mail.activity.mixin
  This lets us display the chatter on the form view and allows users to
  schedule activities.
  e.g: discuss a participation among colleagues, add activities to check some
  participation because you think the person has cheated, ...

- Add a ribbon on the form view that says "passed" or "failed" according to the
  user result

- Introduce a new "Answer" column for the questions list view that is a
  modified 'display_name' that displays the answer based on the question type ;
  This allows to see the answers at a quick glance without having to drill down
  every question to look at the "value_char_box", "value_datetime", ...

- Add the attempts count information in a stat-button, when clicked, the user
  is redirected to the list view of all survey attempts of that specific user
  for that specific survey

- Re-organize and move some fields

- Hide some advanced information into debug mode

Task-2729604

closes odoo/odoo#83781

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-05-12 22:13:46 +02:00
William Braeckman d90153180d [FIX] base: fix file extension when using default name
The file extension detection previously used to determine whether a
filename required an extension was not very smart and in fact only
checked for a dot in the filename.
`mimetypes.guess_type` is now used on the filename to better determine
whether the filename still needs a file extension or not.

This commit is a follow-up to: https://github.com/odoo/odoo/pull/90614
Which aimed to fix the same issue.

TaskId-2826061

closes odoo/odoo#91254

X-original-commit: bf904a7f98ba5bcc0a8909cca3241e2965c4464c
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2022-05-12 21:13:34 +02:00
Bruno Boi 551f894b03 [FIX] web: conflicting accesskey/data-hotkey attrs
Issue:
Sometime an element with an [accesskey] attribute could be triggered
through the standard mechanism (accesskeys) instead of the hotkey
service mechanism (elements with [data-hotkey] attributes).

Steps to reproduce:
- open a record on a form view with a pager
- open some dialog (without using the keyboard)
- use ALT+N => the pager behind the dialog switch to the next record

This comes from the browser default mechanism for elements with an
[accesskey] attribute.

The hotkey service should have taken over on this standard behavior but
it did not because of the dialog which became the UI active element.

NB: this occurs only on a certain set of browser/OS combination. See the
following table https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/accesskey#try_it

Before this commit:
The hotkey service would take over the accesskey standard behavior ONLY
inside the UI active element.

After this commit:
The hotkey service will always take over the accesskey standard
behavior, disregarding the UI active element.

closes odoo/odoo#91261

X-original-commit: 582963a6a18ea3a2e8d3e050af4978067bfe21e1
Signed-off-by: Bruno Boi <boi@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-05-12 20:18:58 +02:00
xavier-bouquiaux 4de35f0a6e [CLA] add xavier-bouquiaux to Acsone's CLA
closes odoo/odoo#88520

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2022-05-12 18:50:06 +02:00
Nicolas Bayet 53b4afe747 [FIX] web_editor: keep content on enter on mobile
Before this commit, when hitting enter while not in composition mode,
the editor sometimes removed all the content that was added the previous
composition.

task-4720

closes odoo/odoo#91235

X-original-commit: eddc820417d97b4100a9fb2f9f8934a84bb2417c
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-05-12 17:35:04 +02:00
Nicolas Bayet 6f9110bfb0 [FIX] web_editor: prevent deleteBackspace to move nodes
Before this commit, whenever the element that must be deleted by
`deleteBackspace` matches `isMediaElement` or `isNotEditableNode` and
the cursor was in the beginning of a `<p>` with inline content, the
inline content moved to the parent and the `<p>` was deleted.
Which is wrong.

Now, whenever the element that must be deleted by `deleteBackspace`
matches `isMediaElement` or `isNotEditableNode`, no inline content
moves.

Task-2781328

closes odoo/odoo#91233

X-original-commit: 34d06958d053b070b1e07541214899649602873a
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-05-12 17:35:00 +02:00
tsm-odoo 9699cb4d55 [IMP] mail: remove redundant FieldMany2ManyTagsEmail test
fieldmany2many tags email test is redundant and error prone (multiple callbacks
relying on nextTick to be called in the right order). Let's remove it.

closes odoo/odoo#91226

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-05-12 17:34:56 +02:00
Victor Feyens baa8e3b48f [IMP] sale_quotation_builder: some cleanup(s)
* use action_ as suffix for action methods
* some xml simplification/cleanup

closes odoo/odoo#91222

Related: odoo/enterprise#27259
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2022-05-12 17:34:52 +02:00
Victor Feyens e5e4ca6554 [MOV] sale_quotation_builder: split sale_order_template.py
Part-of: odoo/odoo#91222
2022-05-12 17:34:52 +02:00
Victor Feyens 8d6beeaf26 [IMP] sale_*: delegate values specification to submodels
That way, the method overrides are grouped with the new fields to 
propagate between template lines/options and order lines/options.

Eases code comprehension and maintainability.

Part-of: odoo/odoo#91222
2022-05-12 17:34:52 +02:00
Victor Feyens a84c7ace37 [IMP] sale_product_*: clean python classes specifications
* Enforce line length for fields spec
* clean one little useless import
* prefer single quotes for strings not shown to the end user

Part-of: odoo/odoo#91222
2022-05-12 17:34:51 +02:00
Victor Feyens a945d9043c [IMP] core: simplify & improve docstrings
closes odoo/odoo#90915

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2022-05-12 17:34:38 +02:00
Nicolas Bayet 4338881cd4 [FIX] web_editor: restrict url regex
Inserting `w.r.t` in the editor transformed it into an url.
This kind of content should not be considered as an url.

task-2795012

closes odoo/odoo#91221

X-original-commit: 75c146fac019b952543403736948b803689bd15b
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-05-12 16:05:16 +02:00
Adrien Minet 128f8b5049 [FIX] base_automation: NewId records are written
How to reproduce the bug ?

- install hr_payroll and web_studio
- in Settings > Technical > Automated Actions, create a new action
linked to the Payslip model
- Go to the Payslip app and generate a payslip by choosing an employee
that has work entries

What is the bug ?

When you create an automated action, you will overwrite the origin write
function of the model. However, the origin write function will still be
called by the new write function.
In the new write function, the records will be filtered according to
their ids. This means that if a record has a NewId, it will not be
handled. This is the bug here since the payslip is under creation.

opw-2781751

closes odoo/odoo#91217

X-original-commit: 84775d1b261d3faa33b2d1abf4e2e016c718b398
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2022-05-12 16:05:11 +02:00
Davan CHIEM DAO 5e73d59c7e [ADD] l10n_it_edi: Simplified invoice
This provides the possibility to import/export simplified invoices.
Currently, the import of simplified invoices would not work and the export of invoice without customer address would be blocked.
Simplified invoice will be able to be imported and exported if the customer address is incomplete, it's a domestic invoice and the total amount is below 400€

freeze_time was removed as it was unnecesarry and posting invoice would not be done directly as the invoicing date is in the future wrt the frozen time.

closes odoo/odoo#91215

Task: 2800967
X-original-commit: 8dc17c29c7e032d94f45ec5e2e82f9dd871e4952
Signed-off-by: Josse Colpaert <jco@odoo.com>
2022-05-12 16:05:07 +02:00
Pieter Claeys (clpi) d8935b5001 [IMP] mrp: workorders filter updates
Default filter on workorder list view now also includes ready workorders.
Also adds a filter for draft workorders.

Task: 2799674
Community PR: https://github.com/odoo/odoo/pull/88801

closes odoo/odoo#88801

Signed-off-by: Tiffany Chang <tic@odoo.com>
2022-05-12 16:05:03 +02:00
Pieter Claeys (clpi) c624b80115 [IMP] mrp: demo data update
BoM of table demo data changed

Task: 2799674
Community PR: https://github.com/odoo/odoo/pull/88801

Part-of: odoo/odoo#88801
2022-05-12 16:05:03 +02:00
Pieter Claeys (clpi) 4fad5bd0ca [IMP] stock: disable scrap locations for manufacturing operation types
Task: 2799674
Community PR: https://github.com/odoo/odoo/pull/88801

Part-of: odoo/odoo#88801
2022-05-12 16:05:02 +02:00
Pieter Claeys (clpi) aeda32f9e7 [IMP] mrp: settings grammar fix
Task: 2799674
Community PR: https://github.com/odoo/odoo/pull/88801

Part-of: odoo/odoo#88801
2022-05-12 16:05:02 +02:00
Pieter Claeys (clpi) 1b9689dbe6 [IMP] mrp, stock: update state label colors
Updated state label colors:
- workorder (list+kanban): cancelled -> red
- manufacturing order (list+kanban): draft -> grey, cancelled -> red
- stock picking (kanban): cancelled -> red

Task: 2799674
Community PR: https://github.com/odoo/odoo/pull/88801

Part-of: odoo/odoo#88801
2022-05-12 16:05:02 +02:00
Pieter Claeys (clpi) 1e15fb9b81 [FIX] mrp_subcontracting: open merged MO form view
Bug fixed where when the MRP subcontracting module was installed the merging of MO's would not open the MO form view.
Correctly displays the breadcrumbs as well.

Task: 2799674
Community PR: https://github.com/odoo/odoo/pull/88801

Part-of: odoo/odoo#88801
2022-05-12 16:05:01 +02:00
Pieter Claeys (clpi) 978df88644 [IMP] mrp: search for product attribute values in MO view
Task: 2799674
Community PR: https://github.com/odoo/odoo/pull/88801

Part-of: odoo/odoo#88801
2022-05-12 16:05:01 +02:00
William Braeckman bbad356f13 [FIX] sale_loyalty,pos_loyalty: fix discountable on specific products
Prior to this commit the discountable amount on specific products was
not computed correctly when using fixed price discounts as it did not
take the taxes into account.
They will now be taken into account and result in the correct discount.

TaskId-2834863

closes odoo/odoo#91202

X-original-commit: 669f4cca94af0c022318f6cb508c1c197aae0846
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2022-05-12 14:51:10 +02:00
Rohitkumar (roku) 61569e9bf7 [IMP] sale_project: fix the SO access error even user has correct sales rights
Before this commit, When user has sale order all docuements right, project user right
and try to open a sale order linked with private project then it raises an
access rights error when a user clicks on sales orders in a project, even
though the user has the correct rights due to invalid access on project_ids
field also only project manager was able to see the project stat button on sale order.

so in this commit, make the project stat button visible to project user
and fix the access error on private project for project user.

task-2792884

closes odoo/odoo#91167

X-original-commit: f4e371a4b0903cea92c947b3afc36deee05237da
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-05-12 14:51:03 +02:00
Romain Derie bef18ef86e [FIX] website: fix the /website/info page
- Show the Odoo version only in debug mode to logged in user, as we do
  for the technical module name.
  The purpose of this page is to generate some backlinks and improve
  (does it really?) the SEO of Odoo.com.
  The Odoo version doesn't bring any value and is another way to easily
  retrieve DBs based on their version with a simple Google search.
  While there is many other ways to do so, let's avoid this one.

- Prior to the introduction of `website.page` and the new page serve
  mechanism, there could be template collision when an user would create
  a page with the same key/name than the template of this controller.
  This is not the case anymore.
  We can remove the refresh meta tag.
  See [1] and [2].

- The check to see if the template exists is useless, we don't do that
  kind of check when rendering a controller, we just assume the view was
  not manually deleted by the user.
  I guess it was historically useful when people would not want that
  /website/info page to be show. But now, there is a clean way to "hide"
  this page by simply disabling it in the "Customize" option of the
  website in the navbar.

[1]: https://github.com/odoo/odoo/commit/4cfd86edaa27d09f1066dd017bf466b8b30611e5
[2]: https://github.com/odoo/odoo/commit/7f6c669530ed7f9935de6516fadb7283ac00a9e4

closes odoo/odoo#91131

Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-05-12 14:50:59 +02:00
Wolfgang Taferner 6aa942189d [IMP] website: show author website for localization on /website/info
Since [1] the l10n modules are displayed together at the bottom of the
page and redirect to the Odoo.com accounting page, regardless of the
localization author.

Now, if the localization was done by a third party, we use that author
website as link.

Note that this is already the case for the regular modules, like the
`payment_mollie` app for instance.

[1]: https://github.com/odoo/odoo/commit/562a2ac270ef8aac3afde05625008cef64f62f89

Part-of: odoo/odoo#91131
2022-05-12 14:50:59 +02:00
Horacio Tellez 89bb842246 [FIX] payment: avoid a mismatch between partner's and acquirer's company
In a multi-company environment, a partner of company A should not be able
to make payments for company B. With this commit, if we detect a
mismatch between the companies, a UserError is raised.

Task - 2627751

closes odoo/odoo#91189

X-original-commit: 6064cf2e98f16b42f516dcd1b0793a62436bab33
Related: odoo/enterprise#27245
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Signed-off-by: Horacio Tellez Perez (hote) <hote@odoo.com>
2022-05-12 13:43:36 +02:00
Simon Genin (ges) 959f3ad8b0 [FIX] web: fix record prefix for export dialog
closes odoo/odoo#91173

Signed-off-by: Julien Castiaux <juc@odoo.com>
2022-05-12 13:43:30 +02:00
kais-odoo 60faa91ab1 [IMP] project: add the creator of task as default follower on task
Before this commit, if user does not follow the project then
while creating the task the creator(current user) is not added as
a follower of the task.

So in this commit, add the user creator of a task as follower
by default, even if (s)he is not following the project.

task-2784885

closes odoo/odoo#91170

X-original-commit: bc62557cc3bdcf792f6d3e19d0f0c87e34057f00
Related: odoo/enterprise#27234
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-05-12 13:43:26 +02:00
Florian Charlier b0f233ba86 [FIX] link_tracker,mass_mailing_sms: fix shorten links
Purpose
Fix bugs in link replacement (html and text version)

1/ The replacement of urls in text (not html) was buggy when
* a string includes multiple urls, and
* `base_url` is one of them and not the first
* Also in SMS marketing when adding the sms `id`

When it came to base_url's turn, the replace function for the content would
replace the `base_url` part of a previously shortened url instead of the
distinct `base_url` link.

2/ Ampersand character
A) The ampersand character prevented replacement of an url inside a `Markup`.
Previous tests passed as the tracker was created but the url was not replaced.

B) The ampersand character was not recognized as part of an url for simple
strings.

3/ Replacement of already short links
A faulty logic made it possible to replace "/r/" urls when no "blacklist" was
passed.

Commit
* Ensures that only the base_url link would be replaced instead in this case.
* Adds support for urls with "&"
* Does prevent shortening short urls
* Improves link conversion performance (regex + avoid duplication when there
  are several occurrences of the same url)
* Adds multiple unit tests

Task-2783844

closes odoo/odoo#91164

X-original-commit: 61026806d831b49a7cf5c44ffef3d762986781ce
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-05-12 13:43:17 +02:00
Nasreddin Boulif (bon) 89e98471fa [FIX] hr_recruitment: Don't use archived email server
Steps to reproduce:

  - Install Recruitment module
  - Set a valid outgoing mail server and archive it
  - Go to Recruitment > Applications > All Applications
  - Create a new application
  - Set a Subject and email, then save
  - Click on button 'Refuse'
  - Select any reason (ensure "send email" is checked)

Issue:

  The email is sent to the applicant through the archived email server.

Cause:

  The current action have 'active_test' set to 'False' in the context
  (useful when archiving an applicant though action menu, since it
  trigger action 'action_refuse_reason_apply' and current applicant
  will be archived at that point).
  Therefore, the archived email server will be used (in case it's the
  only one, or if it has more priority than any other one).

Solution:

  Set 'active_test' to 'True' in the context when sending mail.

opw-2845545

closes odoo/odoo#91161

X-original-commit: c4f6bd121d242dca6eefa697dba23fd6f055bbe0
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: Nasreddin Boulif (bon) <bon@odoo.com>
2022-05-12 13:43:13 +02:00
Touati Djamel (otd) bb24e81fd6 [FIX] sale_stock: allow printing an invoice without stock right
Steps to reproduce the bug:
- Install sale_stock and invoicing
- Create a product tracked by serial number “P1”
- Create a SO:
   - Select any customer
   - Select the product “P1”
   - Confirm the SO
- Confirm the linked picking
- Go back to the SO
- Create the invoice
- Post the invoice

- Give “sales” and “accounting“ rights to Marc Demo
- Connect with Marc
- Go to the posted invoice
- Try to print the invoice

Problem:
Traceback is triggered, to print the invoice we have to access the `Lot` field
which is defined in the stock module but as the user does not have access rights
an error is triggered:
https://github.com/odoo/odoo/blob/15.0/addons/stock_account/views/report_invoice.xml#L5

opw-2832396

closes odoo/odoo#91156

X-original-commit: 273671de7313e7560eed08391f50c1d2ee8755e0
Signed-off-by: Arnold Moyaux <arm@odoo.com>
2022-05-12 13:43:09 +02:00
roen-odoo 34d8762958 [FIX] point_of_sale: stop showing "select customer" popup twice
Current behavior:
When gift card module is activated for a certain PoS, and you use
customer account as the payment method without selecting a customer
the popup asking you to select a customer would appear 2 times.

Steps to reproduce:
- Activate gift cards for PoS A
- Start session in PoS A
- Add some products to the order
- Don't set any customer
- Go to the payment page
- Select "Customer account" as payment method
- Click on validate
- A popup will appear asking you to select a customer
- Click "Ok"
- The popup appears again

opw-2824675

closes odoo/odoo#91149

X-original-commit: bbb05cd9246b7478bcf1bb580dbe91ba4fb5856c
Signed-off-by: Masereel Pierre <pim@odoo.com>
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
2022-05-12 13:43:05 +02:00
Julien Castiaux 900411f9c5 [FIX] website: blank page when nondefault homepage
When the homepage was set to a different page than /, the resulting page
was blank.

The problem is related to a change of the rerouting algorithm, before
the httpocalypse it was re-dispatching the request itself, now it is up
to the called to do so. Here it is what `serve_path` does.

closes odoo/odoo#91034

X-original-commit: b00fefec2a26eb36be8a13cb845ee4f12f87d4eb
Signed-off-by: Julien Castiaux <juc@odoo.com>
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-05-12 13:42:57 +02:00
Julien Castiaux 1de40dd85e [FIX] website: wrong canonical URL after reroute
A reroute in an internal redirection, the URL on the current request is
changed. The actual changes occurs on the "WSGI environment", a
dictionnary that is populated with the request information by the WSGI
server (werkzeug in our case). Among all the properties there are
PATH_INFO, RAW_URI and REQUEST_URI.

* PATH_INFO is the standard value, it contains a RFC-3986 path.
  `request.httprequest.path` is based on that value.
* RAW_URI and REQUEST_PATH are two custom values set by werkzeug to
  mimic other popular wsgi servers (gunicorn, uwsgi, mod_wsgi), they
  also only contain a RFC-3986 path.

When rerouting only PATH_INFO and RAW_URI are updated. REQUEST_URI is
left as-is in order to keep the original path somewhere. When building
the cannonical path, one must use the original path instead of the
rerouted one.

X-original-commit: 779486c4dff23b946b4b14e3dca164ecca4f85a8
Part-of: odoo/odoo#91034
2022-05-12 13:42:57 +02:00
Paul Morelle ece83df99a [FIX] website,http: make EndPoint object reusable
It may happen than the routing map is cleared while rendering a qweb
view. For example, if an asset bundle is regenerated, the previous one
is unlinked, which causes a cache clearing.

Previously-generated EndPoint objects aren't found any more in the new
routing map, so `request.endpoint` cannot be used any more after a cache
clearing.

This commit adds hash and comparison magic methods on http.EndPoint so
that EndPoint objects created by a previous routing map generation can
still be used after a cache clearing.

Two tests were added: one to test the comparison and hash methods, and
the other to test them in a real-case rendering.

Commit 80a04f7ebed fixed this bug too, but introduced another issue
which caused many OPW, so it was quickly reverted by deb23450f18 along
with its performance improvement 33167b3928c. This commit replaces
80a04f7ebed with another way to fix the issue.
A third test has been added in order to avoid reintroducing this other
issue.

By the way, this commit also removes the EndPoint.arguments attribute,
as commit 17f1992698 removed all usages of this attribute in Odoo 9.0,
but left this initialization here.

OPW-2834546
OPW-2834549
OPW-2834625

X-original-commit: bdc45422f5c715782b147eecda2403386ba7eb4a
Part-of: odoo/odoo#91034
2022-05-12 13:42:57 +02:00
Kevin Baptiste 72886a6210 [IMP] hr_contract: automatically expire contract when past end date
Automatically closes contracts when the end date is set in the past.

closes odoo/odoo#90714

Taskid: 2845368
Related: odoo/enterprise#27037
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-05-12 13:42:46 +02:00
Kevin Baptiste 7061bacf6a [IMP] fleet: count archived services on vehicle
When a vehicle is archived, its corresponding services/contracts are archived
as well. However, the corresponding records were no longer counted for
the stat buttons.

closes odoo/odoo#90406

Taskid: 2841384
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-05-12 13:42:43 +02:00
anhe-odoo 2ea1d5233c [FIX] google_spreadsheet: fix parameters in spreadsheet pivot insertion
Observed Behaviour

When opening a pivot view (in any of Odoo module) and trying to import
it in a Google Spreadsheet, we get the following error:
UncaughtPromiseError > TypeError
Uncaught Promise > Cannot read properties of undefined (reading 'id')
TypeError: Cannot read properties of undefined (reading 'id')
at AddToGoogleSpreadsheet.addToGoogleSpreadsheet (...)
at HTMLSpanElement.eval (eval at _compile (...)

Expected Behaviour

When trying to import the pivot in a spreadsheet, everything should
work fine, openning a new tab with a Google spreadsheet.

Reproducibility

This issue can be reproduced following these steps:
1. Install the 'Google Spreadsheet" module
2. Go to 'Settings' > 'Google Drive' and set your credentials
3. Go to the Sales App
4. Select the pivot view
5. Click on 'Favorites' > 'Add To Google Spreadsheet'

Fix Description

The original issue was coming from the fact we try to access the ID
of a null view, giving us the reported error. Moreover, after fixing
this issue, we got another error coming from the fact the config
method was called with a domain passed as a list, while it need a
string. Both errors were corrected in the way it was already done in
https://github.com/odoo/odoo/blob/2e5acb4b15422c1ee38c5630e4fdb929d7a24d3c/addons/google_spreadsheet/static/src/legacy/js/add_to_google_spreadsheet_menu.js#L25

Related Issues/PR

opw-2794744
opw-2761065
opw-2752840

closes odoo/odoo#91127

X-original-commit: cd6a2c83a9c9dbc7efcecb69b542a237a30cc8a8
Signed-off-by: Hendrickx Anthony (anhe) <anhe@odoo.com>
2022-05-12 11:32:50 +02:00
David (dafr) ac586931bc [FIX] mrp: Allow multiple users to start the Work order
# Issue:
With User1, create a MO with work orders, and start one Work Order.
With User2, go to the MO, and start the same Work Order
=> Nothing happen, we currently prevent the workorders to have more than 1 open Time Tracking.

OPW-2845080

closes odoo/odoo#91123

X-original-commit: 8cb5aad6126e3f63ee4ef91115c8b4a6be571828
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: DavidFesquet <dafr@odoo.com>
2022-05-12 09:19:13 +02:00
Dossogne Bertrand a63a271768 [FIX] fleet: fix fuel types
There shouldn't be a distinction between full hybrids.
'hybrid' and 'full_hybrid_gasoline' are replaced in this commit by a unique 'full_hybrid'.
fixes task 2629318

taskID 2753096

closes odoo/odoo#90413

Related: odoo/enterprise#26886
Related: odoo/upgrade#3494
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-05-12 09:19:04 +02:00
Romain Derie 156da50e63 [FIX] website: prevent btn on 404 page to be clicked before JS loaded
Before this commit, it was possible to click on the "Create page" button
before the JS was loaded, as that button is a simple link with a href.
But that link is supposed to be handled by the JS which transform the
GET href link to a fake form submit to send a POST request to the
`/website/add` controller.

If the user clicks before the JS had the chance to handle that click and
do the "transformation", the controller will reject the GET request and
a raw 405 error page will be shown.

Now, we wait for the JS to be fully loaded before allowing user to click
on this button.
The fix is made globally as it should be the case of every link related
to this behavior.

Note that the `/website/add` controller was changed from GET to POST
with commit [1]. It most likely forgot to adapt the button from the 404
page which was later done with [2] by using the `post_link` util class
introduced with [3] (for need of website_blog at the time).

[1]: https://github.com/odoo/odoo/commit/714f0aa07f25e8a88a778e8b21c79b48e9801231
[2]: https://github.com/odoo/odoo/commit/2c85c1cb6ee0f6000cd2db182d5b8cfd3d040876
[3]: https://github.com/odoo/odoo/commit/0f2cada32319b3910d6ace6d412cfa94a646c9c7

task-2847785

closes odoo/odoo#91151

X-original-commit: d4a8ec96900c0e0923901bc2672f18aa51b1a9fb
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-05-12 07:27:59 +02:00
Guillaume (guva) 8c89c1810c [FIX] account_check_printing: allow multiple payments
With this commit, we allow mutliple payments with manual
check printing.

Steps to reproduce:

- With manual check numbering
- Create +=3 vendor bills
- In bills list view, select all bills and register payment
- Select Checks as payment methos, and validate
-> Validation Error: The following numbers are already used ...

Setting the check_numbers before calling the super of
payment.action_post.

opw-2830586

closes odoo/odoo#91128

X-original-commit: c26cd9fa30ac9093f5c7500ca1dd9a9f9cfd06a5
Signed-off-by: Florian Gilbert <flg@odoo.com>
Signed-off-by: Guillaume Vanleynseele <guva@odoo.com>
2022-05-12 05:17:16 +02:00
Guillaume (guva) 25d2665582 [FIX] account: unbalanced entry with price_unit 0
Steps to reproduce:

- Create invoice for a prudict at price X > 0
- Change the price to 0 before saving
- Then save it
-> Error : Cannot create unbalanced journal entry

This bug was introduced in 14.0 with this commit fe7d56dc32c71e04b54de9dbd756a48942a832f4
With this commit, we use an ugly condition to catch the
specific case of a tax with price included and amount type division
to avoid changing the price unit if the line balance is zero.

opw-2822635

closes odoo/odoo#91059

X-original-commit: 2b9592cb0ecef235d708ed7810d0613ccd946124
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Guillaume Vanleynseele <guva@odoo.com>
2022-05-12 02:00:03 +02:00
Adrien Widart 56ea31a9ed [FIX] stock: auto-reserve after last step of multi-step receipt
The auto-reserve feature does not work if the products are received in
several steps

To reproduce the issue:
1. In Settings, enable "Multi-Step Routes"
2. Edit the existing warehouse:
    - Incoming Shipments: 2 steps
3. Create a storable product P
4. Create and confirm a SO with 1 x P
    - The delivery D is created and is waiting for one available P
5. Create and validate a receipt for 1 x P
    - An internal transfer T is generated (Input -> Stock)
6. Validate T
7. Open D

Error: The delivery is still waiting for the product while this product
should be reserved. This is correctly working in 1-step receipt

In 1-step receipt, when the user marks the receipt as done, the
destination of the associated SM is WH/Stock and its operation type code
is "incoming". Therefore, the module checks if some other moves (from
WH/Stock) can reserve the newly-available quantity.
However, in [2/3]-steps receipt, the operation type code of the
in-WH/Stock move is "internal". So, the conditions are not respected and
the module doesn't check the needs of reservation.

OPW-2806423

closes odoo/odoo#90715

Signed-off-by: Tiffany Chang <tic@odoo.com>
2022-05-11 22:14:40 +02:00
sofiagvaladze 0476f084a1 [IMP] fleet: add category_id to the vehicle from model
category_id field is populated from the model, but it can be edited.

task - 2828459

closes odoo/odoo#89282

Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-05-11 19:46:00 +02:00
Hiral Bhavsar cfa916379b [FIX] web_editor: traceback on strikethrough with a checklist
Before this commit:

When having a checked checklist and clicking on the `strikethrough` gives
traceback.

After this commit:

No traceback is being generated.

Task-2833325

closes odoo/odoo#91114

X-original-commit: 491a79f6f8f734990a2ece3fd1b3f90d09a55c85
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-05-11 18:50:14 +02:00
Brieuc-brd f8dc60add2 [IMP] mail: AutocompleteInput, add form-control by default
Part of the overall v16 SCSS optimization/restyle, task-2704984

This commit adds the Bootstrap `form-control` class by default to
improve the consistency of inputs in Mail.

task-2850961

closes odoo/odoo#91081

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-05-11 18:50:04 +02:00
bit-odoo a9c03b7b24 [FIX] im_livechat: few changes for livechat
Before this commit:

- When the operator edit or delete a message, but the livechat visitor does not
  receive the updated content.

- If the first message of a series of squashed messages is deleted, the avatar
  and the name of the author are lost on the visitor side.

After this commit:

- Livechat visitors will receive the updated content instantly and disable
  the reactions and replay buttons for the LiveChat channel.

- Displayed message with the avatar and the name of the author on visitor side.

Task-2678397

closes odoo/odoo#91084

X-original-commit: 3d6ff10055deaea1a2295740c5216efce0ef3ef5
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-05-11 16:00:51 +02:00
tsm-odoo 7cfde26a93 [FIX] mail: ensures getMessagingComponent is called after registration
Adds an import to wait for the required components to be added to the messaging
components registry before their parent use getMessagingComponent. Otherwise,
any slight delay could lead to missing components.

closes odoo/odoo#91083

X-original-commit: 45d04504b2b0427b666f16d1b450edb73e4c14e5
Related: odoo/enterprise#27193
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-05-11 16:00:47 +02:00