Commit Graph
162425 Commits
Author SHA1 Message Date
David Monnom (moda) 004affffda [IMP] pos_self_order: ux improvements
Improvement of several aspects of the self-order UX:
- Changed the sentence indicating that the self-order is menu only.
- Added a shadow to the header.
- Reduced the size of the product image in the product list.
- Reduced the size of the product title in the product list.
- Reduced the size of the product image when you are on the page to add
it to the shopping basket.
- Added a shadow above the sticky area on a product's main page.
- The quantity of a product already added to the basket has been moved
from next to the title to next to the price.
- The review button now floats above the product list and no longer has
a background colour.
- In the basket, taxes and the total are now displayed after
orderlines and no longer sticky at the bottom.
- When the quantity of a product in the cart is changed to 0, the button
is now called "remove from cart".

Part-of: odoo/odoo#125743
2023-06-22 18:29:43 +02:00
David Monnom (moda) 99ad5a9410 [IMP] pos_self_order: align front-end and back-end field name
Previously in the front-end there was a notion of "tag" which used
product categories. This led to misunderstandings, because in the
backend there was a notion of tag and category for the products.

Now, the name of the category field is aligned in the backend and
the frontend.

The product model ID field has also been changed from product_id to
id during loading.

Part-of: odoo/odoo#125743
2023-06-22 18:29:43 +02:00
David Monnom (moda) 0c86b3e392 [FIX] pos_self_order: various bugs fixes
Here is the list of bugs that have been fixed:
- Search, when you click on the search button, the input isn't
autofocused.

- The tag list now scrolls automatically so that the selected tag is
always visible on the screen.

- The back button did not work when the self was opened from a page
containing the back button. This is because we are using the browser
history. In this case, when the user clicks back, we send them to
the home page.

- Automatic tag selection during scrolling has been improved.

Part-of: odoo/odoo#125743
2023-06-22 18:29:43 +02:00
Julien Carion (juca) 73a9154be8 [IMP] web: add ctrl+enter shortcut to dialogs
This commit adds the ctrl+enter shortcut to dialogs which will trigger
a click on the first visible button in the dialog's footer.

Task-3369676

closes odoo/odoo#125330

Signed-off-by: Mathieu Duckerts-Antoine (dam) <dam@odoo.com>
2023-06-22 18:29:38 +02:00
vlst 71284f4998 [IMP] point_of_sale: access customer's orders
In the pos one might often need to see the orders of a specific customer.
In order to accomplish this, a pos user would need to search for the
customer's name in the orders screen.

In order to simplify the flow, this PR introduces a new button on the
customer's page that can be used to navigate directly to the orders page
with the customer's name prefilled in the search bar.

closes odoo/odoo#125222

Task: 3298155
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-06-22 18:29:35 +02:00
Guillaume (gdi) 0f8aa2a816 [FIX] website, web_editor: add margin top on we-alert
This commit adds a margin top on the we-alert to make it prettier.
Otherwise, the alerts are too close to the elements above them.

task-3302433

closes odoo/odoo#120874

Signed-off-by: Benjamin Vray (bvr) <bvr@odoo.com>
2023-06-22 18:29:24 +02:00
Guillaume (gdi) cd7a7237b1 [FIX] website: hide type selector if the field is required by the model
Users are not supposed to be able to change the field type for fields
that are required by the model. This commit removes the option to change
the field type for fields required by the model.
Steps to reproduce the bug fixed by this commit:
- Put a form on the page of a website
- Set the form action to "Send an E-mail".
- Click on the "Your Email" field

=> The user can change the type for this field. We don't want this
because this field is linked to the `email_from` field in the
`mail.mail` model. This commit fixes this issues for every model
required fields.

task-3302433

Part-of: odoo/odoo#120874
2023-06-22 18:29:24 +02:00
Guillaume (gdi) b154fe1591 [IMP] website: make required fields more obvious
When a user puts a form on his site, depending on the action of it, some
fields of the form become necessary. These fields cannot be deleted.
Unfortunately, some users do not understand this. This commit helps
users understand that these fields are required for the action by adding
an alert in the required fields options and by improving the tooltip
displayed when the delete button is hovered.

task-3302433

Part-of: odoo/odoo#120874
2023-06-22 18:29:24 +02:00
Louis (loco) e8713dc078 [IMP] *: add the option to reorder slide of the carousel snippet
*: web_editor, website

The goal of this commit is to add the reorder option on the carousel
slides. Because the option is now shared between the "Carousel", the
"Image Gallery" and the "Images Wall" snippets, a common super option
(`GalleryHandler`) has been created to handle this reordering.

task-2930786

closes odoo/odoo#117369

Signed-off-by: Outagant Mehdi (mou) <mou@odoo.com>
2023-06-22 18:29:17 +02:00
pedrambiria 0e066e2006 [FIX] pos_loyalty: prevent unwanted free product points correction
Before this commit, purchasing a gift card along with applying a free
product promotion in the same order resulted in the gift card balance
being decreased by the free product price.

Steps to reproduce:
1. Create a buy x get y promo program.
2. Open the POS and use this program and sell a gift card in the same transaction.
3. Activate the promo program and complete the transaction.
The promo program discount will take money of the gift card amount.

Also there is another issue with Loyalty Cards points:
When the reward's product in not valid of the rule, it will decrease
the point when you add the reward.

opw-3284636

closes odoo/odoo#126014

X-original-commit: 975ffef9d1fa7a41b223859e5355e05bdba1d11c
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Pedram Bi Ria (pebr) <pebr@odoo.com>
2023-06-22 17:10:53 +02:00
qsm-odoo 07ef90bcd6 [FIX] website: prevent crash when missing field dependency in forms
Steps to reproduce:
- Add a form.
- Setup a conditional visibility on one field, using the "contains" or
  "does not contain" operator.
- Save.
- Open the HTML editor and voluntarily break the form by changing the
  "data-visibility-dependency" attribute to a random text (non existing
  field used as a dependency).
- Save => Crash on page load.

One customer apparently reached that case of receiving a `null` value
(actually possible when retrieving a form data which is an unchecked
checkbox for example) but combined with an operator which really
requires the received value to be a string... but not sure how this is
possible. In any case, it should not make the form crash: it's just a
problematic *visibility* dependency, it should not prevent using the
form. For now, let's prevent this case to crash and add an error in the
console so we may investigate the issue if it ever shows up in a test.

opw-3243345

closes odoo/odoo#125981

X-original-commit: 27144695ff4cd5fc026332c324cfdf8498d5ef14
Signed-off-by: Guillaume Dieleman (gdi) <gdi@odoo.com>
2023-06-22 17:10:47 +02:00
Guillaume Dieleman a41e7d7ee5 [IMP] web_editor: add touchscreen support for the editor
Before this commit, website and email editing was very limited on
devices that have a touchscreen. The blocks tab, the we-lists, ... were
unusable.
Example of issues (on a device that has a touchscreen):
- The users cannot drag & drop snippets in the page.
- The users cannot reorder the values of a multiple checkboxes field.
- ...

This commit allows to handle touchscreen events by translating them
into mouse events to allow users to fully use the editor.

opw-3195487

closes odoo/odoo#125976

X-original-commit: 142684dbe7e5c9d5c5fc1baa00b1027367a45213
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Guillaume Dieleman (gdi) <gdi@odoo.com>
2023-06-22 17:10:45 +02:00
Florian Charlier 3dc7099d37 [FIX] website_forum: fix tag posts count dependencies
Post counts were not updated when a post was created or deleted
because of missing dependencies in the _compute.

Note that while "active_test" is included when counting without
specifying it, the field must be explicitly added to the `_compute`'s
dependency list to trigger it.

Task-3358143

closes odoo/odoo#125968

X-original-commit: 6e1d976131dccecec35d12b8a03328ce9882d055
Signed-off-by: Stéphane Debauche (std) <std@odoo.com>
Signed-off-by: Florian Charlier (flch) <flch@odoo.com>
2023-06-22 17:10:42 +02:00
Pierre Masereel 2d7db2d441 [FIX] web: keep compatibility for btn-fill
The class btn-fill has been move from the common bootstrap review and
only set in frontend. So we add the class in the backend to keep the
existing HTML fields containing btn-fill- class correctly working.

As there were small differences btween btn and btn-fill, we only use the
same design.

Since the classe btn-fill has been moved to only

closes odoo/odoo#125966

X-original-commit: 8ffc79624eef80d3dfdb9ad38c6faea1187a3b70
Signed-off-by: Pierre Masereel (pim) <pim@odoo.com>
2023-06-22 17:10:39 +02:00
mega-odoo c5290e5427 [FIX] l10n_gcc_invoice: prevent trace back while printing an invoice
'ZeroDivisionError: float division by zero' is generated if the user prints
an invoice pdf without including an invoice line or invoice line with the
product price 0.

Steps to Reproduce

- Install the 'l10n_gcc_invoice' modules.
- Go to the current company and change the country to any Gulf nation, such
as Bahrain, Kuwait, Oman, Qatar, Saudi Arabia, or the United Arab Emirates if
it isn't already.
- Go to Accounting > Configuration > Accounting > Currencies
- Activate another currency.
- Open an 'Invoices' module
- Add the 'currency_id' field in the invoice form view.
- Create a new invoice except including the invoice line or invoice line with
 product price 0 and select a currency that does not equal the current company
currency.
- And print this invoice.

Applying this commit will resolve this issue.

sentry-4210558233

closes odoo/odoo#125502

X-original-commit: ae9de44b91b7e80b4a44d69afa69ca95d8f528fe
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
Signed-off-by: Josse Colpaert <jco@odoo.com>
2023-06-22 15:41:03 +02:00
Louis Baudoux 7416acc111 [FIX] iap,website: avoid the creation of IAP accounts during testing
Previously, any call to `IapAccount.get` during testing would lead to
the creation of a new `iap.account` record as this was done in a
separate transaction which is commited.

As we don't want any database modification resulting from a test
execution, we will now check if we're in test mode or not.
During testing, a new account will be created in the current transaction
so that it can be properly rollbacked at the end of the tests.

This commit also modifies how the `iap_jsonrpc` function is disabled
during testing as the old implementation used some pretty obscure
manipulations of the `BaseCase` class.

The tests of the `website` module needed to be updated to take those
changes into account.

closes odoo/odoo#122663

Signed-off-by: Florian Daloze (fda) <fda@odoo.com>
2023-06-22 15:41:00 +02:00
Victor Feyens b1427153f8 [FIX] sale: forbid payment term change on confirmed SO
Same behavior as for pricelist.

closes odoo/odoo#115871

Related: odoo/enterprise#38427
Related: odoo/upgrade#4452
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-06-22 15:40:51 +02:00
Victor Feyens d2eb6b7143 [FIX] website_sale: confirm SO as superuser
* Make sure the logs are coherent (all done as Odoobot)
* Correctly apply auto-lock setting on e-commerce orders

Part-of: odoo/odoo#115871
2023-06-22 15:40:51 +02:00
Victor Feyens f5f54899a9 [CLN] sale_stock: remove old strange logic
Commit b30afcbdb9 introduced
a strange logic where the invoice status was magically considered
invoiced on locked orders if there was no pending stock logic and
the full delivered qty was invoiced.

Following our removal of the locked status, replaced by another boolean field,
we consider it's wrong to rely on the locked status for functional logic,
therefore removing this old logic.

If it's really a problem (and comes back in the future), another clean solution
will be thought and implemented.

task-3163931

Part-of: odoo/odoo#115871
2023-06-22 15:40:51 +02:00
Victor Feyens 17bece3e79 [REF] sale,*: remove locked (done) SO state
It's not a specific state, it should be considered separately,
as a boolean.

This allows to reduce code complexity (flows should not rely (much) on
the locked logic) and to have a clearer flow.

Task-3163931

Part-of: odoo/odoo#115871
2023-06-22 15:40:51 +02:00
Julien Carion (juca) 2a37a3d06f [REF] web, base, mail: move res.users.settings from mail to base
This commit moves and adapt the res.users.settings model from mail to base and
and allows to access and modify its content with web's user service.
This allows to access user settings without needing the mail module.

closes odoo/odoo#116005

Related: odoo/enterprise#38360
Signed-off-by: Michaël Mattiello (mcm) <mcm@odoo.com>
2023-06-22 15:40:43 +02:00
Julien Mougenot 23e0ac2a1a [IMP] web: Support pointer events in draggable
This commit:

- adds a "delay" parameter to the `draggable_hook_builder`, waiting for
that delay on pointer down events before triggering the drag sequence
(making it possible to use "long mousedown" events);

- changes the event detection in `draggable_hook_builder` to listen
for pointer events instead of mouse events, effectively supporting the
drag and drop feature on touch devices;

- adapts the test helpers (with some refactors to `triggerEvent` and
other utility functions) to make them use pointer events instead for
drags and drops;

- adapts the tour utils to use a tone-downed version of the refactored
test utils `dragAndDrop` function;

- also changes events in list view which does not yet uses the draggable
hook, but should still work with the same helpers in tests.

Part-of: odoo/odoo#116005
2023-06-22 15:40:43 +02:00
abd-msyukyu-odoo b053277ee7 [FIX] web_editor: fix FIELD_IS_DIRTY notification on historystep
Fixes an issue introduced in a forward-port:
https://github.com/odoo/odoo/commit/db0c092973f480f3336a44e5f6868dc5a79f0e3a
The listener was not set on the correct target, `historyStep` event is triggered
on `odooEditor` and not `odooEditor.editable`.

This meant that the FormStatusIndicator was not properly notified and
the `save/discard` button was not visible after an editor `historyStep` on form
views

task-3373603

closes odoo/odoo#126006

X-original-commit: f76585530d7387ff2f44639252829aa4546cea1b
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2023-06-22 09:50:51 +02:00
Yash Vaishnav 4a26a1272c [FIX] project: traceback when clicking the discard button while creating a task.
Before this commit, When you click-on the discard button while creating the task
it gives traceback.

This error occurs due to the absence of the chatter when creating a new task.
As a result, 'inputRef.el' becomes null and attempts to access its value and
fail because it does not exist.

This commit will only change the value of the chatter if it exists.

task-3268923

closes odoo/odoo#126004

X-original-commit: 28c9cdbed72a9feaca72fcf24b059211939a345e
Related: odoo/enterprise#42967
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-06-22 09:50:46 +02:00
yhu-odoo 5401733912 [FIX] purchase_mrp: wrong data when merge orig links
In _prepare_merge_orig_links, default value set() is set as default
value for created_purchase_line_ids:
https://github.com/odoo/odoo/blob/31f134cbdc5fa7a50b88bea7faec682e83cb5fe0/addons/purchase_mrp/models/mrp_production.py#L52
When no data for created_purchase_line_ids, the empty set is not
handled:
https://github.com/odoo/odoo/blob/31f134cbdc5fa7a50b88bea7faec682e83cb5fe0/addons/purchase_mrp/models/mrp_production.py#L54-L55
However, empty set is not an acceptable value for m2m fields, error will
raise in this case.
To fix, we replace empty set by empty list.

closes odoo/odoo#125994

X-original-commit: 116238c4d832897a407069daec75334bec020cc8
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-06-22 09:50:41 +02:00
Deependra Solanki bbf14a9fff [FIX] mass_mailing: added 1rem padding top to footer
Before this commit:

The mass mailing footer had no padding top.

After this commit:

Added 1rem / 16px of padding top to the footer.

Task - 3323881

closes odoo/odoo#125989

X-original-commit: 2085057a17409f4e1c33728b709cedbf23146b2b
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2023-06-22 09:50:38 +02:00
Thomas Lefebvre (thle) fc08616eb4 [FIX] hr: prevent launch plan for archived employee
Issue:
------
The "Launch Plan" button appears for an archived employee.
It causes a traceback.

Solution:
---------
Do not display the button for an archived employee.

opw-3366815

closes odoo/odoo#125988

X-original-commit: ecc32425ff71d5e65597ca1424a9b356f97fa0f8
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Signed-off-by: Thomas Lefebvre (thle) <thle@odoo.com>
2023-06-22 09:50:34 +02:00
Mathieu Duckerts-Antoine 876a82b299 [FIX] web: distribute ! or not
When the domain selector is in debug mode (props.isDebugMode = true),
the operator ! (not) is not distributed in the leaves in the domain
selector. That is a domain like ["!", "|", ("foo", "=", 1 ), ("id", "=", 2)]
will be visualized in the domain selector as

Match records with none of the following rules:
  Foo = 1
  ID = 2

The problem we fix is that when such a domain is added via "Add Custom
Filter" (for instance), the search bar facet produced has a representation
of the domain where ! has been distributed even if the debug mode is
active. With the previous example:

------------ -----------
| Foo != 1 | | ID != 2 |
------------ -----------

This makes the user think that the domain she sees is not the domain
she has created.

In the present commit, we make sure that the ! operator is distributed
or not uniformly within the scope of the search model.

closes odoo/odoo#125967

X-original-commit: d15d7e13be0ca6f7705c3bb6f992b45949bccef0
Signed-off-by: Michaël Mattiello (mcm) <mcm@odoo.com>
Signed-off-by: Mathieu Duckerts-Antoine (dam) <dam@odoo.com>
2023-06-22 09:50:31 +02:00
Raouf 7fe8dc7720 [IMP] project: improve create task shortcuts
Before this commit:
In 16.2, we have implemented a nice tool to set various fields at the creation of a task from
the Kanban quick create using shortcuts.
This implementation is simple (only a few lines of code), but is not very flexible.
Indeed, shortcuts need to be in a specific order and at a specific place for them to work.
As a consequence, it is very easy for the user to fail in the creation of their tasks using shortcuts.
This task aims at making this feature more robust and complex so that it works in more cases.

In this commit:
It should be possible for the #tag, 23h, @demo, ! shortcuts to be put in whatever order, as long as they are at the end of the name

task-3349154

closes odoo/odoo#124155

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-06-22 09:50:29 +02:00
pedrambiria 1214542413 [FIX] pos_restaurant: stay on current table after refund
Previously, when conducting a refund on a table, the system would
switch the active table to the table associated with the refunded
order. This was not the desired behavior, as it resulted in the details
of the order disappearing, requiring the user to navigate back to
the refund process.

Steps to reproduce the issue:

 - install PoS restaurant
 - pick a table, do an order and pay it
 - pick another table, refund
 - choose the previous order and refund
-> the order details disappear directly. You have to go back to refund.

opw-3301603

closes odoo/odoo#125908

X-original-commit: 1f560c8954359a15ba84eb695c7eca380722f9fc
Signed-off-by: Robin Heinz (rhe) <rhe@odoo.com>
Signed-off-by: Pedram Bi Ria (pebr) <pebr@odoo.com>
2023-06-22 08:35:04 +02:00
pedrambiria 27ae8f73ac [FIX] point_of_sale: accept GS1 barcodes in PoS
This update enables PoS to handle GS1 barcodes, which was
previously not possible even though the GS1 nomenclature could
be selected. GS1 barcodes can now be used to extract product
identifiers, lot numbers, and serial numbers from the code.

opw-3204299

closes odoo/odoo#125906

X-original-commit: cd2061c02b6c7001558178ade025a1fc4917bf9e
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Pedram Bi Ria (pebr) <pebr@odoo.com>
2023-06-22 08:35:01 +02:00
hote 8447c93ba2 [FIX] sale: currency conversions and rates
Before this commit the reports in sales and associated app suffered from a confusion between
multiplicative and divisive rates for currency conversion. After this commit this will no longer be
the case.

There are several models with their own currencies that are involved in computing the amount of a
sale order:
- the order's company currency `order.company_id.currency_id`
- the order's pricelist currency `order.pricelist_id.currency_id`
- the product's currency for each product in the sale order `product.currency_id`

In the case of a report we need also to take into account the current user's company currency:
`self.env.company.currency_id`.

The `sale_order.currency_rate` is the **multiplicative <u>rate</u>** to convert from the company
currency into the SO currency.

Any product added to a sale order follow the next conversion. Let `conversion_rate` be the conversion
rate between the product's currency and the order's company currency, then:
```python
product_amount_converted = product.list_price / conversion_rate

order.amount_total +=  product_amount_converted * order.currency_rate
```

The rates returned by `_get_query_currency_table()`, on the other hand, are computed as the
**multiplicative <u>ratio</u>** to convert from each company currency into the current user's
company currency.

Any order that is to be analysed on a *report* follow the next conversion. Let `current_company_currency_rate`
be the conversion rate between the order's company currency and the current user's company, then:
```python
order_amount_in_cmp_currency = order.amount_total / order.currency_rate

report.order_id.price_total = order_amount_in_cmp_currency * current_company_currency_rate
```

What follow is a numerical example. Suppose you have the following multi-company and
multi-currency environment.

|order.id|order.company  |line.subtotal|order.currency|order.currency_rate|
| ------ | -----------   | ----------- | ------------ | ----------------- |
|1      |BE Company (EUR)|1000         |INR           |89.46              |
|2      |BE Company (EUR)|2000         |USD           |1.09               |
|3      |BE Company (EUR)|3000         |EUR           |1.0                |
|4      |US Company (USD)|4000         |USD           |1.0                |

If we try to convert all of this for reporting in the US company, the currency table returned by
`_get_query_currency_table()` will give this (company currencies vs USD):

|currency_table.company|currency_table.rate|
| -------------------- | ------------------ |
|BE Company (EUR)      |1.09                |
|US Company (USD)      |1.0                 |

Finally, in order to convert each amount into USD, applying the formulae listed above should give
the following result:

|order.id|order.company|display_price_usd           |
| ------ | ----------- | -------------------------- |
|1       |BE Company   |1000 / 89.46 * 1.09 = 12.18 |
|2       |BE Company   |2000 / 1.09 * 1.09 = 2000.00|
|3       |BE Company   |3000 / 1.0 * 1.09 = 3270.00 |
|4       |US Company   |4000 / 1.0 * 1.0 = 4000.00  |
|Total (USD): 9282.18|

Task - 3277006

closes odoo/odoo#125402

X-original-commit: e8f7a692eaf6b87ccf4a8d95b7a46146b1199bf2
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Signed-off-by: Horacio Tellez Perez (hote) <hote@odoo.com>
2023-06-22 08:34:58 +02:00
Julien Alardot (jual) 07a5d9b1ec [FIX] point_of_sale: half-up cash rounding issue
Steps to reproduce:
- Create a HALF-UP rounding method with 0.05 as the rounding
value rounding method
- Create an order with a product of the price of 1.97
- Pay the order and insert 2.00 as the amount to pay
=> the change is 0.0 which is incorrect and the change must be 0.05

opw-3223873

closes odoo/odoo#118590

X-original-commit: 07dc28e
Signed-off-by: Robin Heinz (rhe) <rhe@odoo.com>
Signed-off-by: Pedram Bi Ria (pebr) <pebr@odoo.com>
2023-06-22 08:34:55 +02:00
paso-odoo d98552c5c2 [FIX] mrp: confirm MO with deleted WO
If there are some dependencies between BoM's operations, a traceback
will appear when the user removes one WO.

Steps to produce:
- From Manufacturing > Configuration: Enable Work Orders.
- Open any Bills of Material.
- In 'Miscellaneous' tab tick the 'Operation Dependencies' boolean.
- Set 3 or more operations in the 'Operations' tab.
- After saving the BOM add 'Blocked By' in the operations.
- Now Create Manufacturing Order for that BOM.
- Delete the one or more workorder(s) from mrp order.
- Now click on the 'Confirm' button, and the error will be raised.

The loop is incorrect because we iterate on the BoM's operations but
the keys of the dict `workorder_per_operation` are based on the MO's
work orders. Therefore, if we remove one WO, the dict will not have
any key for the related operation, hence the traceback.

sentry-4146643254

closes odoo/odoo#125990

X-original-commit: 15366af1774a571548a9c35e7dd8acbdc16ba71f
Related: odoo/enterprise#42957
Signed-off-by: Adrien Widart (awt) <awt@odoo.com>
Signed-off-by: Parth Solanki (paso) <paso@odoo.com>
2023-06-22 06:50:45 +02:00
MerlinGuillaume 08e2409afe [FIX] web: reposition popover when image is loaded
When hovering over an employee's photo (without edit rights) and the
image hasn't been loaded in the cache, the popover is positioned to the
right of the image. With a big image, the popover can be outside of the
page.

Steps to reproduce:
1. Install Employees and set a 4k image to any employee
2. Remove all the rights of Marc Demo on Employees
3. Connect as Marc Demo
4. Open the form of the employee with the 4k image
5. Hover on the employee photo
6. The image position is off

Solution:
Update the position of the popover when the image is loaded and restrict
the image width in the popover to the popover width

Problem:
When we try to find the best position to display the popover and the
image is not loaded, we will find that there is some room for the
popover on the right because the image has no height or width

opw-3281649

closes odoo/odoo#125951

X-original-commit: 532c4cfa4e60bc95319b774794680eabc80b1219
Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
Signed-off-by: Guillaume Merlin (megu) <megu@odoo.com>
2023-06-21 20:10:31 +02:00
Brice bib Bartoletti 1704f0aa6f [IMP] account: make multivat great again
The aim of this commit is:
- to bring back a feature that was wiped out during the refactoring of the chart
of account instantiation in commit 5125748616
- add a test that will solidify the feature
- Improve the instantiation by installing the required l10n module
  directly instead of asking the user to install it manually

Previous to this commit:
The button instantiating the foreign taxes leads to a traceback.

After this commit:
The button instantiate the foreign taxes correctly

Note: To prevent xml_id collision on account, we prefix the xml_ids with their
module's name

closes odoo/odoo#118056

closes odoo/odoo#125950

Community-pr: https://github.com/odoo/odoo/pull/118056/
Task-id: 3196556
X-original-commit: b66ebb78ec750a4657a6de6726deb9eea7e0c7d1
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
Signed-off-by: William André (wan) <wan@odoo.com>
2023-06-21 20:10:29 +02:00
Brice bib Bartoletti 4e644746e9 [REF] account: centralize user creation in tests
X-original-commit: 84ffefed6deed59abb4df8627d5e3ebf970974b6
Part-of: odoo/odoo#125950
2023-06-21 20:10:29 +02:00
Brice bib Bartoletti b8a00bf9d4 [IMP] account: add company ir.rule for tax group
This commit aims to improve consistency.

Context:
- functionally:
    `account.tax.group` is company dependent and thus, it's weird to be able
    to access to other company tax group when those companies aren't
    selected.

- technically:
    In accounting apps, devs also expect company dependent field to not be
    retrieved by the `search` method and not having that ir.rule could cause
    bugs.

X-original-commit: 56f039f82afcf6c262bc5711cd28ae691cdf00e2
Part-of: odoo/odoo#125950
2023-06-21 20:10:28 +02:00
Alexandre Kühn bea3bb541a [FIX] hr: remove deadcode of KanbanView/openChat
OpenChat feature in `hr` is managed by the view widget
"hr_employee_chat", which is added in kanban template.
The override of Kanban View to add openChat feature is
not called at all, so this commit removes this dead code,
and the js_class, as its only purpose was adding openChat.

closes odoo/odoo#125753

Related: odoo/enterprise#42897
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-06-21 20:10:11 +02:00
Pierrot (prro) 7fd43d915c [IMP] l10n_nl: add triangular tax
The Dutch localization was not using any mean by default to know if a
transaction was triangular or not. Similar to the Belgian localization,
the Dutch one can now use the new 0% "ABC-levering binnen EU" tax.
The tax report can will now also display that additionnal information
(without modifying the existing ones).

task-3281024

closes odoo/odoo#125649

X-original-commit: 62a2cecd3acb9fb0b2e9e7d01fef0aef6681cda7
Related: odoo/enterprise#42800
Signed-off-by: Pierre-Rodéric Roose (prro) <prro@odoo.com>
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
2023-06-21 20:10:03 +02:00
Maximilien (malb) 51b3b5b360 [IMP] account_edi: change banner
Goal of this pr is to improve the banner on top of all e-invoicing by shorten
the text and make it one line

task:3374897

closes odoo/odoo#125574

Signed-off-by: Josse Colpaert <jco@odoo.com>
2023-06-21 20:10:01 +02:00
Benoit Socias b016843753 [FIX] website: avoid failing switching mode while image is selected
Since [1] an error is raised when switching the Mode of an Images Wall
from Float to Grid or Masonry while an image is selected.
The display of the size of the image is being updated while its option
panel is not there anymore.

This commit prevents this error from happening by setting up the grid
layout with clones of the images instead of the images themselves.
This leads to the construction of a new editor for the new image.

Steps to reproduce:
- Drop an Images Wall snippet.
- Switch Mode to Float.
- Select an image.
- Switch Mode to Grid.

=> Traceback.

[1]: https://github.com/odoo/odoo/commit/2cbb691a84ce186ddd34a2a4c76d95671ed6e834

task-2990053

closes odoo/odoo#125436

X-original-commit: c532bc6c3b861a68e8381f39efaa22201ae253cb
Signed-off-by: Benjamin Vray (bvr) <bvr@odoo.com>
2023-06-21 20:09:58 +02:00
Maitri Patel 3df2d227cf [FIX] point_of_sale: prevent traceback while open session with the portal user
when the user allows multi employee per session and the portal user tries to
access the pos with the URL /pos/ui?config_id=1 then the error will be generated.

steps to reproduce:

- Installed point_of_sale module.
- In Configuration > Point of Sale > activate Multi Employees per Session option
  and save it.
- In another window, do log in as a demo user and start the pos session.
- From the Admin user, make Marc Demo as a portal user.
- Then refresh the demo user session.
- Traceback will be generated

Applying these changes will resolve this issue.

sentry - 3958755602

closes odoo/odoo#124662

X-original-commit: 49447781b95f18a87491e47c19e4e8a6167ccf1d
Signed-off-by: Robin Heinz (rhe) <rhe@odoo.com>
2023-06-21 20:09:49 +02:00
dasz f9bc67fbcd [IMP] survey: adapt survey inherited views to appraisal
change print action's target to new for all surveys.
see odoo/enterprise#37387
task 3127424

closes odoo/odoo#121283

Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-06-21 20:09:26 +02:00
Hubert Van de Walle (huvw) 75bc86c817 [FIX] mail: usable ListActivity widget in many2many subview
Steps to reproduce
==================

- With studio, create a model
- In the form view, add a many2many pointing to res.partner
- Close studio
- Create a record
- Add a line by selecting a partner

-> `Cannot read properties of undefined (reading 'find')`

Cause of the issue
==================

The res.partner uses a custom widget for the activity field `ListActivity`.
The fieldDependencies selection fields are not properly defined.

opw-3360436

closes odoo/odoo#125907

X-original-commit: 69019fd51aa4d157b95dd44c9f359b967c67a23d
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
2023-06-21 19:04:17 +02:00
Kevin Baptiste 29ad9e881e [REM] hr,hr_holidays: remove deprecated code
Remove deprecated code from odoo/odoo#96545

closes odoo/odoo#125894

Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-06-21 19:04:14 +02:00
Saurabh Choraria 2a9d0ce128 [FIX] base_geolocalize: update log when request to openstreetmap fails
When the user will not get an HTTP response as 200 while retrieving the location
using OpenStreetMap Nominatim service, the logger error will occur.

The logger is updated to use the 'warning' level instead of the 'error' level.
This change reflects a less severe logging level for cases where a request to
OpenStreetMap fails.

sentry-4151622143

closes odoo/odoo#125835

X-original-commit: a73a65efc0daa702b6a3fd40ad63d2ef39ace302
Signed-off-by: Julien Castiaux (juc) <juc@odoo.com>
2023-06-21 15:53:15 +02:00
Maitri Patel 5a47fdc2f8 [FIX] stock: prevent traceback when lots is empty in import serial/lots
When the user click on the 'import' button without lots in the import
serial/lots wizard in stock then this issue is generated.

Steps to reproduce:

- Install Inventory.
- Inventory >> Operations >> Receipts >> create the new Receipt
- Add product to the receipt which has tracking 'by lots',
  Save the Receipts
- Click on the button in a tree view which opens the detailed operation wizard,
  And click on Import Serial/Lots in it
- In Import Serial/ Lots wizard click on the import button without passing any
  value in the lots field
- Traceback will be generated

Applying these changes will resolve this issue.

sentry-4244975188

closes odoo/odoo#125786

X-original-commit: a45aeea3335a96390de0b4b5760683e3081852df
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-06-21 13:46:05 +02:00
Hubert Van de Walle (huvw) f15807b787 [FIX] web: refocus date field in editable list
Since [0], when a cell is already focused, we do not refocus again.
But we forgot to set the lastEditedCell to the current one.

The test "editable list view, should refocus date field" has also been
fixed to reflect the actual behaviour. We set the focus on the picker
cell. Before, in the test, it was on the body. This means that in [1],
`this.activeRowId` would be set to null, thus, the test was not failing.

[0]: 437edce313
[1]: https://github.com/odoo/odoo/blob/1ecfd4ee9529a3cd21a925c1e850e10fe05f2097/addons/web/static/src/views/list/list_renderer.js#L116-L117

opw-3332809

closes odoo/odoo#125301

X-original-commit: 5ee1532bdbdde0062a13e75d85f7342eb2447415
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
Signed-off-by: Abdelouahab Laaroussi (abla) <abla@odoo.com>
2023-06-21 13:46:00 +02:00
vlst 42087c6fa1 [IMP] point_of_sale: Allow products to be part of multiple pos categories
Currently, a product can only be part of one `pos_category`.
This PR changes the relationship between the `product` and the `pos_category` from a `One2many` to a `Many2many`.

closes odoo/odoo#122907

Task: 3138825
Related: odoo/enterprise#41791
Related: odoo/upgrade#4739
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-06-21 13:45:50 +02:00