Commit Graph
160006 Commits
Author SHA1 Message Date
Antoine (ande) ce0e1c095d [FIX] mrp_account: no currency in analytics
Current behaviour:
Cannot add a Work Order to a Manufacturing Order
if the analytic account linked to the MO doesn't
have an associated company.

Expected behaviour:
Should be able to add a WO to a MO even
if the linked analytic account doesn't have
an associated company.

Steps to reproduce:
1. Activate analytic accounts
2. Activate work orders
3. Create an analytic account without company associated
4. Create a Manufacturing Order
5. In miscellaneous, link the analytic account
6. Try to add a WO line
7. Error log

Reason for the problem:
When trying to add a WO line, if the MO has been linked
to an analytic account, it checks for the currency in
the company in the analytic account, which was not
existent, since the company didn't exist.

Fix:
When trying to access currency, if the company in the analytic
account doesn't exist, it defaults to the company in the WO.

opw-3210708

closes odoo/odoo#117708

X-original-commit: f0d8f5e82e62e0bcfc05e25dac2504f8f07537f4
Signed-off-by: Demany Antoine (ande) <ande@odoo.com>
Signed-off-by: Tiffany Chang <tic@odoo.com>
2023-04-05 09:42:37 +02:00
amdi-odoo 31715f5b87 [IMP] web: clarify "Archive" modals
Removing the "Oks" from the "Archive" modals to
clarify what confirming the action will do.

Also fixing a wording error in the form controller
archive modal.

Task-3241064

closes odoo/odoo#117588

X-original-commit: 61c8b51a3d77e913acacead6379cd686693f86ce
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-04-05 09:42:32 +02:00
Jurgen (jugj) 7f49268019 [IMP] hr_contract : Make the contract view the same accross all apps
task - 3061227

closes odoo/odoo#116704

Related: odoo/enterprise#38833
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-04-05 09:42:29 +02:00
Odoo's Mergebot b6002975f2 [IMP] website_event: consider country and city while searching events
Currently, website users/visitors are not able to search the events based on
where they happen.

This PR improves the behavior by allowing the users/visitors to type the
city/country name in the search box and returns the events that are happening
in the country or city that matches the search term. To allow this, we have
utilized the `search_extra` search option and searching the matching events with
`sudo` because public users can not access the `address_search` m2o of the event.

This PR also shows the event location name when users search for the event.
Also add the "_getFieldsNames" method to easily override this method to
add a field name from another model.

Note that searching with sudo is just to add event ids in the domain. The final
result will be returned with not sudoed environment and so the record rules are
always respected.

TaskId-2791031

closes odoo/odoo#89796

Signed-off-by: Stéphane Debauche (std) <std@odoo.com>
2023-04-05 09:42:24 +02:00
Mahamadasif Ansari eb132590db [IMP] website{_event}: show event location in search bar
Currently, if a user searches for an event based on a location name, the
location name is not displayed.

This commit shows the event location name when users search for the event.
Also add the "_getFieldsNames" method to easily override this method to
add a field name from another model.

task-2791031

Part-of: odoo/odoo#89796
2023-04-05 09:42:23 +02:00
D J 50d6f18250 [IMP] website_event: consider address while searching events
Currently, website users/visitors are not able to search the events based on
where they happen.

This commit improves the behavior by allowing the users/visitors to type the
city/country name in the search box and returns the events that are happening
in the country or city that matches the search term. To allow this, we have
utilized the search_extra search option and searching the matching events
with sudo because public users can not access the address_search m2o of the
event. Apart from that, this commit also adds the ability to address_search
the event based on location (name) of the address on address_search.

Note that searching with sudo is just to add event ids in the domain. The final
result will be returned with non sudoed environment and so the record rules are
always respected.

TaskId-2791031

Part-of: odoo/odoo#89796
2023-04-05 09:42:23 +02:00
flvr-odoo 3cfcb204ed [FIX] web : isolate new tab to external ressources
This commit is a security reinforcement.

Before this commit:

ir.action.act_url was able to handle and redirect to protocols like
file:, javascript:, date: ... This is unnecessary in the context of
this action. It could potentially be abused by a poorly written custom
module

It also would not isolate the landing page in case of a new tabs.
It means that chrome would still consider the tab to be from the
previous domain in case no url was passed and js was executed.
This would allow the newly open tab to still make query's to the
referrer using the referrer's cookie. While not stricly necessary
if we already prevent url that start with "javascript:", it is a
nice to have.

After this commit:

New tabs are not able to access referrer informations or execute
javascript interacting with the referrer. Also, it is now impossible
to redirect to protocols other than http and https directly from
the ir.action.act_url

Test update:

All new tabs are required to have the "noreferrer" argument

Tested an example of an unsupported protocol.

closes odoo/odoo#117687

X-original-commit: a020072da17e32fca0bbe6ed02b1afaeec8e8a02
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-04-05 08:38:30 +02:00
Hansun (hale) 0d4a89ac9d [FIX] mrp: broken UI of Work Center Setting
1. Install [Manufacturing] on Apps
2. On [Settings]>[Manufacturing]
- toggle on [Work Orders], [Quality] & [Quality Worksheet]
3. Go to Manufacturing
- Work Centers (a.k.a WC) Overview should be visible
- if no W.C. by default, add from [Configuration]>[Work Centers]
4. click on the 3 dots at the top right corner of each WC card

Issue: ugly layout
Fix: restore the style

affected branch: saas-16.1 up to master

closes odoo/odoo#117695

X-original-commit: 40a5d29d9b5b4070269175a83866837c7725b8c9
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Lee, Hansun (hale) <hale@odoo.com>
2023-04-04 21:11:45 +02:00
FraB af4ad5772c [CLA] add signature for FrancescoBallerini
closes odoo/odoo#117720

X-original-commit: 8b98ad868f7810d9fdcf26a355a646b3eed53410
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-04-04 20:08:47 +02:00
Sébastien Theys 672f2b2383 [FIX] mail: return guests in /who command
closes odoo/odoo#117717

X-original-commit: e4d832804b6d317a4dedc6a11e2e62c1721a6190
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-04-04 20:08:44 +02:00
Pooja Kantesariya 7b5b26d8a0 [FIX] mail: return guests in /help command
task-2917720

X-original-commit: 320501875e027ae8fbb46d1c8b892d2f189595b7
Part-of: odoo/odoo#117717
2023-04-04 20:08:44 +02:00
Odoo's Mergebot 4b98911916 [MERGE] test_mail(_*): cleanup class usage
Remove 'TestMailCommon' and 'TestSMSCommont' test classes. Use MailCommon
or SMSCommon when possible to ease move of test addons and inheritance.

'TestMailCommon' was useless and is replaced by the 'MailCommon' class defined
directly in Mail addon, easing inheritance and imports.

'TestSMSCommon' was useless and is replaced by the 'SMSCommon' class defined
directly in SMS addon, easing inheritance and imports. See community PR for
more details.

Task-3263512

closes odoo/odoo#117606

Related: odoo/enterprise#39291
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-04-04 20:08:38 +02:00
Thibault Delavallée c7af3b7c09 [REF] test_mail_sms: simplify SMS-based test class usage
'TestSMSCommon' was useless and is replaced by the 'SMSCommon' class defined
directly in SMS addon, easing inheritance and imports. See community PR for
more details.

Task-3263512

Part-of: odoo/odoo#117606
2023-04-04 20:08:37 +02:00
Thibault Delavallée c9848bbf58 [REF] test_mail(_*): simplify Mail-based test class usage
'TestMailCommon' was useless and is replaced by the 'MailCommon' class defined
directly in Mail addon, easing inheritance and imports.

Task-3263512

Part-of: odoo/odoo#117606
2023-04-04 20:08:37 +02:00
Martin Trigaux 826fee8b02 [FIX] mail_group: reference new MailCommon class
TestMailCommon was an empty class in test_mail kept for backward compatibility
while MailCommon is in mail. This is needed as we plan to move test_mail in
another addons path in order to isolate test addons.

Task-3263512

Part-of: odoo/odoo#117606
2023-04-04 20:08:36 +02:00
Touati Djamel (otd) 0ad863ba24 [FIX] stock: display forecast for the current warehouse
Steps to reproduce the bug:
- Create two warehouses in the same company
- Create a storable product “P1”:
    - Add 10 units in each warehouse
- Click on the forecasted widget

Problem:
The quantity on hand is 20 instead of 10 while the current warehouse set
in the filter is "WH1", because the warehouse has not
been added in the context, so we calculate all the quantities available
in all the locations of the current company:
https://github.com/odoo/odoo/blob/c05815ae6b8bd7afceb760395af09c707c89c485/addons/stock/report/stock_forecasted.py#L164
https://github.com/odoo/odoo/blob/3ee5d7a0fbccae5f742e1aba8d3d24f8bab3cbdd/addons/stock/models/product.py#L275

for the filter, the default one is added in the context here:
https://github.com/odoo/odoo/blob/16.0/addons/stock/static/src/stock_forecasted/forecasted_warehouse_filter.js#L19

opw-3194872

closes odoo/odoo#115255

X-original-commit: 10ea5d0cfb08b733322d0274e191a20f7f53cd78
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-04-04 20:08:33 +02:00
Adesh Jolhe c039064ca4 [FIX] account: prevent traceback while reload template
When a new tax is created and click on Reload button of fiscal Localization it
will generate traceback.

Steps to Produce:-
- Create a new Tax.
- Then open the setting of invoicing and Click on reload Button which is located
  inside fiscal Localization.
- IndexError will be generated.

Cause:-
- When a user creates a tax from UI `get_external_id` return an empty string and
we try to `spilt` an empty string and get 1 index value and because of that
it gives traceback.

Fix:-
- Check xml_id is not null before trying to spilt and get the value from xml_id.

Sentry-4042986115

closes odoo/odoo#117709

X-original-commit: 3b86115d5f989c3b35579e75c67d94d120ef6be2
Signed-off-by: William André (wan) <wan@odoo.com>
2023-04-04 19:11:55 +02:00
Romain Derie ef8dc0a167 [IMP] website: keep showing dropzone message even if content inside
There is a very nice and clear system that helps the user to figure
what are the available area to drop content inside, and what will they
do: are they shared between products, or product specific etc.

The issue is that once you have dropped a snippet inside, that helper
message is not shown anymore, but it's still not obvious which area is
used for what, actually you have no clue which one is which, especially
if you come back on the page later: at best remember there were 2
separate zones but you don't especially remember which one is which.

Keeping the message helps in that regard without any negative impact.

Note that making the message appear when there are already a snippet
will work out of the box in the sense that the message will be
duplicated and shown twice: one at the very bottom of the area and one
at the very top.

Note that there is 5 cases to consider here:
- Empty website.page in edit mode (no drag & drop)
- Empty website.page with drag & drop
- Non empty website.page with drag & drop
- Empty product description with drag & drop
- Non empty product description with drag & drop

This commit also takes care of fixing the text color issue where the
"editor message" could not be read because of text color too close to
bg color.

task-3160416

closes odoo/odoo#117705

X-original-commit: 9236628b0d037a0a9444d13a30d813f4a8413377
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2023-04-04 19:11:53 +02:00
Sébastien Theys b7dd007396 [FIX] mail: allow click on suggested recipient input
closes odoo/odoo#117681

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-04-04 19:11:48 +02:00
Sébastien Theys 4e33fc4816 [FIX] mail: add recipients as follower when sending message
Part-of: odoo/odoo#117681
2023-04-04 19:11:47 +02:00
Audric Onockx (auon) 00b6a18225 [FIX] project,hr_timesheet: fix performance issue in task kanban
It takes a too long to load project task kanban view.
And ~85% of this time is spent in `ProjectTask._get_all_subtasks`,
which is a recursive method returning the children of the children,
while any, of the task, for each task, just to display their count.

We replaced this recursive method with a SQL request,
which is way faster. Also, it can be called in batch.
It will return a dict {id: subtask_ids}.

task-3246085

closes odoo/odoo#117624

X-original-commit: 3b55936fed9ebdcfb8190437ad66c3e42c26b01c
Related: odoo/enterprise#39295
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-04-04 18:07:14 +02:00
rolandojduartem 89d6b78871 [CLA] Update Vauxoo's CLA adding rolandojduartem
Incorporate Rolando Duarte (rolandojduartem) as Vauxoo's contributor.

I confirm I have signed the CLA and read the PR guidelines at:
www.odoo.com/submit-pr

closes odoo/odoo#117655

X-original-commit: 4c633bbec60ac9dcbbe2c3364f95d15f8a3ab0f5
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-04-04 17:03:41 +02:00
Thomas Lefebvre (thle) 7151c117e4 [FIX] calendar: correct description of 'free' option
On a calendar event, the 'free' option does not hide the element.
So that the user doesn't expect this behavior,
you have to modify its description.

opw-3047999

closes odoo/odoo#117654

X-original-commit: ecc850f4df1151a793d36fdd58621665a6e1a414
Signed-off-by: Arnaud Joset <arj@odoo.com>
Signed-off-by: Lefebvre Thomas (thle) <thle@odoo.com>
2023-04-04 17:03:37 +02:00
Benjamin Vray 0edd492dcb [FIX] web_editor: fix lost rgba colors after shape flipping
In some themes, RGBA colors were used to define the colors of shapes.
However, adding this color in the parameters of the background image URL
of a "shape" element was not valid. This caused several bugs, such as
the colorpicker not finding the colors of the shape used, as well as the
colors of the shape being lost after the application of a "flip".

Steps to reproduce the bug:

- In website edit mode, open the homepage page of the Nano theme.
- Drag and drop a Banner snippet onto the page.
- Bug: The colorpicker does not recognize the four colors used by the
shape.
- Click on one of the two "Flip" buttons.
- Bug: The colors of the shape are lost.

task-2824607

closes odoo/odoo#117652

X-original-commit: 0661aa0bbb4751866cfcc9a320a8eff473ba0442
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2023-04-04 17:03:35 +02:00
Xavier ALT 739aa00a49 [FIX] point_of_sale: fix loading of chart of account with default pos.config
With `generic_coa` now installed by default, the default pos.config are
automatically assigned a sale and an invoice journal, and trying to install
afterward a country specific chart template result in the following error:

2023-04-03 16:29:27,642 9344 ERROR _testdb-162820-testdb-162820-point-of-sale odoo.sql_db: bad query: DELETE FROM "account_journal" WHERE id IN (1, 2, 3, 8, 4, 6, 9, 7, 5, 10)
ERROR: update or delete on table "account_journal" violates foreign key constraint "pos_config_journal_id_fkey" on table "pos_config"
DETAIL:  Key (id)=(10) is still referenced from table "pos_config".

Traceback (most recent call last):
  ...
  File "/home/odoo/src/odoo/saas-16.2/odoo/modules/loading.py", line 481, in load_modules
    processed_modules += load_marked_modules(env, graph,
  File "/home/odoo/src/odoo/saas-16.2/odoo/modules/loading.py", line 365, in load_marked_modules
    loaded, processed = load_module_graph(
  File "/home/odoo/src/odoo/saas-16.2/odoo/modules/loading.py", line 297, in load_module_graph
    module.write({'state': 'installed', 'latest_version': ver})
  File "/home/odoo/src/odoo/saas-16.2/addons/account/models/ir_module.py", line 67, in write
    self.env['account.chart.template'].try_loading(
  File "/home/odoo/src/odoo/saas-16.2/addons/account/models/chart_template.py", line 141, in try_loading
    return self._load(template_code, company, install_demo)
  File "/home/odoo/src/odoo/saas-16.2/addons/point_of_sale/models/chart_template.py", line 16, in _load
    result = super()._load(template_code, company, install_demo)
  File "/home/odoo/src/odoo/saas-16.2/addons/account/models/chart_template.py", line 176, in _load
    self.env[model].search([('company_id', '=', company.id)]).with_context({MODULE_UNINSTALL_FLAG: True}).unlink()
  File "/home/odoo/src/odoo/saas-16.2/addons/account/models/account_journal.py", line 524, in unlink
    ret = super(AccountJournal, self).unlink()
  File "/home/odoo/src/odoo/saas-16.2/addons/mail/models/mail_thread.py", line 326, in unlink
    res = super(MailThread, self).unlink()
  File "/home/odoo/src/odoo/saas-16.2/addons/mail/models/mail_activity_mixin.py", line 246, in unlink
    result = super(MailActivityMixin, self).unlink()
  File "/home/odoo/src/odoo/saas-16.2/odoo/models.py", line 3635, in unlink
    cr.execute(query, (sub_ids,))
  File "/home/odoo/src/odoo/saas-16.2/odoo/sql_db.py", line 311, in execute
    res = self._obj.execute(query, params)
psycopg2.errors.ForeignKeyViolation: update or delete on table "account_journal" violates foreign key constraint "pos_config_journal_id_fkey" on table "pos_config"
DETAIL:  Key (id)=(10) is still referenced from table "pos_config".

This commit also reset the journals on the existing pos.config so that
`post_install_pos_localisation()` assign the right ones once the new
chart template is loaded.

We also only reset payment methods and journals in case we load a new
chart of accounts (this fix the "reload" of the CoA when PoS is
installed)

closes odoo/odoo#117651

X-original-commit: 7a91c57f6bb47e40f0486ca06f0e1916b98db1f4
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Xavier Alt (xal) <xal@odoo.com>
2023-04-04 17:03:32 +02:00
Renaud Thiry f91782279a [IMP] crm: preserve action context for lost lead
Prior to this all of the context of the action called in the list
action was overriden. We now combine the action context with the
environment context.

This allows keeping the context from the XML action that defines the modal sizing.

task-3235932

closes odoo/odoo#116287

Related: odoo/upgrade#4493
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2023-04-04 17:03:28 +02:00
Alexandre Kühn 7b21be10fd [FIX] mail: handle notification for guests not users
Some code in handle notification wrongly assumes `store.user`
is set, as it reads `user.id`. This is correct when the user
is authenticated as an internal user, but for guests this is
incorrect.

This commit adapt code of handling notifications so that
`store.user` can be undefined for guests.

Fix runbot issue 19978

closes odoo/odoo#117647

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-04-04 16:02:28 +02:00
Alexandre Kühn 24e5b5afcf [FIX] mail: do not console warn when cannot load emoji picker
This happens intentionally on tours that finishes successfully
before the emojis are fully loaded. Notably short tours like
public discuss page show this case.

The console.warn still trigger unhappy runbot. Functionally
the emoji picker shows "Failed to load emoji", so this warning
becomes useless.

Fix runbot issue 20081

closes odoo/odoo#117642

Signed-off-by: Stockbauer Matthieu (tsm) <tsm@odoo.com>
2023-04-04 16:02:25 +02:00
Alexandre Kühn a61ce3491a [FIX] mail: fix public discuss crash on isSelfAuthored
This may happen when receiving a new message without setting
the self persona yet.

Fix runbot issue 19975

closes odoo/odoo#117633

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-04-04 16:02:22 +02:00
pedrambiria 739862d965 [FIX] point_of_sale: handle line breaks in product search
Before this commit: the `product.display_name` field could contain
line breaks, which prevented it from being matched correctly by
regular expressions. This commit fixes the issue by modifying the
`_product_search_string()` function to remove line breaks.

opw-3239830

closes odoo/odoo#117626

X-original-commit: f598903fe06e44a03dc0ea1a20ef2667b42eed08
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
Signed-off-by: Pedram Bi Ria (pebr) <pebr@odoo.com>
2023-04-04 16:02:18 +02:00
Géry Debongnie 44052d58d7 [FIX] web,base: do not display js module errors in some cases
Since saas 16.1, we added a more visible error information box when the
module system cannot find some dependencies, or if there is an error in
the JS code. This error box is very useful to understand a lot of
typical devlopment issues.  However, it was occasionally displayed in
production code.

However, we sometimes observe that the error information box was
displayed, because the request to load an assets failed with a 404.

It is unclear in which circumstance this can happen, but it seems that
the following elements are involved:

- the user has an open tab with odoo, kept open for a while
- some js code is changed on the server, which causes the previous
assets to be deleted
- the user reload its open tabs, so the browser will load the /web page
from disk, which points to the old assets files
- then it will try to load all assets, with a 404 on one of the script
- the error information box is displayed

This commit intercepts the loading error and stop displaying the error
information box, which is basically the same behaviour as 16.0 and
before. We could force a reload in that case, but it seems dangerous,
since in case of errors, it could easily lead to an infinite loop.

closes odoo/odoo#117625

X-original-commit: 0a44b5b1e008b591a716efd26217c7db7360c37b
Signed-off-by: Géry Debongnie <ged@odoo.com>
2023-04-04 16:02:12 +02:00
Denis Ledoux 70a8758760 [FIX] core: convert_file and xml_import must ingore env.lang
Before revision 5bf1207c8c
a new environment was created for each call
at `xml_import` or `convert_file`,
with `odoo.api.Environment(cr, SUPERUSER_ID, {})`
meaning the context was empty, meaning the lang was never set

Now that we pass from end to end the environment,
the caller of `xml_import` or `convert_file`
passes his own environment, therefore propagating
his `context` variables, therefore potentially passing
a lang in the context.

Therefore, since this change, the lang of the user
is taken into account when calling `xml_import`/`convert_file`,
and it updates the translation term rather than the source term
for translated fields.

This could be an actual/intended valid behavior,
this needs to be discussed,
but currently the places where `xml_import`/`convert_file`
is called expects to update the source term,
not the translated term.
See for reference
https://github.com/odoo/odoo/pull/116780#issuecomment-1486506663

Therefore, as this is an unexpected/unintended change of behavior
of the refactor 5bf1207c8c,
and as code blocks calling `xml_import`/`convert_file` have not
been adapted, we prefer to play it safe
and revert the behavior to what is was.

This is very possible other context keys will need to be dropped,
but one of the desired change of the refactor was to be
able to pass keys in the context, currently we prefer
to not wipe the environment context and just blacklist the one we
do not want to propagate, such as the lang.
If other related issues arise, we will then re-consider.

closes odoo/odoo#117621

X-original-commit: 44fa57e52fbc853b7756a96c73c94baa469c99ca
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
2023-04-04 16:02:09 +02:00
pedrambiria 24b068645a [FIX] pos_loyalty: not showing error without orderline
Steps to reproduce the error:
 1. Open a Pos
 2. Without any orderline, click on `+-` button
 3. You will see an error

issue https://github.com/odoo/odoo/issues/115642

closes odoo/odoo#117620

X-original-commit: a588bb7fbe9ad6accaa12ebf1ce59767284c4f12
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
Signed-off-by: Pedram Bi Ria (pebr) <pebr@odoo.com>
2023-04-04 16:02:06 +02:00
Michael (mcm) 77e825cab2 [REF] web: replace odoo module by native one
This commit converts almost all odoo module by native module.
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#117456

Signed-off-by: Géry Debongnie <ged@odoo.com>
2023-04-04 16:01:57 +02:00
Tommy (tong) ad063d60b9 [IMP] l10n_jp: update chart of account
- Japan chart of account template updates
- Translation updates
- Use better code names for tax report

task-3127047

closes odoo/odoo#115175

X-original-commit: 7a914a0e1d519767b3caeb8e38eeb2c930fce4fc
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
2023-04-04 16:01:48 +02:00
Pierre Rousseau 70a2a62ec9 [FIX] spreadsheet: correctly format date/datetime values of list
Before this revision, a date/datetime field was displayed in UTC instead
of in the user timezone.
This revision fixes this issue.

opw 3127742

closes odoo/odoo#117623

X-original-commit: c07b450594f7e3e1f093d0b5a5a083f915f75310
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
Signed-off-by: Pierre Rousseau (pro) <pro@odoo.com>
2023-04-04 14:46:09 +02:00
william-andre a226e2317b [FIX] l10n_be: do not override demo accounts from other modules
Other modules (i.e. `hr_payroll_account`) might also be creating demo
accounts, do not prevent that.

closes odoo/odoo#117551

Related: odoo/enterprise#39256
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
2023-04-04 14:45:57 +02:00
Adrien Guilliams (adgu) 168762c838 [IMP] pos, pos_restaurant: adaptation of change of quantity for orderlines
In the previous state of the point_of_sale module, when the l10n_fr_pos_cert
module was used, we were too restrictive leading to an unusable flow by some
clients. We adapt the modules here so that the FR module is more usable
by the clients while still respecting the law.

closes odoo/odoo#113754

Signed-off-by: Heinz Robin (rhe) <rhe@odoo.com>
2023-04-04 14:45:54 +02:00
Hubert Van de Walle (huvw) 3f962d3754 [FIX] website_slides: reponsive design
Steps to reproduce
==================

- Go to elearning
- On the "Trees, Wood and Gardens" card, click on "view course"
- Click on Main Trees Categories

The slide name is outside the view
Also, the XP badge is cropped

opw-3225999

closes odoo/odoo#117595

X-original-commit: 1d5a92a04ba8e52099715cf782cecbb2c73feb14
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
2023-04-04 13:35:50 +02:00
Filip Brcic f9ebed0f38 [CLA] signature for brcha
closes odoo/odoo#117575

X-original-commit: b5acd987554181d76ddb16b7966193ef591e1c97
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-04-04 13:35:45 +02:00
Abderraouf Ghrissi (abgh) a75cf43c9f [FIX] project: display project in read-only when portal user is not a collaborator
Before this commit:
- A portal user cannot access the project if he's not a
follower but a public user can do that and it doesn't
make sense for portal users to have less access than public users.

- Technically the problem was that we call _check_project_sharing_access
with the portal user instead of sudo, so when trying to access
self.collaborator_ids, an exception is raised saying that
the portal user cannot access to project fields.

After this commit:
- Portal users can access the project in read-only when they are not
followers.
- Technically, we preferred searching over just adding self.sudo()
to get the result directly in one query for a better performance.

task-3205644

closes odoo/odoo#117549

X-original-commit: f51685213c2c10a54e4d31f42d20a4bc7f4b17cc
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-04-04 13:35:42 +02:00
Michele a7659ed228 [IMP] doc: add cla for stesiconsultingsrl
closes odoo/odoo#117547

X-original-commit: 5516cff9811d6d5e327c9d71d273b55133253446
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-04-04 13:35:40 +02:00
Andro Gvivradze 46be6f583b [IMP] website_slides: improve quiz ux/ui
This commit improves ux/ui by adding the slide
description on top of a quiz and offering links to additional
resources if the user gets questions wrong.

task-3246366

closes odoo/odoo#117530

X-original-commit: a551f956f05bf7b6782e04a95351bf2d0a0a6610
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-04-04 13:35:32 +02:00
Chenyun Yang 0420239770 [FIX] spreadsheet: borders around header and total row
This commit fixes the problem of invisible borders when pivots and lists are
inserted. Now around headers and the total row, black borders are added.

task 3103403

closes odoo/odoo#117493

Related: odoo/enterprise#39218
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2023-04-04 13:35:22 +02:00
Michael (mcm) 8e3854e2ac [FIX] auth_totp: fix totp tours
This commit fixes the totp tours which fail on a step in
the profile dialog. The step searches for an element
".o_dialog_container" that is removed since commit
e51112e0df7f5e05d3cdf2c01d236c6bbbf123a6

closes odoo/odoo#117451

Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2023-04-04 13:35:18 +02:00
Jorge Pinna Puissant 067bcac533 [REF] web: kanban record quick create
The aim of this commit is to simplify the RelationalModel by moving
Kanban's specific quick create record functions to the Kanban View.

Before this commit, when asking to create a new record using the quick
create on a kanban view, a new virtual record was created by the
DynamicRecordList and added to the DynamicGroupList on the
RelationalModel. A complex mechanism was used to be sure that only one
virtual record is created between all DynamicGroupLists. When the record
was save, the new record (in form view style) was modified to a kanban
style (to do this, the record's activeFields were modified to be
compatible with the kanban card).

Now, the virtual record is created on the Kanban View, in a more simple
way, the kanban renderer knows in which group there is a quick create,
and only in that one the form renderer of the quick create record card
is shown (not need of complex mechanism to have only one quick create
between all groups). After the save, we simply call an existing function
to add the new record to the group using the record's ID (not need of a
complex mechanism to modify the record to a kanban style).

part-of task-id 3179751

closes odoo/odoo#117449

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-04-04 13:35:15 +02:00
Mylyna Hy bafa668555 [FIX] website_sale_stock: translate restock email
Problem:
The email created by _send_availability_email is not translated correctly.
The body is always sent in English
and the subject will always use the current language of the database.

Example:
Partner A's language = Spanish
Current database language = "French"

The body of the email sent to Partner A will be in English and
the subject of the email sent will be in French and
the field attributes of the products will be in English.

Solution:
Pass in the partner's language into the self's context and the product's context.
This fix will translate the entire email uniformly according to the context's language.

opw-3207979

closes odoo/odoo#117375

X-original-commit: 8777f86adc3ad382b6948461781fb72b1b068944
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-04-04 13:35:12 +02:00
Joseph Caburnay 40ac299c1d [REF] point_of_sale,*: remove use of legacyEnv in popups
*: l10n_fr_pos_cert, pos_sale_product_configurator

This is a continuation of the effort of making pos addons independent
from legacy web modules. In this commit, the popups are now completely
independent from the legacy environment. `env.pos` inside each popup
is no longer pointing to the instance of `PosGlobalState` (`globalState`).
To access the `globalState` inside each popup, we have to read it from
the `pos` service (via the `usePos` hook) which is done in this commit.

closes odoo/odoo#116307

Related: odoo/enterprise#39271
Signed-off-by: Samuel Degueldre <sad@odoo.com>
2023-04-04 13:35:06 +02:00
Jinane Maksoud 66a99f4743 [FIX] account: fix stat button computation when multiple analytic accounts exist
The first problem when multiple analytics accounts exist is the
sql query, it is generated with less placeholders than the actual
parameters.
The second problem is the getter from the collected data dict, it
is assuming there is only a single account.

closes odoo/odoo#115189

X-original-commit: 8da76614c58ea1989694a5af3ee623640db126dd
Related: odoo/enterprise#38146
Signed-off-by: William André (wan) <wan@odoo.com>
2023-04-04 13:35:03 +02:00
Vincent Larcin a116225e18 [IMP] hr_timesheet,project: take away Marc Demo's admin rights
Since 16.0, the demo user Marc Demo has gained admin access to all the apps.
To facilitate testing access rights, this commit restores his access rights
as they were before for the Services apps.

Enterprise: https://github.com/odoo/enterprise/pull/38055

Task-3229247

closes odoo/odoo#115026

Related: odoo/enterprise#38055
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-04-04 13:34:54 +02:00