Commit Graph
135051 Commits
Author SHA1 Message Date
std-odoo 8ca2de9bfc [IMP] web: allow to use favorite in Knowledge embedded view
Purpose
=======
Allow to use favorite in Knowledge embedded view.

For that purpose, we need to hook some function in the web module
(because favorites are stored in view arc and not using ir.filters
records).

Task-3251129

closes odoo/odoo#117188

Related: odoo/enterprise#39057
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-04-20 10:51:36 +02:00
abd-msyukyu-odoo e00a33b17a [IMP] web_editor: buffer external steps during Component rendering
Add a mechanism to buffer external steps when some asynchronous rendering needs
to be done (i.e. OWL rendering). This is to prevent external steps occuring
inside the rendered result from being applied when the rendering is currently
ongoing.

Remove `historyResetFromSteps` and `onExternalHistorySteps` as they were only
introduced to trigger an update of Knowledge Behaviors, but now that update is
done through `checkForExtraRendering`.

Modify collaborative tests of the editor so that steps `afterCreate` and
`afterCursorInserted` can be asynchronous.

Task-2821374

Part-of: odoo/odoo#104680
2023-04-20 10:51:22 +02:00
abd-msyukyu-odoo f04b8191c8 [IMP] web_editor: make mocha tests odoo modules
In order to be able to use web dependencies for mocha tests, convert every
existing test to an `@odoo-module` and make a new asset
`web_editor.mocha_tests` that will be used for tests in `/web_editor/tests`

Task-2821374

Part-of: odoo/odoo#104680
2023-04-20 10:51:21 +02:00
abd-msyukyu-odoo 40b762a69f [IMP] web_editor: force load collaborative on form view
Add an option to the html_field (collaborative_trigger) to allow to choose if
the peerTopeer connection of the collaborative mode should happen when the
html_field is loaded ('start') or when the field has the focus ('focus').

Will be used in Knowledge since the html_field of an article is the main focus
when opening the form in edit mode. The collaborative mode should be loaded as
fast as possible.

Task-2821374

Part-of: odoo/odoo#104680
2023-04-20 10:51:21 +02:00
abd-msyukyu-odoo 918d0109f4 [IMP] web_editor: add a hook for historyResetFromSteps
When the current user connects to a collaborative peer, the content inside his
editor will be reset. When opening a record, there is no way to know if such a
connection will happen.

In Knowledge, when one wants to insert an embedded view in an article body from
elsewhere in Odoo, it is inserted programatically once the article is opened. At
that time the peerToPeer connection is not established. Then, if a collaborative
session is started with someone already editing the html_field, the content is
reset, and at that point, the insertedd element is removed, so it should be
inserted again.

This commit introduces a hook that can be used to execute some specific action
if the content of the editor is reset through `historyResetFromSteps` during
the collaboration first synchronization. It can be provided as an option of the
`wysiwyg`.

Task-2821374

Part-of: odoo/odoo#104680
2023-04-20 10:51:21 +02:00
abd-msyukyu-odoo 0eac6dd552 [IMP] web_editor: prevent 'insert' command unwrapping in root
Currently, the 'insert' command unpacks nodes from a lone paragraph, or from
the first and last node if there are multiple nodes.

In knowledge, to append an embedded view to the editable, there is a need to
insert two sibling nodes at once (without unpacking them). With the current
behavior of 'insert', it is possible to do so by inserting a paragraph
containing the 2 nodes that need to be inserted. The result will be that the
'insert' command unpacks the parent paragraph and correctly insert the 2 nodes.

This commit prevents the 'insert' command from unwrapping nodes if the
anchorNode of the selection is the editable itself.

Task-2821374

Part-of: odoo/odoo#104680
2023-04-20 10:51:21 +02:00
abd-msyukyu-odoo 4e115baaad [IMP] web_editor: fully implement oeProtected and oeTransientContent
With the introduction of Knowledge Behavior Component, came a need to create
html nodes which would have limited interactions with the editor. i.e. an Odoo
view already has everything it needs to function properly, and when it is
inserted in the editor, any manipulation on the selection or on the style that
could be done with it should be prevented. Another example would be the
/template block (will be renamed /clipboard in the future) that has a
non-editable part (buttons which have a definite action in Odoo, and which
should not be interacted with) as well as an editable part inside of it).

To solve this use case, this commit proposes to mark specific html nodes with
a `data-oe-protected` attribute which could have one of three values:
- "true"
  - Only mutations of type "attributes" can be registered on the node itself
    which has the `data-oe-protected="true"` attribute
  - Prevent mutations of children (and sub-children) from being registered by
    the mutationObserver of the editor
  - Prevent the selection handling when its anchor is inside a
    `data-oe-protected="true"` element, even if it is `contenteditable="false"`
  - Prevent the command hint
  - Prevent the usage of the wysiwyg toolbar
  - Prevent the dblClick tooltip
  - Prevent the editor sanitization `Sanitize.js`
- "false"
  - Designed to be contained inside a node with `data-oe-protected="true"`
  - Re-enable all features disabled by a parent node with
    `data-oe-protected="true" for the children of a node with
    `data-oe-protected="false"
- ("")
  - This is considered equivalent to have the `data-oe-protected` attribute
    set to "true" (like other html attributes).

Another attribute is added: `data-oe-transient-content`, with the following
values:
- "true"
  - Prevent the serialization of the children of the node, so they are not
    shared during a collaboration.
  - Transient nodes will be removed during `cleanForSave`, meaning that they
    will never be part of the html_field value in the database
- ("")
  - equivalent to "true"

The use case is an embedded view: there is a large quantity of nodes that
are not relevant to share nor to save, since it will be recreated with the
lastest data from the database, with the information relevant to the
currently active user each time it has to be rendered.

Note:
This commit does not handle the dynamic switch from a specific value for
`data-oe-protected` to another (i.e. switching from "false" to "" or "true").
This could cause a number of problems like:
- some mutations from when the value was "true" are not yet handled when the
  switch (to "false") happens => those mutations will be registered as if they
  were always under the "false" value, even though it is not the case.
- in collaborative, some nodes with oids that were not relevant (under the value
  "true") won't necessarily have the same oids in between collaborators.
  Therefore we cannot suddently listen to their mutations and expect the changes
  to be shared by switching to "false".
In conclusion: the `data-oe-protected` attribute value should stay the same
during the entire edition.

Task-2821374

Part-of: odoo/odoo#104680
2023-04-20 10:51:20 +02:00
abd-msyukyu-odoo c3f44dbf59 [FIX] web_editor: notify current step when joining a collaborator which already synced
How to reproduce (scenario):
- Open 3 windows with 3 different sessions in Odoo
user_1 -> in CRM, My Pipeline
user_2 -> in Knowledge on article "target"
user_3 -> in Knowledge on article "target"
-> user_2 and user_3 are in a collaborative session
-> user_1 "insert view in article" "target" (via Favorites)
-> user_1 is redirected to knowledge to the target article
-> RTC_DATA_CHANNEL_OPEN between user_1 and user_2 happens
-> user_1 reset the html_field value from the history steps of user_2
-> the embedded view "My Pipeline" is inserted via `execCommand` and create a
step in user_1 editor
-> user_2 is notified via OE_HISTORY_STEP and receive the new nodes (view)
-> RTC_DATA_CHANNEL_OPEN between user_1 and user_3 happens
-> since user_3 was already synced with user_2, there is no
`historyResetFromSteps`
-> user_3 does not get the step from user_1 with the embedded view nodes now
-> user_3 makes multiple steps (i.e. write some text in a paragraph)

Current Behavior:
-> user_2 and user_1 are notified of those steps and add them to their histories
-> user_3 stil did not get the step with the embedded view nodes
-> now if user_1 and user_2 make some steps, user_3 will be notified, but those
steps "parents" are the steps from user_3, so user_3 may not request a full
history comparison and may never get the missing step

Fix:
-> when a RTC_DATA_CHANNEL_OPEN event happens, the connected client is notified
of the last registered step so it can call GET_MISSING_STEPS if it does not have
it

Note:
This fix solves the specific case mentioned above, but other cases of
desynchronization may happen, see Task-3208277 for a more complete fix.

Task-2821374

Part-of: odoo/odoo#104680
2023-04-20 10:51:20 +02:00
Renilkumar Kajavadra c70a46b8bf [FIX] account: fix IndexError in payment terms
If applied, this commit will solve the tuple index out of range error when the
'Percent' value is not set in the Due Terms and the user tries to add 'Fixed'
value in more than one line.

To reproduce this issue, follow the steps.
- Open Accounting -> Configuration -> invoicing -> payment terms.
- Open any payment term, and change the value from 'Percent' to 'Fixed' in Due
  Terms.
- Add another line with a value as 'Fixed'.

see-https://tinyurl.com/22e2yj2a

sentry-4072967091

closes odoo/odoo#119131

X-original-commit: fcb3c237e24ec44fd6df0de5f2a0f329efb1bf13
Signed-off-by: William André (wan) <wan@odoo.com>
2023-04-20 00:50:00 +02:00
Andrea Grazioso (agr-odoo) 8deeb10ef8 [FIX] account: lock posted entry issue with cash rounding
- Enable Cash Rounding in settings.
- Create the cash rounding as
  - Rounding precision: 5.00
  - Rounding Strategy: Add a rounding line
  - Profit Account: Any
  - Loss Account: Any
  - Rounding Method: Half-up
- Enable "Lock Posted Entries with Hash" on Customer Invoices Journal.
- Create a draft invoice and set the cash rounding on it.
- Confirm

Error will raise
You cannot edit the following fields: Account, Label, Partner.
The following entries are already hashed

This occurs because cash rounding is recomputed during post,
after hash was written

opw-3235377

closes odoo/odoo#119126

X-original-commit: 5cb044dd8a2385c9a3c09520ed97eb4faa39216d
Signed-off-by: William André (wan) <wan@odoo.com>
2023-04-19 23:41:44 +02:00
Alexandre Kühn fa6fe90ee7 [FIX] mail: padding at end of other bubble in discuss chat window
closes odoo/odoo#119092

Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
2023-04-19 21:58:52 +02:00
Victor Piryns (pivi) 98f01f451b [FIX] website_sale: avoid float inaccuracy when comparing for discount
Current behaviour:
When a pricelist discount with a % is present for the /shop, but
doesn't apply for the product, for some base prices that are not
easily representable as floats, the comparison between the base
price and the post-pricelist price may be different, when they are
not, due to floating point inaccuracy.

Expected behaviour:
Even if floats are not accurate, if the price is essentially the
same, it shouldn't be counted as a discount.

Steps to reproduce:
- Install eCommerce and Sales
- Settings > Activate all pricelist settings for discount and check
  the "Comparison Price"
- For a product set the base price to `4,152.48`
- Create a price list that shows the discount of 25% that *doesn't*
  apply for the product we set, set it selectable for the e-commerce.
- Go to the /shop, set the pricelist and look for your product, see
  that the base price and discounted price are the same, but one is
  strikedthrough as if there is a discount.

Reason for the problem:
Floating point inacuracy when computing the base price of the
product, and we compare with the "reduced" price, they are different
(4,152.48 vs 4,152.480000xx), so when we compare them, they are
different, when they shouldn't be.

Fix:
Use `compare_amount(...) != 0` of the currency to safely compare the 2
prices.

Affected versions:
- 16.0
- saas-16.1 (couldn't reproduce, but the line is present, so
  possibly faulty)
- saas-16.2 (couldn't reproduce, but the line is present, so
  possibly faulty)
- master (couldn't reproduce, but the line is present, so
  possibly faulty)

opw-3246461

closes odoo/odoo#119072

X-original-commit: aaaae309d38651c9ce5cd63439695e858a7c047d
Signed-off-by: Piryns Victor (pivi) <pivi@odoo.com>
2023-04-19 21:58:47 +02:00
Andrea Grazioso (agr-odoo) c7c3f69453 [FIX] stock_account: avoid reinvoice on cogs entry
Create a product category [FIFO] with:
- Costing Method: First In First Out (FIFO)
- Inventory Valuation: Automated
Create a product [PROD] having:
- Product category: [FIFO]
- Product Type: Storable Product
- Invoicing Policy: Delivered quantities
- Can be expensed: True
- Re-Invoice Expenses: At cost
Create a sales order with [PROD]
Confirm, Deliver
Open the created STJ journal entry:
- Reset to draft
- Add analytic account on a line
- Post again

To the sale order is added a reinvoice line with negative quantity.
This should not occur with cogs lines

opw-3199428

closes odoo/odoo#119048

X-original-commit: 347975d6d9b07db521e02ee12694aa834708abbe
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Grazioso Andrea (agr) <agr@odoo.com>
2023-04-19 21:58:45 +02:00
Michael (mcm) 8ec2e8cf80 [REF] *: convert last odoo modules to esm
This commit converts odoo modules that haven't been converted with
commit https://github.com/odoo/odoo/pull/117305/commits/e10b45c69e72f09128e49eb46e42834b1ef515d7.
The goal is to deprecate odoo.define in favor of native module and then
simplify boot.js by removing the regexp that finds module dependencies.

task id: 3162300

closes odoo/odoo#118812

Signed-off-by: Géry Debongnie <ged@odoo.com>
2023-04-19 21:58:39 +02:00
Mathieu Duckerts-AntoineandMichaël Mattiello ebf646b44f [IMP] *: ModelFieldSelector improvements
We refactor the ModelFieldSelector and ModelFieldSelectorPopover
components.

We also improve a bit ModelFieldSelectorPopover:
    - on first page, the button to go back is no longer available
      (so that it is now more difficult to produce an invalid path)
    - we always start with a page presenting the model where the last
      selected field name belongs to
    - the keyboard navigation is improved
    - click on model field selector opens the popover with the focus in
      the search input (if any)
    - for relational fields in popover: the user can either click on the
      relational field (and select it) or a special button that make him
      follow the relation to the field comodel

We also refactor the hook useDynamicPlaceholder to make it use a new
component DynamicPlaceholderPopover that uses ModelFieldSelectorPopover.

Task ID: 3272798

closes odoo/odoo#117951

Related: odoo/enterprise#39673
Signed-off-by: Michaël Mattiello <mcm@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: Michaël Mattiello <mcm@odoo.com>
2023-04-19 21:58:34 +02:00
Mathieu Duckerts-Antoine 6e4862d2ba [IMP] web: filter menu closed on advanced search
We make the filter menu close itself when the user click on its item
"Advanced Search".

Part-of: odoo/odoo#117951
2023-04-19 21:58:34 +02:00
Rémy Voet (ryv) 6d930c7b9d [REF] mail: replace override of read_progress_bar _read_group_groupby
closes odoo/odoo#110737

Related: odoo/documentation#4064
Related: odoo/enterprise#38639
Signed-off-by: Vincent Schippefilt (vsc) <vsc@odoo.com>
2023-04-19 21:58:28 +02:00
Rémy Voet (ryv) b60cf1f977 [REF] _read_group_raw doesn't exists anymore
`_read_group_raw` has been remove in previous commit. Convert all usage.

Part-of: odoo/odoo#110737
2023-04-19 21:58:28 +02:00
Rémy Voet (ryv) 81a892ac8c [REF] core: read_group() now uses _read_group()
Make the public `read_group` depends of its private method `_read_group`
refactored to match the backend usage.

We try to keep the public API similar for this first part of the
rafactor, but there are still some API change:
- We cannot order by `id` anymore.
- The display_name of many2x group values are not lazy anymore.

Part-of: odoo/odoo#110737
2023-04-19 21:58:28 +02:00
Rémy Voet (ryv) 88b5135e5f [IMP] core,*: simplify security of read_group
Lot of override of read_group reimplement partially custom security
rule of `_search` method. In order to simplify these security check
and have a consistent behavior between the search and read_group method,
_read_group now use _search to create the from and where clause.

Part-of: odoo/odoo#110737
2023-04-19 21:58:27 +02:00
Rémy Voet (ryv) 687d0ed285 [IMP] *: change the override of read_group
The new backend version of read_group can simplify the
current overrides of read_group. Do it for each of them and
avoid making extra search (done with __domain) when it is possible.

Part-of: odoo/odoo#110737
2023-04-19 21:58:27 +02:00
Rémy Voet (ryv) 234db70d86 [IMP] *: Use the new API of _read_group for backend use
Part-of: odoo/odoo#110737
2023-04-19 21:58:27 +02:00
Rémy Voet (ryv) 9c5554faba [FIX] web: don't create warned orderby for read_group
`read_group` cannot order on the fields that are not
aggregates in the same transaction. We get a warning for it:
`<model>: read_group order by '<field_name> ASC' ignored, cannot sort on empty columns (not grouped/aggregated)`

Fix it.

Part-of: odoo/odoo#110737
2023-04-19 21:58:26 +02:00
Rémy Voet (ryv) 603c16b1a0 [FIX] core,fleet: remove group_operator for Many2oneReference
The default `group_operator` of `Many2oneReference` is 'sum' (inherited
from the parent class `Integer`), it doesn't make any functional sense
to sum ids.

Also set group_operator to None on `co2` instead of override read_group
for the same result.

Part-of: odoo/odoo#110737
2023-04-19 21:58:26 +02:00
Didier (did) 6f12a849f6 [IMP] mail: link preview image as message
This PR hide the message body when the link preview is an image and the message
only contains the link to the image.

closes odoo/odoo#117772

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-04-19 20:58:14 +02:00
Alexandre Kühn 4fd9cfbe81 [FIX] mail: make chat window take whole height in mobile
Before this commit, chat window take at most 95% of global
height. This is ok in desktop, 5% room allow clicking on
systray menu. In mobile, however, the intend is for chat window
to take whole height.

This commit makes chat window take whole height in mobile, while
preserving the max-height 95% of global height in desktop.

Also fix an issue where chat window were foldable in mobile, when
this feature is desktop-only.

closes odoo/odoo#119058

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-04-19 19:14:47 +02:00
Prakash Prajapati b1f8c9880f [FIX] hr_holidays: set the correct default employee in hr leave allocation
Steps:
    - Install hr_holidays module
    - Got to employee app and create  employee (Test)
    - Open Test emp and Click time-off stat button
    - Click Allocation Request
    - Test employee not set in  Allocation Request but current  employee

Issue:

 If we allocate leave from a particular employee but set the  current login user  employee

closes odoo/odoo#119078

X-original-commit: e07f83e2181573604102c2323ac48c08aa0d116a
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-04-19 17:31:52 +02:00
Thomas Lefebvre (thle) 9d5b4d218e [FIX] calendar, google_calendar: prevent duplicated base event
Issue:
------
It is possible to create recurring events
that are in the same DST period.
Unfortunately, the basic event is sometimes duplicated

Cause:
------
The cause comes from the Daylight Saving Time (DST).

With the base event, we create a recurrence.
This recurrence will create all the events
of the recurrence.
To achieve this, with the basic event, we create all the ranges.
Then, we compare these ranges to remove those which already have
events.
Logically, we must reconcile the first range with the base event.
Sometimes the range of the base event and the first range
calculated to generate the occurrences do not match.

The consequence is the creation of a new event.
The cause of this problem is that we go back too far to find
the starting date of the period from which we will generate the ranges.

For example, in the case of a recurrence with a frequency of `MONTHLY`,
we will take the first date of the month.
And if we are in the month when the DST changes,
we will have the problem.

Solution:
---------
The solution is not to go back
if we encounter a difference in the DSTs
between the starting date of the base event
and the starting date for generating the ranges.

opw-3143680

closes odoo/odoo#119073

X-original-commit: 065dd4a2548ff0da6cf23a7ac62321ce99500d35
Signed-off-by: Arnaud Joset <arj@odoo.com>
Signed-off-by: Lefebvre Thomas (thle) <thle@odoo.com>
2023-04-19 17:31:49 +02:00
Matheus Leal Viana (malv) 2d0e286e6b [FIX] purchase: Do not display notes/sections in purchase reporting
The issue is when we create a new PO with notes/sections and these notes/sections are showed on purchase reporting and only the products were supposed to appear there.

This issue happens because the SQL query wasn't applying any filter to the lines. The solution is apply a filter by display_type.

Steps to reproduce:
1) Go to Purchase App -> Purchase Orders -> Create a new PO with notes/sections
2) Go to Reporting -> View as pivot
3) You'll be able to see the section/notes you just created

closes odoo/odoo#119001

Opw: 3245933
X-original-commit: 8a9aa4c65bfdc776772e46bd199f6042f2678895
Signed-off-by: Adrien Widart <awt@odoo.com>
Signed-off-by: malv-odoo <malv@odoo.com>
2023-04-19 14:24:06 +02:00
Mahamadasif Ansari 8caf1e023b [FIX] web_unsplash: accept premium image URL
"ERROR: Unknown Unsplash URL!" is generated when we try to add premium
Unsplash images. This is because when we add the unsplash image, it accepts the
image whose URL starts with "https://images.unsplash.com/" but the premium
image URL starts with "https://plus.unsplash.com/".

This commit solves the above issue by checking that the premium splash
image link starts with the correct format.

sentry-4075507166

closes odoo/odoo#118662

X-original-commit: 00894718cc7332131a7096c1e6dbe124d5d6d233
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2023-04-19 14:24:01 +02:00
Jurgen (jugj) 1902beb621 [IMP] fleet : Add default contract types for vehicles and expand name_search to manufacturer name
This PR :
- Adds 2 new default contract types to the data : Omnium and Leasing
- Lets the user search models by manufacturer name and model name

task - 3249291

closes odoo/odoo#117059

Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-04-19 12:13:30 +02:00
Prakash Prajapati 3571075b18 [IMP] hr: add ribbon in the Job Positions
task-3246004

closes odoo/odoo#116789

Related: odoo/enterprise#38869
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-04-19 12:13:25 +02:00
Julien Carion (juca) e96566e11d [FIX] web: Fix computation of aggregates in list_renderer
This commit fixes how monetary fields are handled when doing aggregates in list view:
aggregates should not be computed when all values are not in the same currency and
the currency should be displayed with the aggregate when this is not the case.

closes odoo/odoo#116556

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-04-19 12:13:22 +02:00
Didier (did) f5ff0b1b30 [FIX] mail: fix link preview overflow in the chat window
Before this PR, a link preview image would overflow out of the chat window. This
because the max-width on the image is bigger than the space dedicated to the
image inside the chat window.
This PR set the max-width to 100% inside a chat window, so the image cover the
space nicely.

closes odoo/odoo#119019

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-04-19 11:01:27 +02:00
Deependra Solanki e82def03f2 [FIX] web_editor: fix /image for pictogram not working
Before this commit:

clicking on the pictogram, the pictogram is not being displayed on the note.

After this commit:

pictogram is being displayed on the note.

task - 3249342

closes odoo/odoo#119010

X-original-commit: 05f13260c2bbce2c5c69b3626ccb628776b11c68
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2023-04-19 11:01:24 +02:00
Tiffany Chang (tic) 2177a045d0 [FIX] stock_picking_batch: print correct num of labels
PR https://github.com/odoo/odoo/pull/106414 made it so the
`product.label.layout` expecting `stock.move` ids rather than
`stock.move.line` ids. Unfortunately it missed updating this for the
batch picking case => when printing the labels for a batch picking,
only 1 label was printed per product rather than the qty done.

Note that this issue does not occur when the batch is Done + has
lots/SNs assigned in it

closes odoo/odoo#118995

X-original-commit: a5af45a8e3ff8860655351dd76a11f1dbb6d8a70
Signed-off-by: Steve Van Essche <svs@odoo.com>
Signed-off-by: Tiffany Chang <tic@odoo.com>
2023-04-19 11:01:19 +02:00
Xavier-Do 608c1ea100 [FIX] tests: check test tags *_install
Making a test post_install using @tagged should always remove the
at_install tag.

The main reason for that is that runbot split config select if an
at_install or post_install tests should be executed is using negation:
`--test-tags -post_install`. The reason for that is that giving a positive tag will
replace the "standard" tag and non standard tag could be executed if
giving `--test-tags at_install` (without negation)

Since runbot tests in parallel builds, one of them using
`--test-tags -post_install` and the other `--test-tags -at_install`,
a test that is both post install and at install wont be executed at all.

Also, a tests with both tags will be executed twice
in a normal flow, usually not intended.

The correct way to make a test post_install is to use

@tagged('post_install', '-at_install')

closes odoo/odoo#118969

X-original-commit: d1db306b212d4abb5b2faab9e56c8e83b85c53b9
Related: odoo/enterprise#39966
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2023-04-19 11:01:13 +02:00
amdi-odoo 64dd4bed9d [IMP] link_tracker: add placeholders
Add placeholders to the mediums and sources tree views.

Task-3240966

Part-of: odoo/odoo#116230
2023-04-19 11:00:59 +02:00
amdi-odoo d9eea928b3 [IMP] utm: improve campaign UI
Purpose
=======
Give users a better experience while using the utm campaign module.

Specifications
==============
* Add a filter called "My Campaigns" filtering on the current user_id.
* Add a groupby Tags.
* Always underline the Tags field in the campaign quick create.
* When duplicating a campaign, do not copy the stage and make it
restart the pipe.
* In the list view:
  - Change the column name from "Campaign Name" to "Name".
  - Add bold on the stage field.
  - Add the avatar widget to the Responsible field.
* For the edit stage modal:
  - Make the dialog smaller.
  - Only display the name field.
  - Add a placeholder to the name field.

Task-3240966

Part-of: odoo/odoo#116230
2023-04-19 11:00:59 +02:00
amdi-odoo efac0ab86e [IMP] utm,sale,link_tracker,crm: change kanban icons to buttons
Change the icons of the utm campaign kanban cards to buttons.
This allows a faster access to concerned views.

Task-3240966

Part-of: odoo/odoo#116230
2023-04-19 11:00:59 +02:00
amdi-odoo 7f6c66bd5e [IMP] utm: allow archiving campaigns
Allow archiving campaigns from the form and kanban views.
Add the "Archived" filter.

Task-3240966

Part-of: odoo/odoo#116230
2023-04-19 11:00:59 +02:00
Andro Gvivradze 6540944fb4 [IMP] survey: make certification reports editable by studio
The goal of this commit is to make certification reports editable by
studio. We also move certification reports into separate report folder
from views, and merge modern and classic views into one. This way we avoid
duplicated code and at the same time the structure will make more sense since
it is already working as a single template.

Task-3148819

closes odoo/odoo#113469

Related: odoo/upgrade#4503
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2023-04-19 11:00:51 +02:00
Adesh Jolhe 1ec282f858 [IMP] project_timesheet_holidays, _*: bring ux improvements for project and timesheet app
*_= project, sale_timesheet,

The purpose of this commit is to improve the UX of the project and timesheet app
So in this commit done following changes:

- In the timesheet time off form view changes the label from
timesheet to timesheets
- In the timesheet list view added a 'no_open' option on the SOL field to
make not be clickable
- In project form view removed the 'quick' create option from the
user_id field
- In project task form view added a 'no_open' option on the SOL field to
make not be clickable

- Color of the Gantt and calendar views in project app
     My Tasks:
	the color used should be according to the personal stage set on the task.
     All tasks:
	the color used should be according to the project set on the task.
     When the user clicks on a project in the main view of Project app:
	the color used should be according to the stage.

task-3125942

closes odoo/odoo#111688

Related: odoo/enterprise#36615
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-04-19 11:00:49 +02:00
Joseph Caburnay e335489526 [FIX] point_of_sale: fix raceback when deleting orderline
Steps to reproduce:
- Activate customer display.
- Open a pos session.
- Open the customer display.
- Add orderline.
- Delete the orderline. Then there's traceback.

This is caused by the fact that the `effect` used to update the customer
display is synchronous, and when removing an order, `splice` is applied
in multiple steps, and causes multiple notifications to the underlying
reactive. At some of those steps, the reactive state is inconsistent
(ie, one of the slots of the reactive array is empty) causing the call
to map to result in an array with empty slots which cannot be used in
`Object.fromEntries`.

This commit fixes that my batching the updates to the customer display
in the next microtask tick, meaning that the update will never be done
with an inconsistent state.

closes odoo/odoo#118743

Signed-off-by: Samuel Degueldre <sad@odoo.com>
2023-04-19 09:56:13 +02:00
Benoit Socias 68ed032b8a [FIX] website: disable mega menu hover mode while editing
When a mega menu "Sub Menus" are configured as "On Hover", it becomes
very difficult to edit its content.

This commit changes the behavior of the "On Hover" while the page is
being edited:
- it disables the hide on exit (`mouseleave`)
- it prevents the show on hover if another dropdown is already opened
- it hides the menu when the page is clicked outside of the opened menu

This commit also disables the preview of the "Show Sign In" option
which is not previewed anyway, so that it does not deselect the mega
menu when hovering the options.

task-2825376

closes odoo/odoo#119002

X-original-commit: ccb78f7af2a4413836a969ff8009dc3df6c2df33
Signed-off-by: Vray Benjamin (bvr) <bvr@odoo.com>
Signed-off-by: Benoit Socias (bso) <bso@odoo.com>
2023-04-19 08:42:36 +02:00
jobl db07dbdf32 [FIX] web: remove bg img when layout bg is Blank
Currently, the boxed and striped document layouts still pass in the
default background image when set to Blank. This image is mostly hidden, but
displays artifacts when printing or changing background color in program
like Paint. This fix removes the background image from these layouts when
"Layout Background" is set to "Blank".

In v15, Odoo changed the way that Document Layouts can be configured by
allowing the Geometric background image to be set on any of the base layouts.
A conditional was added to the standard and bold layouts to check the
selection for the "Layout Background" setting, and to set an empty string
for Blank. This conditional is missing for boxed and striped, causing
the artifacting issue. This fix adds in that conditional, which
removes the artifacting.

opw-3232991

closes odoo/odoo#118921

X-original-commit: 92f28da10e4fa3c80be0759c131febb5e6289e20
Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
2023-04-19 07:40:24 +02:00
Mayurrajsinh Rathod 245e174eb6 [FIX] website_slides: public_views field is now readonly
Before this PR:

The 'public_views' field is editable by the user.

After this PR:

The 'public_views' field is not editable from now onwards.

Task-3262249

closes odoo/odoo#118989

X-original-commit: b9b133dab12db9ec3d7231ea8d50f5188e98b5a6
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-04-18 21:23:42 +02:00
Jigar Vaghela 6eb8213d0e [IMP] l10n_in: Audit Trail
In Indian government required audit trail report for private limited companies
So from this commit user can't delete journal entries after posting once.

Create an audit trail report from mail.message to show a full log of journal entries

task - 3239932

closes odoo/odoo#118945

X-original-commit: f4365ee1c6e979e352ece66b03f3c00e830f2117
Signed-off-by: Josse Colpaert <jco@odoo.com>
2023-04-18 19:29:12 +02:00
Gaetan Vanden Bergh (gavb) ac93d84388 [FIX] website_sale_wishlist: show rentable product in wishlist
Customers can add rentable and not soldable product
to their wishlist but can't see it in the wishlist page.

opw-3252518

closes odoo/odoo#118931

X-original-commit: ea126a2bee271ae2d80814cdf081833015870229
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-04-18 19:29:06 +02:00
Ipsita Borisagar b2103b06f7 [FIX] base, web: allow reading property fields when no access to parent record
This commit fixes a use case where a user would not be able to access the
property field values of a record because he did not have access to that
record's parent (from the property field definition configuration).

In a concrete example:
- In the Knowledge App
- Marc Demo has access to the "Article B".
- The parent article of "Article B" is "Article A".
- Marc Demo does not have access to "Article A".
- Article B has some property fields values configured.
- If Marc Demo tries to open "Article B" -> crash

This is caused by the framework having to read the property definition from the
parent record, which we don't have access to.
A "sudo" was added to allow that use case (which is supported).

In addition, this commit also adds further checks on the web client side to
gracefully handle a special use case where the end-user could not write on the
parent record because of record rules.
(It only checked *access rules*).

To avoid making an extra RPC every time we load the record (to check if we can
write on the parent), we only make that check when the user tries to modify
(add/edit/remove) a property and show a proper error message.
(This also applies when creating new property field tags).

Task-3062064

closes odoo/odoo#118929

X-original-commit: bc538f6944461a642bac0f757ec96d7f8cc14c9a
Related: odoo/enterprise#39946
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2023-04-18 19:29:03 +02:00