Commit Graph
164921 Commits
Author SHA1 Message Date
Manushi Shah (mash) cd2e6ea534 [FIX] sale_product_matrix: remove unnecessary matrix rows
Prior to this commit:
When generating a sale order/purchase order report, all rows, including those
with entirely null values included in the report i.e. the entire matrix is
displayed.

Post this commit:
The sale order/purchase order report is generated with only the rows with at
least one quantity is added, rather than including the entire matrix.

closes odoo/odoo#132045

Task: 2860388
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-09-08 09:47:01 +00:00
tong-odoo 39401c7928 [IMP] base: add hong kong region
See odoo/enterprise#45741

closes odoo/odoo#131851

Related: odoo/upgrade#5043
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2023-09-08 09:47:00 +00:00
Odoo's Mergebot a9f7e17f5d [IMP] base, web: allow to group by properties
Purpose
=======
Allow to group records by their property values,
like we can do with normal fields.

Technical
=========
Because there's no foreign key, when we group by a relational property
we need to check the existence of the ids in the query (and same for
selection and tags, because we might have value of a deleted
option / tag in database).

Task-3032464

closes odoo/odoo#103510

Related: odoo/enterprise#38778
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-09-08 09:46:56 +00:00
std-odoo faf5fa1022 [IMP] web: add tests related to the "group by y properties" feature
Purpose
=======
Add tests about the group by properties feature, the drag and drop
and the behavior in the pivot view.

Task-3032464

Part-of: odoo/odoo#103510
2023-09-08 09:46:56 +00:00
std-odoo 2943106d87 [IMP] project, crm: group by properties
Purpose
=======
Allow to group records per properties.

Task-3032464

Part-of: odoo/odoo#103510
2023-09-08 09:46:56 +00:00
std-odoo 15353f06d7 [IMP] base, web: allow to group by properties
Purpose
=======
Allow to group records by their property values,
like we can do with normal fields.

Technical
=========
Because there's no foreign key, when we group by a relational property
we need to check the existence of the ids in the query (and same for
selection and tags, because we might have value of a deleted
option / tag in database).

Task-3032464

Part-of: odoo/odoo#103510
2023-09-08 09:46:56 +00:00
std-odoo 88f4c4dd36 [IMP] base: properties, do not allow to select transient models
Purpose
=======
Do not allow to select transient models in relational properties.

Task-3032464

Part-of: odoo/odoo#103510
2023-09-08 09:46:56 +00:00
std-odoo 6c566c2814 [IMP] base: properties, better name verification
Purpose
=======
Currently, it is possible to use some bad characters in a property name
by writing directly on the parent (not via the child).

It's possible only with RPC call and it wasn't an issue because we
recheck the name anyway before using it in SQL query (but it should be
cleaned).

We also restrict the maximum length (there's nor reason to use
huge property names).

Task-3032464

Part-of: odoo/odoo#103510
2023-09-08 09:46:56 +00:00
std-odoo 6412575f4b [IMP] base: allow to use default_ context key for properties
Purpose
=======
Allow to use `default_properties.xxxxx` as a context key, to set the
default value on a property. We need that because when we group by
a property in a Kanban view, we can create new record in a given
column, and this process will set this context key.

Task-3032464

Part-of: odoo/odoo#103510
2023-09-08 09:46:56 +00:00
Nshimiyimana Séna 17039d8f4f [FIX] account: include 'quantity' in '_compute_all_tax' dependencies
Summary
-------
This commit addresses an issue where fixed taxes were not calculated
correctly when applied to a line with a price of 0.

Steps to reproduce
------------------
1. Create a fixed tax with an amount of 5.
2. Create an invoice with a line having zero price and apply the fixed
   tax.
3. Save the invoice. You should have a total of 5.
4. Change the quantity of the invoice line, to something like 2.
5. Save the invoice.

We expect the total to be 10, but we get 5.

opw-3212536

closes odoo/odoo#134762

X-original-commit: 2aafff6a36bd40719de9447a7ab9bf05274ff5d2
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Séna Serge Nshimiyimana (sesn) <sesn@odoo.com>
2023-09-08 08:30:04 +00:00
Anh Thao Pham (pta) 28b9d22e02 [FIX] account: fix default journal on payment creation
When creating an account payment with {"journal_id": False} in the values parameters,
a default journal is searched.
However, the found journal is directly overridden by the value in the parameters (i.e. False),
which triggers an error when trying to create the linked account move, because it violates
the not-null constraint on that field.
The default journal should only be overridden if its value in the parameters is not empty.

sentry-4286778702

closes odoo/odoo#134733

X-original-commit: dc26c686ab57119a15763d87effb27d9103927cf
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Anh Thao Pham (pta) <pta@odoo.com>
2023-09-08 08:30:02 +00:00
Hugo Santos 3c4cfb2e27 [CLA] corporate/factorlibre - Add contributor
closes odoo/odoo#134732

X-original-commit: feb22b434fefbb5d3562cca2c6187bf84e60caa9
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-09-08 08:30:01 +00:00
Alexandre Kühn d139240161 [FIX] mail: search in emoji picker should scroll top
Before this commit, when opening emoji picker and scrolling down
then making search, the scroll position was not reset to top.

This gave the impression that the search was incorrect, because
the most likely desired emoji is at the very top but was not visible
when searching in this condition.

This commit fixes the issue by enforcing scrolling top in emoji
picker content when the search term is updated.

Task-3493611

closes odoo/odoo#134675

X-original-commit: 7999ae51c51e24eea15edb8f08b2e35db4a774ad
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-09-08 08:29:59 +00:00
Aaron Bohy dc680a4429 [REF] web,*: stop using and remove legacy utils
*account,web_editor,website,website_sale,website_slides

This commit removes all legacy utils except Markup, which will be
removed in another PR. A lot of those utils were no longer used and
thus have just been removed. Those that were still used either
already existed in the wowl codebase, so usecases have been adapted
to use the new version instead. A few have been re-implemented (or
moved basically) to the wowl codebase (e.g. isEmail and humanSize).

Part of task~3439226

closes odoo/odoo#134620

Related: odoo/enterprise#47044
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-09-08 08:29:58 +00:00
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