Commit Graph
164380 Commits
Author SHA1 Message Date
oco-odoo f36ad3523b [IMP] account_reports: reset country_id when switching the availability condition of a report manually to something else than 'country'
Otherwise, when displaying the field in the view, the field might remain set, causing confusion.

closes odoo/odoo#128143

X-original-commit: 003edebd7e90d3e24a2f932c5ff90b1b13758b35
Signed-off-by: John Laterre (jol) <jol@odoo.com>
2023-07-12 09:14:51 +02:00
divy-odoo f88e827126 [IMP] web_editor: open internal link in edit mode
Before this commit, when the user was clicking on a link to another page
of the website, it was opening in another tab but in frontend mode.
However, in most cases the user actually wanted it to open in backend
mode.

Here is an example of users who started an eCommerce trial. They are
editing their homepage and want to create a product. They open the
"/shop" page using popover but because they are in the frontend, they
don't see the "+NEW" button. This behaviour seems a little odd.

Therefore, this commit aims to open internal links in the edit(backend)
mode instead of the frontend mode.

task-3177126

closes odoo/odoo#128114

X-original-commit: f7dacce18bf44914972da292ff041505289d1e16
Signed-off-by: Divyesh Vyas (divy) <divy@odoo.com>
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2023-07-12 07:40:29 +02:00
momegahed c378868f16 [FIX] pos_discount: remove rounding from discount
Summary
-------
Currently, in POS, global discounts percentages are rounded to the
nearest *whole* number.

Steps to reproduce
------------------
- install the Point Of Sale
- activate Global Discounts on a POS
- start a session and add a product
- add a 5.5% global discount

Look at the added 'Discount' line, you should see that its amount
doesn't match the discount. (6% is applied instead of 5.5%)

opw-3347127

closes odoo/odoo#128111

X-original-commit: cbe314e35911f8c71987f2ae21a0fe446d97c360
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-07-12 07:40:24 +02:00
niyasraphy e588e25a5d [FIX] pos_daily_sales_reports: traceback on printing daily sales
before this commit, on printing the daily sales report
without selecting the pos session in the wizard, it
raises traceback.

traceback:

ValueError: Not naive datetime (tzinfo is already set)
Template: point_of_sale.report_saledetails
Path: /t/t[2]/t/div/div[1]/t[3]/strong/t[1]
Node: <t t-esc="date_start" t-options="{\'widget\': \'datetime\'}"/>

after this commit, the session field will be required
in the wizard and report will get correctly printed

closes odoo/odoo#128096

X-original-commit: a77e2936790fdb179f88c3cd2de08aec801bb24c
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-07-12 07:40:15 +02:00
tsm-odoo f5da99c0ad [FIX] mail: fix crash when unknown member leaves channel
Before this commit, a crash occurred when an unknown member
left a channel.

Steps to reproduce:
- Open two browsers, one for admin, one for demo
- Ensures both users are on the general channel
- Execute the `/leave` command with demo
- A traceback appears on the admin browser

This issue occurs because the `action_unfollow` only sends
the channel member id through the bus but the client relies
on other keys without checking for their presence. This
commit fixes this issue.

closes odoo/odoo#128090

X-original-commit: f8452b2eb8f9243402984d78184ed494384a187c
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
2023-07-12 07:40:11 +02:00
hupo-odoo f85ddd5964 [IMP] account : tax_tags switch on accounting reports
Improves the update of accounting report expression when switching the engine to 'tax_tags'.

To reproduce:
1) Create a new report line in a report with an expression using the 'external' engine, giving it "dudu" as formula.
2) Save your changes.
3) Modify your expression to use 'tax_tags' instead of 'external'. Save your changes.
=> +dudu and -dudu tax tags are now created (with this commit), as expected

task : 3270506

closes odoo/odoo#128053

X-original-commit: a7dfd79ec13bae3d43cda7be06ebd07ba3ce135c
Related: odoo/enterprise#43918
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
Signed-off-by: Hugo Poncelet (hupo) <hupo@odoo.com>
2023-07-12 07:40:08 +02:00
Maruan Aguerdouh (magm) 71233fa2cb [FIX] website_slides: do not crash when deleting a slide
Steps to reproduce:

- Install the elearning module and go to a course not created by you.
- Try to delete or add any slide.
Note: the bug is not consistent it might happen for some courses and not
for others.

Issue: We get a traceback error when trying to modify anything about the
slides in this course.

Solution:
Adding the `'channel_id.slide_ids.slide_ids'` dependece to the
`_compute_category_id` will make the computation to take into account
the changes on the slides.

opw-3316697

closes odoo/odoo#128022

X-original-commit: 1d6f8f4c606ddb7f57acd7ef2a9f983d7de84a34
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-07-12 07:40:03 +02:00
tsm-odoo 1fd39b35b2 [FIX] mail: fix suggestion hook char deletion
Before this commit, the suggestion list would not work when
a string with no match was entered then modified.

Steps to reproduce:
- Open a channel
- Type `/hee` (this string matches no suggestion)
- Delete one of the `e` in order to get `/he`
- This string should match the `/help` suggestion but nothing
is shown.

There is several issues here:
- The suggestion hook is based on the composer selection but
the `selectionChange` event is not triggered when deleting text
from the textarea which leads to incorrect selection.
- The search is cleared in the `suggestionHook` when nothing is
found which leads to incorrect delimiter position after a deletion.

This commit fixes both issues.

closes odoo/odoo#127997

X-original-commit: b8bf65478cad558e02a5902886b3e4272483944e
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-07-12 07:40:00 +02:00
Benoit Socias bbd1a48083 [FIX] web_editor, website: use theme colors on shapes in options panel
Since the edited website pages are inside an iframe, the options panel
cannot base its display on the CSS rules of the page. When changing the
theme colors, only the edited page's CSS is reloaded, not the option
one. Because of this, the background shapes are displayed using an
obsolete color palette inside the options panel.
This causes colors to be forced on background shapes within the iframe
because their default colors do not match the ones inside the options
panel when different theme colors are set. Once forced, the colors of
the background shapes within the content do not follow the theme
palette changes anymore.

This commit forces the background shapes displayed in the options panel
to use the current palette.
This is done by recovering the current edited page's shape background
images from the CSS rules. This approach was chosen as opposed to
adding a `d-none` version of the shape `div` to the edited page and
getting the background image from its computed style.
This fixes the color comparison between the background shapes of the
content and the ones of the options panel, thus not forcing colors if
the theme colors are used.

Steps to reproduce:
- Edit a website page.
- Drop a "Banner" block.
- Enable background shapes.
- Go to the theme tab.
- Select a different theme color palette.
- Select the "Banner" block.
- Open the "Shape" option's menu.

=> The shapes were displayed with the old color palette and if selected
were applied with the old color palette.

Additionally, to avoid a race condition when leaving a theme color
picker by either clicking on the BLOCKS tab or re-selecting the
snippet with a shape, a re-rendering of the existing snippet editors
is requested and the shape cache is invalidated if the palette has
changed in the meantime.

task-3370939

closes odoo/odoo#127951

X-original-commit: c511e100cad2febc0ebb9ce61b5eb52232e60f7d
Signed-off-by: Soukéina Bojabza (sobo) <sobo@odoo.com>
2023-07-12 07:39:51 +02:00
Guillaume (gdi) 39b4d16f10 [FIX] website: format price according to client locale
Since [this commit], we have a range input to select a price filter for
products. This input displays a min and max price that the visitor can
select. The problem is that the price is not formatted according to the
visitor locale. This commit fixes this issue.

Steps to reproduce the bug:
- With English as language, go to the shop page
- Go to Customize and activate filter by price
- Install French on the website
- Visit /shop in French

=> The price is not formatted according to the French locale. For
example, we can see a price of a thousand euros displayed as 1,000.00
but in French, it should be displayed as 1 000,00.

[this commit]: https://github.com/odoo/odoo/commit/41f7c7bc6428050d4c7956edca26b7c1bd2d8e04

task-3414455

closes odoo/odoo#127881

X-original-commit: 683b7edf0ce1f098757aa1e38ee6dc5d4e255272
Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
Signed-off-by: Guillaume Dieleman (gdi) <gdi@odoo.com>
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2023-07-12 07:39:48 +02:00
Lucas Perais 450f79c896 [FIX] web: actionService reports: pass action's context to download
Before this commit, the report action's context was not passed to the download route.
This was problematic as some crucial keys may be forgotten when downloading the pdf.

After this commit, we do pass the full context to the download route, ensuring consistency of the context
across calls.

closes odoo/odoo#126963

Related: odoo/enterprise#43441
Signed-off-by: Luca Vitali (luvi) <luvi@odoo.com>
2023-07-12 03:48:50 +02:00
Lucas Perais 26ea33bc64 [FIX] account: report invoice Rounding should be in a table row
Commit ee6e560415 probably forgot to wrap the
rounding data of the document_tax_totals_template in a table row `<tr />`

This commit corrects it

Part-of: odoo/odoo#126963
2023-07-12 03:48:49 +02:00
Lucas Perais 4d61085348 [FIX] web_editor: wysiwyg coherent API
Before this commit the function getContentEditableAreas passed in options
was not correctly called.

The OdooEditor which receives it too passes itself to it.

This commit corrects the call in Wysiwyg to that function and passes the odooEditor instance

Part-of: odoo/odoo#126963
2023-07-12 03:48:49 +02:00
Lucas Perais a38fd5eb2c [FIX] web_editor: html_field QWeb styling with specific class
Before this commit, whenever some nodes had some attributes similar
to QWeb (t-if, t-else, t-out etc....) the QWebPlugin's style applied.

This was unpractical when that style needed to be customized.

After this commit, the HtmlField add a class signaling that it should apply that style.

Part-of: odoo/odoo#126963
2023-07-12 03:48:49 +02:00
Lucas Perais 04b844550b [FIX] web_editor: wysiwyg color error resilient
When popping the color selector of the wysiwyg, sometimes the OdooEditor
returns an error code instead of a list of elements.
In that case, the code crashed as it expected a list (implicitly, by calling Array methods)

This commit accounts for that and tests whether the return is an Array.

Part-of: odoo/odoo#126963
2023-07-12 03:48:49 +02:00
Lucas Perais 958209f7c7 [REF] web: SelectMenu: a subtemplate for items
Before this commit, it was not possible to customize the way an item
in the selectMenu was displayed.

After this commit, with the help of a subtemplate, it is now possible
to subclass the SelectMenu and customize how an item is displayed

Part-of: odoo/odoo#126963
2023-07-12 03:48:48 +02:00
Lucas Perais 1e5c256294 [FIX] web: CodeEditor: resource-specific session
The new CodeEditor dismissed the notion of ace EditSession.
This serves to split the ace internals (history, values etc...) according
to the logical unit of a session.

After this commit, from the CodeEditor point of view for each edited resource (a view mostly)
corresponds one session.

Part-of: odoo/odoo#126963
2023-07-12 03:48:48 +02:00
Lucas Perais 49ae7f4d47 [IMP] web: ConfirmationDialog can take a confirmClass props
Before this commit, the confirm button of the confirmation dialog
was always btn-primary.

After this commit, it can take a props to modify that.

Part-of: odoo/odoo#126963
2023-07-12 03:48:48 +02:00
Martin Trigaux 884a56c239 [FIX] test_access_rights: adapt tests
Make the user be in at least one of the group employee, public or
portal to be more coherent with Odoo

closes odoo/odoo#125216

Related: odoo/enterprise#42628
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-07-11 22:33:47 +02:00
Xavier Morel ce1a4a2ee0 [IMP] base: deprecate global rules
ir.model.access rules without group will now log a warning

Part-of: odoo/odoo#125216
2023-07-11 22:33:47 +02:00
Martin Trigaux c68fa610d4 [FIX] *: correctly search record without user
If a user is not present in the request, he is in no group at all and
can not access any model, including the one available for public
users.
Avoid ambiguity by using sudo or add a user specifically.

Part-of: odoo/odoo#125216
2023-07-11 22:33:47 +02:00
Martin Trigaux cd2f330bec [IMP] *: remove glocal ACL
Specify explicit route for each ,, line
This is part of task 3230280 where global ir.model.access will be
forbidden.
The goal is to make access to public/portal explicit. Too often,
global access was granted with only employees in mind.

Remove ,,0,0,0,0 lines

mail:
employee already had read access to mail.group
still needed to subtypes as in ir.rule domain

mail_group: employee already had read access
pos_mercury: only needed for employees

membership:
move public access for website_membership as needed in the controllers

website_customer: employee already had read access

website_event_booth: no need for category
website_event_exhibitor: retrieved in sudo
website_event_track: not needed for location

Part-of: odoo/odoo#125216
2023-07-11 22:33:47 +02:00
Benjamin Vray b043f0671a [IMP] website: target popup as a link
This commit introduces a new feature to the popup snippet.
Up until now, the popup could be displayed after a delay or on exit.
This commit enables the popup to be displayed on click.

To make use of this feature, the user will need to:

- Set the "Display" option of the popup to "On Click (via link)".
- Paste the anchor that has been copied to the clipboard into the
URL input of any link.

This commit also adds a test for this new feature.

task-2172312

closes odoo/odoo#76442

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2023-07-11 22:33:36 +02:00
Ivàn Todorovich 858943c47d [IMP] *: remove deprecated use of mail widgets
They have been removed in 3fea5b213, these must be left overs.
They don't really do any harm besides providing a bad example for devs.

closes odoo/odoo#127767

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-07-11 21:21:04 +02:00
Mahamadasif Ansari a1a243f984 [FIX] mrp: make receipts avaliable in mo overview when missing qty less than 1
"ValueError max() arg is an empty sequence" occurs when user try to
open the manufacturing overview. This is because the component
product on hand quantity is negative so it generate empty replenishments.

Step to produce:
1. install manufacturing
2. Go to Inventory > Configuration > setting
3. Enable storage locations in the warehouse > save
4. Create a product, e.g., "x"
5. Click on the Hands unit to update the product quantity.
6. Click New on Update Quantity.
7. Enter any negative value in the counted quantity (e.g., -50) > click apply
8. Go to Manufacturing > Click New
9. Select any product (e.g., "A") for manufactoring
10. Add "x" in component product > enter 0.0 in To consume > save
11. Click on Overview (smart button)> Error occur

This commit solves the above issue by making receipts available in the
Manufacturing Overview report when the missing quantity in a
manufacturing order is less than 1.

sentry-4110696764

closes odoo/odoo#127629

X-original-commit: 27697fd6f9b601714b0aef9884eaadca963f32f1
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: ANSARI MAHAMADASIF (maan) <maan@odoo.com>
2023-07-11 21:20:58 +02:00
mky-odoo 3083402d32 [FIX] point_of_sale: allow classic users to load demo products
While click on add demo data wizard button it will generate trackback.

Steps to Produce:-
- Create database without demo data.
- Login as Admin.
- Install 'point of sale' module.
- Delete all product
- Create New User and give user access to 'point of sale'.
- Login with new created user.
- Go to 'Point of Sale' module.
- Open new session
- Click on Generate Demo Data >> Error occur

Error: A traceback appears: AccessError: You are not allowed to create
'Point of Sale Category' (pos.category) records.

This commit solves the above issue by allowing the creation of demo
data on POS for users, which has User rights.

sentry-4245391993

closes odoo/odoo#127263

X-original-commit: a8f5343f5b83f6eb069f9d1e542fc1e14fbedfcb
Signed-off-by: David Monnom (moda) <moda@odoo.com>
2023-07-11 21:20:45 +02:00
Kevin Baptiste 427d31766d [IMP] hr, hr_contract: show fields to employee manager
Adds a mechanism to have some fields available to the employee manager
on the public employee profile.

Here `first_contract_date` is available for the employee manager.

task-2882052

closes odoo/odoo#124640

Related: odoo/enterprise#42362
Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
2023-07-11 18:03:18 +02:00
Leonardo Pavan Rocha 79d4a829e5 [IMP] web: many2many_tags_field allow passing noViewAll to Many2XAutocomplete
In sign, we don't want to show the view all option when choosing sign options
for a sign item in a template. This commit adds the noViewAll prop to the
many2many_tags_field component.

task-3233643

closes odoo/odoo#122157

Related: odoo/enterprise#39787
Signed-off-by: Arnaud Joset (arj) <arj@odoo.com>
2023-07-11 18:03:10 +02:00
Aaron Bohy b553163b4e [FIX] web: fix clickbot to enter studio
Since [1], the DOM of the studio icon has changed, and no longer
matches the selector of the clickbot menu. As a consequence, it
no longer entered Studio. This commit fixes the selector.

[1] odoo/enterprise#9da0c9fab6c066aa97bc8cb99eb0e54b5a76a08f

closes odoo/odoo#128040

X-original-commit: aba563c58ec890bbf33d4a7d3cc34e9b2a4012a0
Related: odoo/enterprise#43910
Signed-off-by: Luca Vitali (luvi) <luvi@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-07-11 12:00:49 +02:00
momegahed 6c8e3b2705 [FIX] hr_skills_slides: error on creating course
Steps to reproduce:
1. add the existing field `employee` to the `res.partner` form view
2. toggle it for the current user
3. try to create a new course in elearning
4. traceback

bug:
the code assume that the employee field is `partner.employee` however
it is just a boolean field

opw-3345462

closes odoo/odoo#127955

X-original-commit: 74e74c9a4df75148125268b901742c12799186fe
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-07-11 12:00:40 +02:00
xO-Tx 4691fc4bbe [FIX] website: fix current animated text update on text animation
Steps to reproduce:

- Go to website > drop a snippet with text content.
- Select a text > click on text animation button to activate the option.
- Click on the button to disable text animation > The text animation
cannot be applied again on the text.

Starting from 16.0 (exactly [1]), the `document` > `selectionchange`
event listener was added on `this.$body[0]`, which means the code from
`__onSelectionChange` will never be executed, and as a consequence, the
option will handle the text as if it has already an animation because
of the not correctly updated value in `this.$currentAnimatedText`.

Spotted while working on [2].

[1]: https://github.com/odoo/odoo/commit/3c2febddb67888617dad74af0e9e46ed60d105b7#diff-d2188391a9d83cc97f3220e08d259e82796d94191dcf5e5fdb9b77e57074e6a5
[2]: https://github.com/odoo/odoo/pull/122751

task-3414256

closes odoo/odoo#127812

X-original-commit: 1bf244c77f4bd1f52c0964b75e0ce5582bfa54f7
Signed-off-by: Guillaume Dieleman (gdi) <gdi@odoo.com>
Signed-off-by: Outagant Mehdi (mou) <mou@odoo.com>
2023-07-11 12:00:37 +02:00
Claire Bretton (clbr) 4466370eb5 [FIX] l10n_ch: Swiss QRCode relax origin country constraint
We allow creation of QR-Bill codes when they are issued from
another country than Switzerland.

Steps to reproduce :
1. Enable QRcode Bill in Accounting settings
2. Set a valid Swiss QR-IBAN account on your company.
(Contact > CH Company > Accounting tab > Bank Accounts:
Set account number to `CH21 3080 8001 2345 6782 7`.)
3. Set the CH Company's country to something else than Switzerland.
4. Create a Swiss partner (be sure to set all address/ZIP/city/country=CH).
5. Create an invoice to that Swiss partner and post it.
6. Click Print QR-BILL, it will raise an error.

closes odoo/odoo#127798

Task: 3359821
X-original-commit: c456c78e347c707b0f5b684b47631e5566963289
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
Signed-off-by: Claire Bretton (clbr) <clbr@odoo.com>
2023-07-11 12:00:35 +02:00
Rodolpho Lima 17cd7fcd6d [FIX] web_editor: comment about transforming URL inside link
The previous comment referenced in this commit is no longer reflects
the code section that follows it, as it has undergone modifications in a
previous commit [1]. The code segment responsible for pasting image and
video has been relocated and is no longer positioned beneath the
comment, rendering it obsolete.

The comment has been reworded to accurately reflect the content of the
code section that follows.

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

closes odoo/odoo#128025

X-original-commit: 7929389a1c2f9e6cfdf34de813abc6f8c90b8371
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2023-07-11 09:10:31 +02:00
Rodolpho Lima ec302e06d0 [FIX] web_editor: line breaks pasted as BR
Before this commit, when pasting the clipboard content as plain text
(CTRL+SHIFT+V), line breaks ('\n') got converted to `<br>` elements.
This made the behaviour of the pasted section inconsistent with the
other parts of the edited document, in which line breaks are obtained
via paragraphs (`<p>`). In particular, when converting the pasted
content to a list, the whole multi-line content would be added to a
single list item, instead of one item per line.

This commit makes sure pasted line breaks result in new paragraphs.

task-3323873

X-original-commit: 18026ed2d4efaa6323e38b53eced77b1db666453
Part-of: odoo/odoo#128025
2023-07-11 09:10:30 +02:00
Carsten Wolff (cawo) 48972503c2 [FIX] sales_team: set forcecreate=0 on crm_team_member_admin_sales
A considerable number of upgrade requests fail on different python constraints,
because the DBs in question are missing the `crm_team_member_admin_sales`
xmlid, while the data is in conflict with the attempt to restore the default
data (e.g. `base.user_admin` and `team_sales_department` have been assigned to
different companies or simply the data still exists and is still marked as
active).

The removal of the xmlid can only be done by an admin in developer mode and it
is safe to assume that the intent was to no longer have the default data and
that it is of no use to recreate it.

To support this intention and to make these upgrades succeed, set
`forcecreate="0"` on the XML record `crm_team_member_admin_sales`.

opw-3414340

closes odoo/odoo#128020

X-original-commit: 73fa2c03928afb8a3bdc3533d3af0874505ff6b8
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Carsten Wolff (cawo) <cawo@odoo.com>
2023-07-11 09:10:27 +02:00
clesgow 51de4ab9b5 [FIX] web: handle focus for buttons cells in list
This is reproducible in lots of ways, here's one:
- Inventory -> Products -> Any storable product
- Click on Update Quantity
- Click on the cell where the 'History' and 'Set' button are

This raises a traceback as the `cell` assigned right before is null at
that point. Indeed, since those cells from a special kind of column made
of buttons (o_list_buttons), those don't have a `name` attribute to
find, hence the traceback.

closes odoo/odoo#128014

X-original-commit: 222dc64be51cc8e711278cff96392e755ba39fd4
Signed-off-by: Francois Georis (fge) <fge@odoo.com>
2023-07-11 09:10:24 +02:00
Maximilien (malb) e410bed643 [IMP] l10n_fi: Adding account + translation
Before this PR, a lot of account were missing from the finnish COA.
The goal of this PR was to add those missing account following this spreadsheet:
https://docs.google.com/spreadsheets/d/1hpQndK24UJ9efvl_Vyp5p-UczonIm_FxPnakf_Ugm68/edit#gid=1134177820

Also adding the according translations

closes odoo/odoo#128001

Task: 3241121
X-original-commit: 6833ba3b86df5ce3a28696e99c56aa186375a680
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
2023-07-11 09:10:21 +02:00
John Laterre (jol) 182648a1f1 [FIX] account: fix reversed move payment state
Currently, when reversing a customer invoice with a credit note
that included an exchange difference, the payment state would
switch to 'Paid' instead of 'Reversed'.

This was due to the fact that the exchange difference entry
changed the way the payment state was evaluated. This
is being fixed here.

task-3418480

closes odoo/odoo#128000

X-original-commit: 01cb9804d46d75d820e7e16ce065e1034d7a8c20
Signed-off-by: Laurent Smet (las) <las@odoo.com>
Signed-off-by: John Laterre (jol) <jol@odoo.com>
2023-07-11 09:10:18 +02:00
tsm-odoo 9728406695 [FIX] mail: fix transient messages wrongly positionned
Before this commit, transient messages were inserted at the
wrong position.

Steps to reproduce:
- Send a message on a channel
- Execute the `/help` command
- The transient message is positioned before the message
that was sent first.

When a message was posted, the message fetch route was called
and the transient messages were inserted again.

They are two issues here:
- Messages should not be fetched when posting a message
- Transient message index is wrongly computed when it is
the last one.

This PR fixes both issues.

closes odoo/odoo#127979

X-original-commit: bebea00e1ff0757ce5ce34d6ae87f6adef2e515c
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
2023-07-11 09:10:12 +02:00
Julien Mougenot 1fdfe36d9b [FIX] web_tour: support pointer events in tour helpers
This commit adds support for pointer events in tour helpers. The way it
works is that every event triggered in the "click" helper has been
changed to be a pointer event, and when needed the equivalent mouse
event is also triggered for compatibility.

closes odoo/odoo#126772

Related: odoo/enterprise#43305
Signed-off-by: Géry Debongnie <ged@odoo.com>
2023-07-11 09:10:07 +02:00
paso-odoo 0fab57e4eb [FIX] l10n_es_edi_tbai: check company vat for sender
If the vat is not set on the company and calls the method of web service
parameters for Bizkaia, it will raise an AttributeError like the 'bool' object
has no attribute 'startswith'.

Fix this issue by adding a condition to check the company's vat.

Sentry - 4282481635

closes odoo/odoo#127954

X-original-commit: 2eb66299a2edc5dd5194a7ea7a2ef208a135d533
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Parth Solanki (paso) <paso@odoo.com>
2023-07-11 06:52:57 +02:00
Benoit Socias 62bdd7adae [IMP] website, web_editor: placeholder in empty sanitized HTML fields
When an HTML field is empty and no block can be dropped inside it, it
is very difficult to locate or even notice.

This commit adds a placeholder text inside sanitized HTML fields.

Steps to reproduce:
- Install website_crm_partner_assign.
- Go to a contact without website description.
- Go to its website page.
- Edit page.

=> The `partner.website_description` field is difficult to locate.

task-3293600

closes odoo/odoo#120588

Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2023-07-11 03:35:39 +02:00
Benoit Socias 1bf2a891dd [IMP] *: make HTML fields with sanitized attributes edited as text-only
*: web_editor

When an HTML field sanitizes its attributes, it can still be filled with
HTML content (blocks, styling, power box commands) using the website
builder. This causes problems because those elements can then be broken
by the sanitizing.
It is possible to break elements so badly that the page cannot be
edited anymore to fix the problem.

This commit prevents the user from dropping snippet blocks inside the
content of such fields.

Steps to reproduce:
(Unless `slide.slide`'s `description` becomes
`sanitize_attributes=False` in the meantime.)
- Edit a single Course's slide.
- Drop a Carousel into the description field at the bottom.
- Save.

=> Carousel did not work.

Worse:
- Instead of the Carousel, drop a Countdown.

=> An error happens on each page reload, and the edit mode cannot be
reached anymore.

task-3293600

Part-of: odoo/odoo#120588
2023-07-11 03:35:39 +02:00
Xavier ALT 4978894a1b [FIX] hr_timesheet: fix access error on 'all timesheets' list view
After odoo/odoo@ad40298a9, when a user having access to timesheet app
but not to accounting app tries to see his timesheet in list view, and
some lines have been invoiced manually, an access error is raised.

This commit ensure that user can compute `readonly_timesheet` even when
user has no accounting access.

opw-3415661

closes odoo/odoo#127996

X-original-commit: 8f224acaac2d3c67d06284726a75194c9dc20a28
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-07-10 23:43:41 +02:00
Thomas Lefebvre (thle) e937d480d0 [FIX] hr_attendance: correct timezone in report
Steps to reproduce:
-------------------
- with timezone "Europe/Brussels" (UTC +02:00);
- create an attendance that starts at 1:00 AM;
- go to pivot view in Reporting tab.

Issue:
------
Attendance appears to be a day early.

Cause:
------
When converting a date to UTC for database storage,
it's possible that the date may change
(due to a large offset or hours close to 00:00).
Therefore, when we use `CAST(check_in as DATE)`,
we will keep the date that has potentially changed.

Solution:
---------
Use postgresql's `at time zone <timezone_name>`
statement to convert the recorded attendance
to UTC in the employee's timezone.

Note:
-----
On an employee's form view, the "Working Hours" field
(`resource_calendar_id`) is required.
The `resource_calendar_id` field is a Many to One
to the `resource.calendar` model.
The `resource.calendar` model contains
the `tz` field, which is required.

As a result, it will always be possible to find
an employee's timezone via his calendar resource.

Hypothesis:
-----------
Attendances are created using the browser's timezone.
It is normal to think that the employee's
calendar timezone is the same as his browser timezone.

opw-3370874

closes odoo/odoo#127989

X-original-commit: 8ac7e19ce94685438ab16f052c6550e86e692a75
Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
2023-07-10 21:25:51 +02:00
Victor Feyens 9ac7694b9f [CLN] sale_management: leftover dead code
closes odoo/odoo#120229

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-07-10 21:25:48 +02:00
Valeriya(vchu) 27ec7bf1ea [IMP] sale_management: allow edit optional products in portal
Before, if the product was both in the order and in optional
products, the user could not edit the quantity.
Now, the user can edit the quantity for all optional products.

task-3290530

Part-of: odoo/odoo#120229
2023-07-10 21:25:47 +02:00
Antoine (anso) 715eba5a47 [FIX] mail: close chatter button in attachment view
This commit fixes the style of the close chatter button in the
attachment view to match new Milk button design

It also fixes a no spacing issue between `.o-mail-Chatter-close` and
`.o-mail-Chatter-follow`

task-3415853
part of task-3326263

closes odoo/odoo#127978

X-original-commit: f655bdfda5caf6608d4364f49bdddf25f3abf201
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2023-07-10 18:16:39 +02:00
Chrysanthe (chgo) de6650cb8c [FIX] web: fix calendar buttons spacing
=== ISSUE ===

If you open the calendar module with an event with attendees, the status
button showing if the user accepted the invitation or not is missing a
left margin.

=== AFTER ===

We add a `ms-1` class to the buttons to space them correctly.

task-3389679
part of task-3326263

closes odoo/odoo#127976

X-original-commit: 86595f718ec5824d53f49ae7495677dd31551d57
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2023-07-10 18:16:36 +02:00
lejeune quentin 5eeae30fd3 [FIX] point_of_sale: Update raspberry pi os for iot use
With this update the version of python goes to 3.9.2
In addition, a unique password system has been put in place

closes odoo/odoo#127975

X-original-commit: a0feb285ff2ff4a9b82f87ff5abefb307847f25a
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
2023-07-10 18:16:33 +02:00