Commit Graph
160135 Commits
Author SHA1 Message Date
Xavier Morel cedc968f22 [FIX] base: better filter drop table warnings
Along with improving the table_kind API, #117439 added a warning when
dropping non-tables.

This warning turns out to trigger on many models, in two major cases:

- the hook is called on abstract models, which don't have a table in
  the first place, it probably should not be called for those but can
  easily be skipped
- the hook is also called on `_auto = False` which don't have a table
  anymore, this is because we use `DROP TABLE $table CASCADE`, which
  implicitly drops any view (or table) depending on the table, it
  might be possible to avoid this by ensuring we drop models in
  reverse topological order *and* drop all of a module's views then
  tables at once (by passing multiple names to `DROP`, but for now
  just ignore the case where we're trying to drop an object which
  can't be found

closes odoo/odoo#118194

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2023-04-11 15:17:32 +02:00
Jorge Pinna Puissant baebb6a5b0 [REF] web, *: Unique id for field nodes
Before this commit, the field node id (`field_id`) uses the field name
for the first occurrence on the arch, and add an underscore and a number
for the rest of the occurrences. This can create inconsistencies when
sombody assumes that the field_id is equal to the name, and don't take
into account the possibility of multiple occurrences.

Now, a unique id is created since the first occurrence, this remove all
ambiguity between the id and the name.

Part-of task-id 3179751

closes odoo/odoo#117799

Related: odoo/enterprise#39511
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-04-11 15:17:20 +02:00
Pieter Claeys (clpi) c6d0c12c44 [FIX] stock: stock scrap locations readonly
Since https://github.com/odoo/odoo/pull/104062, the location and
scrap location id fields on a scrap order are no longer editable
(even while still in draft).

To reproduce:
- Enable storage locations in settings
- Create a new scrap order
Bug: The source and draft location are readonly.

This fix restores the intended behaviour to make these fields editable
while in draft state and adds a test to confirm this behaviour.

Task: 3266655
Community PR: https://github.com/odoo/odoo/pull/117931

closes odoo/odoo#118177

X-original-commit: 1dcc9ade1793a562e5df20336241d2a025c5e14c
Signed-off-by: Tiffany Chang <tic@odoo.com>
2023-04-11 14:11:54 +02:00
Rohitkumar (roku) d21b61cbf0 [IMP] hr_timesheet, _*: improve wording
_* = sale_timesheet, account

In this commit, we have replaced the cancel button string with discord instead
of cancel.

task-3216495

closes odoo/odoo#115693

Related: odoo/enterprise#38341
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-04-11 14:11:49 +02:00
aliya 1723670898 [FIX] account: change error type in name_create
Accounts can be created with help of `name_create`, where a user can add a code and a name in one place and we split that for them.
To prevent the user creating accounts by mistake too often, we've made it so that the quick create always raises an error to display the modal (pop-up to edit the account before creating it). However, now UserError does not bring the modal, but the error message is displayed instead.
ValidationError in name_create makes more sense and also lets users see the modal.

task-3262539

closes odoo/odoo#118132

X-original-commit: 4a7411a972edc52fdf1b2fae77dddf1d9e558505
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
Signed-off-by: Aliya Tastemirova (alta) <alta@odoo.com>
2023-04-11 11:33:56 +02:00
Mahdi cheikh rouhou (macr) de1d04db4c [FIX] calendar : change stop date for recurrent event
Changing end time for recurrent event will generate an error.

steps to reproduce the error:
1- Create an event in the calendar app with recurrence on
2- Save and close
3- Edit this event again and select change all events at the top
4- Change the ending time

The error was happening because the wrong key was accessed in a
dictionary

opw-3236432

closes odoo/odoo#118087

X-original-commit: 97f51b24da5db1a0217121aae583a9c1d715adc4
Signed-off-by: Adrien Widart <awt@odoo.com>
Signed-off-by: Mahdi Cheikh Rouhou (macr) <macr@odoo.com>
2023-04-11 11:33:54 +02:00
std-odoo 5f1f4d4170 [FIX] account: fix a failing test about digest
Bug
===
The tagged had only `post_install`, so it wasn't run on the runbot.

In the meantime, the account team removed `user_type_id` and so the
test is failing (and I could have been merged because of the tag).

closes odoo/odoo#118037

Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2023-04-11 11:33:51 +02:00
abd-msyukyu-odoo b9551a5070 [FIX] web: compute containing block layout in position hook
How to reproduce:
- create a list embedded view in Knowledge (/item list)
- in the control panel click on "Filters"

Current behavior:
- the dropdown is not correctly positioned

Expected behavior:
- the dropdown should be positioned around the button

Fix:
`getBestPosition` uses dimensions and layout positionning based on the viewport,
but `reposition` modifies the style properties `top` and `left` of the element,
which are relative to the closest containing block. Since in that case the style
position is `fixed`, there are a number of factor that can influence the
containing block, as specified in:
https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
We can easily compute the layout offset caused by the containing block just
after resetting the popper top and left to `0px` and take it into account for
the final value.

Task-3267555

closes odoo/odoo#118018

Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
2023-04-11 11:33:48 +02:00
niyasraphy 81bb17091f [FIX] mrp_subcontracting: show lot field only when lot/serial number is activated
before this commit the lot field is visible even without activating the
lot and serial number feature from the settings.

after this commit the field will be visible only when the feature is
activated in the settings.

closes odoo/odoo#117850

X-original-commit: 9c02bc50b46f6544b4696632274045fad751aad5
Related: odoo/enterprise#39400
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-04-11 11:33:40 +02:00
Alexandre Kühn e8567dadbd [FIX] web: upload same file twice in discuss composer
Before this commit, when clicking on "Attach files" in discuss
composer, then removing it, it was not possible to upload the same
file again.

This happens because file input of file uploader relies on `change`
from the input. The `input.value` contains the filepath, so if we
upload the exact same file without clearing the value, the value
will be unchanged and it won't trigger uploading as a result.

This commit fixes the issue by clearing the input just after
the file has been uploaded, so that we can upload the same file.

Cannot reproduce bug in QUnit tests because `inputFile` helper
programmatically always trigger "change" on input file.

closes odoo/odoo#117704

Signed-off-by: Luca Vitali <luvi@odoo.com>
2023-04-11 11:33:38 +02:00
kais-odoo 120ac7566f [IMP] im_livechat: modify mail short code demo data
In this commit, remove space and modify content in demo data.

task-3067151

closes odoo/odoo#106233

Related: odoo/enterprise#34232
Related: odoo/upgrade#4184
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-04-11 11:33:29 +02:00
kais-odoo 9b2c19b945 [IMP] project: improve generic UX of project
In this commit made following changes:
- added copy writing content in project form view for
  access_instruction_message field.

task-3067151

Part-of: odoo/odoo#106233
2023-04-11 11:33:29 +02:00
Rémy Voet (ryv) 016f26a931 [FIX] base: wrong value profiled
closes #odoo/odoo#88276

Signed-off-by: Christophe Matthieu (chm) <chm@odoo.com>
2023-03-13 11:03:46 +01:00
Denis Ledoux 536e670f8c [FIX] http: ensure values of session are serializable when stored
closes odoo/odoo#86015
Signed-off-by: Julien Castiaux <juc@odoo.com>
2023-02-07 09:12:32 +01:00
niyasraphy 40be0ebf9b [IMP] website_forum: remove milli seconds from vote datetime
before this commit, in the votes tab in the website
user profile, the date time is shown including the
milli seconds in it.

* open forum
* open own user profile
* click votes tab and see the date time

after this commit, the milli seconds info will be
removed from the date time.

closes odoo/odoo#118152

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-04-11 09:21:23 +02:00
amdi-odoo 6bd14cd39a [FIX] web: fix phone field button text alignment
Fix the phone field buttons text alignment
("Call", "SMS", ...) which is currently rendering
the letters on different lines because of a text-break
css class introduced by: odoo/odoo#114442

Override this text-break class for the phone field
buttons links.

Task-3258943

closes odoo/odoo#118109

X-original-commit: 012f97b7e6811bfa4804ba49696811f7f6b98582
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-04-11 09:21:21 +02:00
niyasraphy 85fc6e09d8 [FIX] website_profile: remove duplicated import in init
before this commit, the controllers directory is
imported twice in the init file.

after this commit, the duplicated import is
removed.

closes odoo/odoo#118105

X-original-commit: 3496c25b677dfe8695b00cea0cd5eff095941321
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-04-11 09:21:19 +02:00
oco-odoo 4f93fd0800 [FIX] account_reports: aggregation engine: properly expand aggregation expressions when using an if_other_expr_[above|below] subformula
The if_other_expr_[above|below] subformulas were introduced in stable by https://github.com/odoo/enterprise/commit/f39862263c7e2332468a69736589a35d66d87b16. They basically allow displaying the value of an aggregation expression if another line's amount is above/below a provided bound. When using an expression with such a subformula to compute a carryover value (hence giving the expression a _carryover_... label) on a tax report, the posting of the said tax report's closing entry looped forever. No report from Odoo falls into this use case at the moment, but the issue occured on a development branch (for l10n_ma).

This was due to the fact the tax closing expands only the aggregation expressions needed in the computation of the carryover to compute its value, hence not providing all the expressions of the report. Doing so, _get_aggregation_terms_details was called, and it neglected to include the expression used as comparison term by the subformula into the dependencies of the aggregation to expand. As a result, the comparison term could never be evaluated, and the loop went on forever, waiting for the comparison term to receive a value.

closes odoo/odoo#118104

X-original-commit: 76288d1fd654c9ff4c721cc1d96596b6adbf95d0
Related: odoo/enterprise#39535
Signed-off-by: John Laterre (jol) <jol@odoo.com>
2023-04-11 09:21:13 +02:00
Fabien Meghazi 5cbb0738be [IMP] sql_db: allow to customize pg connection's application_name
This is an improvement over commit f6c13d7 in order to allow full
customization of postgresql connection's `application_name`.

In a PID linux namespace the containers processes IDs might not be relevant
for a system administrator and one might want to customize the content of the
`application_name` just like it was possible to do before commit f6c13d7
using the `PGAPPNAME` environment variable.

This commit allows to expose an `ODOO_PGAPPNAME` environment variable whose
content will be interpolated with the PID (optional)

closes odoo/odoo#117921

X-original-commit: a4108eee91f8e9bf82be5a4be4b91bab16baa0df
Signed-off-by: Olivier Dony (odo) <odo@odoo.com>
2023-04-11 09:21:08 +02:00
rhe-odoo 7db7b3ef04 [FIX] pos_sale: show correct shipping address
When creating a quotation in the sales app with a different shipping address, this is not shown on the invoice report from the point of sale.
Before it was always using the pos order partner address.
Now we check if the sale order had a different shipping address before setting the address on the report.

closes odoo/odoo#117603

Task-id: 3258679
X-original-commit: f12abb338501a745716480e055e9a8d33229bb0c
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-04-11 09:21:05 +02:00
Kartik Chavda a457785920 [IMP] sale_project: improve generic UX
Purpose of this PR to do generic improvement.

So in this PR done following improvements:

- add context in partner fields in various places to display
customer partner first in selection of partner field.
task-3099758

closes odoo/odoo#107913

Related: odoo/enterprise#34950
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-04-11 09:21:00 +02:00
kais-odoo 829a7a31e4 [IMP] rating: update rating template content
This commit replaces 'write a feedback' into 'share feedback'
in the feedback content of rating portal page to share a feedback.

task-3079119

closes odoo/odoo#107590

Related: odoo/enterprise#34838
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-04-11 09:20:55 +02:00
valeriobelcastro a33dbdb5c7 [IMP] handle query parameters on /web route
closes odoo/odoo#117987

Signed-off-by: Julien Castiaux (juc) <juc@odoo.com>
2023-04-09 12:57:40 +02:00
Đào Nam 0f8cbcb5a1 [IMP] barcodes: Allow other modules to add the COMMANDS option.
closes odoo/odoo#118123

X-original-commit: 2daa8361373f2308c9efe571d0901699b7a73262
Signed-off-by: Géry Debongnie <ged@odoo.com>
2023-04-09 08:03:45 +02:00
Abdelouahab (abla) 7e53bd296f [FIX] account: origianl bills with encrypted PDF
To reproduce
============
- Accounting > Vendor Bills > create a vendor bill and upload the pdf (attached on this ticket)
- back to list view, select the created bill and print the original bills a user error is raised

Problem
=======
when trying to add the banner we read the PDF and we found out that it's encrypted so we raise the error

Solution
========
if the PDF is encrypted, we log warning and carry on downloading the original bill.

opw-3221796

closes odoo/odoo#118134

X-original-commit: 900418d9bc7bd260cac67769be77f8e818eed814
Signed-off-by: John Laterre (jol) <jol@odoo.com>
Signed-off-by: abla001 <abla@odoo.com>
2023-04-09 05:46:43 +02:00
Julien Van Roy b9e223c15a [FIX] account_edi_ubl_cii: UBLVersionID should not be present for Bis 3
Tag UBLVersionID should not be present for UBL Bis 3 and its inheriting
formats.

The fonction infering the format from an xml etree needed to be apdated
too, since we can no longer rely on the `UBLVersionID` node for UBL Bis
3 and its inheriting formats. The `CustomizationID` node is used.

opw-3249153

closes odoo/odoo#118125

X-original-commit: 8b1fc42af5471872da4ff0b335d04e769e286628
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Julien Van Roy <juvr@odoo.com>
2023-04-08 17:09:08 +02:00
Denis Ledoux a2acf91958 [IMP] core: models __repr__ should show when ids is wrong
As a developer,
when you craft your records set manually,
and wrongly use the API and set something weird in `ids`,
something else than a tuple of integers,
`repr` should help you to understand you did something wrong.

e.g.

before
```py
In [1]: env['res.partner']._browse(self.env, '(1,)', 'bar')
Out[1]: res.partner(1,)
```

after
```py
In [1]: env['res.partner']._browse(self.env, '(1,)', 'bar')
Out[1]: res.partner'(1,)'
```

We could put an assert in `_browse` to make sure `ids`
is a tuple of integers, but this is considered a non-stable
change, as it will suddenly crashes when you will update
Odoo while it wasn't the case before.

closes odoo/odoo#118119

X-original-commit: f689c4f53fc4663b17c57bd1d704b9ffb9f11f8d
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
2023-04-08 14:38:46 +02:00
tsm-odoo c0ce422935 [FIX] bus: solve indeterministic error in TestWebsocketCaryall
This PR fixes the `15350`runbot issue that was due to the
websocket subscribe not being properly awaited before logging
out.When the log out occurred before the subscribe was received,
the `odoo_ws` variable was `None`.

closes odoo/odoo#118097

X-original-commit: 59af91840c3ed7253c1c3c9dd80a4919ebdee593
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-04-07 21:48:48 +02:00
Habib (ayh) 34149617a3 [FIX] account: broken no content helper
doAction does not convert the action help html to markup resulting in the display of an html string.

To replicate:
- Journal Items List view or Analytic Items
- Click a link to the bank recon widget
- In bank recon widget, search for something that returns no records
- The no content helper displays html string

After this PR:
By using the doActionButton instead, noConentHelper is marked up and displays correctly.

closes odoo/odoo#118093

X-original-commit: 8cedb020f2bcd2115fdaf0fb44abbeb936ced3c0
Related: odoo/enterprise#39531
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Ayob Habib (ayh) <ayh@odoo.com>
2023-04-07 20:44:28 +02:00
Rahul Prajapati 10620c0caf [FIX] base: fix validation for co-model field in ir_field view
The co-model field in `IrField` view is accepting Related Model name
even if it is invalid. And replaces the invalid model name with `_unknown`.
This causes KeyError `display_name` when trying to create or read a record.

To fix that we are adding Validations for the Related Model field when it gets
updated from UI side.

sentry-3933471439

closes odoo/odoo#118052

X-original-commit: e4f7798fd5a5cccd5d385f535fbc21264cb6948b
Signed-off-by: Rémy Voet <ryv@odoo.com>
2023-04-07 19:43:33 +02:00
Mathieu (mano) abd5ea645b [FIX] website_sale: fix wrong ribbon text color
Since Bootstrap 5, bg- classes behave differently. On the website
e-commerce shop the ribbon for the states "Sale, Sold out, Out of stock,
New!" still uses bg- classes therefore having the wrong text color by
default, making it difficult to read.

This commit fixes the default text color by using new bootstrap 5 class
text-bg-* instead of bg-*

task-3096035

closes odoo/odoo#118051

X-original-commit: e6ecb4f72e9610bd5e3f81264c8278fbb7a6d5a3
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2023-04-07 19:43:30 +02:00
Alexandre Kühn d9bb64f1e9 [FIX] mail: show email_from if message has no author
closes odoo/odoo#118038

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-04-07 19:43:28 +02:00
Alexandre Kühn 804d3786e8 [FIX] mail: do not auto-open chat window with odoobot on login
closes odoo/odoo#117978

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-04-07 19:43:25 +02:00
Mathieu Duckerts-Antoine d0b9c092bd [IMP] web: new field service
We move the function loadFields from the view service to a newly created
field service. That service can also be used to load model fields for a
given path (loadPath), i.e. load all model fields for the models
traversed by the given path.
We use loadPath in useModelField and DomainSelector.

closes odoo/odoo#117882

Related: odoo/enterprise#39418
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-04-07 19:43:20 +02:00
Mathieu Duckerts-Antoine 6c5d54e1d9 [IMP] web: cache: new clear and invalidate methods
We introduce two new methods for Cache:
    - a method "clear" that can be used to delete a specific path
    - a method "invalidate" that can be used to delete all paths

Part-of: odoo/odoo#117882
2023-04-07 19:43:20 +02:00
Mathieu Duckerts-Antoine 57a04c4aa3 [IMP] web: utils: zip and zipWith functions
We introduce in utils/arrays.js, the two classical functions zip and zipWith.

Part-of: odoo/odoo#117882
2023-04-07 19:43:19 +02:00
Louis (loco) abda2bb60a [FIX] website_blog: adjust the width of the border when inside column
Steps to reproduce the bug:
- Go on the blog of the website.
- Edit.
- In the "Customize" section, apply the "List" "Layout" and activate
the "Sidebar".

-> The sidebar appears at the bottom of the page instead of on the
side.

The situation looks like this:
```html
<div class="container">
    <div class="row">
        <div class="col"></div>
        <div class="border-end"></div>
        <div class="col-12"></div>
    </div>
</div>
```
The bug comes from the fact that the `div` with the `border-end` class
is inside a `row` class. Due to that, a bootstrap 5 css rule applies
and puts the `width` of the `div.border-end` element to `100%`. Because
the element tries to fill the entire width of the `div.row`, it is put
at the bottom of the page as well as its following elements (in this
case, the sidebar). This bug is fixed by removing the `div.border-end`
element.

opw-3217775

closes odoo/odoo#117849

X-original-commit: 9d8b895b934e5b0986c932837fd043cf847a8992
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2023-04-07 19:43:16 +02:00
zel-odoo 21b6ef38cf [IMP] mail: activity visual update
1. always show the name of the assignee.
2. replace the icon with avatar
3. bold the time info.

task-3142628

closes odoo/odoo#116349

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-04-07 19:43:13 +02:00
Maryam Kia 7248178d19 [IMP] mail: Add message reaction menu
This commit adds a menu to see reaction on a message.
It can be accessed from message options or from long press in mobile.

Task-2641441

closes odoo/odoo#116022

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-04-07 19:43:10 +02:00
Bastien (bvdn) f50c7c16ab [REF] web: add a hook on Many2XAutocomplete orm promise
closes odoo/odoo#115943

Related: odoo/enterprise#38027
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-04-07 19:43:02 +02:00
Carlos Carral 0b30d1d266 [CLA] Update Vauxoo's CLA
Incorporate Carlos Carral (carralc) as Vauxoo's contributor.

closes odoo/odoo#118040

X-original-commit: 0472569febd557a9956b196e840dd996309c9f9c
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-04-07 18:44:01 +02:00
Lucas Lefèvre fccbc91cc8 [FIX] spreadsheet_dashboard_account: display unpaid amount absolute value
In the Invoicing dashboard, the upper-left most scorecard displays the total
invoiced amount.
The baseline "X unpaid" is wrong. It was displaying the difference between
the key value (total invoiced amount) and the unpaid amount.
That means if not a single invoice was paid (everything unpaid), it would
display "0 unpaid". That obviously not correct.

opw-3248761

closes odoo/odoo#118030

X-original-commit: 2b795ee59ef063b5b7298382008ebd61c51de36e
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2023-04-07 17:46:42 +02:00
Touati Djamel (otd) 79f85ab312 [FIX] purchase: add the supplier list of the product in each company
Steps to reproduce the bug:
- Create a storable product “P1”
1:/
- Select the company A
- Create a purchase order:
    - product: “P1”
    - vendor: “V1”
    - confirm the PO
The vendor “V1” is added to the supplier list of “P1”

2:/
- Select the company B
- Create a purchase order:
    - product: “P1”
    - vendor: “V2”
    - confirm the PO

Problem:
The vendor “V2” is added to the list but “V1” is deleted from the list
in company A

The “seller_ids” field is in the “product.template” model, we try to
modify it in the “_add_supplier_to_product” function from the
“product_id”(product.product) field which inherits from the
“product.Template” model:
https://github.com/odoo/odoo/blob/3b88ed5ea458a37ee4d440f83bab45bd0fb13845/addons/purchase/models/purchase.py#L531-L532

So the function “inverse_related” will be called, in which the function
“__set__” will be triggered: In the values, the command for the create
will be added but the command for the set will be added as well while
it shouldn't. So in the `write_real` function a search will be done to
get all `product.supplierinfo` with the same product_tmpl_id:

https://github.com/odoo/odoo/blob/36544651f2049bcf18777091dbf02c9631b33243/odoo/fields.py#L4415-L4417

but as we are in sudo, those of company “A” will also be recovered, so
they will be unlinked since they are not in the command.set

opw-3251941

closes odoo/odoo#117985

X-original-commit: 78f803f3c1963711e2a5541f913f030da4f06fb7
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Djamel Touati (otd) <otd@odoo.com>
2023-04-07 17:46:39 +02:00
bosaeed 1d81c2fb8c [CLA] add signature for bosaeed
add signature CLA for bosaeed

closes odoo/odoo#117893

X-original-commit: 07396fd40157c2b020472e05a80acd4a67e9efe8
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-04-07 16:40:53 +02:00
Pratik Awasthi 28b093e6b6 [IMP] project: test onboarding tour for project
This will improve the testing of the onboarding tour
 - earlier when we change the class and don't update the class in the tour it goes unnoticed
 - to prevent failure of the tour we called onboarding tour from python to test the flow
 - Because it helps users to understand the flow so we can let the tour fail

task-3235684

closes odoo/odoo#115672

Related: odoo/enterprise#38333
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-04-07 16:40:48 +02:00
Bastien (bvdn) 0c2060eab9 [IMP] project, web: sort burndown chart legend
Before this commit:

- The burndown chart displayed the stage in order of the data fetching which wasn't logical especial for a chart that supposed to represent the evolution of the tasks in the project
- When sorting all/my tasks by stage, It was possible to select any project in any quickcreate of the stages which didn't make much sense

After this commit:

The burndown chart legend is now ordered according to the stage sequence (previously was ordered randomly by comming data)
Modified the burndownChartModel, simply makes a RPC to get the stages and sequences then sort the legend elements (one by stage) with it
Display only the projects which uses the stage in the dropdown menu of the task kanban quickcreate (when grouping by stage)

When sorting by all/my tasks by stage, the quickcreate now only display the projects which contains the stage selected
done by adding a domain in the quickcreate form
(shoutout to LTU and AUON who actually found the fix)

Task-3067445

closes odoo/odoo#105694

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-04-07 15:31:52 +02:00
tsm-odoo d2e5969e3e [FIX] mail: indeterministic guest tour
This PR fixes the `19916` issue on the `test_mail_channel_public_page_as_guest`
test.

The messaging service subscribes to bus notifications before it is fully
initialized. This test is composed of two tours. In the first one, the guest joins
the channel and receives the "guest has joined the channel" message. Then, the second
tour starts and the local storage is cleared. Since the local storage has been cleared,
the guest receives this message again, potentially before messaging has been initialized
which leads to a `channel_pin` rpc. This RPC fails with `SessionExpired` error and the tour
is stuck and eventually, fails.

closes odoo/odoo#118000

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-04-07 11:37:30 +02:00
Xavier Morel 8932d447aa [FIX] core: table_kind semantics (incorrect classification of toast as temp)
17c4f47b0a updated table_kind to return
`pg_class.relkind`, however the semantics are *not* the same, and that
was ignored: `relkind = t` is for *toast* tables, not *temporary*
tables. In `pg_class` the temporary-ness is instead signaled by
`relpersistence` (which applies to both tables and sequences), temp
(and unlogged) tables have `relkind = r`. `existing_tables` does that
correctly, possibly unwittingly.

While at it, upgrade `table_kind` to return an `enum` (whose value is
the old discriminant).

closes odoo/odoo#117444

Related: odoo/enterprise#39185
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2023-04-07 11:37:25 +02:00
Joseph Caburnay 762aefc455 [REM] point_of_sale,pos_restaurant: remove marked up headers
Currently, the "receipt_header" and "receipt_footer" text fields of the
'pos.config' model can be used to render html in the receipt using qweb by
putting `<!DOCTYPE QWEB` as the first line of the text. In the previous
versions, it is converted to a markup so it is rendered as html in the
receipt. Rendering it as markup poses security issues therefore we are
removing this feature in this commit.

After this commit, we now only allow regular string to be added in the
receipt and footer headers.

If user wants to introduce custom markup in the headers, they can
properly do so by extending the `OrderReceipt` template from other addons.

closes odoo/odoo#117336

Task-id: 3256208
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
2023-04-07 11:37:20 +02:00
Abderraouf Ghrissi (abgh) bd6428515a [IMP] project: Improve UX
Before this commit:
- project tasks view: when we group by company, milestone, customer,
worksheet template or any m2o field, the KanbanColumnQuickCreate is
displayed for that field, we can add a new one or apply examples,
but thoses examples are stages.
That doesn't make any sens to add them in a project or milestone context,
then if you add a new column manually or via the apply examples, it will
disappear once refreshing the page.
To summarize, stage is the only valid group by that can have the
KanbanColumnQuickCreate.

- all tasks view: same problem as the previous point + quick creating
is also not valid for group by stage as we are in all tasks context that
are linked to different project and the examples are mainly applied for a specific
project, if you try to add manually or via the examples and refresh they are going
to disappear as they are not linked to any project.

- my tasks view, same problem for previous point + quick creating when grouping
by personal stage is valid but apply examples  button is displayed to show stages and if
used, it will not add anything, so it should be hidden.

- Project Kanban examples stages are all created as not folded.
Some users don't know that 'folded in kanban' option is available on the stages,
and that tasks in a folded stage are considered as done.

After this commit:
- project tasks: KanbanColumnQuickCreate and applying examples are only available
when grouping by stage.

- all tasks: KanbanColumnQuickCreate is not available.

- my tasks: KanbanColumnQuickCreate is only available when grouping by personal stages.
applying examples is not available.

- some example stages are folded..

task-3092925

closes odoo/odoo#107633

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-04-07 11:37:03 +02:00