Commit Graph
168963 Commits
Author SHA1 Message Date
Romain Derie 41e2c4859b [FIX] website: properly filter website.page records on list/kanban view
Note: This fw-port commit cherry-picked and squashed commit [2] directly
      as it was fixing this original commit before it had the chance to
      be forward ported.

Since commit [1], which adapted the website pages list view to OWL, the
records listed on screen are filtered according to the active website
filter. However, the full list of records is still used behind the
scenes for all potential actions.

Steps to reproduce:
1. Go to the pages list view.
2. Select a specific website (if it's not already the case).
   => The total of records in the upper right corner does not match the
      number of pages on that specific website.
3. Click on the "Select all" checkbox.
   => All the pages are selected, including those that do not appear on
   screen.

This is because the records were just visually hidden with a `t-if`.

[1]: https://github.com/odoo/odoo/commit/940f4ee875332dafa1f379970a7683be6b3ee606
[2]: https://github.com/odoo/odoo/commit/db670f64f4c2190f1655f9077ea62885049a3c84

Courtesy of @robinlej and @detrouxdev

Related to task-3676124
opw-3554064
opw-3658648

closes odoo/odoo#149547

X-original-commit: 8d78a916dc8c0eca82e8a6a2c6f5541938709930
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2024-01-22 21:10:46 +00:00
Andrea Grazioso (agr-odoo) 772e713317 [FIX] hr_expense: allow minor edits in expense payment
Create an Expense Report
Add an expense paid by company
Submit to manager > Approve > Post journal entries
Choose the payment method to be Checks
Open Accounting dashboard, in Bank card click on 'Checks to print'
Select the check
Print the check

Issue: Action will be blocked by error
"You cannot do this modification since the payment is linked to an expense report."
This occurs because the system does not allow writing to the payment record
once it has been linked to the expense

This commit allow to edit fields that would not trigger a move
synchronize

opw-3633035

closes odoo/odoo#149440

X-original-commit: fa89fcf7a30edf760bbba1920966ed4595e45fe8
Signed-off-by: John Laterre (jol) <jol@odoo.com>
Signed-off-by: Andrea Grazioso (agr) <agr@odoo.com>
2024-01-22 21:10:45 +00:00
Julien Castiaux 09093a51ae [FIX] survey: bad orm.read usage when updating attendees count
Start a live session, on the manager side stay on the welcome page (the
one that counts how many attendees joined). Using several other private
browsing tabs join the live session. On the manager side, the number of
attendees never changes.

During a previous refactoring of legacy rpc => orm, an error slipped,
instead the records and fields as separated arguments, the two were
passed together as a list in a single argument.

We used the opportunity to increase the verbosity in case of errors and
to enrich our test cases.

Fine tunning of 7422eb6 ([IMP] *: remove legacy rpc)

Task-2834638

closes odoo/odoo#149427

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2024-01-22 19:01:03 +00:00
william-andre b4ccdb34b6 [FIX] account: performance of reconciliation
Instead of trying to find the reconciled lines recursively, we can use
the `matching_number`, since it now has a distinct value for each
subgraph of reconciliation even for partials graphs.

The situation in 16 was computing the graph by doing one query per level
of depth. In 17, before this commit, only one query was done but
computing the graph from each node, leading in a worse time complexity.
The result was that for small batches, it was slightly faster in 17 than
16 but considerably slower for bigger batches.
This commit just makes things go zoom in all cases.

closes odoo/odoo#149336

Signed-off-by: Laurent Smet (las) <las@odoo.com>
2024-01-22 19:01:02 +00:00
Nicolas Bayet 119fa9f974 [FIX] web_editor: fix isDirty check on html fields
The method `getValue` of the wysiwyg could have some cleaning on the
value that will always make it different from the original value.
The _isDirty method of the html field will now make the original value
be processed by the wysiwyg `getValue` to be able to compare it
with the current value.

The sanizite call in `OdooEditor.cleanForSave` had the wrong root. As
we are calling `cleanForSave` for an element that is not inside the
editable, the root cannot be `this.editable`.

task-3679122

closes odoo/odoo#148996

Signed-off-by: Antoine Guenet (age) <age@odoo.com>
2024-01-22 19:01:00 +00:00
Benoit Socias 255eb4c99c [FIX] website, *: generate primary snippet templates for each theme
*: theme_default

Since [1] when installing a theme from the Website builder's Themes tab,
if that theme used other snippets than the default ones in their
configurator pages which were inherited, the import of the theme failed
because the primary template was not generated before the import of the
data files.

This commit relies on each theme calling
`_generate_primary_snippet_templates` before declaring templates that
require them.
In master, the early loading is removed altogether.
See the changes in `theme_default` for the approach that was adopted
through all themes.

Steps to reproduce in master:
- Start odoo-bin with `-i website`.
- Edit home page.
- Go to the "Theme" tab.
- Click on "Switch Theme".
- Pick "CORPORATE / Buzzy".

=> Fails because the `website.configurator_s_banner` template is not
defined.

[1]: https://github.com/odoo/odoo/commit/cfed4e391d11058b1b46417f0b630cdbc4070d7c

task-3670496

closes odoo/odoo#148443

Related: odoo/design-themes#755
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2024-01-22 19:00:58 +00:00
Ethan Vincent 2b3bf4a4f6 [FIX] sale_pdf_quote_builder: skip fmt empty SOLs
**Current behavior:**
Trying to print or send a sale order quotation that contains
non-saleable lines (notes or sections) will result in a
ValueError.

---

**Expected behavior:**
The quotation should print/download or be prepared for sending.

---

**Steps to reproduce:**
1. Create a new quotation with at least one note or section
   line

2. Click the action gear, select Print -> PDF Quote

---

**Cause of the issue:**
A method involved in the control flow for building a PDF from
a quotation, _get_sol_form_fields_mapping(), attempts to format
the sale price of all order lines involved in an order without
first ensuring one exists.

---

**Fix:**
The fix prevents _get_sol_form_fields_mapping() from being
invoked if the SOL does not have a linked doc (i.e., if the
line has no associated product and thus no price).

opw-3664710

closes odoo/odoo#148291

Signed-off-by: Morgane Demesmaeker <edm@odoo.com>
2024-01-22 19:00:57 +00:00
Evgeniia Kotova 2c5a856850 [FIX] sale: change sales team on sale.order if specified on res.partner
Current behavior: If new partner is chosen on sale.order, sales team remains the same.

This fix allows sales team from res.partner to be considered.

opw-3607442

closes odoo/odoo#147231

X-original-commit: ff5a2a419b89fc24b3fbc34edb88c31403484d94
Signed-off-by: Evgeniia Kotova (evko) <evko@odoo.com>
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2024-01-22 19:00:56 +00:00
nni-odoo f3d7a97f69 [ADD] payment_xendit: new payment provider for Indonesia and Philippines
See the README.md file for more details.

2946329

closes odoo/odoo#141661

Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2024-01-22 19:00:55 +00:00
Mehdi Outagant (MOU) 3eb5b3410c [FIX] web_editor: fix invisible background position actions in grid mode
Steps to reproduce:

- Go to website (“Edit” mode) > Add a “Big Boxes” block.
- Switch to “Grid” mode > Select the last column n (while n > 1) and set
a background image on it.
- Try to change the background position > You cannot save or cancel the
changes since the option buttons (“Apply” & “Discard”) are invisible.

This is simply because the grid element was cloned on the background
container (`.o_overlay_background`) with its grid `z-index` style
(with `z-index` === n) which automatically hides the buttons.

The goal of this commit is to fix this behaviour by simply forcing the
`z-index` of the background element to 0.

task-3648466

closes odoo/odoo#150351

X-original-commit: 7dbb25dfeae25f27e10d4052db98c5f9d93699ff
Signed-off-by: Benjamin Vray (bvr) <bvr@odoo.com>
2024-01-22 15:56:57 +00:00
Lucas Perais 3ba89c75be [FIX] web: report: remove CSSCustomProperties in bg and text colors
After the migration to Bootstrap5 (odoo/odoo#95450), some standard
bootstrap classes did not work anymore when *printing* the report
via wkhtmltopdf (bg-dark, bg-black etc.....).
This is because wkhtmltopdf doesn't support CSS Custom Properties and many
Bootstrap5 rules use them (many have already been adapted in the referenced PR or linked ones)
wkhtmltopdf doesn"t support rgba CSS function either.

This fix allows for thoses classes to work when printing as they can be used
if the report was edited via Studio's Report Editor.

closes odoo/odoo#150214

X-original-commit: 9e32609e6920485d690b3bdb1e4dc83b338c8b36
Signed-off-by: Romeo Fragomeli (rfr) <rfr@odoo.com>
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2024-01-22 15:56:56 +00:00
Odoo's Mergebot d64fe336b7 [FW][FIX] mail: fix various web.push issues
PURPOSE

Provide fixes for web push notifications implementation in mail, especially
it has been moved in standard mail in 17.0 .

FIXES

Fix override of recipients computation: add missing keys to match standard
structure

Fix 'notify_by_web_push' being called two times in discuss channels

Fix web push recipients being computed at wrong place: should be done in
a clean override of '_notify_recipients'

Fix access issue when sending push notifications in public channels

Task-3695571
Related to Task-3669738 (Mail: Web Push Models Rename and Fixes)

closes odoo/odoo#150011

Related: odoo/enterprise#54647
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2024-01-22 15:56:54 +00:00
Thibault Delavallée 5b4cddb67c [FIX] mail: fix discuss channel accessing members / partners for notifications
Now that code is fixed there are more access to channel members and partners
to send them push notifications notably. Some tests are crashing when public
users access channel pages and perform actions that send push notifications.

Task-3695571
Related to Task-3669738 (Mail: Web Push Models Rename and Fixes)

Part-of: odoo/odoo#150011
2024-01-22 15:56:54 +00:00
Thibault Delavallée 940c168a20 [FIX] mail: respect 'scheduled_date' for push notifications (backport)
Backport of odoo/odoo@1955c55f86

Sending notifications can be delayed by giving 'scheduled_date' as parameter
for notification process. This is used notably when a process in several
steps should wait for some user input before sending notifications e.g.
rating feedback and update done in two steps.

Sending web push notifications should respect this scheduling as already
done by inbox and email notifications.

Task-3695571
Related to Task-3669738 (Mail: Web Push Models Rename and Fixes)

Part-of: odoo/odoo#150011
2024-01-22 15:56:54 +00:00
Thibault Delavallée 4882ef0a58 [FIX] mail: fix discuss.channel notification recipients computation (backport)
Backport of odoo/odoo@24ebd74dc9

Recipients on a channel notification are computed twice: once using an
override of '_notify_get_recipients' that fetches information of mentioned
recipients; once in override of '_notify_by_web_push' to try to add
recipients for push notifications.

However this is not the right way to do it. Everything should be computed
in '_notify_get_recipients', setting the right 'notification_type' and then
let 'notify_by_MEAN' methods deal with their recipient input.

In this commit we now correctly compute recipients on a given channel
  * mentioned partners;
  * unmuted members on chat channels (push);

Task-3695571
Related to Task-3669738 (Mail: Web Push Models Rename and Fixes)

Part-of: odoo/odoo#150011
2024-01-22 15:56:54 +00:00
Thibault Delavallée e3aa094802 [FIX] mail: fix discuss.channel sending two times push notification (backport)
Backport of odoo/odoo@f312762c6a

'_notify_thread' calls '_notify_thread_by_web_push'. There is therefore no
need to call it once again in discuss.channel override of '_notify_thread'.

Task-3695571
Related to Task-3669738 (Mail: Web Push Models Rename and Fixes)

Part-of: odoo/odoo#150011
2024-01-22 15:56:54 +00:00
Thibault Delavallée 13b80af02e [FIX] mail: fix discuss.channel override of '_notify_get_recipients' (backport)
Backport of odoo/odoo@e3125c8389

A lot of keys are missing compared to standard '_notify_get_recipients'.
This is done in two methods that are updated to include keys defined
in 'MailFollower._get_recipient_data()' that contains the reference
structure to return.

Task-3695571
Related to Task-3669738 (Mail: Web Push Models Rename and Fixes)

X-original-commit: 7a46a957764aa5ee97a0a183fa1b747de85ff8ac
Part-of: odoo/odoo#150011
2024-01-22 15:56:54 +00:00
Thibault Delavallée ff60189b5f [IMP] mail: add an helper for notification scheduled date
Just extract some code we should otherwise copy in both mail_mobile and
mail_enterprise.

Task-3695571
Related to Task-3669738 (Mail: Web Push Models Rename and Fixes)

X-original-commit: a6b0e88d00e1dcd4abbc1e37d62d65063c6956de
Part-of: odoo/odoo#150011
2024-01-22 15:56:54 +00:00
Pierre-Yves Dufays 427e20129b [FIX] {test_}mail: set automated flag to False for activity scheduled manually
How to reproduce:
- Install contacts
- Go to any contact
- Schedule an activity on the contact by clicking on "Activities"

The flag automated of the created activity is set to True which shouldn't be
the case (you can check either in the DB or by adding the field with studio).

The same happens when scheduling plan, scheduling activities on multiple
records in the view list or a plan on multiple records.

This fixes the problem by modifying the activity schedule wizard so that it
always creates activities with automated flag set to False.

Note that that flags is used to distinguish activities created manually from
those created automatically. Some flows automatically cancel automated
activities (e.g. cancel 'validate my ticket') but those should probably not
cancel user defined activities (e.g. 'ask customer to pay'). That's why we must
ensure that activity created manually have that flag set to False.

Task-3691827

closes odoo/odoo#149965

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2024-01-22 14:25:17 +00:00
Julien Mougenot 0fc7b3e999 [FIX] web: give enough space to display datepicker on small screens
Before this commit, the datepicker was not displayed entirely on small
screens if the current view wasn't tall enough.

This commit adds a margin (supposedly) big enough to render the entire
picker even on small screens.

Task 3585878

closes odoo/odoo#149510

X-original-commit: 47c0627d218bd846596c9deb84720fc289047365
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
2024-01-22 13:02:17 +00:00
Wolfgang Taferner 851eb19843 [FIX] account_payment: new transaction will fail based on NewId / None in query
In order to avoid failing on this computation make sure actual ids are available
to be used in query.

closes odoo/odoo#150201

X-original-commit: c133d584153d3acc617433380773ac5d66419d80
Signed-off-by: Morgane Demesmaeker <edm@odoo.com>
2024-01-22 09:08:55 +00:00
Gauthier Wala (gawa) 24104cb0a0 [FIX] l10n_pl_jpk: Hide tab if not polish company
The tab PL Extra is visible if l10n_pl_jpk is installed and your
company is not polish.
This should not be the case

closes odoo/odoo#150199

X-original-commit: b5335d356d4d098b719e6bd8e966ac5847340f96
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
Signed-off-by: Wala Gauthier (gawa) <gawa@odoo.com>
2024-01-22 09:08:54 +00:00
lakhichand borse b134cb60ae [FIX] project: make personal stages not clickable in task calendar
Steps to reproduce:
- Open the 'project.task.calendar' view.
- click on the date to open private task
- Observe that personal stages are clickable.

Issue:
- The personal stage should not be clickable in the 'project.task calendar' view

Solution:
- Disabled the clickable behavior for personal stages in the 'project.task
  calender' view

task-3637218

closes odoo/odoo#150133

X-original-commit: 48c5d2b7bc036fb530ab7f665894c30174cb2518
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2024-01-22 09:08:50 +00:00
Thibault Delavallée 5acfd69e0e [FIX] mail: allow complete email for default from
Default_from on alias domain is currently managed like bounce or catchall.
We consider it is always only a left-part of an email address that should
be completed with alias domain name.

However and notably at migration default_from could contain a complete
email address. In that case better be defensive and keep the domain part
of the value.

Task-3690919

closes odoo/odoo#149887

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2024-01-22 09:08:48 +00:00
Vivek Pathak a167f897e9 [FIX] mass_mailing_sms: change label from 'Subject' to 'Title'
Before this commit:
The label for the `sms_subject` field incorrectly displayed as 'Subject,' which
was misleading as SMS messages do not have a subject like emails.

After this commit:
The label has been changed to 'Title' which is appropriate for SMS

Task-3500573

closes odoo/odoo#149815

X-original-commit: ce33260099dd374e1aab7ad4168737b7754fa8e0
Related: odoo/enterprise#54553
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2024-01-22 09:08:46 +00:00
late-odoo 6815eb0894 [FIX] account: prevent error when selecting company while journal is empty
Currently an error occurs when the user is creating a new invoice and  selects
the 'Customer' while the 'Journal' field is empty.

Steps to Reproduce:

- Install 'Accounting' module.
- Go to Accounting > Customer > Invoices and  then click on New.
- Empty the 'Journal' field and then select any 'Customer'.
- The error will be generated.

Error: ValueError: Expected singleton: res.company()

This error arises at [1] when the company is selected, but the 'journal_id'
field is left empty,

This commit fixes the above issue by ensuring that the company is selected based
on the accessible branches of the associated journal, or falls back to the
default company if no journal is specified.

Link: [1]-https://github.com/odoo/odoo/blob/ad9cd949168e3be3db6e9a4983faa6b02626b0a2/addons/account/models/account_move.py#L1771

sentry-4835188267

closes odoo/odoo#149707

X-original-commit: aa645cfde60644eec05a120e434da4e94ff0da75
Signed-off-by: de Wouters de Bouchout Jean-Benoît (jbw) <jbw@odoo.com>
Signed-off-by: Lavina Tekwani (late) <late@odoo.com>
2024-01-22 09:08:45 +00:00
Mylyna Hy a8bc293309 [FIX] sale_loyalty: invoice discount lines
Problem: Discount lines are not reflected on invoices when the invoice policy is set to delivered quantities. Loyalty products' invoice policy should be defaulted to invoice on ordered quantities.
Thus, if the default is set to invoice on delivered quantities for all products, loyalty products are incorrectly defaulted to invoice on delivered.
This feature was removed when loyalty programs was refactored, refer to commit: https://github.com/odoo/odoo/commit/71499bbd23c0e94ffd9b7f82f9d28a5afe045197

Solution: Initialize the loyalty product to have its invoice policy to be on ordered quantities.

Steps to Reproduce:
Navigate to Sales > Configuration > Settings > Pricing and ensure the Discounts, Loyalty & Gift Card check box is checked
Navigate to Sales > Configuration > Settings > Invoicing and set the invoicing policy to Invoice what is delivered
Navigate to Sales > Products > Discount and Loyalty
Create a new promotion that is available on Sales. Make sure the conditional rules is if minimum $50.00 spent and the rewards is 10.00% discount on your order (which should be set as the defaults)
Navigate to Sales and create a new quotation
Add a product that costs more than $50 and then click on PROMOTIONS and apply the promotion that was just created and confirm the sale order
Navigate to the delivery by clicking on the delivery smart button and click on validate
Navigate back to the sales order and click on CREATE INVOICE
Then click on CREATE AND VIEW INVOICE
You should see the issue that the promotion is not applied on the invoice

opw-3582958

closes odoo/odoo#150263

X-original-commit: 9e5b6a48473b344a530f18f1e58121b40328bff3
Signed-off-by: Morgane Demesmaeker <edm@odoo.com>
2024-01-22 07:57:08 +00:00
Adnan Saiyed 33a3fa1b0f [FIX] web_editor: tablepicker size not visible
Current behaviour before commit:

In tablepicker, number of the selected cells (rows X cols)
is not visible at the bottom.

Desired behaviour after commit:

Now, number of the selected cells is visible at the bottom of
tablepicker.

task-3662728

closes odoo/odoo#150243

X-original-commit: 72aae3599c8cd81fc00b2d46a432ee20f7c44b13
Signed-off-by: Antoine Guenet (age) <age@odoo.com>
2024-01-22 07:57:07 +00:00
Benoit Socias a28054b05c [FIX] web_editor: do not paste a link if target does not support HTML
When pasting text inside the editor, if the text looks like a URL, a
link is implicitly created.
Unfortunately, this also happens when the edited element does not
support HTML.
Because of this, when translating a page, links are created inside the
translated text which does not support HTML.

This commit solves this by pasting the plain text if the target of the
paste does not support HTML (which is the case for translations).
This commit also prevent link creation when typing a space after text
that looks like an URL in targets that do not support HTML.

In saas-16.4, `_handleAutomaticLinkInsertion` is also adapted to prevent
unwanted link creation.

Steps to reproduce for first scenario:
- Add French to your website.
- Edit your master English Home page.
- Drop a Text snippet in the Home page.
- Save the Home page.
- Switch to French.
- Translate the page.
- From an external text input, copy `http://odoo.com` in your clipboard.
- Put the cursor inside the Text snippet's text.
- Paste.

=> A link was created.

Steps to reproduce for second scenario:
- Add French to your website.
- Edit your master English Home page.
- Drop a Text snippet in the Home page.
- Save the Home page.
- Switch to French.
- Translate the page.
- Put the cursor inside the Text snippet's text.
- Type `http://odoo.com` followed by a space.

=> A link was created.

opw-3546308

closes odoo/odoo#150189

X-original-commit: de351e500559166963fd2e748229d5c1d901aa44
Signed-off-by: Benjamin Vray (bvr) <bvr@odoo.com>
2024-01-22 07:57:07 +00:00
visp-odoo 68d3db616c [FIX] web_editor: unable to delete table row in firefox
Before this commit:

Attempting to delete a selected table row does not result in the removal of the
row in Firefox.

After this commit:

Now deleting a selected table row results in removal of the row in FIrefox.

task-3610789

closes odoo/odoo#150167

X-original-commit: 5dd99a02fc3cce99969e696b5cf428afaa27ba78
Signed-off-by: Antoine Guenet (age) <age@odoo.com>
2024-01-22 07:57:06 +00:00
sesn-odoo 70a4ff9000 [FIX] account: restore "outstanding" ID
Steps to reproduce
------------------
* go create an invoice for a customer that has outstanding credits.
* in the blue message at the top, click the "outstanding credits" text
  in bold.

You should see that you're taken to the home page. We expect to be taken
to the bottom of the invoice, where the outstanding credits are
displayed.

Cause
-----
A static HTML ID was mistaken for a variable in
d682871a8b.

opw-3691932

closes odoo/odoo#150153

Signed-off-by: de Wouters de Bouchout Jean-Benoît (jbw) <jbw@odoo.com>
2024-01-22 07:57:05 +00:00
Claire Bretton (clbr) a34599c65b [FIX] account: Reconciliation - use payment custom rate
In case of a payment we want to use the custom/accounting rate
instead of the odoo rate, as rate probably comes from the bank.

closes odoo/odoo#149937

X-original-commit: ab51ab96329ccc672eb48a68f44c4ebea008dce9
Signed-off-by: Laurent Smet (las) <las@odoo.com>
Signed-off-by: Claire Bretton (clbr) <clbr@odoo.com>
2024-01-22 07:57:03 +00:00
Antoine (ande) 701f3a3fcc [FIX] web: report not good when exporting to pdf
Steps to reproduce:
1. Go to Settings
2. In Document Layout
3. Click on Configure Document Layout
4. Preview looks right
5. Click on Download PDF Preview
6. Open the PDF
7. Preview is not right
8. The bottom right table is squished

Cause of the issue:
Introduced by https://github.com/odoo/odoo/commit/778cc239010f3bb8618824fdaf06cb19922d6498

Fix:
Copied report_invoice_document

opw-3651311

closes odoo/odoo#150195

X-original-commit: 227c9567845ec9a592e9f265fbfcee537dd17ff5
Signed-off-by: Antoine Demany (ande) <ande@odoo.com>
2024-01-22 06:47:31 +00:00
Andrea Grazioso (agr-odoo) 84ea3966ac [FIX] account: public user cannot access product with tag
Install module l10n_eu_oss_reports and website_sale
Edit a product (i.e. Acoustic Bloc Screens)
In Accounting tab add an account tag
Try to access the product webshop page as public user

User receive an error message

403: Forbidden
The page you were looking for could not be authorized.

Error message:
You are not allowed to access 'Account Tag' (account.account.tag) records.
[...]

This occurs because during tax computation the system try to access
account tags but they cannot be read by the public user

opw-3455325

closes odoo/odoo#149638

X-original-commit: 6428081e385ff08e6d4be47938e8b91abeb4246b
Signed-off-by: Laurent Smet (las) <las@odoo.com>
2024-01-21 19:59:29 +00:00
Denis Ledoux ec0cd75328 [IMP] core: disable x2many manipulation as sudo for sensitive models
This revision adds a flag
`_allow_sudo_commands` to which models can opt-in
to protect themselves against malicious
manipulation of one2many or many2many fields
through an environment using `sudo` or a more priviledged user.

Flagging a model `_allow_sudo_commands = False`
disable `sudo` and `with_user(...)`
when manipulating a one2many or many2many
field targeting this model.

task-3695103
2023-11-01 08:05:16 +00:00
Thibault Delavallée 313c5c10cd [FIX] mail: do not crash when redirecting to non thread records
'_redirect_to_record' is used notably when accessing 'mail/view' controller
used notably with email notifications ('See Document' link). In order to
try to avoid multi company issues a call to '_get_mail_redirect_suggested_company'
is performed in order to find the record's preferred company.

However it is defined on 'mail.thread' which means the redirect crashes if
invoked using a non thread record. This is quite rare but may happen with
models using a mailgateway implementation similar to 'mail.thread' without
inheriting from the mixin (see 'mail.group' model added in Odoo 16).

This limitation is present since a long time but is now more present since
odoo/odoo@f4523fcd92 .

Task-3689459

closes odoo/odoo#150309

X-original-commit: 9a366dcdb789d0f160871ee4d29a463e2641ca26
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2024-01-21 14:35:30 +00:00
Odoo Translation Bot 95a4b6dfdc [I18N] Update translation terms from Transifex 2024-01-21 00:17:03 +01:00
Tiffany Chang (tic) 04e5bfe61e [I18N] gamification: ensure translation of orig motivational messages
For some reason the demo data for some of the ranking motivational
messages is different from their default motivational message (in data).
Because of the way the `translate=html_translate` works, when the demo
data was installed, the original motivational message was overwritten
and therefore not exported in the .pot file so it could never be
translated. Since we want both the demo and original messages
translated, it's best that we add the original messages into the demo
data so that it's not visible to users, but is still exported to the
.pot file.

closes odoo/odoo#150306

X-original-commit: 2f3aafe55ee39a3661477934f63b2a5c90f724a5
Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
Signed-off-by: Tiffany Chang (tic) <tic@odoo.com>
2024-01-20 10:46:54 +00:00
kcv-odoo 865c08ec4d [FIX] partner_autocomplete: correct test cases to check proper conditions
This commit fixes test case to properly target auto
complete block to check auto complate feature is working
as expected or not.

task-3690532

closes odoo/odoo#150279

X-original-commit: b556b7c309530cede3577a3bfc884b1fe821537c
Signed-off-by: Louis Baudoux (lba) <lba@odoo.com>
Signed-off-by: Kartik Chavda (kcv) <kcv@odoo.com>
2024-01-20 09:33:38 +00:00
kcv-odoo 6bbdd15817 [FIX] partner_autocomplete: fix quick creation issue
Before this commit auto complete suggestion were showing on partner field even though there
is no_create attribute on partner field and because of that user can create partner record
from that field even though user is not allow to create record from it and also it gives
trackback in partner portal field because of access_token.

This commit prevent auto complete suggestion when partner field has no_create attribute
set on them to avoid unnecessary partner creation from that field.

task-3690532

X-original-commit: ba2edab747db2c89d06feb9422d7f53a759766ae
Part-of: odoo/odoo#150279
2024-01-20 09:33:38 +00:00
Christophe Monniez 8b8819c494 [FIX] sale_mrp, sale_mrp_margin: deduplicate tests
By inheriting from a test class that contains test methods, these tests
are executed twice.

closes odoo/odoo#150272

X-original-commit: 835f600eac6fd1ec202cd21876457b14d3d0af06
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2024-01-20 09:33:37 +00:00
Christophe Monniez 2c16088298 [FIX] barcodes_gs1_nomenclature: deduplicate tests
When inheriting from a test class having tests methods, the tests are
played twice. In this particular case, the inheritance was not necessary
at all.

closes odoo/odoo#150287

X-original-commit: 839fa009f3f032cb45c56acfe237933bf0fb69c9
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2024-01-20 08:22:27 +00:00
Trịnh Ngọc Hưng c80fec8f15 [FIX] l10n_vn: VN account chart template use_anglo_saxon as False
- Because default use_anglo_saxon is False

closes odoo/odoo#150278

X-original-commit: fba0b2abda1fb2a101b6bfb0be93d21a2919388e
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
2024-01-20 05:31:55 +00:00
Brice bib Bartoletti be3058bfb6 [FIX] sale: downpayment invoice and credit note
The aim of this commit is to fix the computation behavior of the downpayment
line of the sale order.

Context:
Create a sale order and invoice a down payment.
Make a credit note for the downpayment invoice for a part of the
invoice's amount.

Before the commit:
The downpayment line on the sale order gets its price_unit updated to
the amount of the last credit note.

After the commit:
The downpayment line on the sale order gets its price_unit updated to
the sum of the amount of all linked invoice.

closes odoo/odoo#150274

Task-id: 3634439
X-original-commit: 48995672ed58c99b1d8b143225a6535104d3bf8d
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
Signed-off-by: William André (wan) <wan@odoo.com>
2024-01-20 05:31:54 +00:00
Adrien Widart (awt) 3689958cac [FIX] stock_landed_costs: create LC in multi-comp setup
To reproduce the issue:
1. Create two companies C1, C2
2. Select C1 and enable C2
3. Confirm a PO with a FIFO product in C2
4. Process the receipt
5. Bill the PO with a landed cost
6. Generate and post the LC

Few errors will happen: on the LC, the journal used belongs to C1,
not C2. Another one: in C2, on the product's form view, the standard
price does not include the LC

OPW-3651022

closes odoo/odoo#150200

X-original-commit: 0b623378b3664d428d9146b99b3fa050d76b0e99
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Adrien Widart (awt) <awt@odoo.com>
2024-01-20 05:31:53 +00:00
Sébastien Theys fa9815afa7 [FIX] mail: fix chatter reaction crash before init messaging
store.self is not necessarily known when the chatter is rendered

closes odoo/odoo#150103

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2024-01-20 02:43:06 +00:00
lejeune quentin de1ff5b166 [FIX] hw_drivers: Fix default value for iot_client on boot
If an IoT doesn't have a DB recorded, the IoT client can't have an
url.
So the Websocket can't parse a empty string and return a traceback.

With this commit we check if there are a DB else iot_client is None

closes odoo/odoo#150089

Signed-off-by: Yaroslav Soroko (yaso) <yaso@odoo.com>
2024-01-20 02:43:05 +00:00
tsm-odoo cfea1ace7a [FIX] mail: fix ptt extension not working after worker wake up
The Ptt extension makes use of the `chrome.session` API to keep track
of the connected clients. Before this PR, the session storage was
initialized at the top level of the background script. This is an
issue since it will be executed after the service worker wake up thus
overwriting the existing client map. This PR removes this

closes odoo/odoo#150084

Initialization: the map will be created when needed instead.
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2024-01-20 02:43:04 +00:00
Xavier Bol (xbo) 2ddc00f9af [FIX] web: display "Remove Cover Image" button
Before this commit, when a kanban card has cover image set and the user
would like to remove it, he does not have the "Remove Cover Image"
button displayed when he goes to KanbanCoverImageDialog. The reason
is because the condition on `t-if` set on that button is always
falsy because `coverId` is undefined in the component.

This commit defines getter called `hasCoverImage` to return true
if the record displayed in the kanban card has cover image set.

task-3623759

closes odoo/odoo#150033

X-original-commit: c5d1894804c590dec208755e93d21f249714721d
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2024-01-20 02:43:00 +00:00
mjvi-odoo db05ddcf10 [FIX] web: 'upload and Set' button not functional in project task cover image
Steps to Reproduce:

Navigate to Project.task kanban view.
- Attempt to set a cover image.
- Observe the non-functional 'upload and set' button.

Issue:
- The 'upload and set' button in the Project Task Cover Image is unable to click

Solution:
- Resolved the issue, ensuring the 'upload and set' button functions correctly
  for a seamless cover image setting in Project Task.

task-3623759

X-original-commit: fc531640dedf7c8a576ed43d8e27a0c1054ec512
Part-of: odoo/odoo#150033
2024-01-20 02:43:00 +00:00