Commit Graph
164907 Commits
Author SHA1 Message Date
Pedram (PEBR) f2f078e0e7 [FIX] point_of_sale: set default language for new customers
Previously, when creating a new customer from the POS interface, if
the default language was not changed in the form, an empty string
would be sent to the backend. This resulted in the new customer not
having a language set.

This commit establishes the default language selection as the user's
selected language when creating a new customer within the POS system.

opw-3466525

closes odoo/odoo#134613

X-original-commit: 82e4dc110fdd9f3a8b58e473474eb13709ddc7a4
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Pedram Bi Ria (pebr) <pebr@odoo.com>
2023-09-08 08:29:56 +00:00
Adrien Guilliams (adgu) 626483b5e3 [IMP] point_of_sale: add a "should be printed" method to the invoice
For some localization, an invoice is created automatically when creating
a pos_order. This leads to a PDF being donwloaded for every pos_order
done during a session which might be annoying for the cashier.

This commit adds a method that is meant to be overriden by those
localizations so that this invoice is not printed everytime.

closes odoo/odoo#134268

X-original-commit: f5b4d588d18d8eda15d5e5f2f4353a3f05402888
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Adrien Guilliams (adgu) <adgu@odoo.com>
2023-09-08 08:29:55 +00:00
Didier (did) 8a6eda2ccd [IMP] mail: add typing status above the composer in chat window
In DM chat, the im status turns into typing icon so it was not
a problem. In group chat and channel, however, there was no way
to see typing members in chat window.

This commit adds explicit small text above composer in chat window
to list typing members of conversation.

Task-3474778

closes odoo/odoo#133757

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-09-08 08:29:54 +00:00
sofiagvaladze 4a80e6e922 [IMP] hr: refine simple user form view
When we go to the simple user view, no need to show "Create Employee"
option unless we are inviting a new user. Also, to standardize the
behavior, we remove the context that conditionally used to hide the option.

Moreover, we add smartbutton leading to the related employees' view to the
simple user form view.

task-3334739

closes odoo/odoo#122870

Related: odoo/enterprise#41646
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2023-09-08 08:29:53 +00:00
David Monnom (moda) 4a12c68184 [IMP] point_of_sale, pos_*: overall improvements and fixes
List of improvements:
- Add `Is a Kiosk` field when creating a new POS config
- Add category and change the image of the combo demo product
- Hide useless settings when kiosk mode is enabled

List of fixes:
- Fix bootstrap carousel traceback when no image is set
- Changed the warning sentence concerning adyen payments
- Fix start category in kiosk
- Fix sync between Self Order mobile and PoS restaurant, now new Lines
  from restaurant are added to the mobile order
- Fix product reminder when adding something in PoS mobile

closes odoo/odoo#134508

Signed-off-by: Robin Heinz (rhe) <rhe@odoo.com>
2023-09-08 07:17:52 +00:00
Arnaud Joset be3794ad72 [FIX] base_geolocalize: allow using the functionnality without privileges.
Before this commit, simple user could not use the novatim API since https://github.com/odoo/odoo/commit/160e8bfbf72a3e5d7cc8d8cbe7bc4f310f298baa

closes odoo/odoo#134757

Taskid: 3497580
X-original-commit: 4376361854e6e4e0e87f1f280fbd68ee1595369d
Signed-off-by: Arnaud Joset (arj) <arj@odoo.com>
2023-09-08 01:46:53 +00:00
Maximilien (malb) d6d468e5f1 [IMP] hr_expense: readability expense receipts
The goal of this PR is to improve the readability of expense receipts on
hr_expense and hr_expense_sheet.
This PR do the following:
- Add the expense name next to the filename
- Vertically center the receipt on both model (was previously done in hr_expense
 but not for the sheet)
- Make sure the title doesn't get hidden by the image (was previously done in
hr_expense but not for the sheet)

Also, to achieve the first point we had to modify the attachment so that we can
retrieve easily the information of which line the attachment is attached.

closes odoo/odoo#130181

Task: 3443067
Signed-off-by: William André (wan) <wan@odoo.com>
2023-09-07 16:16:04 +00:00
hmai 0c49049aef [FIX] web editor: cursor jumps out of blockquote
Steps to reproduce:

1. add a paragraph
2. add a blockquote
=> the cursor will jump in the paragraph
This commit fixes a bug detected when inserting a blockquote. The cursor
jumps to nearby paragraph on insert, and other issues.

The cause of the bug is tied to the fact that we rely on a complex behavior
when inserting paragraph related elements (within the insert command).
The way to make blockquote behave like the other paragraph related
elements is simply to add it to the list as done in this commit.

Task-3383441

closes odoo/odoo#134700

X-original-commit: 8195beacbd878c56bc93290bc03665e30667e177
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2023-09-07 14:45:31 +00:00
Samuel Degueldre 19217ce64b [FIX] web: restore legacy rpc error handling
Previously we removed some code related to handling errors in legacy
RPC, that would wrap errors in an object and give them an event that
could be defaultPrevented to mark the error as handled, but this code is
still needed. This commit restores it.

closes odoo/odoo#134693

Signed-off-by: Michaël Mattiello (mcm) <mcm@odoo.com>
2023-09-07 14:45:30 +00:00
Adrien Dieudonné c2f9b87a03 [IMP] web: remove legacy_env_utils
This util was used in :
- owl_dialog_tests
- field_one2many_tests
- relational_fields_tests
- gantt_tests (enterprise)

These files are now converted to WOWL.

closes odoo/odoo#134684

Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2023-09-07 14:45:29 +00:00
Nicolas Bayet 661705da13 [FIX] web_editor: update link url regex
In order to fix wrong url recognition, improve the url REGEX by:
- Recognize an url with a dot at the end in the string
  `www.google.be.`. It was not recognized before this commit.
- Do not allow a special character after an url that is not
  separated by "/", "?", or "#". Before this commit, the content
  `www.google.be!` would have been recognized the url as
  `www.google.be!` instead of `www.google.be`.
- Do not include in the url some character if they appear at the end.
  The chars are:
  - .
  - ,
  - }
  - )
  - ]
  - '
  - "

task-3373367

closes odoo/odoo#134660

X-original-commit: 0327ed28e855c89f9c13266c4aba5c99d80263ac
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2023-09-07 14:45:28 +00:00
Didier (did) 8bd1d87880 [IMP] mail: allow scroll using keyboard key in chat window
Before this PR, it was not possible to scroll a chat window using page down/page
up, home or end keys.
This is because the thread component that is scrollable cannot became an activeElement.
This PR fix this by adding a tabindex="-1" on the scrollable element.

Task-3468978

closes odoo/odoo#134657

Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
2023-09-07 14:45:28 +00:00
Parth Solanki(PASO) 5bfe32d939 [IMP] sale, stock: add shiprocket setting
Shiprocket added in settings as a third-party shipping connector.

task-3071078

closes odoo/odoo#134641

Related: odoo/enterprise#47018
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2023-09-07 14:45:23 +00:00
vlst b71e05e804 [REF] point_of_sale: unify numpads
At the moment, the point_of_sale module has 3 different implementations of
numpads. This is absurd. In this PR we unify them all into a single
numpad component.

One of the reasons why there are multiple numpads is because each requires
a slightly different set of buttons. The new `Numpad` component provides
a simple API which allows the consumer to specify what the buttons should be.

This is done by proving the `buttons` prop, which has the following type:
```js
    buttons: {
        type: Array,
        element: {
            type: Object,
            shape: {
                value: String,
                text: { type: String, optional: true },
                class: { type: String, optional: true },
                disabled: { type: Boolean, optional: true },
            },
        },
    }
```

In this PR we also provide a simple set of helper functions for the tours
and adapt all of the existing tests accordingly.

closes odoo/odoo#132245

Task: 3470346
Related: odoo/enterprise#46427
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-09-07 14:45:20 +00:00
nikj-odoo 62a8e81f28 [IMP] product: reorder product attribute
Currently the user cannot modify the order as he adds new attribute to the product.
In this commit he will be able to do that

task-3451377

closes odoo/odoo#131514

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-09-07 14:45:19 +00:00
Nicolas Bayet 52a1f267b7 [IMP] web_editor: drag and drop nodes within the editable
PURPOSE
The main reason is that when there are two block side by side that are
not editable (eg. the `HR` tag, the `/template` block), it is impossible
to set the cursor in between to add more content.

task-2984709

closes odoo/odoo#105179

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2023-09-07 14:45:18 +00:00
Nicolas Bayet 4c71662c95 [REF] web_editor: convert SmoothScrollOnDrag into a regular class
In order to use the class outside a legacy context, this commit
convert SmoothScrollOnDrag into a regular class.

task-2984709

Part-of: odoo/odoo#105179
2023-09-07 14:45:18 +00:00
Nicolas Bayet e47b07f4ef [REF] web_editor: prepare absolute containers for the movable node
- Add the ability to add a container to a tree of absolute containers
- Draw the avatars and the avatar overlaps in their own containers
- In order to clearly understand what draws the user avatar and a
  selection, create the method _drawUserAvatar.

task-2984709

Part-of: odoo/odoo#105179
2023-09-07 14:45:18 +00:00
Nicolas Bayet d0ab79a296 [REF] web_editor,mass_mailing,website: make closestElement support predicate
To improve the api, make closestElement take a predicate as an
argument.

task-2984709

Part-of: odoo/odoo#105179
2023-09-07 14:45:18 +00:00
aliya e334606588 [FIX] account_peppol: add a config param for test mode by default
Currently, the default edi mode for peppol is production, even in demo environments. This commit adds the config_parameter in demo data, so that it's created when peppol is presented/tested for demo purposes. Otherwise, the production server is getting spammed with test participants.

closes odoo/odoo#134656

X-original-commit: a1cb07e7de3dc06a36c1d632e1f670675c98d1f3
Signed-off-by: Laurent Smet (las) <las@odoo.com>
Signed-off-by: Aliya Tastemirova (alta) <alta@odoo.com>
2023-09-07 13:10:13 +00:00
Corentin Thaon (thco) 46f1e7552c [FIX] l10n_ar, l10n_cl: Print invoice PDF foreign currency
Trying to print or send an invoice using a foreign currency leads to a traceback while generating the PDF.

Steps to reproduce:
- Install l10n_ar and step into the AR company;
- Create a new invoice using a foreign currency (e.g. USD);
- Confirm the invoice;
- Try to Send/Print the invoice.

This is also the case with l10n_cl.

opw-3477108

closes odoo/odoo#134612

X-original-commit: 9578fa9854a000a58ca6ffbdf144104d6a99c56d
Signed-off-by: Cedric Snauwaert <csn@odoo.com>
Signed-off-by: Corentin Thaon (thco) <thco@odoo.com>
2023-09-07 13:10:10 +00:00
Nicolas Lempereur d262dfac69 [FIX] sale: fix amount to invoice multiple SO one invoice line
From an internal feedback, someone reported that the code added:

e2ec9e6c86949f5781d03a7dbb1065ef8af3196a

might cause an issue in case of several sale order linked to the same
invoice line.

With this changeset, in this case we will have the same behavior as
before, eg:

- one sale order line (SOL1) has amount_total 700
- one sale order line (SOL2) has amount_total 1400

if the invoice line linked to both line has price_total:

* 700 => amount_to_invoice of: SOL1 will be 0, SOL2 will be 700
* 1400 => amount_to_invoice of: SOL1 will be -700, SOL2 will be 0
* 2100 => amount_to_invoice of: SOL1 will be -1400, SOL2 will be -700

opw-3437237

closes odoo/odoo#133498

X-original-commit: 15a90c9f6cbf5a1750fafee994fda4b6ec2ebc14
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2023-09-07 13:10:09 +00:00
tsm-odoo a188d9c894 [IMP] im_livechat, *: use guests for livechat visitors
*: crm_livechat, mail, test_discuss_full, website_livechat.

part of task-3332628

closes odoo/odoo#129770

Related: odoo/enterprise#45767
Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
2023-09-07 13:10:07 +00:00
vlst 78f77a89a4 [FIX] point_of_sale: fix restrict categories bug
The products are not correctly loaded in the POS because of a bug
regarding the `Restrict Categories` feature.

Steps to reproduce:

1. Create a `pos config` with `Restrict Categories` set to: `categ1` and `categ2`

2. Disable `Restrict Categories`

3. Open the POS and notice that although all the categories are present in the
	category selector, only the products from `categ1` and `categ2` are loaded.

closes odoo/odoo#134645

Task: 3497308
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-09-07 11:46:15 +00:00
Alexandre Kühn c5ece6ccc1 [FIX] mail: discuss sidebar quick search case-insensitive
Before this commit, quick search in discuss sidebar (shown when
more than 20 conversations) was case-sensitive. For example,
when a channel was named "R&D" and user types "r", the channel
was not found.

This commit fixes the issue by making search case-insensitive.

Task-3485254
opw-3445747

closes odoo/odoo#134603

X-original-commit: 02e5af467b6058ea0933255c8f0c4e8dab17f31d
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-09-07 11:46:12 +00:00
+6 15ffe0b838 [FW][MERGE][IMP] mail, web: prepare support of WhatsApp
RATIONALE

Enterprise is adding support of WhatsApp as a mean to communicate
with customers. This require some update in community, notably by
using a new widget and preparing discuss channels to support whatsapp
channels.

See sub commits for more details.

Task-2377154 (Add WhatsApp Support)

closes odoo/odoo#134377

Forward-port-of: odoo/odoo#133973
Forward-port-of: odoo/odoo#131688
Related: odoo/documentation#5730
Related: odoo/enterprise#46942
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Co-authored-by: Akshat Trivedi <aktr@odoo.com>
Co-authored-by: Aurélien Warnon <awa@odoo.com>
Co-authored-by: Gitashri Mantha <gman@odoo.com>
Co-authored-by: Jigar Vaghela <jva@odoo.com>
Co-authored-by: Kashyap Patel <kasp@odoo.com>
Co-authored-by: Khushi Vakil <khva@odoo.com>
Co-authored-by: Nishant Jain <niai@odoo.com>
Co-authored-by: Prakash Prajapati <ppr@odoo.com>
Co-authored-by: Priyanshi patel <prpa@odoo.com>
Co-authored-by: Rahul Prajapati <rapr@odoo.com>
Co-authored-by: Renaud Thiry <reth@odoo.com>
Co-authored-by: Shreya Patel <shpa@odoo.com>
Co-authored-by: Stéphane Debauche <std@odoo.com>
Co-authored-by: Thibault Delavallee <tde@odoo.com>
Co-authored-by: Zeel Patel <zepa@odoo.com>
2023-09-07 11:46:11 +00:00
Renaud Thiry b71e5eea64 [FIX] mail: voice do not trigger change on unmount
'unmounting' key was not passed in when cleaning up the voice recorder
for an unmount.

In whatsapp this made the composer difficult to use as the voice
recoder is unmounted each time a message is sent.
The missing key made it impossible to send multiple messages as the
composer would be in the 'recording message' state, disabling the send
button.

Task-2377154

Part-of: odoo/odoo#134377
2023-09-07 11:46:11 +00:00
+4 628f3a54e4 [IMP] mail: prepare inclusion of whatsapp channels
Prepare 'discuss.channel' model as well as discuss code to include 'whatsapp'
channels and WhatsApp flow inclusion. Those channels are specifically used
in whatsapp-based flows and have some specific behavior, hence using a
specific channel_type for them.

Also add a setting in 'mail' to install 'whatsapp' module.

Task-2377154 (Add WhatsApp Support)

Part-of: odoo/odoo#134377
Co-authored-by: Akshat Trivedi <aktr@odoo.com>
Co-authored-by: Aurélien Warnon <awa@odoo.com>
Co-authored-by: Gitashri Mantha <gman@odoo.com>
Co-authored-by: Jigar Vaghela <jva@odoo.com>
Co-authored-by: Kashyap Patel <kasp@odoo.com>
Co-authored-by: Khushi Vakil <khva@odoo.com>
Co-authored-by: Nishant Jain <niai@odoo.com>
Co-authored-by: Prakash Prajapati <ppr@odoo.com>
Co-authored-by: Priyanshi patel <prpa@odoo.com>
Co-authored-by: Rahul Prajapati <rapr@odoo.com>
Co-authored-by: Renaud Thiry <reth@odoo.com>
Co-authored-by: Shreya Patel <shpa@odoo.com>
Co-authored-by: Stéphane Debauche <std@odoo.com>
Co-authored-by: Zeel Patel <zepa@odoo.com>
2023-09-07 11:46:11 +00:00
Thibault Delavallée cdae935731 [IMP] mail: allow to link partners to logs
In this commit we allow to give 'partner_ids' when using '_message_log'.
This allows to link a message to recipients but those are not notified
in any way.

Main purpose is to link a message which has a side effect to the main record
customer. First usage will be in WhatsApp implementation to link a sent
WhatsApp to a recipient, easing finding it back when receiving replies.

Task-2377154 (Add WhatsApp Support)

Part-of: odoo/odoo#134377
2023-09-07 11:46:11 +00:00
+4 fe62bfeacb [IMP] web: add DynamicModelFieldSelectorChar widget
In this commit we create a DynamicModelFieldSelectorChar widget. Purpose is to
use it in WhatsApp to select fields when trying to make a valid path to find
information on a given model. Example

  <field name="xxx" widget="DynamicModelFieldSelectorChar"
         options="{'only_searchable': true}"/>

It is based on char widget, using only_searchable options.

Task-2377154 (Add WhatsApp Support)

Part-of: odoo/odoo#134377
Co-authored-by: Akshat Trivedi <aktr@odoo.com>
Co-authored-by: Aurélien Warnon <awa@odoo.com>
Co-authored-by: Gitashri Mantha <gman@odoo.com>
Co-authored-by: Jigar Vaghela <jva@odoo.com>
Co-authored-by: Kashyap Patel <kasp@odoo.com>
Co-authored-by: Khushi Vakil <khva@odoo.com>
Co-authored-by: Nishant Jain <niai@odoo.com>
Co-authored-by: Prakash Prajapati <ppr@odoo.com>
Co-authored-by: Priyanshi patel <prpa@odoo.com>
Co-authored-by: Rahul Prajapati <rapr@odoo.com>
Co-authored-by: Renaud Thiry <reth@odoo.com>
Co-authored-by: Shreya Patel <shpa@odoo.com>
Co-authored-by: Stéphane Debauche <std@odoo.com>
Co-authored-by: Zeel Patel <zepa@odoo.com>
2023-09-07 11:46:11 +00:00
vlst 9a7c187147 [IMP] point_of_sale: enable combo products
Products can be created directly from the `pos.combo` view.
Before this PR, such products would not be automatically available in
the POS app.

This PR makes it so products linked to combos are available in POS by
default.

We also introduce an additional check that makes it so products associated
to combos cannot be disabled in the pos.

In this commit we also make it so the `Office Combo` product from the pos
demo data is in the `Desks` `pos_category`.

closes odoo/odoo#133359

Task: 3481899
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-09-07 11:46:07 +00:00
Valentin Vallaeys (vava) 5ca1da8ab3 [ADD] product: add multi-checkbox attribute type for extra options
Currently there is no efficient way to suggest extra-options to
customers in PoS or eCommerce. Extra options should be easily selected
by customers (or PoS waiters) with checkbox. Each checked option would
add an extra-price to the product price and appear on tickets,
receipts, invoices, kitchen display, ...

This commit introduces a new type of attribute: multi-checkbox. This
will not create product variants. A default extra-cost is defined at the
attribute level, but it can be changed at the product level.

The new attribute is available in Sales, not yet in eCommerce nor in PoS
(it will be in a future task).

task-3256585

closes odoo/odoo#130915

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-09-07 11:46:06 +00:00
Damien Bouvy aa0833184e [FIX] base: writing selection values with server actions
Server actions that 'update the record' have a mechanism to allow users
to easily select a selection value if the field they want to update is a
selection field (instead of having to type the technical value
directly).

Before this commit, this mechanism incorrectly stored the selection's
name instead of the value (e.g. 'Done' instead of '01_done'), making the
write crash when the action was run.

closes odoo/odoo#134625

Signed-off-by: Bouvy Damien (dbo) <dbo@odoo.com>
2023-09-07 10:29:49 +00:00
Mathias Mathy (MAMA) adfa9a4fcf [FIX] repair : editable destination locations on picking type
As the `default_remove_location_dest_id` field of the stock.picking.type
model is required, it is intended to be set by the user, and so it
must be editable rather than readonly.
Moreover, for accounting purpose, we want the ability
to modify `default_location_dest_id`.
Finally, we ensure to set a default value on all locations when
selecting 'repair_operation' as code.

closes odoo/odoo#134587

X-original-commit: 7504484ba2ebc93963bc0dec6441e351caee2638
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Signed-off-by: Mathias Mathy (mama) <mama@odoo.com>
2023-09-07 10:29:44 +00:00
Mahdi Cheikh Rouhou (macr) 9e8b8d1bf7 [FIX] account, web : display monetary and numbers in rtl language
Issue:
======
- Display of monetary values in kanban views is wrong in rtl language
- Pivot display has multiple erros in rtl language: values are left
  aligned and they are supposed to be right aligned like in ltr lang,
  negative numbers has the sign in the wrong place, the (plus/minus)
  icon placement is wrong (it should be before the title and not after)

Steps to reproduce the error:
=============================
- Install accounting and rlt language (arabic for example)
- Go to accounting (display of monetary fields is wrong)
- Go to accounting/accounting/journal items/pivot view
- Choose residual amount in view (it has some negative values)

Solution:
=========
Kanban Solution:
- I fixed the direction of the display to be ltr always for monetary
  values and added the class to the appropriate tags.
Pivot Solution:
- I fixed the direction and text-align style for the values to always
  display the same like rtl.
- displaying the icon and then the title will always give the desired
  display since the direction will reverse their order itself when it's
  rtl

enterprise fix : https://github.com/odoo/enterprise/pull/46675

opw-3295573

closes odoo/odoo#134296

X-original-commit: 6b7f89b43b6abc970c955760da203a1e41c53652
Related: odoo/enterprise#46900
Signed-off-by: de Wouters de Bouchout Jean-Benoît (jbw) <jbw@odoo.com>
Signed-off-by: Mahdi Cheikh Rouhou (macr) <macr@odoo.com>
2023-09-07 10:29:43 +00:00
Hubert Van de Walle (huvw) 04eed39aa8 [FIX] board: Add to dashboard no longer saves default filters
When adding a view to the dashboard, we already save the domain.
We don't want to save the default filters as they can have an opposite
domain as the one selected, meaning no records will be matched when
going to the dashboard.

---

opw-3385248

closes odoo/odoo#134610

X-original-commit: 16ab99eece9b36b1bb2958bb0f8ec45cbf8b83d3
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-09-07 09:00:37 +00:00
Jinjiu Liu 125fcaa620 [FIX] website_sale: add conditions to make sure partner's name exists
Reproduction:
1. Install Event, Sales, Website, Contacts
2. Login as Admin, create a new portal user 123, set the password as 123
3. Go to Contacts, find the created user, add a shipping address, leave
the name blank
4. Open another tab login as the portal user, place an order
5. At the Address step, Edit the billing address, change the name from
empty to “Test Name”, click next
5. An error is thrown cause the new name is not equal to empty value

Fix: this fix aimed the conditions we have in the previous PR: https://github.com/odoo/odoo/pull/111708
This change will allow the user to add a name for shipping address at
checkout.Without the fix, if you
change the name of a shipping address, it won’t be able to get through.
This is because of how we manage the shipping address, e.g. shipping
address is managed as child partners. For shipping address, the check
can_edit_vat is always false. See here: https://github.com/odoo/odoo/blob/14.0/addons/portal/models/res_partner.py
Another check, e.g. if shipping is being edited, is added to make sure
name/email can be changed for delivery address. For internal user, the
editing of shipping address is not blocked because of the `share` check.
But the same condition is used to ensure the consistency in case we
change how the shipping address is managed in the future.

Note: if the data is '' for name for example, the pre-process will
convert it to `False`. Thus the edge case that `'' != False` doen't
exist anymore

Related PR: https://github.com/odoo/odoo/pull/111708

opw-3126325

closes odoo/odoo#134606

X-original-commit: 55423cbdeeb1ce35fb257624ea0d04d4be99a943
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Signed-off-by: Jinjiu Liu (jili) <jili@odoo.com>
2023-09-07 09:00:36 +00:00
Preksha Chouhan 46016e33ea [FIX] web: return updated list of fields in export template
When user access template at the time of export with deleted field.
The traceback will be generated.

To reproduce the issue(any model, here- 'account.move.line'):

- Install 'account_accountant' module
- Go to Settings > Technical > Database Structure > Fields
- Create a new field with model as 'Journal Item' and save
- Go to Accounting > Miscellaneous > Journal Items
- Select any record in list view and click on export and generate a new export
template with newly created field
- Go to 'ir.model.fields' and delete that field
- Go to 'Journal Items' and select that template while export

Error: A traceback appears: KeyError: 'tax_audit'

When a field gets deleted from 'ir.model.fields' but it does not get deleted
from export template. And selecting that template to export the records will
lead to traceback.

See -
https://github.com/odoo/odoo/blob/59669e9943158e51dcbb9ae69ad758df8f7c7976/addons/web/controllers/main.py#L1815-L1818

sentry-4331986723

closes odoo/odoo#134605

X-original-commit: e458a4c164820c3ccf00b0520c5f86c49238fb2a
Signed-off-by: Julien Castiaux (juc) <juc@odoo.com>
2023-09-07 09:00:34 +00:00
Jurgen (jugj) 0b88ea0c4c [FIX] hr_holidays: Fix smart-button display of remaining time off
This PR fixes the display of remaining days that wasn't correctly displayed when an allocation
had no time limit.
task-3414291

closes odoo/odoo#134584

X-original-commit: 5fc84bd71fca69862ef4eb3fbb956a18c951d8d0
Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
Signed-off-by: Jurgen Gjini (jugj) <jugj@odoo.com>
2023-09-07 09:00:32 +00:00
Jurgen (jugj) 08550d7bb0 [IMP] hr : Update activity type summary when type changed
task-3429069

closes odoo/odoo#134550

X-original-commit: a6ee3d66ad15e32fc2f339f0f51f9267daead26d
Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
Signed-off-by: Jurgen Gjini (jugj) <jugj@odoo.com>
2023-09-07 09:00:31 +00:00
Victor Piryns (pivi) 0ba867a88f [FIX] web: truncate filename when importing custom module via studio
Issue:
When uploading a large custom module via studio for importing, Chrome
crashes with an internal SIGKILL and Firefox manages to load, but is
really sluggish.

Steps to reproduce:
- Install Studio
- In the Apps Dashboard > Customizations > Import
- Upload a large custom module (50 MiB)
- Chrome crashes, while on Firefox the page is sluggish

Cause:
In the module `base_import_module`, the `module_file` doesn't have a
corresponding `filename`, therefor the name used to be displayed in
the wizard is the content of the binary file in base64 encoding...
For a module that is of a large size, this is a *gigantic* string
that crashes Chrome and slows down the DOM on Firefox.

Fix:
Truncate the maximum filename that is displayed in the template to
the max length necessary to encode in base64 (0xFF) 255 bytes, as
255 bytes is the maximum filename size on Linux/Windows/MacOS.

Affected versions:
16.0 up to master

Reference:
opw-3491998

closes odoo/odoo#134532

X-original-commit: 218c9875c0422beb2a5b199797e531ed3625a13b
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Piryns Victor (pivi) <pivi@odoo.com>
2023-09-07 09:00:30 +00:00
Pierre Pulinckx (pipu) 038169ee9f [REF] web: simplify assets loading
In this commit, the loadXML function has been removed. We use registry with
xml_templates to load XML templates for OWL Apps.
The goal of task is to remove loadXML and getBundle from assets to simplify
the understanding of assets api.

task-3266441

closes odoo/odoo#134520

Related: odoo/enterprise#47001
Signed-off-by: Michaël Mattiello (mcm) <mcm@odoo.com>
2023-09-07 09:00:28 +00:00
FrancoisGe 33453faf23 [FIX] web: support properties in calendar
Before this commit, in a calendar view with a properties field, a crash
will be display when you click on an event.

closes odoo/odoo#134476

Related: odoo/enterprise#46990
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-09-07 09:00:27 +00:00
Tom De Caluwé 70a4051646 [FIX] web: support dark mode in field selector popover
Switch to using scss variables instead of hardcoded colors to support dark mode
in field selector popover.

Steps to reproduce:
Turn on Dark mode. Open Automated actions and add a model. Edit domain and
start typing: text is white on white, the popover does not adapt to dark mode.

opw-3453065

closes odoo/odoo#134458

X-original-commit: 5a57bd799688ee7a2c2e29d775fda73bba34c777
Signed-off-by: Tom De Caluwé (tdc) <tdc@odoo.com>
Signed-off-by: Romeo Fragomeli (rfr) <rfr@odoo.com>
2023-09-07 09:00:25 +00:00
David Monnom (moda) b6ea693753 [FIX] pos_self_order: fix combo header in kiosk
Previously, header height in pages was managed by `kiosk_template.js`
and in the various other components via props. This caused a bug in the
`combo.xml` page, as the header with steps and product names was not
displayed.

Now the height of header, content and footer is managed entirely via
the components and never via the template. This corrects the error in
question.

closes odoo/odoo#134354

Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-09-07 09:00:24 +00:00
Hung Trinh Ngoc 79e6b96263 [IMP] account: rename statement when journal type is cash
- To avoid confusion with the concept, I propose a modification to the
term "cash" in the journal.

closes odoo/odoo#131986

Signed-off-by: Trịnh Ngọc Hưng <ngochung207@gmail.com>
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
2023-09-07 09:00:23 +00:00
Dylan Kiss (dyki) 058ea4508c [IMP] account: structured sepa communication
Add helper functions to check structured communication references for
ISO (existing), Belgium, Finland, Norway and Sweden.

task-3284330

closes odoo/odoo#122835

Related: odoo/enterprise#41629
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
2023-09-07 09:00:20 +00:00
Noe Antoine 72b0d77cb5 [IMP] {website_}event{_sale,_exhibitor}: ease ticket access
The tickets are reworked, made easier to print and have
their structure reworked for qr code addition (in ENT branch).
Also they are easier to download as buttons are added to do so.

1. Design

Tickets have their background removed in order to ease
their printing. More room is given to details, the design
is simplified.

  New RESPONSIVE HTML TICKET

The confirmation email will now contain a link "See tickets"
leading to a new version of the full page ticket, called
"responsive_html". It does not generate / download PDF but rather
leads to a rendered qweb html page, with design working
properly on different screen sizes. The design is a tweaked
version of the full_page ticket template, simplified. It allows
users to see their ticket directly without needing a pdf viewer.

2. Download Tickets Buttons

"Download / See Tickets" Buttons are added in
- Email Templates (Ticket and Badge)
- The SO confirmation (if payment). All tickets, per event.
- The registration confirmation (if no payment). All tickets
in the same PDF. They are for the same event.

In order to access tickets, a route event/my_tickets is added
in the controller. It takes an event_id, registration_ids and
a hash based on those plus the database secret using tools.hmac.
The groundtruth hash is obtained for given registration ids in the
method _get_tickets_access_hash on event.event. The route is
used in all places listed above. The hash must be valid and attendees
must exist.

No condition on payment is set in my_tickets as we want the download
tickets link to work for non-free tickets as well at the end of the
sale process, and as the sale order could not be linked to any invoice
at that stage (if automatic invoices is not set in the settings),
registrations being 'not paid' at that point. This could be cleaned
in further work as different states are to be clarified.

The route must be public as it must work even for public users.
(from email or as public user registering on front-end) Also,
we give sudo access to the course in the case of invitation to
a course that is not yet published, as long as the hash and
registration are valid.

3. Email Templates

In order to have similar mail templates for badge and tickets,
Registration Badge content is duplicated from Registration
Confirmation and slightly tweaked, replacing existing body.

Also, the info of the payment / order moved from full page ticket
to the body of the confirmation email.

PR ENT - odoo/enterprise#41164
PR UPG - odoo/upgrade#5007

Task-3061851

closes odoo/odoo#120933

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-09-07 09:00:17 +00:00
Abdelouahab (abla) 7147d7774e [FIX] mail: fix current user finding in _mail_find_partner_from_emails
To reproduce
============
- login as Mitchell Admin
- change the email of a portal user, ex: Joel Willis, to the same email
as Mitchell Admin. Do this through the Contacts App
- always connected as Mitchell Admin, create a sale order and send it by
email to client, in chatter the sender will be Joel Willis

Problem
=======
when setting the author, `_mail_find_partner_from_emails` is called, when searching
for users with the given eamil, two results are found and the first one
is taken as author

Solution
========
give the priority to the current user when it matches the given conditions

opw-3455520

closes odoo/odoo#134609

X-original-commit: b4a9095497fb77e6963103fa2a27d20e00172ea1
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Abdelouahab Laaroussi (abla) <abla@odoo.com>
2023-09-07 06:56:53 +00:00
amdi-odoo 85a4d44c9a [IMP] {website_}event: improve registration desk view
Purpose
=======
Registration Desk promenade.
Bunch of QOL improvements to make the handling
of events easier.

Specification
=============
- Modify the attendee search template to have the search
  in this order:
 * Participant (search in name, email and company)
 * Company
 * Booked by
 * Selected Answers
 * Ticket
 * Event (Just for the multi-event mode)
- Make attendee registration status bar clickable to ease
the state modification.
- Attendee registration kanban view improvements:
 * Display the company.
 * Add a ticket icon in front of the ticket type.
 * Display the answers selected while registering (only
   for the questions of type selection) as tags.
 * Always use the fa-check icon for the card buttons
   (secondary for confirmed, primary for attended).
 * Add a button to go backwards (confirmed to unconfirmed,
   attended to confirmed) to ease the state modification
   from the kanban view. As we now have 2 buttons, widden
   their allocated space to make the clicks easier.

Task-3469490

closes odoo/odoo#134479

X-original-commit: c95db124cac8031e928f8fcdc5d47ebbc7f7f341
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Amélie Dieudonné (amdi) <amdi@odoo.com>
2023-09-07 06:56:52 +00:00