Commit Graph
163406 Commits
Author SHA1 Message Date
Damien Bouvy 2437baee53 [IMP] base: better help text for company tagline
closes odoo/odoo#129143

Signed-off-by: Bouvy Damien (dbo) <dbo@odoo.com>
2023-07-20 14:23:31 +02:00
roen-odoo 7907ec49c4 [FIX] point_of_sale: fix test with hardcoded pricelist ID
This fix removes the hardcoded pricelist ID and uses the one used in the
PoS config instead.

closes odoo/odoo#129136

X-original-commit: f5d3e985ad41af29fc6cbcfc2417e475443cd00d
Signed-off-by: Robin Heinz (rhe) <rhe@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
2023-07-20 14:23:28 +02:00
Habib (ayh) 057472b873 [IMP] account: generic coa tax repartition lines
Since the refactoring of chart templates, the wrong account is used for the purchase tax (`Tax Received` instead of `Tax Paid`) in the generic COA taxes.

closes odoo/odoo#129130

X-original-commit: 25eff4142b7a8b57fc5e9b73ac92c4c54e29085b
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
2023-07-20 14:23:26 +02:00
Antoine (anso) a5bb9ace46 [FIX] project: fix avatars alignment in subtasks dropdown in kanban view
Before this commit, avatars images were not aligned correctly

NB: The bug is only present in Firefox and pre v15.4 Safari because
these browsers don't support `:has` CSS selector. This selector is used
to set a `display: flex` on `.o_field_many2many_avatar_user` if it has
no `.o_tags_input` child in `many2many_avatar_user_field.scss`

task-3422356
part of task-3326263

closes odoo/odoo#129129

X-original-commit: fedf405aa821cf57b566c7992b0b14ad331bf80f
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2023-07-20 14:23:23 +02:00
Antoine (anso) b9e1de0030 [FIX] web: fix o_x2m_control_panel's bottom margin
This commit sets the bottom margin of `.o_x2m_control_panel` at the
positive amount of the negative top margin of `.o_list_renderer` so
that the `.o_cp_pager` buttons are not cropped

task-3422214
part of task-3326263

closes odoo/odoo#129128

X-original-commit: 0e40d65382c37ad594aae351435f5bea14903cd6
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2023-07-20 14:23:20 +02:00
Lopes Marc (loma) c91346f889 [FIX] website_forum: fix posts sorting by last activity date
Fixed a typo in forum templates that prevents users from atlerning
between ascending and descending order when sorting forum posts.

follow-up of #123709
task-3316555

closes odoo/odoo#129116

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-07-20 14:23:18 +02:00
Xavier-Do eb708e5cad [IMP] base: avoid cache_invalidation
A clear_cache was added in _update_xmlids in pr 119813.

If it was needed in case of update, it is not useful when creating an
xmlid or when the value is unchanged.

The initial idea was to detect if an update or an insert was done, maybe
using create_date and write_date. Unfortunately the create_date is the
same as the write_date in the same transaction. This is unlikely but in
this case, we could update the cache in place.

The final behavior is to update the cache in all case, and notify other
workers only if a model was updated.

This will help to avoid invalidating the cache too mush during module
loading. Even if the impact on time is small, the increase in queries
was visible.

This solution would even be a slight improvement on previous query count

closes odoo/odoo#129029

Related: odoo/enterprise#44349
Signed-off-by: Julien Castiaux (juc) <juc@odoo.com>
2023-07-20 14:23:15 +02:00
Xavier-Do d5ed47a11f [IMP] base: simplify _xmlid_lookup cache
The _xmlid_lookup cache contains the id of the ir.model.data with is
unused, making cache pupulation and usage more complex than needed.

Removing this id in prevision of the next commit

Part-of: odoo/odoo#129029
2023-07-20 14:23:15 +02:00
Theo VINCENT (thvi) b81a049a4e [ADD] pos_online_payment_self_order, *: add module
*: pos_self_order

Adds online payment support for self-order flow in the Point of Sale app.

 - Adds a configurable online payment method specific to the self-order flow, which is optional in "Pay after meal" mode, required in "Pay after each" mode.
The POS config of a restaurant can use 2 different online payment methods, one for the frontend cashier flow, and another for the self-order flow, or can use the same for both.
By default, if an online payment method is configured for the self-order flow, any new order paid online will be paid with that payment method.
But if the cashier requests an online payment with a different online payment method, that payment method will be used for that order during the time the cashier keeps his online payment popup open (without cancelling the online payment) (after cancelling the online payment, the order could potentially still be paid online, and if so it will use the online payment method of the self-order if one is configured, otherwise the online payment method of the cashier flow).
 - Allows the customer to open the online payment page of an order from the self-order UI.
In "Pay after meal" mode, if an online payment method is configured, the "Pay" button is displayed when the customer order is saved on the server, otherwise the "Order" button is displayed (even when the order has been sent to the server and then modified without sending it again).
Otherwise, if no online payment method is configured, the "Pay at cashier" unclickable button is displayed.
In "Pay after each" mode, the "Pay" button is displayed everytime.
 - Replaces the self_order_after_each_cart_tour test.

closes odoo/odoo#127869

Task-id: 3171698
Related: odoo/enterprise#44055
Signed-off-by: Robin Heinz (rhe) <rhe@odoo.com>
2023-07-20 14:22:57 +02:00
Antoine (anso) 6504612cf2 [FIX] loyalty: empty list view on mobile
This commit fixes `.o_view_nocontent`'s mobile layout. Prior this
commit, it's content was overflowing on top of the page.

task-3418657
part of task-3015891

closes odoo/odoo#129115

X-original-commit: a51310a53ac3abf7435223e2d2a3215a3e60df50
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Signed-off-by: Vallaeys Valentin (vava) <vava@odoo.com>
2023-07-20 13:07:11 +02:00
Valentin Vallaeys (vava) aa3ebd20a6 [FIX] loyalty: reorder loyalty templates
X-original-commit: 9d533234ba0367c44b88dc11bca1b9583fe1f43a
Part-of: odoo/odoo#129115
2023-07-20 13:07:11 +02:00
Valentin Vallaeys (vava) d3f0d22d7a [FIX] loyalty: missing field in kanban
Steps to reproduce:
- Go to Sales > Products > Discount & loyalty
- Create a new record
- Click on existing reward
- Click discard button

Error due to missing field in kanban view.

Fixes #124785

X-original-commit: db6ee7113cd6c3a830d2d401e92de98787323d43
Part-of: odoo/odoo#129115
2023-07-20 13:07:11 +02:00
Valentin Vallaeys (vava) 72d1aeb127 [FIX] loyalty: (un)archive linked reward product
X-original-commit: b56ead874c10b7b1411eac27891bd935c68e368b
Part-of: odoo/odoo#129115
2023-07-20 13:07:11 +02:00
Valentin Vallaeys (vava) 129b5e8d8c [FIX] loyalty: allow archive product linked to archived program
X-original-commit: a91f580f6fba65193df735ab1a21ae036f2ff924
Part-of: odoo/odoo#129115
2023-07-20 13:07:10 +02:00
Danial Sheikhani ac5b316a4e [FIX] loyalty: coupon loyalty program issues
This commit fixes a few remaining bugs in loyalty:
- misplaced use of ewallet and gift view for discount program types;
- wrong context when creating a gift card (got discount and coupon);
- wrong options to program type when creating a loyalty card;
- product tag was mandatory in reward eventhough a reward product is
assigned.

task-3015891

X-original-commit: 440a853b01dbcc67ad926487764682a5c68c2c8b
Part-of: odoo/odoo#129115
2023-07-20 13:07:10 +02:00
tsm-odoo 87e4216174 [FIX] im_livechat: do not allow thread actions
Only two thread actions are allowed for the embed livechat
for now: closing the chat window and folding it. Until now,
the actions were not loaded but this is dependent of the
imported files which is not ideal.

This PR makes allowed thread actions explicit in order to
ensure only the right thread actions are available.

closes odoo/odoo#129090

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-07-20 13:07:05 +02:00
Xavier ALT 5fb7167cdf [FIX] website_crm_partner_assign: order partners by 'complete_name'
Since odoo/odoo@3c62ca1eb, `display_name` is not stored anymore; we
should use the `complete_name` field instead, that serve the same
purpose (and is not context-dependant).

closes odoo/odoo#128891

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-07-20 13:06:53 +02:00
Audric Onockx (auon) fb88a7448c [IMP] project,_*: allow all project features on tasks w/o project
_*: hr_timesheet,sale_project,sale_timesheet
Generally, you don't want subtasks to be displayed at the same level
as their parent tasks. You want to consider the subtasks as part of
their parent's project, but don't want to see them directly in this
project. Rather, you want them to be accessible only via their parent.
(There are exceptions to that and we want to stay flexible.)

First solution that comes to mind is to have `project_id` set to False
for the latter tasks, but then how to get the value of the fields that
are related to the project?

So, second solution would be to have a field `project_root_id`,
which would be the project of the parent, or the grand-parent, etc.
The issue now is that we have to fields "project", and it isn't obvious
when to use one or the other.

The most simple way to answer this need is to keep one field "project",
that will always be set for (non-private) tasks,
and create a boolean field : `display_in_project`.
But we want it to be technical (no checkbox in the view).
So, when the user unsets the project on a subtask, the view will act
as if the project was unset, but in the back-end,
we'll set `display_in_project` to False and set `project_id` back.

The fact that all tasks have a project allows us to know if action x
can be perform on this task t, dependind on t.project_id.allow_x.

task-3367246

closes odoo/odoo#128281

Related: odoo/enterprise#43996
Related: odoo/upgrade#4930
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-07-20 13:06:46 +02:00
Rmi Rahir (rar) fbd38450b1 [FIX] spreadsheet: reject public assets in backend
The css of the public assets were added in the backend assets.

closes odoo/odoo#129110

Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2023-07-20 11:49:50 +02:00
Mayurrajsinh Rathod b4a0f43356 [FIX] crm: change evaluation of field date_deadline for demo data
The purpose of this commit is to change the evaluation of
date_deadline based on month for 'Quote for 12 Tables' demo data.

As calculating expected revenue for next month give different amount
from expected. This is because previously 4 weeks gives 28 days
and now 1 month will set same date of next month.

Task-3414271

closes odoo/odoo#129103

X-original-commit: c08d69a00e2ab5fa72934bddee804aa17642466d
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-07-20 11:49:47 +02:00
Adrien Guilliams (adgu) 52efaa4fd7 [IMP] pos_daily_sales_reports: adjustements for pos_blackbox_be
To comply with the requirements asked by the Belgian government for
the PoS certification, some changes had to be made to the reports.
As we have to show the turnover of the session on the session report,
we decided to show this for everyone, as this is a useful information
for every user.

closes odoo/odoo#128879

X-original-commit: fbd2116db6c5208d06877831751cd7736f8d37b7
Signed-off-by: Robin Heinz (rhe) <rhe@odoo.com>
2023-07-20 11:49:34 +02:00
Pieter Claeys (clpi) 3ab87f1d86 [IMP] mrp: remove product from WO's name
task-3231200

closes odoo/odoo#127250

Related: odoo/enterprise#43610
Related: odoo/upgrade#4938
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2023-07-20 11:49:28 +02:00
svs-odoo a467737420 [IMP] mrp*: make some MO's methods public
The `mrp.production` method `_pre_button_mark_done` will now be public
so it can be called since the web client.
This change is done in order to know if trying to mark as done a
production will return a wizard or not, which is needed in the new MRP
Display view since there is a delay before a MO is actually marked as
done and we don't want to see the wizard poping up after this delay but
before !

The method `_set_qty_producing` public is also public now because it's
called in `_onchange_producing` but saddly, the onchanges don't happen
in the MES view, so this way we can manually call it when needed.

task-3231200

Part-of: odoo/odoo#127250
2023-07-20 11:49:27 +02:00
Arnold Moyaux ff32acbb86 [IMP] mrp: auto_install enterprise module
Part-of: odoo/odoo#127250
2023-07-20 11:49:27 +02:00
3dda30d265 [IMP] mrp: preparations for MES
In `mrp_workorder` (enterprise), we're adding a new view to process
manufacture orders and workorders: MES.
These changes are more or less related to MES. See following for the
main changes.

== Be able to mass produce an ongoing production order ==

Currently once the mo is in progress it's not possible to use
the mass produce feature anymore. Even in basic cases where the
componenets are not tracked. It's also not possible to mark
all the productions directly as done. It's needed in the
mrp display action, so we enable it everywhere

== Manage different flows with tracking ==

Currently there is 2 different flows:
- No tracking -> All the quantities easy
- Lot -> All the quantities + display button to create lot number
- Serial with component not tracked or only one: Mass produce
- Serial that require a match between components SN/Lot and finished
product serial number -> Only display it as one unit with an automatic
backorder/

task-3231200

Part-of: odoo/odoo#127250
Co-authored-by: R1D1CUL0US <clpi@odoo.com>
Co-authored-by: svs-odoo <svs@odoo.com>
2023-07-20 11:49:27 +02:00
Pieter Claeys (clpi) c9fdd3ca22 [IMP] mrp: add barcode to workorders
The WO barcode is composed by its production order's name followed by
the WO's ID. Example: WH/MO/00123/4

task-3231200

Part-of: odoo/odoo#127250
2023-07-20 11:49:26 +02:00
svs-odoo c67d01bfc2 [IMP] mrp: demo data's changes
- Add table's leg in stock;
- Don't confirm `mrp_production_3`;
- Decrease qty to produce for `mrp_production_1` and confirm it.

task-3231200

Part-of: odoo/odoo#127250
2023-07-20 11:49:26 +02:00
Leonardo Pavan Rocha d5ba147d0b [IMP] web: enable JS tooling for sign_itsme
This commit enables the JS tooling for the sign_itsme module, as well as it
removes a rule in the eslintignore file that is not valid anymore since the
static/src/js folder does not exist anymore in sign.

task-3286974

closes odoo/odoo#126296

Related: odoo/enterprise#43103
Signed-off-by: Arnaud Joset (arj) <arj@odoo.com>
2023-07-20 11:49:17 +02:00
Leonardo Pavan Rocha c4994c7d10 [IMP] web: changes in name and signature for sign
This commit adapts the NameAndSignature component to allow usage in the sign
module by enabling customization of behavior when "auto" and "load" buttons are
clicked. It also replaces the top buttons for fa icons for a cleaner UI and
adds autofocus to the name input field.

task-3286974

Part-of: odoo/odoo#126296
2023-07-20 11:49:17 +02:00
william-andre 0479b2b594 [IMP] account,*: manage subsidiary companies
Allow sharing records between company
* accounts
* taxes
* fiscal positions
* products
* ...and some related models

These records can be read and used in children companies.

This can be used to
* have different branding for different businesses
* allow more complex security rules
* consolidate branches differently
* manage different tax reports with different tax ids in the same
  country

task-3371677

closes odoo/odoo#125642

Related: odoo/enterprise#43215
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
2023-07-20 11:49:06 +02:00
william-andre 0eff29409d [IMP] web: manage hierarchy in company selector
In order to manage different branches, the usability of the company
selector is being improved
* display in a hierarchic manner
* when selecting a company, select all the available children with it

task-3371677

Part-of: odoo/odoo#125642
2023-07-20 11:49:05 +02:00
william-andre 0d30cc2bc9 [IMP] models: manage sub companies with check_company
Allow some models to be delegated to the main company of the object.
For instance:
* Have company Parent and Child
* Child has access to all the accounts of Parent
* When creating a document in Child using an account of Parent, there
  shouldn't be a consistency error.

In order to do that, a new method `_check_company_domain` has been added.
This method is used when `check_company=True` is set on the field
declaration to:
* filter relational fields in the UI [^1]
* validate relational fields when writing on them in `create` and `write`

That method should also be used in the business code for models likely
to be shared amongst company branches instead of hardcoding the domain
based on `company_id`.
The same applies on domain restriction on the field declaration: the
flag `check_company` should be prefered instead of providing the domain
explicitly based on `company_id`.

Since a lot of validation and filtering will now be done based on
`parent_of`/`child_of` of the company, some support has been added for
that special case in `filtered_domain` in order to avoid doing
additional queries.

task-3371677

[^1]: because of that change, support has been added on the python
interpreter of the client to allow concatenatng domains.

Part-of: odoo/odoo#125642
2023-07-20 11:49:05 +02:00
william-andre ba5df07223 [FIX] base: do not depend on active_test to evaluate parent_of
Let's assume that
* Company S is a sub company of it's parent company P
* Company S has access to all the accounts and taxes of company P
* Some taxes are archived, but used

Because of the needed access rules, there will be a `parent_of` on the
record rules of accounts and taxes.
If we consider that we should consider the context key `active_test` to
add a implicit `('active', '=', True)` clause in the domain when
evaluating `parent_of` and `child_of` clauses, an access error will be
raised instead of hiding the archived records, even when simply trying
to read an archived record.

The archive feature and the security rules should be independent; if a
security rules needs to depend on the fact that a record is archived, it
should be explicit in the domain and not rely on side effects of the
implementation of `parent_of`/`child_of`

Part-of: odoo/odoo#125642
2023-07-20 11:49:05 +02:00
william-andre b405bc41fb [IMP] base: restrict currency rates to main companies only
The interraction between currency rates owned by branches can not be
defined clearly.
It would also make the currency rates tables a lot bigger.

task-3371677

Part-of: odoo/odoo#125642
2023-07-20 11:49:04 +02:00
william-andre dc4dcead6e [IMP] base: add more support for sub companies
Add fields and tooling to support sub companies.
The new fields are
* `parent_ids`, which consists of all the ancestors of the current
  company
* `root_id`, the upmost parent, which is the company controlling the
  subsidiaries
* `parent_path` is added to avoid a hit on the performances when using
  the multibranch feature

Also add a mechanism to ensure some fields are shared with a root
company and all it's descendents.
All fields listed by `_get_company_root_delegated_field_names` will be
readonly and copied from the `root_id`.

task-3371677

Part-of: odoo/odoo#125642
2023-07-20 11:49:04 +02:00
Vivek Pathak b783718ad1 [FIX] web: prevent overlap of popovers on property field deletion
Before this commit:
Previously, when the property field was deleted, a confirmation dialog box would
open. However, this resulted in an issue where both the property field dialog
box and the confirmation dialog box overlap.

After this commit:
With this fix, when a property field is deleted, the property field dialog box
now closes before the confirmation dialog box opens. This ensures that there is
no visual overlap between the two dialog boxes.

Task-3371734

closes odoo/odoo#129080

X-original-commit: 971826ab02e7e4134e73c498d85867a74088eaf9
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2023-07-20 10:07:29 +02:00
Vivek Pathak 2c843fcb09 [REV] web: prevent error on multiple property field deletions
This commit reverts the changes from PR https://github.com/odoo/odoo/pull/126457.
The previous changes aimed to fix the error that occurred when deleting the
property field multiple times.
However, the update behaviour now ensures that the property field popover closes
after a single click on delete icon.

Task-3371734

X-original-commit:https://github.com/odoo/odoo/commit/9dc7d596b07532aa021ee0ca0a2bcb3c2378caf1

X-original-commit: 9ae3e6e74b0fa52b392313510276b1cbfe5a2afd
Part-of: odoo/odoo#129080
2023-07-20 10:07:29 +02:00
Benjamin Vray cc6cf9ef13 [FIX] web_editor, *: fix replacing an image with shape by another media
*: test_website, website

Steps to reproduce the bug:
- Drag and drop a text-image snippet onto the page.
- Add a shape to the image of the snippet by selecting the shape from
the options.
- Click on the "replace" button in the options of the image.
- In the media dialog, navigate to the "icons" tab.
- Choose an icon.
- Inspect the HTML code of the icon in the DOM.
- Bug: The 'data-shape' attribute with a value is still present.

After this commit, when replacing media, the transfer of element
attributes specific to "shape" elements only occurs towards an image and
no longer towards other media (e.g. icons).

We also prevent adding shapes to images that don't support it (e.g. SVG
files). Before this commit, when replacing a .jpeg image that had
a shape with a SVG image, the shape was not removed.

This commit also adds tests to prevent these bugs from reappearing.

task-3420533

closes odoo/odoo#129079

X-original-commit: 023b0b3124a7181fdf486df8c830bb16edd10aa6
Signed-off-by: Soukéina Bojabza (sobo) <sobo@odoo.com>
2023-07-20 10:07:25 +02:00
Antoine (ande) b2e1607eb7 [FIX] account: bank statement traceback
Steps to reproduce:
1. Go to Accounting
2. Go to Bank -> Operations
3. Select one of the lines
4. Try to create a statement
5. Traceback

Cause of the issue:
active_ids can be None

opw-3419257

closes odoo/odoo#129078

X-original-commit: 4af42cc815a50d29ba59c1f33703760e671b296c
Signed-off-by: Andrea Grazioso (agr) <agr@odoo.com>
Signed-off-by: Antoine Demany (ande) <ande@odoo.com>
2023-07-20 10:07:22 +02:00
Arnold Moyaux ed54c39ef7 [FIX] stock: traceback during PO import
Following #127245

It happens because `_should_bypass_reservation` has been removed in 15.0
and only exist on the `stock.move` object and not the `stock.move.line`
anymore

opw-3336131

closes odoo/odoo#129076

X-original-commit: 7e917e8713e246811531f9d7c90395242e544057
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-07-20 10:07:16 +02:00
Alvaro Fuentes bade33c935 [FIX] account: fix CoA translations load
This patch solves two issues when loading translations from CSV files.
1. If there is a CoA from a custom module that is not available the load
   fails.
2. If there is an uninstalled CoA in use some of its fields may be
   missing thus loading values from CSV files may fail.

Both issues were observed during upgrades.

closes odoo/odoo#129068

X-original-commit: f2b2260683a284801aa0aa55850cfecb4a0ff0e4
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Alvaro Fuentes Suarez (afu) <afu@odoo.com>
2023-07-20 10:07:14 +02:00
althaf shaik 1f19492493 [FIX] sale_stock_margin: restrict to compute purchase price without product
This traceback raises when user remove the' product' while creating 'Sale Order'

To produce this issue:

1) Install 'sale_stock_margin'
2) Create a new "Sale Order" in sales
3) Give values to "customer" and click "confirm" button
4) Now in "Order Lines" click "Catalog" button
5) Add any "product" and remove it.
6) Now click back to Sale Order which created above through breadcrumb
7) Now remove the 'Product'
Note:- Make sure 'product_id' is visible in "Order lines".

Error: A traceback appears: "Expected singleton: product.product()"

On "_compute_purchase_price" method, product is referenced to
"compute average price".

See:-

https://github.com/odoo/odoo/blob/ee680a9365bba0ed4c0e5e741b3e8dce94fab9bd/addons/sale_stock_margin/models/sale_order_line.py#L10-L19

Because of user removed the 'product', it return none in self which leads to
above traceback.

sentry-4320939660

closes odoo/odoo#129067

X-original-commit: a5b04bebc80c3c483bfe2eaf6c22f47613a0f0a0
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-07-20 10:07:11 +02:00
mehjabinfarsana 1f57d57a3e [FIX] purchase: remove quick_create from purchase kanban view
before this commit, on clicking the purchase kanban view,
it allows to quick create from the kanban view,
and the value entered is going to name of purchase order

after this commit, quick create is disabled

closes odoo/odoo#129028

X-original-commit: 9c9433f3ebd65cfee8eceb751481116488ced3fc
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-07-20 10:07:09 +02:00
Dawn Hwang 7fca358b7f [FIX] hr_holidays: Fix domain in _get_number_of_days
The domain was forced to fix multi-company rules, but now is missing
domain checking whether the resource.calendar.leave is of "leave" type.
This is set if the domain is None but since the domain is overridden, it
needs to be set explicitly

closes odoo/odoo#128993

X-original-commit: 4e91aed5c31114064514f5a9e9c0ab0332580208
Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-07-20 10:07:05 +02:00
Chrysanthe (chgo) 0c405014d2 [FIX] web: fix calendar and datetime picker layout
=== ISSUE 1 ===

The spacing between the navigation buttons in Calendar were managed
by a `gap-1` class. This worked but it was not consistent with
the navigation we have in project gantt view. In order to improve
the consistency of our  UI, we need to make this look the same.

=== ISSUE 2 ===

If you navigate to Time Off and request a new time off, the datetime
picker `apply` position is not correct. This is due to the fact that
no `state.timeValues` is visible to position it accordingly. That means
we need to specify two different layout depending if these buttons are
visible or not.

== AFTER ===

We remove the `gap-1` class and add a `btn-group` class instead,
which manage the spacing between children buttons.

We also change the navigation icons to `arrows` one and fix two issues
related to the datetime picker :

- The gap between month name isn't computed as it should ;
- There is an issue with the position of the `apply` button
when no `state.timeValues` is displayed.

task-3389679
part of task-3326263

closes odoo/odoo#128460

X-original-commit: c0b354e14a18667463451aa6fe768bffcbb9da9a
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2023-07-20 10:06:53 +02:00
Valeriya(vchu) bc3026e2b2 [IMP] product, website_sale(comparison): enable product tags and ribbons
use product tags to display information as color/image on the product
page, enable filtering by tags, add tags to specification/comparison
table. Remove the link between ribbons and tags because there is no use
as we are able to show the tags on the page, add ribbon to
product.product

task-3299538

closes odoo/odoo#124299

Related: odoo/upgrade#4824
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2023-07-20 10:06:47 +02:00
Odoo's Mergebot be3955d1de [MERGE][IMP] sale_project: Add SO/SOL stat buttons, allow creating SOLs on the fly
This PR aims to improve two sale flows in project:

## Ease SO creation from project

### Purpose

Currently, users have to create a project on one side, create an SO on the other side and then manually link the two elements together for the project to be billable. This is not the most intuitive and creates friction during the creation of a project. Indeed, the user would reach a dead-end when configuring their project employee/SOL mapping, as new SOLs cannot be created from there. As a consequence, this task aims at giving users the possibility of creating an SO directly from their project.

### Changes

- Added a "Sales Order" stat button to the project form view.
    - Contains SOs linked to the SOLs set on the project, its tasks and their timesheets.
    - Hidden if the project is FSM, non-billable or without a partner.
    - Sales Orders created through this stat button should have at least one product of type "service".
    - If the project doesn't have a Sales Order Line, creating a SO sets the first service SOL of the created SO on the project.

## Offer a view on SOLs from project updates

### Purpose

Support the use-case of lawyer firms. Indeed, they usually create one SOL per action they complete for their customer. They need an easy to create a new SOL and a way to search among all of their SOLs. We are thus adding a link to the list of SOLs from the right-side panel of project updates.

### Changes

- Added a "Sales Order Items" stat button in project update.
    - Contains the SOLs linked to the project, its tasks and their timesheets.
    - Hidden if the project is FSM, non-billable or without a partner.
    - SOLs created through this stat button will be added to the SO of the project.
        - If there is no such SO or if the current user doesn't have access to it, a new SO will be created instead.
    - Refactored the SOL form view to be able to easily reuse it for this flow.
- Following this change, the ability to create SOLs on the fly from a Many2one field was added to multiple places.
    - Available in helpdesk.ticket, project.project and project.task form view, as well as project employee mapping.
    - The name entered in the field will be used to get a default product for the SOL, if a product with a matching name can be found.

closes odoo/odoo#121263

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-07-20 10:06:39 +02:00
Victor Piryns (pivi) b09f72ec93 [FIX] sale_timesheet: don't count expense as recorded hours on SO 2
Description:
Follow up on #128696, because the fw-port in 15.0 was merged before the
additional changes could've been added.

Affected versions:
15.0 -> master

opw-3302460

closes odoo/odoo#129081

X-original-commit: 6435bcb144a72ccfec3107d81b96c7eb2f4089fa
Signed-off-by: Piryns Victor (pivi) <pivi@odoo.com>
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-07-20 08:57:30 +02:00
paso-odoo 09063c8161 [FIX] web: prevent selection while record in edit mode from editable list view
If applied, this commit will solve the issue of the list view selection when
the record is not actually created but it can be selected and can able to
perform the action.

Steps to produce:
- Open Accounting > Configurations > Chart of Accounts.
- Click on the 'New' button.
- Select the new line which has been added.
- Perform the 'Duplicate' action for that record.

This commit will fix the generic issue by preventing the record selection while
the record is in 'Edit' mode.

sentry - 4191036697

closes odoo/odoo#129000

X-original-commit: 5570216c8c852b5851526217858b5b7515309444
Signed-off-by: Mathieu Duckerts-Antoine (dam) <dam@odoo.com>
Signed-off-by: Parth Solanki (paso) <paso@odoo.com>
2023-07-20 08:57:27 +02:00
luvi 563b6a8a39 [IMP] web: add isDisplayStandalone feature detection helper
This commit adds the isDisplayStandalone helper, allowing to detect whether
Odoo is running inside the Progressive Web App (in standalone mode) or not.

This feature detection is directly used in the linked enterprise

closes odoo/odoo#128969

Pr: https://github.com/odoo/enterprise/pull/43680.
Related: odoo/enterprise#43680
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2023-07-20 08:57:13 +02:00