Commit Graph
168477 Commits
Author SHA1 Message Date
nda 54e2fa15f8 [FIX] point_of_sale: retrieve unit price from sale order line
Unit price is recomputed on non groupable order line instead
of being the same as its sale order line counterpart.

Steps to reproduce:

- make sure unit measure category are not groupable
- create a sale order and add a line with a product with UOM
unit (ex: acoustic bloc screens) and quantity 3
- change the default unit price (100$ instead of 295$)
- open the point of sale
- open the SO and click on settle the order
=> price is 295$ instead of 100$ on each of the 3 lines

opw-3569481

closes odoo/odoo#147487

X-original-commit: 00d8a876c501098da1e8b2f7484e5e3808b61865
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Nicolas Danhier (nda) <nda@odoo.com>
2023-12-26 17:00:36 +00:00
Walid a9ff983d8f [FIX] purchase_stock: bill before reciept
Steps to reproduce:
- Create a product with AVCO that you invoice on Ordered quantities in the Vendor tab.
- Create a PO with a value of 200
- Create an invoice and change the price to 100. Then cancel the Invoice.
- Create a new invoice and confirm it without changing anything (so price is 200)
- Receive the product
- The valuation will be 150, the average of the 2 invoices.

Bug:
all linked invoices are taken into account

Fix:
only consider posted ones

opw-3633051

closes odoo/odoo#147485

X-original-commit: b899edd5b9c2f5e813fc0a83ea5506672785f47b
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2023-12-26 17:00:35 +00:00
Andrea Grazioso (agr-odoo) 93fe7f9e6a [FIX] purchase_stock: traceback on empty date
Configure a product having category set with:
- Costing Method: Average Cost (AVCO)
- Inventory Valuation: Manual
Create a purchase order with the product
Confirm
Receive Products
Create bill (do not set date)
Confirm

Traceback will appear:
'AssertionError: convert amount from unknown date'
It occurs because of an attempted currency conversion without a date
As the bill is without date it should raise an UserError instead

opw-3628295

closes odoo/odoo#147367

X-original-commit: 03436a006f31f4bf42336fe31514161562c9b180
Signed-off-by: Adrien Widart (awt) <awt@odoo.com>
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2023-12-26 17:00:34 +00:00
clesgow 1f1a95282d [FIX] stock: avoid recomputing the schedule_date too early
Steps to reproduce:
- Inventory -> Delivery -> New Planned transfer
- Add two lines with two different products and save
- Set different scheduled dates for each move
- Set the earliest move quantity_done to the demand
- Validate and create a backorder

Issue:
The done picking scheduled date will be changed to the latest move (that
is moved to the backorder).

This is due to a recompute of the picking's scheduled_date *before* the
remaining moves are assigned to the backorder.

Note:
The order on the `stock.move.line` had to be removed, as it forced a
recompute of the original picking *before* the assignation of the
remaining moves to the backorder.
What happens is :
- Updating the move will check its move lines
- To follow the SML order, it will need their pickings
- To follow the picking order, it will need their scheduled date
- Their scheduled dates can be out of date (since we already put some
moves to `done`)
- This will lead to a recompute of the original picking's scheduled date

Instead, what we do is adapt the changes from odoo/odoo#79069, moving
the order from the model to the reports where it's used.

opw-3346598

closes odoo/odoo#147330

X-original-commit: 92092420548cb68db03ac139c23608fc1aa3a7cd
Related: odoo/enterprise#53320
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Signed-off-by: Quentin Wolfs (quwo) <quwo@odoo.com>
2023-12-26 15:49:37 +00:00
tsm-odoo d8c95bddec [FIX] mail: fix non deterministic crosstab test
The "Channel subscription is renewed when channel is left" test
ensures the bus subscription is renewed when the user leaves the
channel. In order to do so, the test relies on a patch of the bus
service and awaits the `waitUntilSubscribe` helper. This is not
correct: the subscription will never be triggered since the bus
service method is patched to only call `assert.step`.

This test passes most of the time by luck: `waitUntilSubscribe`
detects the first subscription (the one that is triggered when
starting the bus service) and the delay is most of the time enough for
the step to be ready.

This PR fixes the issue by:
- waiting the first subscription to ensure it does not interfere with
the test.
- removing the bus service patch: waiting for the subscription is
enough.

fixes runbot-46941

closes odoo/odoo#147255

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-12-26 12:21:47 +00:00
Pedram (PEBR) fb203ec2b4 [FIX] point_of_sale: prevent assignment of payment method during copy
Befoer this commit, duplicating a POS payment method led to automatic
assignment to the source payment method's POS configs. This behavior
caused issues, particularly when the POS session was open.

opw-3635647

closes odoo/odoo#147238

X-original-commit: 0725850a9d2893ea80518575735ca407cc608968
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-12-26 11:03:19 +00:00
Benoit Socias f2bee5d2a1 [FIX] web_editor: restore gradient custom buttons
Since [1] when the `Colorpicker` template cache was moved from
`ColorPalette` to `getColorPickerTemplateService`, the custom buttons
fill color cannot be set as a gradient anymore.
This happens because the needed `getTemplate` props is injected for the
font and background colors, for the `we-colorpicker` but not for the
link tools color palettes.

This commit restores the gradient color selection for custom buttons by
linking the `getColorPickerTemplateService` to the link tools color
palettes.

Steps to reproduce:
- Edit Home page.
- Click on "Contact Us" link in header.
- Select link style "Custom" in link tools.
- Open "Fill Color" palette.

=> Gradient tab was not shown in palette.

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

task-3641914

closes odoo/odoo#147373

X-original-commit: 087861bcbfe444765fdb0b81e0398c12d8db34e8
Signed-off-by: Soukéina Bojabza (sobo) <sobo@odoo.com>
Signed-off-by: Benoit Socias (bso) <bso@odoo.com>
2023-12-26 08:36:46 +00:00
dominikkertys 19c4b3a2ef [CLA] Update 26house CCLA
closes odoo/odoo#147295

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-12-26 08:36:45 +00:00
Romain Derie cb1ad42130 [FIX] website: make anchor links work in offcanvas mobile menu
A anchor menu in the mobile offcanvas related to an element in the
current page doesn't work in offcanvas:
- The offcanvas doesn't close
- The page doesn't scroll to the clicked location

This is because the menu anchor navigation is hooked to use our own
scrolling behavior instead of the browser one.

Doing so, we preventDefault, which prevent the offcanvas menu to close
itself when clicking on a anchor menu.

This commit simply manually closes the offcanvas and once the closing
animation is complete, starts our own smooth scrolling.
It also targets the desktop offcanvas menu (when hamburger layout is
selected) so it got a smoother UX: it closes then scrolls, instead of
scrolling but not closing.

Another possibility would have been to just close manually the offcanvas
without a preventDefault and without a call to our custom scrolling
method.
Doing so, the browser would naturally scroll to the element while we
close the offcanvas but it would be less elegant as you wouldn't see the
scrolling animation.

Note that the offcanvas was introduced with commit [1].

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

opw-3604963

closes odoo/odoo#146907

X-original-commit: db881e66785a866319bd4980a9ae7b6393e55457
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2023-12-26 08:36:44 +00:00
Romain Derie 97333d421f [FIX] test_lint: sync with regular rslintrc file
Keeping things in the same order between both files will help when
modifying this file later.

After this commit, the `globals` in both files are 100% sync'd.

Part-of: odoo/odoo#146907
2023-12-26 08:36:44 +00:00
Romain Derie 9e8651d5e2 [FIX] web, test_lint: regroup bootstrap globals
A later commit will add `Offcanvas` as new bootstrap global in the
eslintrc files.
Since the globals are randomly sorted, the chance is taken to regroup
those.

Part-of: odoo/odoo#146907
2023-12-26 08:36:44 +00:00
Romain Derie b68914221f [FIX] web, test_lint: remove afterEach from eslintrc test suite
Commit [1] added a call to "afterEach" and added it to the test suite
eslintrc but since it's only called there from the testing suite once
and since it was not sync'd in the regular eslintrc, it's better to add
it as a global in the file directly.

[1]: https://github.com/odoo/odoo/commit/84389729392df491d5a67ebe25a8fa44beac1930

Part-of: odoo/odoo#146907
2023-12-26 08:36:44 +00:00
Romain Derie 5081951213 [FIX] web: remove "_" from eslintrc
Underscore was removed with commit [1], this is most likely a leftover.

[1]: https://github.com/odoo/odoo/commit/28e1e61e5c419ee7aa0e6268d7899dcfa115d333

Part-of: odoo/odoo#146907
2023-12-26 08:36:44 +00:00
Romain Derie 318dde2029 [FIX] web_editor, website: hide animation option when cors protected img
Before this commit, the "on hover" animation option would be shown for
images of type url-attachment-redirect.
Selecting that "On Hover" option value would result in a crash if the
image was CORS protected (which is often the case).

Steps to reproduce:
- Drag & drop "Text - Image" snippet
- Double click on an image to replace it
- Select in the media dialog "Add URL" and insert a CORS protected
  image URL
- The image is correctly added, and its url is something like
  `/web/image/123-redirect/xxx.jpg`
- Click on the image and then click on its "Animation" option and select
  "on hover" as value
-> It crashes

The same error will happen with absolute URL of a CORS protected image
(instead of the relative local redirect attachment-url
`/web/image/123-redirect/xxx.jpg`).

Technical stack:
> the XML option `data-animation-mode="onHover"`
  > call the js method `animationMode()`
    > calls `trigger_up('enable_hover_effect')`
      > calls `setImgShape()`
        > calls `_applyShapeAndColors()`
          > calls `_writeShape()`
            > calls `applyModifications()`
              > calls `loadImage()` which fails to load the image

-----------

Technical note: JS `fetch()` takes advantage of the browser cache, no
need to create a `Map` cache for it, despite the `_computeVisibility()`
method being called multiple times.

----------

Related to commit [1].
The code is failing since commit [2] which added the "On hover" image
animation.

Other animation values won't fail. And not-cors-protected images will
work fine with the on hover option.

[1]: https://github.com/odoo/odoo/commit/f0fe283c761cd6b1d7293dd41795ac6fc721e341
[2]: https://github.com/odoo/odoo/commit/7f730f81ec541cc7791fc6b3fded17c838433f85

closes odoo/odoo#146732

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2023-12-26 07:33:27 +00:00
Romain Derie fc8248e4b6 [FIX] web_editor: also remove img animate class when cleaning attributes
There is a code in charge of removing image animation attributes, but
this code was not removing the `o_animate_on_hover` class.

Probably not that big of a deal but during the investigation of a bug,
this class was not removed while the attributes where, which seems to
lead to a crash later.

Related to commit https://github.com/odoo/odoo/commit/7f730f81ec541cc7791fc6b3fded17c838433f85

Part-of: odoo/odoo#146732
2023-12-26 07:33:27 +00:00
Romain Derie c3d796d044 [FIX] web_editor: prevent crash if data-shape-colors is not set
There is cases leading to have a `data-shape` but no
`data-shape-colors`. It then makes the code crash.

Step to reproduce:
- Drag & drop "Text - Image" snippet
- Double click on an image to replace it
- Select in the media dialog "Add URL" and insert a CORS protected
  image URL
- The image is correctly added, and its url is something like
  `/web/image/123-redirect/xxx.jpg`
- Click on the image and then click on its "Animation" option
-> It crashes

In such a case, the code was crashing on the line below this fix:
`img.dataset.shapeColors.split(';')`

The modified code here is related to commit [1].
But the code only break in Odoo 17, probably following commit [2].

[1]: https://github.com/odoo/odoo/commit/cd403480f90cf7103651f3be818a14b06d3c73ca
[2]: https://github.com/odoo/odoo/commit/7f730f81ec541cc7791fc6b3fded17c838433f85

Part-of: odoo/odoo#146732
2023-12-26 07:33:27 +00:00
kcv-odoo 513be97b2f [IMP] payment_razorpay: support tokenization in Razorpay's "Payment" gateway
See README for technical details.

task-3495914

closes odoo/odoo#143525

Related: odoo/documentation#6732
Signed-off-by: Kartik Chavda (kcv) <kcv@odoo.com>
2023-12-24 07:01:14 +00:00
Odoo Translation Bot 50e8e08183 [I18N] Update translation terms from Transifex 2023-12-24 00:18:24 +01:00
Olivier Dony 9de51e74f3 [FIX] tools: update default hashing rounds
The default is 25000 rounds, which is too low nowadays.
An off-the-shelf laptop takes ~400ms for a single hash at 600k rounds.

closes odoo/odoo#147202

X-original-commit: e200e96bfbb9cc29771b3727231e2f9a9ae01825
Signed-off-by: Olivier Dony (odo) <odo@odoo.com>
2023-12-23 19:13:42 +00:00
Rémy Voet (ryv) 914ac6d0b9 [FIX] tests: fix assert message of required field check
closes odoo/odoo#147400

X-original-commit: 0b9257009154eb92a723f72ad64a31cf9b577748
Signed-off-by: Raphael Collet <rco@odoo.com>
2023-12-23 17:01:38 +00:00
Andrzej(pian) b0067dfd72 [FIX] mail: mime type alias
Some printers incorrectly specify the content-type of PDFs as "pdf" instead of
the correct "application/pdf." To handle this situation,
an alias has been introduced, treating content-type "pdf" as "application/pdf."

[Reproducing original bug]
1. run odoo with documents module
2. prepare email file
2.1 create email with a pdf attached
2.2 export email to .eml
2.3 modify content-type of the pdf from "application/pdf" to "pdf"
3. send prepared email to odoo to inbox-financial alias (the default one
   creating documents)
4. Go to documents, observe that the created PDF is blank!

[Motivation for fix]
Since:
1. Odoo uses the Python built-in module for parsing emails*
    (the actual issue lies outside Odoo code).
2. "pdf" is not an accepted MIME type according to current norms
    (https://datatracker.ietf.org/doc/html/rfc6838#section-4.2).
It's not an actual Odoo bug.
However, redirecting this issue to the appropriate printer manufacturer and
waiting for a fix may be time-consuming, hence the proposed fix.

*function parsing email with the Python built-in module
https://github.com/odoo/odoo/blob/407ea60796a2b18eb02f5569e1cfab9f1163a572/addons/mail/models/mail_thread.py#L1282

opw-3462260

closes odoo/odoo#147363

X-original-commit: e95a19341536e442239a7e940089d7f66ab9f534
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-12-23 15:09:31 +00:00
Levi Siuzdak (sile) 41b4f14d8b [FIX] project: remove task_properties from project sharing view
Versions:
---------
- saas-16.2+

Steps to reproduce:
-------------------
1. Have a project with tasks & sub-tasks;
2. invite portal user to project;
3. log in as portal user;
4. go to a sub-task;
5. click the parent task button.

Issue:
------
Javascript is trying to get the type attribute of an `undefined` value.

Cause:
------
Commit 590beec447 added `task_properties`
to `view_task_search_form`, this search view is used by
`action_project_sharing_view_parent_task`, bringing it into view for
portal users who do not have read access to this field.

Solution:
---------
Add a `search_view_ref` to the context to force using
`project_sharing_project_task_view_search` instead.

opw-3498012

closes odoo/odoo#147377

X-original-commit: 47b0f6a42464ff41d40507cec5771b6dc3131d47
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-12-22 22:58:50 +00:00
Bastien (bvdn) 78ab391990 [IMP] product: reset product catalog quantity to 0 when user inputs empty value
When the user inputs nothing in the setQuantity input in the product catalog input,
NaN is fixed in the productCatalogData.quantity value, which is fine for the backend
since the NaN will be converted to Null then 0 when fixed in the SOL qty_product
but the product card will display an empty input which is not good.

with this change the productCatalogData.quantity will be fixed to 0, making the input space
(and minus/plus buttons) disapear, which is more logical since the product quantity has
been set to 0

In addition to this it'll prevent a traceback in industry_fsm_sale module where we used
float_round() to fix the product quantity, which doesn't handle Null value

Task-3599491

closes odoo/odoo#142523

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-12-22 22:58:49 +00:00
Brice bib Bartoletti 6e652c94b5 [FIX] account_report: prevent tax tag renaming
The aim of this commit is to prevent the tax tag to be renamed when the
engine and the formula are changed at the same time.

Context:
For the french report, we had to introduce new expressions and change
the existing ones.
The nex expression would have the same formula than the previous one and
the old one would change their engine and formula.

Before this commit:
The tags are renamed to match the new formula.
This would be useless as the new engine won't use those tax

After this commit:
The tags aren't renamed.

closes odoo/odoo#147392

Task-id: 3607253
X-original-commit: 659f20add8b7c9c1a342a021bfc3c80316816c22
Related: odoo/enterprise#53341
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
2023-12-22 21:37:44 +00:00
Julien Van Roy 4667fdd695 [FIX] l10n_fr: support french fiscal rounding
Each line of the french VAT report should be rounded to the unit. In
addition, the tax amounts should be recomputed using the rounded base
amounts!

The rounding of each line is enabled using the 'integer_rounding' option
introduced in
https://github.com/odoo/enterprise/commit/1916433a951fb98baf1a54e6b6e0f8a3f59920a4.
The recomputation of the tax lines base on the rounded base lines is
done using aggregation expression (so the `tax` tags are no longer used
in the report).

The rounding difference is accounted during the closing entry.

task-3607253

X-original-commit: 12477a5401c4d0eaf39c87c17afc7f82d9018986
Part-of: odoo/odoo#147392
2023-12-22 21:37:44 +00:00
guva-odoo c9c50a92a0 [FIX] account, analytic: add analytic distribution, remove precompute
Related to https://github.com/odoo/enterprise/pull/52648
we add the analytic distributino to the move vals for
the exchange diff move.
We also remove the precompute on the fields, manual backport
of https://github.com/odoo/odoo/commit/b9047febf3c4d67ce409f9f1dba8a9cc7c7165fe

opw-3603668

closes odoo/odoo#147332

X-original-commit: 41b38f1dc7df824e6c09e66e293e82f2823915aa
Related: odoo/enterprise#53322
Signed-off-by: Habib Ayob (ayh) <ayh@odoo.com>
Signed-off-by: Guillaume Vanleynseele (guva) <guva@odoo.com>
2023-12-22 18:42:23 +00:00
Maruan Aguerdouh (magm) 6afe525d93 [FIX] sales_team, crm: field template not missing for mobile view
Steps to reproduce:

- Install Contacts and Sales.
- Activate debug mode and go to contacts.
- Create new contact and get the mobile view inside the contact form.
- Go under Sales & Purchases and look for sales team.
- Try to change it in mobile.

The issue is that we were missing the template view for these specific
fields when on mobile, specifically we didn't had the proper kanban view
set for these fields.

opw-3323976

closes odoo/odoo#147365

X-original-commit: 52992f9cbd94aaea6d1500f20862bf2d6fa811ab
Signed-off-by: Jérémy Hennecart (jeh) <jeh@odoo.com>
2023-12-22 17:35:53 +00:00
aliya 2d0cf9bdb9 [FIX] l10n_ee: add taxes with the new VAT rate
The VAT rate is increasing from 20% to 22% from January 1st, 2024.
We need to keep both 20% and 22% taxes until the end 2025 for phasing out period.
20% taxes will be inactive for new customers.

task-3615036

closes odoo/odoo#147331

X-original-commit: 2c41415f1010fac3bfcc510fc08f659cfe009420
Related: odoo/enterprise#53321
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Aliya Tastemirova (alta) <alta@odoo.com>
2023-12-22 17:35:52 +00:00
Anh Thao Pham (pta) a8dfb18dfa [FIX] account_payment: fix portal pay button
Steps to reproduce:
- Install Accounting
- Activate a payment provider (e.g. Stripe)
- Configure payment provider with "Capture Amount Manually" option activated
- Invoice Online Payment in Accounting settings
- Create an invoice
- Go to invoice portal preview
- Pay it via "Pay Now" button
- Go back to invoice portal preview
=> The "Pay Now" button is still there (not expected)

- Uninstall "account_payment_invoice_online_payment_patch" module
- Go back to invoice portal preview
=> The "Pay Now" button does not appear anymore (expected)

Cause:
"account_payment_invoice_online_payment_patch" module has been created to
allow to disable invoice online payment without uninstalling "account_payment"
module.

However, it overrides 2 different "t-if" conditions:

1) (invoice.amount_residual or not tx_ids) and
   invoice.state == 'posted' and
   invoice.payment_state in ('not_paid', 'partial') and
   invoice.amount_total

2) invoice.state == 'posted' and
   invoice.payment_state in ('not_paid', 'partial') and
   invoice.amount_total and
   invoice.move_type == 'out_invoice' and
   (pending_manual_txs or not tx_ids or invoice.amount_paid < invoice.amount_total)

with the same condition "invoice._has_to_be_paid()" that corresponds to:
   (self.amount_residual or not transactions) and
   self.state == 'posted' and
   self.payment_state in ('not_paid', 'partial') and
   self.amount_total and
   self.move_type == 'out_invoice'

One part of the second "t-if" condition is removed by the override:
(pending_manual_txs or not tx_ids or invoice.amount_paid < invoice.amount_total)

The second condition is used and is overridden 2 times.

Solution:
Add (pending_manual_txs or not tx_ids or invoice.amount_paid < invoice.amount_total)
in the "_has_to_be_paid" method.

opw-3378400

closes odoo/odoo#147316

X-original-commit: df110bb524f780433cdaf64e482329989e9d513b
Signed-off-by: Anh Thao Pham (pta) <pta@odoo.com>
2023-12-22 16:14:54 +00:00
Gitashri Mantha(gman) 06d6000ae9 [FIX] delivery: return label portal download
Before this commit
================
- Portal users were not able to download the return label via the portal because
the Access token is not passed.

After this commit
================
- Portal users are able to download return labels via the portal.

task-3245766

closes odoo/odoo#147315

X-original-commit: 2b9fe4854078e237b5da7e97e4ff3fa8d6c270a9
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-12-22 16:14:53 +00:00
FrancoisGe b467658170 [FIX] web: x2m in m2m_tags and x2m in list can be reordered
Before this commit, in a non-editable x2many in list mode, if there
is a field  "A" with many2many_tags which is displayed as an x2many
in list mode in the form dialog, it cannot be reordered with handle field.

Problem:
When we extend a record from an x2many to a form dialog, we use the
activeFields defined in the form view and patch them with those in the
list view. Currently, we always use the default order from the list view
even if it doesn't exist. So we always ignore the one defined in the form view.

Solution:
If there is no default order in the list view, we use the one in the form view.

How to reproduce:
- Go to a form view with an x2many field in list mode which contains
  an "A" field with the many2many_tags widget.
- Click on a record in the x2many
- A form dialog opens with field "A" in the form of an x2many in list mode,
  containing a handle field.
- drag and drop a line to reorder the records

Before this commit:
  It is not possible to reorder records

After this commit:
  It is possible to reorder records

Task ID: 3641933

closes odoo/odoo#147253

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-12-22 16:14:52 +00:00
Antoine (ande) 83053ba887 [FIX] website_slides: fullscreen forms error
Current behaviour:
When setting a form to fullscreen,
it doesn't save.

Steps to reproduce:
1. Go to eLearning
2. Select a course
3. Add Content, type Web Page
4. Select it, Go to website
5. Drag and Drop a form in the middle
6. Click on Fullscreen
7. Try to send the form
8. An error has occurred, the form has not been sent.

Cause of the issue:
Caused by: https://github.com/odoo/odoo/commit/17c6f6f30bf13bd3c303b28d9a314bd76dd8f4dc
When using a form normally, website_form_signature is added by
add_form_signature in the page, because rendered through XML.
When using a fullscreen form, website_form_signature is not added,
because the page is rendered through JS.

Fix:
Calling ir.qweb.field.html in the JS route which calls
value_to_html (in website) which calls add_form_signature

Concerning {'template_options': {}}, without it, when we call
_post_processing_att with the argument options.get('template_options'),
because options are empty, it returns None, and in _post_processing_att
when doing options.get('inherit_branding') we get a traceback.
Since in 16.0, options are not used either in value_to_html
nor _post_processing_att, it is no use to fix their modules.

opw-3611126

closes odoo/odoo#147197

X-original-commit: beb1200d31ea0fc3ae4261b50018d9f56c275cc3
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Antoine Demany (ande) <ande@odoo.com>
2023-12-22 16:14:51 +00:00
Demesmaeker 741f4b4e1c [FIX] payment_custom: use correct payment reference
When the payment reference is set as the customer reference, the warning message of the
transaction still show the order reference instead.

With this commit, we now ensure the expected reference is shown instead.

opw-3461181

closes odoo/odoo#147143

X-original-commit: f25537dc83a6cb9193f78ab8f32c94a541fade0e
Signed-off-by: Morgane Demesmaeker <edm@odoo.com>
2023-12-22 16:14:50 +00:00
shap@odoo.com be715e5ad2 [FIX] sale_timesheet: Display remaining hours on SO field red if negative
Steps to produce:
- Go to project application and create a new  task with SO.
- Select a customer that has prepaid hours product.
- Check that remaining hours on SO is less than 0.
- Share that project.
- Go to front-end.

Issue: The value of 'remaining hours on SO' should be displayed in red
       if the value is negative

Cause: Necessary class was not added to the field

Solution: To resolve this issue added decoration-danger when remaining
          hours so is less than 0.

task-3549489

closes odoo/odoo#146948

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-12-22 16:14:49 +00:00
Mattis Megevand (mmeg) 50652f265c [FIX] hr_holidays, resource: use employee time-zone for leave compute
Steps to reproduce:
- Create Allocation for 20 days for Mitchell Admin and validate (12/01 to 12/31).
- Set Working Schedule "Standard 40 hours/week" to UTC timezone.
- Set Mitchell Admin's timezone to Europe/Zurich.
- Create a time off with type Extra Time Off with dates 12/29 - 12/29 and try to save.
- Receive Validation Error: There is no valid allocation to cover that request.

Issues:
You cannot request that leave due to a timezone mismatch, even though you should be able to.

Solution:
To solve the zone mismatch we use the employee timezone to compute the
attendance intervals.

opw-3619178

closes odoo/odoo#146938

Signed-off-by: Bertrand Dossogne (bedo) <bedo@odoo.com>
2023-12-22 16:14:47 +00:00
Benoit Socias d092f4cfee [FIX] web_editor: move snippets only across visible ones
Before this commit if invisible elements are in the DOM (e.g.
device-visibility restricted) the arrows to move snippets (columns,
sections) did show up and behave as if the neighbour elements were
visible.

This commit hides arrows that would not visually move the snippet, and
upon using the move arrow, it also moves the snippet beyond the first
visible neighbour.

Steps to reproduce as of 16.0:
- Drop a "Columns" snippet.
- Make the center column hidden on desktop.
- Move the first column to the right.

=> It did not move and an arrow to move to the left was displayed.

Steps to reproduce before 16.0:
- Drop three snippets.
- Make the second snippet conditionally visible.
- Hide it using the eye icon in the "Invisible Elements" list.
- Move the first block down.

=> It did not move and an arrow to move upwards was displayed.

task-3584947

closes odoo/odoo#146879

X-original-commit: 60e2a5bc9ed8721ed34eb952cd34375fe5a93395
Signed-off-by: Robin Lejeune (role) <role@odoo.com>
2023-12-22 16:14:46 +00:00
stefanorigano (SRI) 473e629a09 [FIX] web: avoid rendering ButtonBox inside Dialog components
Prior to this commit, `ButtonBox` components were rendered inside
`Dialog` ones.

The approach created issues in the user flow, particularly in cases
involving intermediary records that were not yet saved yet.

task-3619180

closes odoo/odoo#146797

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-12-22 16:14:46 +00:00
Rémy Voet (ryv) e0297bdac4 [FIX] core: fix onchange when create new one2many record
When we add a new record N to an one2many tree view from an existing
record X form, during the onchange() on the one2many comodel, the cache
of the N.one2many contains only the new record X (the siblings aren't in
it). Because of this, the result of compute methods may be incorrect
and the form won't be updated accordingly. See
https://github.com/odoo/enterprise/pull/52957 for a concrete example.

Technically, this is due to _update_cache() forcing the inverse field
value to the single value of the new record
("not cache.contains(inv_rec, invf)" is True), instead of also
considering the original values (which is properly done by
Field._update()).

closes odoo/odoo#146778

Related: odoo/enterprise#53298
Signed-off-by: Raphael Collet <rco@odoo.com>
2023-12-22 16:14:45 +00:00
Martin Maes 8dbebbf444 [FIX] mrp: fix MO qty from BoM
In a Manufacturing Order based on a BoM, changing the qty values
and then change the scheduled date will reset the qty to the bom ones.

This should not be the case.

Regarding the test, setting the date before the bom_id ensure that the date will
be set when we enter the _compute_move_raw_ids.

enterprise: https://github.com/odoo/enterprise/pull/51822

opw-3568943

closes odoo/odoo#146508

X-original-commit: 780dded
Related: odoo/enterprise#52892
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-12-22 16:14:43 +00:00
Romain Derie d51e43c117 [FIX] website_blog: hint that manual post teasers are not translatable
Since its introduction with commit [1], the blog post teaser is not
translatable as the field was not set as `translate=True` by mistake.

It's not possible sadly in stable to add it since the jsonb introduction
for translated fields, as `translate=True` behaves as a DB change.
Without a module update, it will crash, trying to set jsonb value in a
non jsonb field.

A best effort is make here to add a tooltip to hint what's going when in
translate mode and clicking on this field text.
Note that the field is not marked as translatable, but if people click
on it, they will see the tooltip.

If we face multiple needs, it might be clever to introduce a new
property on field declaration allowing the mark a field as "translate
forgotten" so that our builder shows this warning out of the box.

Step to reproduce:
- Install 2 langs on website
- Go to /blog in the main language and enter edit mode
- Type something on a blog card below the cover (it should show by
  default the first few sentences of the blog content)
- Go to the alternate language and enter translate mode
- The field is not maked as translatable and can't be translated

[1]: https://github.com/odoo/odoo/commit/8cc850f3a54f62072d4df99de612f17494ffb123#diff-ae5c21b812e929930064fb93dc919ef1701fd63bae3d9fb306160d01be5629b3R114-R115

opw-3474638

closes odoo/odoo#147287

X-original-commit: abc5e3c119b74691949c7f48d3b7ba1f9fc88626
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2023-12-22 14:49:00 +00:00
Xavier ALT e64a9eb53c [FIX] event: wrong company name displayed on attendee badge
Following the event badge redesign in odoo/odoo@1da6cbc4c, we should
display on the attendee's badge (report) the attendee's company name
(`company_name`) instead of the event's company (`company_id`)

closes odoo/odoo#147272

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-12-22 14:48:58 +00:00
roen-odoo 3e2d4a066e [FIX] point_of_sale,pos_sale: take all customer note into account
Current behavior:
When you add multiple note in a sale order, only the last one was taken
into account in the POS. Now we show all notes on the ProductScreen and
on the ReceiptScreen.

Steps to reproduce:
- Install pos_sale
- Create a sale order with a product and 2 notes
- Open the POS and load the sale order
- Only one note appears under the product
- Validate the order
- Only one note appears on the receipt under the product

opw-3551331

closes odoo/odoo#146891

X-original-commit: f7c5e7fd772d9700fe16589eea0ad51dda873c5f
Signed-off-by: Vlad Stroia (vlst) <vlst@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
2023-12-22 14:48:57 +00:00
Xavier Bol (xbo) 27ca5799d4 [MOV] web: move kanban helpers for tests in helpers file
Before this commit, the helpers for the kanban view are only used
in the kanban tests in web module and those helper functions are not
exported and so it is impossible to use it outside that file.

This commit moves the helper functions for the kanban view in a new file
called "helpers.js" in the same directory containing the tests for the
kanban views and export all the helper functions to be able to use it
anywhere we need to use those helpers in JS tests.

closes odoo/odoo#147279

Related: odoo/enterprise#53040
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-12-22 14:48:56 +00:00
Yolann Sabaux 1be4f8f783 [FIX] l10n_ch: display qr_code once on reprint
Steps to reproduce:
- In Settings/technical/actions/reports: find the invoice report
- in advanced: activate "Reload from attachment"
- create an invoice with a swiss customer
- confirm and print
- print the invoice again

Issue:
There are two pages with the same qr-code

opw-3626815

closes odoo/odoo#147281

X-original-commit: a6e06531cdd15736b6ed51702e6ba17fb73fe89d
Signed-off-by: de Wouters de Bouchout Jean-Benoît (jbw) <jbw@odoo.com>
2023-12-22 13:31:44 +00:00
Aaron Bohy a72007508a [FIX] base_import_module: fix form view layout
Before this commit, the layout of the import module form view (in
the dialog) was broken. This was due to unnecessary and wrong use
of col/colspan attributes.

closes odoo/odoo#147271

Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2023-12-22 13:31:43 +00:00
Josse Colpaert f6d2e211a6 [IMP] l10n_es_edi_tbai: lroe vendor bill for Batuz
From the first of January, Ticketbai becomes required in
the region of Batuz (Bizkaia).

And we were missing a piece where also the vendor bills
need to be sent, similar to SII (but different)

For that, they use an LROE structure, which we also used
for sending customer invoices, but with the regular Ticketbai
XML in there (encoded in base64).

For vendor bills, it is however not the regular Ticketbai
XML and the chaining and signature are also not needed, but
the enveloping structure is built in the same way.

So, we activate Ticketbai by default on vendor bill journals,
but it will only be sending when the agency is Batuz.

Thanks to Moduon and Landoo for the extra push.

opw-3628750

closes odoo/odoo#146625

Signed-off-by: Quentin De Paoli <qdp@odoo.com>
2023-12-22 13:31:41 +00:00
Julien Castiaux fefea440c8 [FIX] survey: chop down long words in labels
Create a new live-session survey with a multi-choice question of 4
choices. In one of the choices write a word of 20+ characters. Start the
live-session, on the manager side the choices overlap on the screen.

In case a word is longer that the available place, it can overlap on the
labels of the other columns, making the text very hard to read. This
work wraps words that are too long for a single line over multiple ones.

Task-3530706

closes odoo/odoo#146554

X-original-commit: f085957855f86fb669c533be09fd13a14a6c874d
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Julien Castiaux (juc) <juc@odoo.com>
2023-12-22 13:31:40 +00:00
roen-odoo 09c1545412 [FIX] point_of_sale: make sure to print changes before saving them
Current behavior:
When trying to print the changes of an order, nothing was printed.
This was happening because we were first saving the changes before
sending them to the printer. Because of this when we tried to retrieve
the changes to print them, they were already saved and we were not
retrieving anything.

Steps to reproduce:
- Setup a printer to print order changes
- Create a new order in PoS restaurant
- Add a product to the order
- Click on the "Order" button
- Nothing is printed

opw-3625397

closes odoo/odoo#146461

Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-12-22 13:31:39 +00:00
aliya 5daf8f145d [FIX] web: fix list view with search panel
In list views with search panel, in case there are no records found,
the nocontenthelp is being cut off,
because the o_list_renderer doesn't take the full height.
This commit sets the height on the div, so there is no cut off happening.

Part of: task-3619987

closes odoo/odoo#147268

X-original-commit: 52c916089547c96c2d16c0c6134b40270b72b72d
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Aliya Tastemirova (alta) <alta@odoo.com>
2023-12-22 12:00:45 +00:00
Evgeniia Kotova 57c8ad118e [FIX] website_event_booth: make images of booth categories accessible by public user
Currently, categories' images can only be seen while logged in. This fix will allow public user to have access to images.

Description of the issue/feature this PR addresses: add access rights for booth category for public user
Current behavior before PR: images of booths' are not loading if not logged in
Desired behavior after PR is merged: images of booths' are loading regardless of the user

opw-3625773

closes odoo/odoo#147267

X-original-commit: 1599e5c3c004e439e8ff45dfc40a92a045a66c21
Signed-off-by: Jérémy Hennecart (jeh) <jeh@odoo.com>
2023-12-22 12:00:44 +00:00