Commit Graph
161848 Commits
Author SHA1 Message Date
JF Aubert 65b06f3eff [FIX] mrp: fix planning by workcenter
Since https://github.com/odoo/odoo/commit/926c4d4769db1846d94e2ab5a3e9b02308b0b160
planning by workcenter no longer takes into account unavailabilities of
less than 1 day in month mode, leading to erroneous accumulations
because some calendar unavailabilities (for example from day 5:00 p.m.
to day+1 8:00 a.m.) are missing.
We return to the previous behavior by transmitting all the unavailabilities.

The planning by production no longer displays the unavailability of workcenters.

closes odoo/odoo#123898

Task: 3305266
X-original-commit: d7a803cfbed7aa28d0835f9db974802d4b6f77d1
Related: odoo/enterprise#42017
Signed-off-by: Steve Van Essche <svs@odoo.com>
Signed-off-by: Jean-Francois Aubert (ajf) <ajf@odoo.com>
2023-06-06 14:48:30 +02:00
Xavier Morel 70f131626c [IMP] account_tax_python: simplify code, remove context
- remove context injection added 6 years ago
  (2dab340717) but apparently never
  used, if it's needed in the future it would be much cleaner to
  extract the context(s) into a method and allow overriding that
- filter taxes just once, rather than filter then re-add
- also keeps recordset order which is probably useless but can't hurt

closes odoo/odoo#123651

Signed-off-by: William André (wan) <wan@odoo.com>
2023-06-06 14:48:27 +02:00
Goffin Simon 2ba0446f9a [FIX] account: Display Customer or Vendor in account.move list view
Steps to reproduce the bug:

- Let's consider an analytic account AA linked to customer invoices
- Open AA and click on the smart button Customer Invoies

Bug:

The field customer was not displayed in the account.move list view (same for Vendor Bills)

opw:3179200

closes odoo/odoo#123382

X-original-commit: 8ab9798269513a8bedee7874d1305b1a71b29052
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2023-06-06 14:48:24 +02:00
Jurgen (jugj) 3326df49c6 [IMP] hr(_contract/_timesheet), l10n_be_hr_payroll: Improve the UX of the employee view
This PR adds several UX improvements :
- Timesheet smartbutton : Get weekly view instead of daily
- Attestation (N) : Fix displayed year
- Remove demo profile picture for Marc Demo to allow the new one
- Employee tree view : Allow more flexibility in terms of what you can show and hide on the tree view
task - 3299145

closes odoo/odoo#120659

Related: odoo/enterprise#40766
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-06-06 14:48:16 +02:00
Maximilien (malb) 2eca114f52 [FIX] hr_expense: padding setting
Before this pr the label and the field were way too close, by adding a padding
start the setting become way more readable.

closes odoo/odoo#123887

Task-id: 3338500
X-original-commit: 33d2cf77434c27f3ac382dc45888f7824dbb6bb5
Signed-off-by: Maximilien La Barre (malb) <malb@odoo.com>
Signed-off-by: William André (wan) <wan@odoo.com>
2023-06-06 13:10:42 +02:00
Maximilien (malb) c91d9c5190 [IMP] base: adding margin bottom paperformat to wkhtmltopdf
Before this PR, it wasn't possible to add a custom margin bottom into specific paperformat args.

closes odoo/odoo#123872

Task-id: 3171683
X-original-commit: 0ea1af531ce8887434893f670b1c1e9f075e88c3
Related: odoo/enterprise#42004
Signed-off-by: John Laterre (jol) <jol@odoo.com>
Signed-off-by: Maximilien La Barre (malb) <malb@odoo.com>
2023-06-06 13:10:39 +02:00
Victor Feyens 4e6db76aba [IMP] product,sale: extract computation of price before discount
So that we can in the future harmonize more easily the discount
computation between sale, point_of_sale, e-commerce, ...

closes odoo/odoo#123849

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-06-06 13:10:31 +02:00
Alexandre Kühn d9679cafe0 [FIX] mail: same icon size of expanded message actions
closes odoo/odoo#123798

X-original-commit: 125201ce0b96cada42b6059707ffcb7212909b44
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-06-06 13:10:27 +02:00
Maximilien (malb) 3845ec0742 [IMP] account: bank sync community
Before this PR, there was a button in the onboarding dashboard to do a bank
synchronisation. But this step in the onboarding is not useful in invoicing app.
It is only relevant for enterprise accounting.
So this PR remove the step from the onboarding panel

closes odoo/odoo#120678

Task-id: 3302325
Signed-off-by: William André (wan) <wan@odoo.com>
2023-06-06 13:10:19 +02:00
nni-odoo 1d02705b00 [FIX] l10n_th: avoid singleton error
if a recordset containing more 1 record calls _l10n_th_get_branch_name, it will proudce an error

closes odoo/odoo#123857

X-original-commit: 73adf34a1a7cc9c9fdde9303f5462ead4ec1cc7f
Signed-off-by: Nicolas Viseur (vin) <vin@odoo.com>
2023-06-06 11:45:27 +02:00
Demesmaeker 623e20e181 [FIX] website_sale: show correct terms and conditions from company
Currently, on a multi-company environment with different website domains set, the terms and
conditions web page, which should be company-specific, are not correctly "pulled" if you check a SO

This was due to the website override that searched for a current_website, even if none was set on a
SO, thus setting the website url instead of the company one.

opw-3239061

closes odoo/odoo#123855

X-original-commit: ac5c042d3b1e0774ad430a66142437fc8db2fded
Signed-off-by: Morgane Demesmaeker <edm@odoo.com>
2023-06-06 11:45:25 +02:00
Aaron Bohy f40ab7c811 [FIX] web: BasicModel: clear x2many changes after save
Before this commit, after a save, we didn't remove the changes in
x2many fields (StaticList). As a consequence, if save was called
twice on a record with changes in a x2many, those changes were
sent twice to the server. In particular, if those changes involved
a command 0 (create), the record was created twice.

To reproduce the issue, go to a sale order, add a line, select a
product, click out to validate the row, then click several times
on the product. As you clicked several times, several doAction are
asked to the action service. For each of them, the form view is
asked to save its changes, and thus the same row is created multiple
times.

After this fix, the changes in x2manys are cleared after the first
save, so there's no change the save for the subsequent calls.

opw-3268947
opw-3324848

closes odoo/odoo#123851

X-original-commit: 9073304660ee64c7051b7ed86f8fa3513fe6ba7a
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-06-06 11:45:22 +02:00
std-odoo b90d471e6b [FIX] base: fix selection properties in list view
Bug
===
The web client expects the selection key to be at least an empty array.
(never false), like for a normal selection field, and so if the selection
has been created without an option, it crashes in the list view.

For consistency, we also set an array when there are no tags.

Task-3340671

closes odoo/odoo#123844

X-original-commit: 2e38397c2cfe0e4ed501d4ce7b98f0c47fe6c344
Signed-off-by: Rémy Voet <ryv@odoo.com>
Signed-off-by: Stéphane Debauche (std) <std@odoo.com>
2023-06-06 11:45:19 +02:00
Alexandre Kühn 6741ebdd62 [FIX] mail: no size flicker on message hovering
Following https://github.com/odoo/odoo/pull/123266 that removes
some vertical spacing between messages.

The date text on squashed messages was increasing size of messages
that fits on a single line.

This commit fixes the issue by slightly reducing the size of date
text in sidebar, so that when hovering messages it doesn't affect
the size of messages.

closes odoo/odoo#123799

X-original-commit: 454d250e6c88b09d616d4d3404204d57addf8b28
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-06-06 11:45:16 +02:00
Alexandre Kühn 23e60fb780 [FIX] mail: no access right issue on open chat from message avatar
Before this commit, when hr was installed and Demo clicks on avatar
of Mitchell Admin, open chat failed due to access right exception.

This happens because open chat works only with internal users, and
when we don't know whether the partner has an internal user, we have
to check whether there's a user linked to this partner.
Doing `searchRead()` without passing any field triggers this missing
access right for some reasons.

Only the knowledge of an existing `userId` is enough, so we
can actually just make a `search()` to get the user id. This won't
trigger the access right exception while giving the user id of
the partner if this exists, thus proceeding with open chat request.

closes odoo/odoo#123796

X-original-commit: 2f6dc5f4222d380cf77c6660ccce8b7381e0e64a
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-06-06 11:45:14 +02:00
niyasraphy db8a289384 [FIX] base: search groups with full name
before this commit, if user search with full group
name in the search view of res.groups, currently
it returns no results.

* open groups menu
* search for Sales / Administrator
* will return no result

after this commit, searching a user group with
full name with return the corresponding user
group.

closes odoo/odoo#123723

X-original-commit: 6ef080a4818dd0bb85aa4ef257900522d9e9fbd6
Signed-off-by: Julien Castiaux (juc) <juc@odoo.com>
2023-06-06 11:45:11 +02:00
Sébastien Theys 08a06c6e8f [REF] mail: make thread actions more generic
This will remove the necessity to patch component, and remove
duplciation between discuss and chat window.

Part of task-3265211

closes odoo/odoo#123454

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-06-06 11:45:04 +02:00
Julien Castiaux 27865152bb [FIX] core: missing doc for some subcommands
Run `odoo-bin help`, you'll notice that some descriptions are missing,
this commit fixes that.

Run `odoo-bin shell --help`, you'll notice that the `usage:` line says
`odoo-bin [options]` instead of `odoo-bin shell [options]`. Other
commands that depend on the server cli are broken too. Fix those too.

closes odoo/odoo#121085

X-original-commit: 9c6bac741ff437564e7dbe4d0aa8dbd307b71f8d
Signed-off-by: Vincent Schippefilt (vsc) <vsc@odoo.com>
Signed-off-by: Julien Castiaux (juc) <juc@odoo.com>
2023-06-06 11:44:58 +02:00
dasz eda66f0560 [IMP] hr_recruitment: add refuse candidate server action
closes odoo/odoo#119071

Task: 3280773
Related: odoo/enterprise#40841
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-06-06 11:44:53 +02:00
Florian Charlier 5239a98293 [FIX] website_forum: fix new post button popover
When a portal user asks a question (e.g. on the Help demo forum) and
go back to the forum's home page while their post is to be validated
before they can post again, they're hit with a traceback (because the
offset argument type is incorrect).

Probably coming from switching bootstrap version.

Task-3347773

closes odoo/odoo#123831

X-original-commit: b14edd74d00c0b0054827563f032f2c384503360
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-06-06 10:30:17 +02:00
Hubert Van de Walle (huvw) 60d6b423c3 [FIX] stock: allow the forecasted report to be accessed by it's URL
Steps to reproduce
==================

- Have at least two warehouses
- Go to products -> Acoustic Bloc Screens -> Forecast
- Switch warehouses
- Refresh the page

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

When reloading the page, the action is restored from the router state
(the URL). This means that the context isn't restored. In that case,
`originalContextAction.active_model` won't be defined. We then try to
use `originalContextAction` as if it was a string. But in this case,
it's an object `{active_id: ...}`.

opw-3301164

closes odoo/odoo#123812

X-original-commit: 6205a3b85b6551393c9ed33d0213cff9bc693ba3
Signed-off-by: Tiffany Chang <tic@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
2023-06-06 10:30:14 +02:00
MerlinGuillaume abdae38656 [FIX] account: group by payment status in the invoice analysis
An error is thrown when displaying the invoice analysis with a group by
on payment status when there is at least one invoice partially paid

Steps to reproduce:
1. Install Invoicing
2. Open Invoicing and partially pay any invoice
3. Go to Invoicing > Reporting > Invoice Analysis
4. Group by custom field: payment status

Solution:
Use all the possible payment_state values of account_move for
account_invoice_report

opw-3213576

closes odoo/odoo#123777

X-original-commit: 0e063bc142f13456935263caa07e6d840c1852f9
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
Signed-off-by: Guillaume Merlin (megu) <megu@odoo.com>
2023-06-06 10:30:11 +02:00
tsm-odoo fc82e4feda [FIX] im_livechat: apply message update in real time
Since [1], the `mail.record/insert` notification is not
sent to the livechat visitor.

Since [2], this notification is not listened by the
notification handler either.

This PR fixes those issues in order to make message update
instantaneous on the public livechat.

1: https://github.com/odoo/odoo/pull/120018
2: https://github.com/odoo/odoo/pull/120893

task-3349454

closes odoo/odoo#123728

X-original-commit: 6f456e3b591ebc86502e4be65768042cc223c3db
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Debondt Didier (did) <did@odoo.com>
2023-06-06 10:30:05 +02:00
althaf shaik a3da3ec98a [FIX] stock: return empty recordset if no rule found
When _get_rule does not find any rule, it returns False. This
could create some tracebacks as we mostly expect a stock.rule.

It will give:
if False in <recordset>:
Hence a traceback:
TypeError: unsupported operand types in: False in stock.rule()

By applying these changes will resolve this issue.

Sentry-4206998573

closes odoo/odoo#123194

X-original-commit: d6a0b9810ffc7fad68ebf7b13902747d43024455
Signed-off-by: Adrien Widart (awt) <awt@odoo.com>
2023-06-06 10:30:03 +02:00
Andrea Grazioso (agr-odoo) ce28cb2683 [FIX] account_edi: send payment xml in "Send receipt by email" action
With MX edi company setup
Create an invoice, validate cfdi
Register payment, validate cfdi
Action > Send receipt by email

Issue: payment xml is missing from email composer

opw-3289582

closes odoo/odoo#123168

X-original-commit: ed6c3c3a4a6c5c685e709734c536a5e4252b4eb8
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Grazioso Andrea (agr) <agr@odoo.com>
2023-06-06 10:30:00 +02:00
Luis Manuel [Vauxoo] ad72ee0cbb [CLA] Update Vauxoo's CLA adding LuisMzz
Incorporate Luis Manuel (LuisMzz) as Vauxoo's contributor.

I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

closes odoo/odoo#123804

X-original-commit: 5f040ad7a7eb98c572f847d7e936d1577d70942f
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-06-06 09:19:39 +02:00
Jurgen (jugj) 4c772ecfb9 [IMP] hr_recruitment: Make the last job position used the default one at creation
task-3133112

closes odoo/odoo#123781

X-original-commit: 388cbee9537b460ef80401d3a33b258d761477c2
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-06-06 09:19:36 +02:00
Maximilien (malb) 441d779a43 [IMP] account: tax filter
Before this pr, it was not possible to do a search on the description of the
taxes. I've added the search filter for the tree view.

Also correcting a forgotten "or" in another search view and a missing uppercase.

closes odoo/odoo#123773

Task-id: 3332762
X-original-commit: 5e2e52f10131f0de19638c47347dbcc445a8c531
Signed-off-by: William André (wan) <wan@odoo.com>
2023-06-06 09:19:28 +02:00
sofiagvaladze 4a68ec46ec [IMP] hr_recruitment: avoid sending stage change message to unarchived applicants
Purpose:
When the applicant is unarchived, they are automatically set back to
first stage. This is done automatically. In case there is automated
message post configured for that stage change, it will send the mail to
the applicant. We want to avoid this.

After this commit, the automated message related to the stage change
will not be posted in case the applicant has been just unarchived,
even if it is configured for the stage.

task - 3267915

closes odoo/odoo#120506

Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-06-06 09:19:23 +02:00
divy-odoo 2af270d76a [FIX] website_form: prevent input field type change
The translation of input "default values" is allowed only when
`type="text"`. However, email field values are translatable because of
strange behaviour:

- Go to website (Edit mode) > Add a form block.
- Select the existing email field > Change label position > The input
is transformed into a `type="text"`.

Each time a "non-custom" field is re-rendered, The `_getActiveField()`
method is obtaining field related data from the database, including its
type, which changes it back to the original value ("char").

The goal of this commit is to fix this behaviour using `_getFieldType()`
to set the right field type instead of the default one.

task-3247520

closes odoo/odoo#123819

X-original-commit: caf6183c2a46ee1843b4df902fe0a96dfe3740d0
Signed-off-by: Outagant Mehdi (mou) <mou@odoo.com>
Signed-off-by: Divyesh Vyas (divy) <divy@odoo.com>
2023-06-06 08:06:13 +02:00
Victor Piryns (pivi) 359a3444b2 [FIX] sale_project: proj.profit. w/o lines from other projects
Current behaviour:
If in 1 SO we have 2 service lines, each making their own project (for
ex: 1 with a template project, the other without), these 2 lines are
present in both project profitability report, skewing the margins,
as costs calculated on a per-project basis, while sol are aggregated.

Expected behaviour:
Don't include services that have their have another project than the
current one in the profitability report. (Project profitability `A`
shouldn't show services that are linked to project `B`).

Steps to reproduce:
- Install Sales, Project, Accounting, Timesheets
- Activate Analytic Accounts in Settings
- Create a project template
- Create 2 service products, both create a Project when confirming
  the SO, one has no project template, the other has a template (the
  one we create just beforehand)
- Create an SO, add the 2 lines, 1 for each service, 5 and 3
  quantity respectively > Confirm SO
- Go to the Project's Update panel of either created project, we can
  see that both lines are present. If you timesheet in a task in
  either project, it will show up in both project's profitability
  report.

Reason for the problem:
In some places, when we are constructing the domain that is used to
fetch the sale order lines that will be added to the profitability
items, we fetch the correct sol (only linked to this project), then get
the sale order linked to this line, and we search all lines related
to that SO (so we included products that are not services, for
example materials necessary for a service). This flow includes lines
that may be linked to other projects.

Fix:
We fetch SOL linked to the current project or that have no project
(for materials).
⚠️ **known limitation** Material lines are shared between
projects (because of `('project_id', '=', False)`), but that's
already current behaviour, even before this fix.

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

opw-3300322

closes odoo/odoo#123803

X-original-commit: d0735a6168f5c019d5c03190f930882addd2496a
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Signed-off-by: Piryns Victor (pivi) <pivi@odoo.com>
2023-06-06 08:06:10 +02:00
Preksha Chouhan eaf506c27b [FIX] mrp: prevent traceback while date_finished field is null
While creating a new Manufacturing Orders, if user set value of 'date_finished'
field in the 'Work Orders' as null. As 'date_finished' field is not required,
user might have removed it by using other way.

Traceback will be generated.

'>' not supported between instances of 'bool' and 'datetime.datetime'

This commit will check the condition if the value of 'date_finished' is set or
not.

sentry - 4197616234

closes odoo/odoo#123802

X-original-commit: 11f6f2315159d321180e0fd6c9bc5747c5a7e781
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Preksha Chouhan (prec) <prec@odoo.com>
2023-06-06 08:06:07 +02:00
Panagiotis Kyriakou 577bdbcd87 [FIX] project: revert current stage notification
This commit reverts a previous commit which allowed to
display the current stage when the state is changed.

The reverted PR: https://github.com/odoo/odoo/pull/119925

The reversion was done as what was implemented does not
follow the standard display of tracking messages and
because it doesn't look good in the chatter.

Task-3336184

closes odoo/odoo#123797

X-original-commit: eff511140175ba8224c2f9be59a798a3e1dee6da
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-06-06 08:06:05 +02:00
Sanket Brahmbhatt 5e7c538a3d [FIX] sale_timesheet: missing other_costs sequence in project update
when the user tries to access the project update
View of a project and at least one timesheet of that project has
timesheet_invoice_type='other_costs', a traceback might be occurs
saying the other_costs does not exist in a dict used for
the sequence to display the project profitability in a certain order.

closes odoo/odoo#123776

Sentry: - 4204230673
X-original-commit: 8e47dd6862811b1b3d2495bbc6bc383aea098a8f
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-06-06 08:06:02 +02:00
Kartik Chavda f7037c3515 [IMP] portal,project: reduce the size of the wizard dialog in project
In this commit, in this commit, We have changed the size of wizard
dialog to medium instead of large.

task-3259212

closes odoo/odoo#120211

Related: odoo/enterprise#40577
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-06-06 08:05:50 +02:00
nni-odoo 84ac1d1093 [IMP] l10n_th: Tax Invoice
When an invoice is issued in Thailand, the Revenue department will make a note that taxes need to be paid. This is important for both corporate tax and VAT purposes. A tax invoice is important to be generated and should contain the title "Tax Invoice".
On top of that, the tax invoice should also contain the information on supplier's tax id number (headquarters or branch number). In this case, we set the original Odoo invoice to be labelled Tax Invoice and create another invoice called commercial invoice.

2879718

closes odoo/odoo#123679

X-original-commit: 1cdaa362c9f0377a7ec4929c2f581ccd84ae3b33
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Nicolas Viseur (vin) <vin@odoo.com>
2023-06-06 03:49:51 +02:00
Trịnh Ngọc Hưng d5511a4fc4 [FIX] account: account type of cash diff gain
When you need to consolidate revenue from sales activities,
corresponding with the cost of goods sold to determine gross profit, the
figures will be inaccurate due to the inclusion of other income sources.

closes odoo/odoo#123813

X-original-commit: 4ef36973a124d85486ec3a5d93a1fda6920b7097
Signed-off-by: William André (wan) <wan@odoo.com>
2023-06-06 01:13:43 +02:00
snd c76881ab7e [FIX] stock: dont reassign package when removed in 3-steps delivery
In a 3-steps delivery with backorders, when removing the package in the 2nd step, it should be absent from the last step (OUT picking).
However, assigning a package on the backorder of the 1st picking and creating a new backorder reassigns the package to the OUT picking.
Settings: 3-steps delivery, packaging
Steps:
- create a SO of product A for 10 units
- on PICK_1 picking: put 2 units in Done and put in a package, validate, create a backorder
- on PACK_1 picking: remove the destination package for the 2 units, validate, create a backorder
- on OUT picking: the stock.move.line does not have a package
- on PICK_2 picking: put 2 units in Done and put in a package, validate, create a backorder
- on PACK_1 picking: the package was reassigned to the destination package
- on OUT picking: the stock.move.line has the original package that was removed before

This fix ensures that a package can't be assigned on 'done' stock.move.line

closes odoo/odoo#123743

X-original-commit: bd2b7f816a155ea25cc8c34cd5abe599dac73c1e
Signed-off-by: Diez Stéphane (snd) <snd@odoo.com>
2023-06-06 01:13:41 +02:00
Julien Van Roy 1c359c3106 [FIX] account_edi_ubl_cii: handle fixed taxes in UBL/CII
Use case: the eco-taxes (recupel, auvibel, etc) are fixed taxes in Odoo,
which apply before the "regular" (percentage) tax on an invoice line. We
can have one or more fixed taxes and 1 regular tax.

In EN16931, there can only be 1 tax per invoice line. Thus, the fixed
taxes are encoded as charge on the invoice lines (with reason code
`AEO`: "Collection and recycling"). The tags `AllowanceCharge` (in UBL)
and `SpecifiedTradeAllowanceCharge` (in CII) are used. Then a serie of
tax related infos need to be changed: the taxes in UBL/CII should not
contain the fixed ones and the total untaxed amount needs to be adapted,
as well as the total tax amount (since the fixed taxes were removed).

To be able to import the fixed taxes back in Odoo, the charges on the
invoice lines are read and their names and amounts are used to search on
the existing taxes.

task-3274208

closes odoo/odoo#123761

X-original-commit: ff3feddb363984c62fae973cee905a06494b2a28
Signed-off-by: Laurent Smet <las@odoo.com>
2023-06-05 20:04:16 +02:00
tsm-odoo 8098bc13bb [FIX] mail: incorrect message order in chatter
Since [1], messages were ordered in ascendant order if the
`after` parameter was passed to the `_message_fetch` method.

This leads to messages being inserted in the wrong order
when several messages are batched then fetched via the
`/thread/messages` route. In practice, this order can
be removed since the `/channel/messages` route already
orders its messages correctly.

1: https://github.com/odoo/odoo/pull/116666/

task-3349175

closes odoo/odoo#123727

X-original-commit: 597b0b00068f6ab99632563faeb2ea18f5c9056f
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Stockbauer Matthieu (tsm) <tsm@odoo.com>
2023-06-05 17:51:45 +02:00
Florian Charlier 3509ddf3ed [FIX] website_forum: prevent calling vote on multi
This method was supposed to work in multi (see history) but that
behavior was lost somewhere.

Voting for several posts at the same time doesn't mean much in the end
and the function wouldn't work anyway because:

1. Return values wouldn't work in multi
2. It would try to vote n times for each of the n posts in self and
  violate unique constraint.
3. If the last existing vote had opposed value to the new vote,
  the method would create only '0'-valued votes for all the new
  records.

We here then clean it make sure it is not called on several posts.

A test is extended to check votes and records counts.

Task-3267872

closes odoo/odoo#123725

X-original-commit: dc049ce98292e08f5ecf2f20005dc227375dde75
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Florian Charlier (flch) <flch@odoo.com>
2023-06-05 17:51:40 +02:00
Guillaume (guva) 741a6a6df8 [FIX] account: change journal on journal entry
With this commit, we make sure that the name
of an entry is well computed when changing
the journal in the form view.

Steps:

- With fresh db
- Open a new journal entry form
- Change the journal
-> The name doesn't change, it should change
   regarding the code of the journal

Also add a test for the fix which introduced
the issue 46e6ae2941.

opw-3332590

closes odoo/odoo#123724

X-original-commit: 29d59960f7c19a7adda094d1effad6ba5f68f918
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
Signed-off-by: Guillaume Vanleynseele (guva) <guva@odoo.com>
2023-06-05 17:51:37 +02:00
Michele 97d07c8e01 [FIX] mrp: fix format of bom quantity in mrp_report_bom report
If you are using a locale that uses "," as decimal_point and "." as
thousand_seps the parseFloat around formatFloat is not parsing correctly
the float because the parseFloat is not locale-based but uses always the
"." as decimal point. example: in Italy the thousand separator is ".".
parseFloat("3.000,00000") returns "3" as result but the correct result
is "3000" . It is not necessary to use formatFloat but it is needed

closes odoo/odoo#123711

X-original-commit: 48dd3d189a50b4b2a25ce0c3cf6dca0f744fd928
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-06-05 17:51:29 +02:00
Michael (mcm) 32c7c35ac9 [FIX] web: update operator of domain selector
What are the steps to reproduce your problem?

- Go to Settings > Technical > User Interface > User-defined Filters
- Create a new one, select a model (e.g.: '2-Factor setup Wizard' -
  the first one)
- In domain, click on '+ Add Filter'
- Select 'ID', then '>' operator
- Then, change for a char field (e.g.: 'Secret')

What is the current behavior you observe?

- The former '>' operator is present at the end of the list

What would be the expected behavior in this case?

- The former '>' operator should not be in the list anymore (as the
  field type has changed).

opw 3324744

closes odoo/odoo#123706

X-original-commit: 054b6293e384d018fa087dca377f0cbecaee6341
Signed-off-by: Mathieu Duckerts-Antoine <dam@odoo.com>
2023-06-05 17:51:26 +02:00
Benoit Socias 6e26ca030d [FIX] website: do not reuse an existing view key for a page key
When generating a new page key, it was only made sure to not match
existing page keys. This leads to COW happening on existing views if the
key already existed in a view.

This commit ensures that new page keys are not existing view keys
either.

Steps to reproduce:
- Create a page named "snippets".

=> Notification was shown indicating that `website.snippets` is private.

task-3328827

closes odoo/odoo#123693

X-original-commit: e7ef9f0bfc59a468c9f883561c371367cc06c1b7
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Benoit Socias (bso) <bso@odoo.com>
2023-06-05 17:51:23 +02:00
Benoit Socias fc7fa1683c [FIX] website: ignore leading slashes when creating a page
When the name given when creating a new page starts with a slash, the
werkzeug route `/website/add/<path:path>` cannot be matched. This leads
to wrong navigation situations.

This commit removes any leading slash from the entered page name.

Steps to reproduce:
- Create a page.
- Enter "/abc" as name.

=> A 404 error page was reached.

task-3328827

X-original-commit: 7ff29b680d8552f0b4a440b3209a6a37357af21e
Part-of: odoo/odoo#123693
2023-06-05 17:51:23 +02:00
Damien Bouvy 1f0ba75519 [FIX] hr_recruitment: open in main action
For some reason, this is pbly the only action from a menu items that
opens a modal dialog instead of being the main actions. Other actions of
this kind are usually a wizard of some sorts - there is no reason to
behave that way to manage "persistent" data.

closes odoo/odoo#123598

X-original-commit: eecc22becb221ab5e5a476264920ca35eac9afa7
Signed-off-by: Bouvy Damien (dbo) <dbo@odoo.com>
2023-06-05 17:51:18 +02:00
Victor Piryns (pivi) 448b70b0c0 [FIX] sale_project: convert to project currency in profitability
Current behaviour:
All sold services in another currency than the companie's one are not
being converted in the project profitability, but the currency
symbol is correctly set to the one of the project. (related to company)

Expected behaviour:
Sold services in another currency should be converted in the project
profitability.

Steps to reproduce:
- Install Sales, Accounting, Project, and a localization (ex: Sweden)
- Switch to the Swedish company.
- Settings:
  - Activate analytic accounts
  - Make sure the company currency is SEK
  - Update the conversions rates of the currencies
- In products: create a new service (ex: $100)
- Create a new project (make sure it creates an analytic account)
- Sell 1 unit of that service, make sure the pricelist before adding
  the line is "USD Public pricelist" (so the line should be $100),
  add the analytic account to the line. Confirm the SO.
- Add a task in the project, and add the SO as ref to it.
- Go to the project profitability panel, observe that the value of
  the service we just sold is 100 kr (the value of $100, but with
  the symbol for SEK kr).

Reason for the problem:
Lack of currency conversion for services when computing the
profitability items for the project update panel.

Fix:
Similar fix to 68b4ea69c173dd5894bcb42b99e6818f241f9734, but in that
fix we missed the conversion for revenues coming from analytic
accounts (aka services).

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

opw-3274626

closes odoo/odoo#123527

X-original-commit: bf8766b4c15946adac9e2e16a31f11df54cb30f8
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-06-05 17:51:15 +02:00
Odoo's Mergebot 43985a400d [REF] point_of_sale, pos*: reorganize static/src files
pos*: l10n_co_pos, l10n_fr_pos_cert, l10n_gcc_pos, l10n_in_pos,
l10n_sa_pos, pos_adyen, pos_discount, pos_epson_printer, pos_hr,
pos_hr_restaurant, pos_loyalty, pos_mercury, pos_restaurant, pos_sale,
pos_sale_loyalty, pos_sale_product_configurator, pos_six, pos_stripe

Previously, the pos followed the convention established in Odoo for a
very long time to organize its static source files, one folder for js,
one for css and one for xml. In a component-based workflow this makes it
hard to work with as the template of a component is very far in the file
tree from the component itself.

This commit adopts the new convention from the web module, and locates
the js and xml of components in the same folder. It also renames all
files to follow the convention of the rest of odoo that file names
should be snake_case. Some files had additionally been renamed to more
accurately reflect their purpose.

closes odoo/odoo#123498

Linked-to: https://github.com/odoo/enterprise/pull/41923
Related: odoo/enterprise#41923
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-06-05 17:51:08 +02:00
Samuel Degueldre cb2a53d573 [REF] point_of_sale, pos*: adapt import to moved files
pos*: l10n_co_pos, l10n_fr_pos_cert, l10n_gcc_pos, l10n_in_pos,
l10n_sa_pos, pos_adyen, pos_discount, pos_epson_printer, pos_hr,
pos_hr_restaurant, pos_loyalty, pos_mercury, pos_restaurant, pos_sale,
pos_sale_loyalty, pos_sale_product_configurator, pos_six, pos_stripe

The previous commit reorganizes the files in the pos, this commit
renames all of the imports of those files to match their new location.
This is done in a separate commit to allow git to better keep track of
the changes and apply forward-ports more seamlessly.

Part-of: odoo/odoo#123498
2023-06-05 17:51:06 +02:00