Commit Graph
163215 Commits
Author SHA1 Message Date
Adrien Widart (awt) 34c55c5e54 [FIX] mrp: find BoM with other picking type
To reproduce the issue:
1. In Settings, enable "Multi-Step Routes"
2. Create a second warehouse WH02
   - Let WH01 be the existing one
3. Create two storable products P_compo, P_finished
4. Create a BoM:
   - Product: P_finished
   - Components: 1 x P_compo
   - Operation Type: "WH02: Manufacturing"
5. Create a MO:
   - Product: P_finished

Error: Once the product is set, nothing defines the BoM (and
therefore the components, picking type, and so on)

When opening the MO form, the picking type is directly defined with
"WH01: Manufacturing". Therefore, when looking for a BoM, we use
that picking type as criteria -> we will not find the BoM of step 4

Notes about the fix:
- Small behaviour change: once the picking type is set, it does not
change automaticaly (whatever the BoM is)

OPW-3122384

closes odoo/odoo#116515

X-original-commit: 93381af48e20a10c3fded88f010f89cd03cc5131
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Adrien Widart <awt@odoo.com>
2023-03-24 19:21:25 +01:00
Mathieu Duckerts-Antoine 6540757d4a [FIX] web: Domain: improve validation
We make the class Domain detect more invalid domains.

closes odoo/odoo#116471

Signed-off-by: Géry Debongnie <ged@odoo.com>
2023-03-24 14:37:03 +01:00
Louis Wicket (wil) 0c53d28133 [IMP] *: remove "French spacing"
According to Wiktionary, French spacing is "the archaic practice (though
still current in French) of inserting a space around colons, semicolons,
question marks, and exclamation marks". This is not standard practice in
English and most languages of the world.

The purpose of this commit is to start purging the code from this typo,
as it may reflect poorly on the software for some people.

closes odoo/odoo#116167

Related: odoo/enterprise#38542
Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
2023-03-24 12:50:13 +01:00
pedrambiria 70d11f4ca2 [FIX] point_of_sale: Display the correct discount name in paid orders
Before this commit, the discount name in the paid orders was different
from the one displayed when creating the order. This was due to the
fact that the `full_product_name` field was not being sent to the point
of sale, so the discount product name was being used instead.

This commit fixes the issue by ensuring that the `full_product_name`
field is sent to the point of sale, which allows for the correct discount
name to be displayed in the order menu.

opw-3213225

closes odoo/odoo#116473

X-original-commit: 8df45f2b50f01a9312a2513f39b467583d735a1d
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
Signed-off-by: Pedram Bi Ria (pebr) <pebr@odoo.com>
2023-03-24 11:08:52 +01:00
Audric Onockx (auon) 53c128d492 [FIX] sale_timesheet: adapt fields desciption to compute method deletion
In https://github.com/odoo/odoo/pull/105730,
we deleted `_compute_allocated_hours` method,
but it is still referenced in the description of field
`allocated_hours`. In this commit, we erase this reference.
And because it is not compute anymore, no need to specify
`store` and `readonly`.

closes odoo/odoo#116465

X-original-commit: 94f76339b6b15f60a33db5305d67a647c46c2caa
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Signed-off-by: Audric Onockx (auon) <auon@odoo.com>
2023-03-24 11:08:50 +01:00
Aurelien van Delft (avd) 3ffc61f8fa [FIX] product_expiry: fix MemoryError on module installation.
In large databases with > 2M stock_move_lines, installing
the product_expiry module can raise a MemoryError because the
field_cache is overfilled by the computation of the expiration_date
computed stored field.

Adding an _auto_init for this field prevent such errors from being
raised by creating the column manually.

closes odoo/odoo#116456

X-original-commit: 8b82d3154858582f6d321bd6473557fc192af25f
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-03-24 11:08:47 +01:00
det 2bda33784d [IMP] hr_expense: edit account on expense sheet
Before this commit, the field account was readonly on the expense sheet and
the accountants have to go thourgh each expenses to change the account.

After, we allow changing the account on the expense sheet directly.

closes odoo/odoo#116439

Task-id: 3244925
X-original-commit: 3102ec4c3b108be18ccc6856c1c235b0b37d1e00
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
Signed-off-by: Detry Thomas (det) <det@odoo.com>
2023-03-24 11:08:38 +01:00
dhba-odoo 477e4af96d [FIX] web_editor: traceback on empty selection.
Before this commit:

Applying color on empty selection generate traceback.

After this commit:

Now, able to apply color on empty selection.

Task-3089214

closes odoo/odoo#116435

X-original-commit: b4793caddc52b7f4a6a3510a04604b88387e767e
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2023-03-24 11:08:35 +01:00
Victor Feyens 1e48a1a7a5 [FIX] website_sale: do not use cached pricelist on partner update
If the SO partner changes, we shouldn't use the pricelist id stored
on the session, only the new partner pricelist.

opw-3138262

closes odoo/odoo#116434

X-original-commit: 16ba84c25c107996fd0c57f4ffbeb63737601406
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-03-24 11:08:32 +01:00
Andrea Grazioso (agr-odoo) e1b3f32d11 [FIX] account: invoice analysis total always positive
Create a Credit Note, save and confirm
Go to Reporting>Invoice Analysis
Switch to Pivot view, add mesures ntaxed Total and Total, expand rows by Move.

The credit note untaxed total is correctly reported as negative, total
is reported as positive

opw-3223043

closes odoo/odoo#116421

X-original-commit: 06b1f3d0c78fc22250fc544b4c3152a58bfbe05c
Signed-off-by: John Laterre (jol) <jol@odoo.com>
2023-03-24 11:08:27 +01:00
Guillaume (guva) c4b4c4e621 [FIX] account: change move currency
Before this commit, we could not change
the currency on invoice if related journal
has a default currency set.

opw-3226228

closes odoo/odoo#116420

X-original-commit: 7f7743470ac1309d5e047563d06362e54edb552a
Signed-off-by: John Laterre (jol) <jol@odoo.com>
Signed-off-by: Guillaume Vanleynseele (guva) <guva@odoo.com>
2023-03-24 11:08:24 +01:00
Jacky (trj) 85e9c84dab [FIX] pos_sale: add down payment limit
Before:
When taking a SO from the Sales app in the POS, there is no "Down payment limit".
There is either no way to check what has still to be paid. So the POS user can
charge a customer several times for the same down payment because he cannot see
if it has already been paid.

After:
When you click on the Quotation/Order list the amount left to pay is displayed.
When a down payment is chosen and a percentage is entered that is too high and
represents more than the remaining amount to be paid, a warning appears and warns
that the orderline will be adjusted to the remaining price.

closes odoo/odoo#116182

X-original-commit: 185324cc1abf1448d3db976c8e5751196baad3ee
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
2023-03-24 11:08:19 +01:00
Pierre-Yves Dufays b245b8cb6f [FIX] mail: fix error while previewing a template without record
To reproduce the problem:
- Install project
- Remove all tasks
- Go to settings -> Technical -> Email Templates
- Select the template "Project: Task Rating Request"
- Click on Preview
Without the fix, a stack trace is displayed. With the fix, the preview is
displayed with the message "No record for this model" for the field "Test
record".

Technical note: the error happens because error_msg was not assigned in the
compute method of that field when the reference to the record is missing or
incomplete.

Task-3196081

closes odoo/odoo#116431

X-original-commit: 1f296539210a07e0b1aed0d9d3cd736c5cb33375
Signed-off-by: Dufays Pierre-Yves (pydu) <pydu@odoo.com>
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-03-24 10:04:46 +01:00
Pierre-Yves Dufays 6cfbcc46a7 [IMP] test_mail: add template preview test about recipients
Add a test that check recipients displayed in the template preview. This test
has been added following the fix that solves the template "partner_to" not
displayed in the preview.

Task-3196081

X-original-commit: 86a492275e56217a5edd57d99a0db7576aa91377
Part-of: odoo/odoo#116431
2023-03-24 10:04:46 +01:00
Pierre Paridans f949217256 [FIX] web,mail,web_tour,test_main_flows,tests: no hardcoded user agent
Main Flow Tour Mobile shouldn't require a specific `user_agent` as it
targets a small screen and not a mobile platform (iOS, Android...).

Actually, during refactoring of the tours (odoo/odoo@3a798039d6),
a confusion was made between the legacy `isMobile`, which represents a
small screen (cf. `env.isSmall`) and `isMobileOS`, which targets
"mobile" platforms (ie. iOS, Android...) independently of the screen size.

This commit applies the proper condition (isSmall) for the tours
management and removes the useless `user_agent` property. It also
removes the logic added to support custom user_agent in the Chrome
automation for testing.

closes odoo/odoo#116186

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-03-24 09:05:13 +01:00
David Monnom (moda) bcdcebfbf3 [FIX] point_of_sale: crash at startup number_buffer
Previously, the productScreen component used numberBuffer.use(), this
function has been removed in this PR :
- https://github.com/odoo/odoo/pull/112219

This removal causes a crash when in mobile mode. This is because the
productScreen component tries to reset the buffer when it is mounted
with this.numberBuffer.reset().

The problem is that in mobile mode no component initializes the buffer
in productScreen, which causes an error.

Now the number buffer is again initialized in the productScreen
component and not in its children. This solves the problem.

closes odoo/odoo#116457

X-original-commit: d317a7093c07a955abee1979ad8c3235cd16faef
Signed-off-by: Samuel Degueldre <sad@odoo.com>
2023-03-24 07:45:26 +01:00
Hansun (hale) 6a54992575 [FIX] event{._sms}: event: access right for admins of event app
1. Install [Events]

2. On [Settings], create an admin for Events (uncheck all other rights)

3. Click on Events, enter an event

3. Click on [Communication] tab, and try adding a line

Issue: accessing ir.model is blocked
Solution: Find another way

Original fix in 15.0: #112527
Fix of the fix in 15.0: #115881
Original forward-port in 16.0: #115101

This commit is fixing the original forward-port in 16.0 and includes
the fix of the fix.

affected branch: 16.0-master
opw-3163138, 3193659

closes odoo/odoo#116438

X-original-commit: 38594f13586d95c8ed74593ea368e8b51826740b
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Lee, Hansun (hale) <hale@odoo.com>
2023-03-24 07:45:15 +01:00
william-andre 47c3eb5c3d [FIX] account: do not recompute account when partner change for ODs
Reproduce:
* Create a journal entry
* Add a new line
* Select account
* Select partner

The selected account is annoyingly changed/removed.

This should only be done for invoice-like documents. The account is
selected manually for miscelaneous operations.

closes odoo/odoo#116436

X-original-commit: 55826a514b0a25aff03dde2d4bc9f520fa295203
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: William André (wan) <wan@odoo.com>
2023-03-24 07:45:13 +01:00
Rahul Prajapati 6eb6558566 [FIX] account_edi: file validation while uploading
This issue was caught in sentry.
When we try to create or update an invoice by uploading an `.xlsx` attachment,
it raises an Error as it will go to convert it into XML tree because the
concerned LOC will check `xml` in `mimetype` of attachment which is
`application/vnd.openxmlformats-officedocument.spreadsheetml.sheet`.

sentry-3929855076

closes odoo/odoo#116343

X-original-commit: 400932b5ad89ac124bd1fa8373e21b569cf3d779
Signed-off-by: William André (wan) <wan@odoo.com>
2023-03-24 07:45:10 +01:00
Lucas Lefèvre b6c4cbe07d [IMP] spreadsheet: update o_spreadsheet to latest version
### Contains the following commits:

https://github.com/odoo/o-spreadsheet/commit/59f25bb4 [REL] 16.3.0-alpha.2
https://github.com/odoo/o-spreadsheet/commit/d0189bd0 [FIX] config: bump owl version
https://github.com/odoo/o-spreadsheet/commit/115e1d2b [FIX] tests: fix component tests and their organization
https://github.com/odoo/o-spreadsheet/commit/e42786ad [FIX] Top_bar: Opening a menu should close the composer Task: 3076218
https://github.com/odoo/o-spreadsheet/commit/45f4c5c3 [FIX] range: show ref error after removing col/row
https://github.com/odoo/o-spreadsheet/commit/c55d601d [IMP] figure: add snap to figure drag & drop
https://github.com/odoo/o-spreadsheet/commit/7cbde524 [FIX] side panel: onSidePanelClose prop never call on X symbol click
https://github.com/odoo/o-spreadsheet/commit/308e5d6c [IMP] figure_chart: Double click on chart open the sidepanel
https://github.com/odoo/o-spreadsheet/commit/9781b7e3 [FIX] composer: fixed composer placeholder issues

closes odoo/odoo#116338

Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2023-03-24 07:45:07 +01:00
Victor Piryns (pivi) c0ae3e70e1 [FIX] project: search view for activities on tasks should be correct
Current behaviour:
When checking on the activities that are "Late/Today/Future", the
resulting search view doesn't apply any filter.

Expected behaviour:
If you click on "Late" activities for Tasks, then you should see
only the "Late" activities, not all of them.

Steps to reproduce:
- Install Project
- Create a project and 3 tasks for that project
- On each task, put an activity that is "Late"/"Today"/"Future"
  respectively (1 activity per task)
- Click on the activity widget (top-right in the header) > Tasks > Today
- All tasks are shown, not only those for "Today"

Reason for the problem:
Since the view refactoring from
b77f60b , search filters follow an
hierarchy of inheritance to reduce code duplication. The issue is
that it's "delegation" inheritance (so the childs have a mode of
type "primary") but all their priorities are the sames, so the
algorithm for view matching (refer to documentation) matches the
parent view, that doesn't contains the necessary filters for the
activities, which are defined a few level lower in the inheritance.

Fix:
Add descending priority in the inheritance chain so we match the
lowest child when web-client requests the search view.

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

opw-3234525

closes odoo/odoo#116337

X-original-commit: 609f484
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-03-24 07:45:04 +01:00
tsm-odoo b34d0fd7c9 [FIX] mail: fix temporary_id not supported as message_post parameter
Since [1], the `temporary_id` of a message is passed to the
`message_post` route in order to renconciliate the temporary
message on the client side and the real message created by the
server.

This led to crashes when sending message on the chatter because
this parameter was not allowed as a `_notify_thread` parameter.

Since this parameter is highly specific and isn't linked to any
business/model code, this parameter is now passed via the context
thus solving this issue.

[1]: https://github.com/odoo/odoo/pull/116085

closes odoo/odoo#116333

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-03-24 07:45:01 +01:00
Hubert Van de Walle (huvw) 7b368df0fe [FIX] web: binary field filename in form view not updated with pager
Steps to reproduce
==================

- Go to a form view with a binary field, or add one with studio
- Upload a file a.txt to a record
- Upload a file b.txt to another record
- Switch between both records with the pager
- The filename is not updated

opw-3208810

closes odoo/odoo#116323

X-original-commit: 90515916e8adb3edb560d73ec8889ad52319cc1d
Signed-off-by: Luca Vitali <luvi@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
2023-03-24 07:44:59 +01:00
FrancoisGe 1c1dcdb676 [FIX] web: properties test very slow
In tests, if we need to interact with dropdowns, we should patch setTimout so that we don't have to wait x ms for the dropdown to open.

closes odoo/odoo#116319

X-original-commit: 008d4faebabbecb88d4ce514650b59cdc21ff85a
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-03-24 07:44:49 +01:00
desdelinux aea02e9860 [IMP] l10n_pe: Add List of Peruvian Banks
Provides data on Peruvian Banks extracted from the Central Reserve Bank of Peru https://www.bcrp.gob.pe/sitios-de-interes/entidades-financieras.html

closes odoo/odoo#95870

Related: odoo/enterprise#38293
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
2023-03-24 07:44:44 +01:00
tsm-odoo a6c7739191 [FIX] mail: fix message unread counter
This PR fixes several issues with the unread counter:
- Notifications being considered as unread messages (which is not
the case on the server side which resulted in inconsistencies).
- Counter greater than it should be when the last seen message is
not loaded.
- Messages not marked as read on first thread opening.

task-3239957

closes odoo/odoo#116208

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-03-24 06:45:56 +01:00
dhba-odoo c69bf9ac1d [FIX] web: popover collapsed when fewer fields available.
Before this commit:

popover collapsed when there is fewer fields available.

After this commit:

Now, the popover will not be collapsed when there are fewer fields available.

Task-3072813

closes odoo/odoo#116194

X-original-commit: 787b9b0b49793598c44aebc20e4a0c5e7850f5af
Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
2023-03-24 05:49:08 +01:00
Dinuth Perera e0f69b47a2 [CLA] Dinuth Perera
closes odoo/odoo#116112

X-original-commit: 32e33327ce1150f6a74978112dbf1ad6c9a89cc7
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-03-24 04:28:48 +01:00
Joseph Caburnay 73b9d48703 [REF] point_of_sale,pos_*: convert barcode_reader to service
**Notable feature changes**

- PoS app continues to load even if no nomenclature_id is configured.
  - When scanning, an error popup is shown to the user mentioning about
    the misconfiguration.
- We introduce a default error handler that shows the ErrorBarcodePopup
  when there are no registered barcode handlers via the
  `useBarcodeReader` hook.

closes odoo/odoo#115906

Related: odoo/enterprise#38444
Signed-off-by: Samuel Degueldre <sad@odoo.com>
2023-03-24 03:28:42 +01:00
Xavier Bol (xbo) 3081278abc [IMP] project: toggle state if task is subtask without project set
Before this commit, the state mode for subtask without any project set
is not the toggle one as it is the case for the private task.

This commit changes the state mode to have the toggle mode when the
task has no project set, that is, the subtask without any project set
or the private task since a subtask without a project set could be see
as a todo task and not a task in a real process as it is the case for a
task linked to a specific project.

task-3230063

closes odoo/odoo#115781

X-original-commit: e2d7ee73222ab3330da9c45570a4a6330d87c016
Related: odoo/enterprise#38378
Related: odoo/upgrade#4448
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-03-24 02:23:37 +01:00
Xavier Bol (xbo) 58183d47e7 [IMP] project: do not display private on project if task is subtask
Before this commit, since the display_project_id field has been removed and
the project_id field could be unset on subtasks (default value as the
`display_project_id` field), the widget `project_private_task` consider
a task as private if the task has no project_id set.

This commit changes the widget to check if `is_private` field is true
to display the `Private` on `project_id` field value.

task-3230063

X-original-commit: b0a8a9aedb3b5cfb2acb6ff3b10a77c279bda8fd
Part-of: odoo/odoo#115781
2023-03-24 02:23:37 +01:00
Xavier Bol (xbo) de7d0b17c5 [IMP] {sale_}project,{hr_,sale_}timesheet: remove display_project_id field
Before this commit, the `display_project_id` field was a bit confusing
for the user to know what is the goal of this field. Also this field is
available when the user wants to import his data into Odoo, if he does not
know the goal of this field then he could be lost to know which field he
should for his data to import (or even export).

This commit removes the display_project_id field and so a task will be
private one if the project and the parent fields are not set. The
project to set to the timesheet will be the one set on the task or the
one set on one of its parent tasks.

task-3230063

X-original-commit: 22eda5a5ddcfcda9fa6597d6fe21eb20f525799f
Part-of: odoo/odoo#115781
2023-03-24 02:23:37 +01:00
FrancoisGe 2ecfed335d [REF] *: extractProps receive dynamicInfo
Before this commit, the use of multiple <field> with the same name in a
view was not well supported.

Why was this?
Some Field components need to know information related to the <field>
such as context, domain, required and readonly. The solution used before
this commit to access this information is to use the getFieldContext,
getFieldDomain, isReadonly, isRequired functions of the model.
Unfortunately, these only take into account the last occurrence of the
<field> because the model is not aware that the same field is present
several times on the view. The information must therefore not come from
the model. For example, it was not possible to have the same field
twice with 2 different domains. It will use the domain of the last
field for both.

Solution:
We will add the object "dynamicInfo" to the fieldInfo passed to the Fields
extractProps function. This object will contain a getter to get the value
of required, readonly, domain and context for the current <field>.
If a Field needs one of its information, it will just have to get it
from extractProps.

Part of Task: 3179751

closes odoo/odoo#115197

Related: odoo/enterprise#38151
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-03-24 01:24:48 +01:00
Brice bib Bartoletti c45a164b13 [IMP] account: tax tag on any journal item
The aim of this commit is to allow any tax tag to be set on a journal
item and to allow the user to put tax tag from foreign countries in
which they have a VAT number on any tax.

The end goal is to allow the user to impact tax reports from several
country with the same journal item, avoiding the creation of a whole
journal entry and setting the path for some more automation.

Context:
Our user has a company based in Belgium but has a warehouse in
Netherland. Thus, when the company sells anything from that warehouse, it
needs to fill the Dutch tax report directly.
Moreover, the company needs to fill a grid on the Belgian VAT tax report.
That means that the user would need to gather some journal items on both
the Belgian tax report and the Dutch tax report.

Before this commit:
The user can't set tax tag from another country on its tax nor in the same move.

After this commit:
The user can set tax tags from any country for which its company has a
foreign vat number on any tax and in a move

Task-id: 3196547
opw-2810712

closes odoo/odoo#113027

Related: odoo/enterprise#37247
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
2023-03-24 00:20:39 +01:00
Dylan Kiss (dyki) f39c28ec45 [IMP] account,purchase: vendor bill line matching
The current algorithm to match vendor bills with purchase orders was written
while keeping in mind that the vendor bill data came from an OCR scan and was
thus not very detailed or totally reliable.

The current algorithm tries to match in this order:
1. Document reference(s) match(es) one or more purchase orders and the total
amounts of the bill and the purchase order(s) match as well.
2. Document reference(s) match(es) one or more purchase orders and the total
amount of the bill matches a subset of lines in the matched purchase order(s).
3. Document reference(s) match(es) one or more purchase orders but the amounts
do not match.
4. No document reference, but the vendor and total amount of the bill matches
exactly one purchase order.

When we generate a vendor bill from an EDI document (electronic invoice), we do
have very accurate information however and can also match line by line, since
our vendor bill will contain separate lines.

In this commit we add an extra algorithm specifically for EDI documents:
* We find all purchase orders matching the vendor bill reference(s)
* For every vendor bill line (having a unit price), we try looking in our
matched purchase orders' lines for the same unit price and a remaining
quantity higher than or equal to what is in the vendor bill. If multiple matches
are found, we check the name similarity and take the most similar line.
* We replace the vendor bill line with the purchase order line, changing the
quantity to the one on the original vendor bill line.
* Unmatched vendor bill lines remain untouched.

We also remove matching method 2 (see above) for EDI documents, in favor of the
new algorithm.

This approach makes that more purchase order lines will be able to get matched
when using EDI documents.

task-3140712

closes odoo/odoo#112684

Related: odoo/enterprise#37061
Signed-off-by: Laurent Smet <las@odoo.com>
2023-03-23 23:16:55 +01:00
tsm-odoo 08278d582b [FIX] mail: crash when message has no author
This commit fixes a crash that occured when a message has
no author. The author avatar url was assuming an author
would always be given while it is not the case.

closes odoo/odoo#116306

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-03-23 21:13:05 +01:00
Damien Bouvy dbc6b60839 [IMP] web: 'edit stage' vs 'edit' wording confusion
When grouping a kanban view by a m2o field, a configuration menu
('cog' menu) is available with actions available on the target
record.

This menu contains the entries 'Fold' and 'Delete' which have very
generic wording, and for some reason 'Edit Stage', which of course only
makes sense if the target record is a stage of some kind. Often, it
might not be - there is no reason to use such restrictive language.

Task-3244415

closes odoo/odoo#116299

Signed-off-by: Bouvy Damien (dbo) <dbo@odoo.com>
2023-03-23 20:12:48 +01:00
Thibault Delavallée 2c5738d7ab [FIX] website_forum: assign value for computed 'karma_flag' field
Before this commit, the compute method was not returning the value for the
field karma_flag field, and thus it was returning compute method failed to
assign value error.

After this commit, the compute method will return correctly set the value
for karma_flag field from the forum.

closes odoo/odoo#116281

X-original-commit: odoo/odoo@bfa3f2d
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-03-23 20:12:45 +01:00
Maximilien (malb) deee288909 [IMP] l10n_{latam_invoice_document,ec,ar,cl}: translate
In the following task (https://github.com/odoo/odoo/pull/112803) there is two commits. One of them remove a change made in the other by mistake. We did a PR in saas-16.2 to revert the impacted localisation (https://github.com/odoo/odoo/pull/116292). The goal of this pr is to add back the translation for latam invoice documents.

closes odoo/odoo#116224

Task-id: 3244168
Signed-off-by: Josse Colpaert <jco@odoo.com>
2023-03-23 19:13:49 +01:00
Tom De Caluwé 41e3411776 [FIX] website, *: keep table of contents title and menu entries in sync
*: web_editor

The table of contents menu entries are generated automatically which
poses a problem in translation mode. The menu translation entries
are not be editable separately, but the users might be trying to.

This commit shows a notification when the user clicks on the menu
entries while in translation mode, explaining that they are generated
from the title entries.
It was initially intended to use a tooltip - but the amount of code
needed to display a tooltip without marking the DOM as modified is
needlessly complex.

To avoid that styles applied on a plain text during translation were
also appearing in the navigation menu, an attempt at adding a span
around them to make sure that their translation was distinct from the
one inside the main content. But this led to the risk of losing
existing translations.
Because of this, and because that situation seems unlikely, any
remaining style in the navigation menu is instead stripped when the
table of content is started to maintain consistency with what is shown
during translation.

An `o_translation_without_style` class has been introduced to indicate
to the synchronization mechanism that only the text must be replicated
for those elements.
For labels that have a different `data-oe-translation-initial-sha` than
their related header, that value is temporarily kept in another
variable, the value is replaced by the one from the header, which make
the synchronization mechanism properly associate them, then on save
the initial value is restored so that the translation is saved for the
right slot.

task-2752391

closes odoo/odoo#116270

X-original-commit: 5776a358e1b42186d2c26c9bc25010a12811f416
Signed-off-by: Outagant Mehdi (mou) <mou@odoo.com>
2023-03-23 12:14:54 +01:00
Saran440 afcf0fba8d [FIX] purchase: default currency from context
closes odoo/odoo#116238

X-original-commit: ba6f90c2d664b7cef7f7ecd619b763ad6fe2138b
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-03-23 12:14:51 +01:00
vishal padhiyar 78b7e9cca9 [FIX] web_editor: image cropping gives traceback
Before this commit:

The traceback appears after cropping an image and then trying to crop it again.

After this commit:

Cropping an image and then cropping it again won't give us tracebacks anymore.

Task-3134764

closes odoo/odoo#116262

X-original-commit: 83cf218b131c47b711327a224b0a0fd81406e8c3
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2023-03-23 10:05:50 +01:00
Jurgen (jugj) f020b58f3f [IMP] hr_holidays : Log note when manager changes the time off type
task - 3195707

closes odoo/odoo#116253

X-original-commit: 268a2dca9eda9c29b965d4e413de82dd9bdbb1b6
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-03-23 09:07:05 +01:00
pedrambiria f5067bc472 [FIX] point_of_sale: show the promotion line for the refund
Before this commit: if you wanted to refund an order that contains a
promotion line, it did not show the promotion line to refund. The
problem was that, during the initialization of an order from JSON, it
calls `set_partner` and `set_pricelist`. It causes a call to
`_updateRewards()` inside the `pos_loyalty`, which will remove the
promotion line. But it doesn't need to update the rewards when it
creates the order object from JSON.

The solution is to prevent calling `set_partner` and `set_pricelist`
when it creates the order object from the JSON.

opw-3111578

closes odoo/odoo#116236

X-original-commit: a03fa619f1388fb8033128a44eeb5451ef150890
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
Signed-off-by: Pedram Bi Ria (pebr) <pebr@odoo.com>
2023-03-23 09:06:59 +01:00
Jorge Pinna Puissant 04d5fb2255 [FIX] *: simplify concrete field API - remove update prop
Since [1], the update props is not used anymore in the field API. Some
utilization were missing in the refactoring.

[1]: https://github.com/odoo-dev/odoo/commit/b5db53b5df6403d2d9b57771854bc36aa5d83583

task-id 3241162

closes odoo/odoo#116229

X-original-commit: d212e46119a187452eb6c6d52b8592f28a633dd0
Related: odoo/enterprise#38579
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-03-23 09:06:52 +01:00
Corentin Thaon (thco) f130a37470 [FIX] account: state dependency _compute_amount
Reintroduction of the dependency on the state of the account.move for the _compute_amount method.

Some customers are experiencing problems following the migration to version 16. If they had draft 'account.move' before the migration, the 'amount_residual' field is set to 0 during the migration. When they validate the move after the migration, it goes directly to the paid status because the field is not recomputed.

opw-3182437
opw-3196490
opw-3229872

closes odoo/odoo#116180

X-original-commit: 3c7f6c3e39c05d7dfd24dd1b73f7bb3f19230f72
Signed-off-by: Laurent Smet <las@odoo.com>
2023-03-23 09:06:44 +01:00
Nicolas (vin) 783733cf33 [IMP] hr_expense: avoid adding wrong expense_line_ids
You cannot validate and expense report having expense_line_ids of
different payment mode.
But so far, it was possible to select these lines, and it would
be blocked upon saving.

We will improve this behavior by extending the domain on the
expense_line_ids field and disallowing to add lines that would lead to
an error later in the process.

It will also correctly handle the creation of new line via the expense
report form view, and add the paid by field as optional hidden in the
view in order to allow to find more easily the expense line that are
causing issues.

task id # 3221780

closes odoo/odoo#116077

X-original-commit: ec18bd414c831a9af67802dcd5d7181ef8d43049
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
Signed-off-by: Nicolas Viseur (vin) <vin@odoo.com>
2023-03-23 08:01:08 +01:00
niyasraphy 7f2e9b852a [FIX] l10n_fr_pos_cert: 'account.bank.statement' object has no attribute 'state'
before this commit, in the code it is referenced
to non existing field state in account.bank.statement model
and thus it raise exception.

after this commit, the exception wont be raised and
validation error will be done based on the state field
state in account.bank.statement.line

closes odoo/odoo#115888

X-original-commit: ecdc3cb32bd96ecc859f385d3541eb2f5e4bad4d
Signed-off-by: Heinz Robin (rhe) <rhe@odoo.com>
Signed-off-by: Laurent Smet <las@odoo.com>
2023-03-22 23:56:08 +01:00
Alexandre Kühn d07f29613d [FIX] mail: emoji picker category selection should not cut emoji
closes odoo/odoo#116254

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-03-22 21:47:49 +01:00
Alexandre Kühn 9f61697411 [FIX] mail: smaller follower subtype dialog
closes odoo/odoo#116251

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-03-22 21:47:46 +01:00