Commit Graph
145381 Commits
Author SHA1 Message Date
Kartik Chavda e3f3ea347b [FIX] analytic: add seach view for cost/revenue stat button
Purpose of this commit change search view that display in
act_window view that open by cost/revenue stat button in
analytic account form view.It displays the search view that
come from timesheet, it should be display search view of
analytic items.

So, In this commit add analytic items search view in
action of cost/revenue stat button.

Task Id: 2622912

closes odoo/odoo#76999

X-original-commit: 8a6145ca809168080a1a2162f2d6da98b6e5c7e2
Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
2021-09-22 19:25:44 +00:00
Nicolas Bayet 5b7151e0ef [FIX] web_editor: wait editor loading in tests
In a undeterministic circumnstance, the editor has not enough
time to be loaded after `testUtils.nextTick()`.

By using a 100ms timeout instead, it will give more time for
the editor to be loaded and therfore reduce the risk of a false
negative to appear.

closes odoo/odoo#76980

X-original-commit: 190ddf08b8bb6c4750f1d0ad1c57f19b936794de
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2021-09-22 18:13:49 +00:00
oco-odoo 1bdfdae121 [IMP] l10n_ch: fix typo in UserError
closes odoo/odoo#76975

X-original-commit: 704fc0fa9e0d8eecd2f15a7f36f1320a9ed2e717
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2021-09-22 15:08:59 +00:00
Barad Mahendra bda930b602 [FIX] project: fix the visibility of assign to me button
Currently the 'Assign to me' button is never visible on form view
of the task.

So in this commit visible the button only when user_ids is Fasle on
task.

closes odoo/odoo#76967

Taskid: 2642872
Closes: #76312
X-original-commit: 6f96898160bb219427d5c5b23195ef8563e732a8
Related: odoo/enterprise#21072
Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
2021-09-22 15:08:55 +00:00
Barad Mahendra 6b8429f4c2 [FIX] sale_timesheet: fix the upsell activity creation
Currently the 'upsell' activity generated when the delivered quantity
of the SOL is >= 100% instead of > 100%

so in this commit, if SOL is > 100% then only the upsell activity should
be generated. also fix the upsell_threshold value to fix the test case.

Taskid: 2642872
Closes: #76312
X-original-commit: ee9082b9d93b4f98a9a13694fb3b803cd7d1ac6c
Part-of: odoo/odoo#76967
2021-09-22 15:08:55 +00:00
Mitul Shah 2119232747 [FIX] survey: properly display filter label
While seeing the survey results, user can filter the answers. When the
filter is applied, '>' character is added between each letter of the
filter label. This string formatting operation was needed prior v14 for
the answers of matrix type question. But with survey the refactoring
(see commit[1]), we already get the formatted answers from controller,
so we don't have to manage it from the xml template.

This commit removes string operation from xml template responsible for adding
'>' (greater than) character between each letter of the filter label and thus
displays the label properly.

commit[1] - https://github.com/odoo/odoo/commit/351a4439b3a28d3832cd9bf17840dc9feaad7231

Task-2638463

closes odoo/odoo#76968

X-original-commit: ccd0970d51a05378ac3cd7a8d86321a5cbbe98ae
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-09-22 13:47:12 +00:00
Goffin Simon 9550789604 [FIX] account, mail: Using alias with journals in multi comapnies
Steps to reproduce the bug:

- Let's consider two companies A, B
- Let's consider two contact with the same email E, C1 in A and  C2 in B
- Let's create an alias AL for the vendor bill journal of B
- Send a vendor bill VB from E to AL

Bug:

A new bill is created in B with C1 as partner instead of C2
So an access error was raised when trying to open the bill in company B

opw:2495870

closes odoo/odoo#76963

X-original-commit: 1a58be583629af80af00f288dc5925c3940be1ef
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-09-22 13:47:08 +00:00
Munaf Khan b56025dff2 [IMP] website_event_track: add quick create form view for tracks
Currently, while creating tracks on the fly from an event, we can
simply set the name, which is not enough, we should also be able
to set date, and display proper placeholder for the name field.

This commit add a new quick create form view for the track kanban
view, so that user can simply choose the track name and date and
can simply add tracks on the fly.

Note that it is mandatory to set event on the track. If we are
within an event, the default event is already available in context
so we don't display it while adding a track within an event.

But we are not within an event, we simply display 'event_id' on
quick create card so that use can select an event and create
track on the fly.

TaskId-2635390

closes odoo/odoo#76250

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-09-22 13:47:04 +00:00
Lucas Perais (lpe) 56dda82a5f [REF] web, *: legacy: lazy loading of legacy reporting views
Since commit 0134495ba5 the reporting
views pivot, graph, cohort are written in full new framework.

Some applications still need the legacy ones, so this commit just implements
the lazy loading of those views.

In stock, report_stock_forecasted has been adapted in order to avoid having
a GraphView override: we now modify the canvas' height in pure JS.

*: board, stock

closes odoo/odoo#76931

Related: odoo/enterprise#21054
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-09-22 12:22:46 +00:00
Kamen Zhekov 63209575ee [IMP] website_sale: add choice for default sort type in website editor
It is impossible to define the default order in which to display
products in the shop page. The order can be changed through the
"Sort By" dropdown, but it is reset every time the page is refreshed.

There is now an option in the website editor that allows setting a
default sorting method that is applied when displaying products.
It is overridden by the setting from the "Sort By" dropdown if
there is a different sorting method selected.

task-2616245

closes odoo/odoo#76512

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-09-22 12:22:40 +00:00
Arnaud Joset dd6cc7445e [FIX] calendar: display start and end of events without datetimerange widget
Before this commit, the datetime range widget was used to set these values in for calendar form view.
Unfortunately, some glitches appeared in mobile view. This commit, revert this change because fixing the mobile view for this specific case was not trivial.
Datetime range widget works in mobile for regular form view (not launched from the calendar view).

closes odoo/odoo#76086

Taskid: 2635704
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2021-09-22 12:22:35 +00:00
nounoubensebiaandAurélien Warnon e2d11fa279 [IMP] [website_]crm: post crm.leads merge message using a full template
Use a template for merge post messages and clean how fields are displayed,
notably by fixing the display format, and the field order.

Indeed, previously posted lead merge message contained all fields in an
alphabetical order, even ones that had empty values, which is not very user
friendly in terms of display.

Now, the displayed fields are determined and ordered by sections, which greatly
improves understanding the various information.
Please note however, that it has the downside of not including all fields
anymore.

The merged leads information are included in a "read more/read less" enabled
block using the "data-o-mail-quote" feature to get a nice rendering and avoid
cluttering the Odoo chatter UI.

Within the sent mail however, the full text is directly visible when viewing
through a mail client.

Task-2451164

closes odoo/odoo#75946

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Co-authored-by: Aurélien Warnon <awa@odoo.com>
2021-09-22 12:22:32 +00:00
William Braeckman e7097fd6e1 [FIX] web: fix calendar quick create removing everything
When an event is currently being inspected by the user, i.e. the popover
is displayed and the user clicks somewhere else on the calendar, we do
not wish to open the quick create menu, only close the popover.
However the code that handled that case was not adapted to the regular
calendar view, only the one from the calendar app and would remove all
data currently displayed.

This commit fixes that issue.

TaskId-2652219

closes odoo/odoo#76939

X-original-commit: ea5c7b643be8c902b03a2ae175c051c479e45ed9
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2021-09-22 10:58:55 +00:00
Christopher Ormaza 8eee999a01 [IMP] Add corporate cla opa-consulting
closes odoo/odoo#76924

X-original-commit: 1cbed312720a75d58717199f3def8a41713f5a46
Signed-off-by: Josse Colpaert <jco@openerp.com>
2021-09-22 08:15:55 +00:00
Tiffany Chang (tic) 6cc2c8d901 [FIX] stock: ensure safe UoM change for done smls
We fix 2 related UoM issues:

1. Fix quant inconsistency from changing the UoM of Done
   stock.move.lines

Steps to reproduce:
- Enable "Storage Locations" setting
- Create a new "Storable Product" and create a receipt for 1 unit of it
- Validate the 1 unit receieved
- Open "Detailed Operations" of the move and change the stock.move.line
  UoM to dozen.

Expected result: 13 on hand
Actual result: 1 on hand

To fix this:
- prevent users from editing the UoM after the picking is
  done (i.e. unless adding a new stock.move.line and not saving).
- update the write on done logic so stock.move.line UoM changes are
  considering and will update the quant correctly (in case of RPC or
  direct write).

2. Prevent changing UoM of Done stock.move to prevent inconsistent field
values within stock.move and confusion for users

Steps to reproduce:
- Complete a picking (incoming is easiest to see) with a new product
  (i.e. 0 qty) having 1 unit done.
- Unlock picking and add a new stock.move with 1 unit done and save.
- Edit the just added stock.move's UoM from Units to Dozen.
- Check the quantity on hand / Done qty of stock.move after leaving and
  returning to form.

Expected result: 13 On Hand
Actual Result: 2 On Hand and the "Done" qty in the picking is 0.0083
  (i.e. 1/12 of a dozen)

To fix this:
- prevent users from editing the UoM after the picking is done (unless
  adding a new stock.move and not saving)
- if a Done stock.move UoM is uodated, a UserError occurs because there
  is no straightforward way to ensure the quant is updated correctly
  since is handled within the move.line (i.e. has no visibility to its
  move's uom change => changing only UoM and not qty done will result in
  no quant update)

closes odoo/odoo#76916

X-original-commit: 72a1e7d75f0b13f23def912c8bcc758c58438b04
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Signed-off-by: Tiffany Chang <tic@odoo.com>
2021-09-22 08:15:51 +00:00
Ivan Yelizariev 68b652b5b6 [FIX] core: regenerate user groups view after forcing demo data
Since
https://github.com/odoo/odoo/commit/8a3e1a0ccdad25ba5b4b99639bdaeb9073a27f1f,
`_update_user_groups_view` is called only once per module installation. However,
module installation is not the only scenario when data files are loaded and
hence we need to add the method call.

---

opw-2602541

closes odoo/odoo#76869

X-original-commit: a46d20c89c24a4e60faef09cf8ad7721bd29d6cc
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2021-09-22 08:15:47 +00:00
Julien Mougenot 6427086210 [FIX] web: Repair web in single module
Since https://github.com/odoo/odoo/commit/344d82ca251bbba8f54e85d6b881cc92f8823f13 :

The `web_editor` module is no longer installed by default in default
databases since it now depends on the `mail` module. This caused a few
bugs inherent to the base modules to surface:

- in the `mock_server` file: performRpc was synchronous and threw
uncaught errors;
- in the webclient scss: the body did not have an assigned with and
height of 100%, which caused some positioning issues.

This commit fixes these problems in the base modules.

closes odoo/odoo#76921

X-original-commit: bc1b14ff8a7d412fbbc5987ed57e2d4cdd00a0a0
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-09-22 06:51:09 +00:00
Kevin Baptiste 491a54ca48 [FIX] hr_holidays: propagate context from Time Off dashboard
The context was not propagated hence it was not showing the allocations
of the current companies.

closes odoo/odoo#76919

Taskid: 2652888
X-original-commit: 487621429a8e4a71be2b7054e485288130e474b6
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2021-09-22 06:51:05 +00:00
Aaron Bohy e9961dc5a5 [FIX] web: graph: keep pending filters when toggling a measure
Consider the following scenario on a slow network in a graph view:
 - add a filter (triggers a reload)
 - toggle a measure (triggers another reload, before the first one
   completes)

Before this commit, the new searchParams coming from the first
reload were lost, even though they were still displayed in the
search view.

This commit ensures that we keep the last searchParams when
reloading the graph view.

closes odoo/odoo#76918

X-original-commit: 1719de73099eca0b765237cb47caf44813157b94
Related: odoo/enterprise#21046
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-09-22 06:50:55 +00:00
Aaron Bohy 5f19d41d32 [REF] web,project: graph: use renderer props convention
By convention, views pass the model instance in props to the
renderer. Moreover, when the renderer needs to perform actions
outside of its natural scope, those callbacks have to be given in
props as well, s.t. the renderer can call them directly (instead
of triggering an event, listened by the parent).

This commit also adds the props validation on the PivotRenderer.

X-original-commit: 0ca538eba780aacca44ab4e34c56d8eed22fa333
Part-of: odoo/odoo#76918
2021-09-22 06:50:54 +00:00
Aaron Bohy cc05e24791 [REF] web: graph and pivot: rework view props
This commit simplifies the props of the GraphView. We only keep
props that are necessary (e.g. for the dashboard view), and for the
others, we find the information in the arch. That way, there's only
one way to do, which is easier to understand.

We also remove the "display" and "title" props from pivot as they
weren't used.

X-original-commit: c26953ef15b0846282bbeccd7cf0de25e1a47392
Part-of: odoo/odoo#76918
2021-09-22 06:50:54 +00:00
Adrien Widart 252ae7f4be [FIX] base: use context_today as default rate name
Suppose the TZ is UTC+12 and a user creates a new rate in the morning:
the date will be the day before

The default date should consider the user's timezone.

OPW-2590972

closes odoo/odoo#76914

X-original-commit: 94eb684d83c3afb717f1a548ef02b4449e0db959
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
Signed-off-by: Adrien Widart <adwid@users.noreply.github.com>
2021-09-22 06:50:48 +00:00
Xavier BOL (xbo) edd25f3261 [IMP] project: add tour js for project sharing feature
This commit adds an unit test to start a tour with an internal user
connected to test the project sharing feature. Another test is
created to start a tour with a portal user connected to test the
project sharing feature.

part of task-2633229

closes odoo/odoo#76906

X-original-commit: db7825efb1b5cc052ecc795f9c81db5f3f58a5d3
Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
2021-09-22 05:41:16 +00:00
William Braeckman bccd62a54d [FIX] hr_org_chart: remove res_id from the widget's action
On the employee view there is a possibility to open a list of all the
employees managed by the current employee however the action contains
the key 'res_id' which makes both create and open action invalid. (the
manager is opened either way instead of the right action)

The action now also has a proper name instead of displaying `unnamed`,
aswell as containing the context necessary to default the manager as
expected. and the triple dots displayed when there are too many
employees has been replaced with `See All`.

TaskId-2648133

closes odoo/odoo#76905

X-original-commit: 2fe87bcfbf0c9b1f08cc2c38f0881de3738af537
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Signed-off-by: William Braeckman (wbr) <Williambraecky@users.noreply.github.com>
2021-09-21 16:08:47 +00:00
william-andre 33ae8b76f5 [IMP] account: allow batch deletion of account.sequence.mixin
In order to prevent holes in the sequence, a constraint is checking that
only the last number of the chain is removed.

This commit extends that to a batch of records by checking that:
* the last number of the sequence is part of the batch
* the batch is sequential (there are no holes in it)

closes odoo/odoo#76870

X-original-commit: 7883900e3b615c632dab2b02c792f6d8c1045a15
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2021-09-21 11:09:57 +00:00
qsm-odoo d03903ab00 [FIX] website: properly translate mega menu template labels
Missing translations introduced with [1].

[1]: https://github.com/odoo/odoo/commit/a57cda43c3b097b49baa2fc2a394494bbb01419a

closes odoo/odoo#76883

X-original-commit: f810703ae51a41a273d749e88309d1cf8caaca71
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-09-21 09:38:26 +00:00
Sébastien Mottet (oms) 59e4bb6526 [FIX] website, web_editor: fix wrong indentation and comment
Fix wrong indentation and comment introduced by commit https://github.com/odoo/odoo/commit/a57cda43c3b097b49baa2fc2a394494bbb01419a

task-2636545

X-original-commit: 0a589389860a9c1f18eae5cbd90a1ba3e85f5dfc
Part-of: odoo/odoo#76883
2021-09-21 09:38:26 +00:00
qsm-odoo c276545de7 [FIX] web_editor: properly await all async parts for onRemove/onClone
Even though onRemove and onClone cannot be async themselves (yet?), it
is called via a trigger_up of `call_for_each_child_snippet` so that each
part of the snippet being removed / cloned has their onRemove / onClone
called. Doing that way, some SnippetEditor instances may have to be
created and it can be an async operation... the problem is that our code
was only awaiting the first of those instanciations instead of all of
them.

closes odoo/odoo#76881

X-original-commit: ea2a40afb96147e83c897a0376e187d8c957e66a
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-09-21 09:38:21 +00:00
Younn Olivier 3b598dbdf8 [FIX] web_editor: correctly init "open in new window" link option
The "Open in new window" checkbox was always initialized as false, even
if the link would open in a new window - both in the link tools and
dialog.

task-2172311

closes odoo/odoo#76880

X-original-commit: 52b034e8844336cc424e3126b843ec084fd7118e
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-09-21 09:38:17 +00:00
Denis Ledoux e1dee01068 [FIX] l10n_in: expected singleton error when posting multiple moves
```
ceback (most recent call last):
  File "/home/odoo/src/odoo/14.0/odoo/service/server.py", line 1199, in preload_registries
    registry = Registry.new(dbname, update_module=update_module)
  File "/home/odoo/src/odoo/14.0/odoo/modules/registry.py", line 89, in new
    odoo.modules.load_modules(registry._db, force_demo, status, update_module)
  File "/home/odoo/src/odoo/14.0/odoo/modules/loading.py", line 474, in load_modules
    migrations.migrate_module(package, 'end')
  File "/home/odoo/src/odoo/14.0/odoo/modules/migration.py", line 180, in migrate_module
    migrate(self.cr, installed_version)
  File "/tmp/tmpgxy7cwao/migrations/account/saas~13.4.1.1/end-09-payment-refactoring.py", line 618, in migrate
    util.iter_browse(env["account.move"].with_context(**ctx), ids, chunk_size=1024).action_post()
  File "/tmp/tmpgxy7cwao/migrations/util/orm.py", line 169, in caller
    return [getattr(chnk, attr)(*args, **kwargs) for chnk in chain(it, self._end())]
  File "/tmp/tmpgxy7cwao/migrations/util/orm.py", line 169, in <listcomp>
    return [getattr(chnk, attr)(*args, **kwargs) for chnk in chain(it, self._end())]
  File "/home/odoo/src/odoo/14.0/addons/sale/models/account_move.py", line 14, in action_post
    res = super(AccountMove, self).action_post()
  File "/home/odoo/src/odoo/14.0/addons/account/models/account_move.py", line 2649, in action_post
    self._post(soft=False)
  File "/home/odoo/src/odoo/14.0/addons/sale/models/account_invoice.py", line 81, in _post
    posted = super()._post(soft)
  File "/home/odoo/src/odoo/14.0/addons/purchase_stock/models/account_invoice.py", line 188, in _post
    return super()._post(soft)
  File "/home/odoo/src/odoo/14.0/addons/l10n_in/models/account_invoice.py", line 108, in _post
    elif self.journal_id.type == 'purchase':
  File "/home/odoo/src/odoo/14.0/odoo/fields.py", line 963, in __get__
    record.ensure_one()
  File "/home/odoo/src/odoo/14.0/odoo/models.py", line 4993, in ensure_one
    raise ValueError("Expected singleton: %s" % self)
ValueError: Expected singleton: account.journal(4, 3, 59, 99, 18, 11, 8, 77, 10, 72, 21, 66, 92, 88, 74)
```

upg-30689

closes odoo/odoo#76875

X-original-commit: 4d3774a4d8692293cc89a3b505811172556e2d03
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
2021-09-21 09:38:13 +00:00
Arnold Moyaux f7290fc9fe [FIX] stock: duplicate picking on push rules
Usecase:
- 2 warehouses 1 and 2
- Create a route with a rule from inter-warehouse to WH2
- Create a picking type for WH1 for stock to inter-warehouse
- Create a planned transfer with 2 stock.move in the wH1 new picking
type
-* Go back to inventory overview
- Click on process on the picking type WH1 -> inter-warehouse
-* Process the picking created before
- Go to WH2 delivery

You see 2 pickings for each stock.move despite they share the same
data (procurement group, source and dest locations)
If you don't do the steps bewteen *, you only have 1 picking.

It's due to the context of the views that is propagate to the
new picking created by push rules.

opw-2533718

closes odoo/odoo#76821

X-original-commit: 60c7722eedc1835a8aca9d6bbd75f5ab66ea4b59
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2021-09-21 09:38:02 +00:00
Joren Van Onder b717423f09 [FIX] payment_authorize: charge tokens via the sandbox when disabled
It's possible for a payment.acquirer to charge tokens when it's
disabled via the subscription app (_cron_recurring_create_invoice()).

Before this patch it would use the production endpoint. It's
unexpected and can cause accidental charges in a database meant for
testing.

opw-2637659

closes odoo/odoo#76820

X-original-commit: 7316413261ca8294ceffa212d6b5079b6e35daf6
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2021-09-21 09:37:58 +00:00
William Henrotin 0419f27f38 [FIX] stock_picking_batch: wrong widget
The widget many2onebutton doesn't exist anymore. As the web client
fallbacked on the default many2one widget. The behavior was the intended
one but with a warning in the logs. This commit uses the proper widget
to avoid the unintentional warning

closes odoo/odoo#76882

X-original-commit: 4547cbff9f2850fcfcd536a574fd5c29c44ecdb5
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
2021-09-21 08:08:51 +00:00
Philippe Wauthy 52e9668e99 [FIX] fleet: clean service type demo data
Description of the issue/feature this PR addresses:
In fleet, the demo data for service type have two entries for summer tires
The service types are sorted by alphabetical orders instead of id

Current behavior before PR:
The summer tires service type is appearing twice in the demo data
The service types are sorted by id

Desired behavior after PR is merged:
The summer tires service type is unique in the list
The services types are sorted by alphabetical order

task-2641484

closes odoo/odoo#76403

Signed-off-by: Kevin Baptiste <kba@odoo.com>
2021-09-21 08:08:47 +00:00
Benoit Socias 6fbd03ed21 [FIX] website: avoid error when no template installed for dynamic snip.
Since [1] if neither website_blog nor website_sale was installed, upon
selecting a dynamic snippet, an error was raised.
It therefore prevented deleting the unusable snippet.

After this commit the error is avoided by coping with the fact that it
is possible that no template is installed.

[1] https://github.com/odoo/odoo/commit/ef531afe39f9a586f4eac381651aa32eaec8b098

Related to #75662

task-2651978

closes odoo/odoo#76877

X-original-commit: b6df1fed57c16c489e57ba0dea09a321200b11d2
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Signed-off-by: Benoit Socias (bso) <bso-odoo@users.noreply.github.com>
2021-09-21 06:44:11 +00:00
Francois (fge) 2de7eb29b0 [IMP] web: move and convert profiling_sweb_view
closes odoo/odoo#76871

X-original-commit: bee8953c3d8b7179bf1f526baa593825f09bfd97
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-09-20 20:14:07 +00:00
Francois (fge) 97733eae50 [FIX] web: fix Edit ControlPanelView
The debug item "Edit ControlPanelView" is only available if there is
a control panel in the current view.

closes odoo/odoo#76862

X-original-commit: 68cb8d23e2011ed359fc54f3deed6c84290d5c3b
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-09-20 20:14:03 +00:00
Francois (fge) 421a676156 [FIX] web: use makeDeferred from web
closes odoo/odoo#76848

X-original-commit: 2777d187cd72967a1137f851c6c9cc0f9172dcee
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-09-20 20:13:57 +00:00
Julien Mougenot a94914d775 [FIX] web_tour: Give correct access when reading modules
Tours are automatically disabled when the demo data are enabled on
at least one module. To ensure that, when giving the session_info
object, we read on the `ir.module.module` model to check whether some
of them have demo data.

Before this commit, this check only relied on the user's `is_admin`
flag, which does not give read access on the `ir.module.module` model.

Now, a `sudo` ensures that any admin user can read on the model.

closes odoo/odoo#76864

X-original-commit: 3a8d30d51a392f42d83d24b5f865f77b05205b50
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2021-09-20 19:04:06 +00:00
Nasreddin Boulif (bon) 89b5a55f31 [FIX] sale_quotation_builder: Update template header message
Update header message to match changes in the following commit:
https://github.com/odoo/odoo/commit/8ba6e3b0c3bf856308b4d58158392d0e99d2b58e

opw-2631125

closes odoo/odoo#76863

X-original-commit: 65250fdef59dc07a5d34302c50b060d45936d234
Signed-off-by: bon-odoo <nboulif@users.noreply.github.com>
2021-09-20 19:04:02 +00:00
Hed Shefer 6b37071eed [CLA] corporate signature for Layline Tech
closes odoo/odoo#76861

X-original-commit: 95c99be67989703454b48f42d27798f7de011336
Signed-off-by: Josse Colpaert <jco@openerp.com>
2021-09-20 19:03:57 +00:00
Xavier MorelandRaphael Collet 97a1568db3 [FIX] base: completely wipe context in res.partner's display_name
Because the field is stored it doesn't make much sense to have a
context dependency and that can cause significant issues. However
`name_get` looks pretty innocent and it's not necessarily insane to
have a context dependency *there* (or even in the average
`display_name` as they're normally non-stored computed fields).

`_compute_display_name` previously blanked (blacklisted) just a few
context values, but doing the opposite is probably the better idea.

See also: odoo/odoo#68946

OPW-2453956
Task 2500978

closes odoo/odoo#76469

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
Co-authored-by: Raphael Collet <rco@odoo.com>
2021-09-20 19:03:53 +00:00
Didier (did) d81a539362 [FIX] mail: add missing notifition when leaving a channel
This will close the RTC session when a user leave a channel with a RTC session
open.

task-2646095

closes odoo/odoo#76849

X-original-commit: c5d2a17888d79e4b37cd8f9a690132b9cd556fbd
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-09-20 17:52:51 +00:00
Tom De Caluwé 2083e59281 [FIX] website: open the editor from a translated homepage
A bug currently prevents opening the editor from a translated version
of the homepage, for example /nl_BE (it works for other paths though).
Before this commit the url computed by _goToMasterPage was:

/website/lang/default?r=/nl_BE?enable_editor=1&rde=2

which will first redirect to the default language and then again to the
translated version. The bug was introduced by commit
119d9437e0 which chose an url without a
trailing slash as the canonical one for the homepage.

However, the bug can already be reproduced in 13.0 since commit
269aa59411  if the user manually
navigates to /nl_BE instead of /nl_BE/. No flows are redirecting to the
url without trailing slash in our codebase before 14.4, so the problem
is rarely seen.

When clicking on the "Edit in master" button, _goToMasterPage now
correctly removes the language code and redirects to the master
version, solving the problem.

task-2622270

closes odoo/odoo#76837

X-original-commit: 141c15d5dae137df11a73146ff4c991add7a2ff3
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-09-20 16:40:09 +00:00
Nathan Marotte (nama) 8dede2cb20 [FIX] mrp stock_picking : count to do and filter not matching
Issue: The button # To Process in mrp/views/stock_picking_views.xml
 at line 33 uses the domain state confirmed, draft, planned, or progress

But the default filter, which is called "to do", show those 4 states +
to_close (in mrp/views/mrp_production_views.xml line 309)

Side-Note: Issue also present in 14.0, so starting the bug fix from
here. 12.0 doesn't seem to have a to_close state but the count and
filter domain also do not match

Steps to reproduce in 14.0
 On Runbot, go to Inventory click on the "# to process" button on a
 Manufacturing card.
- Choose any MO and create a work order. On this work order, click
"Start", then "Done".
- The MO is now in the "To Close" stage.
- Go back to Inventory Overview. The number to process has gone down by
 one.
- Click on the "# to process" button, you will see that the "To Close"
 MO appears in the list but is not counted by the button.
(written by dido)

For 13.0 I haven't been able to find steps to reproduce but the button
has not changed between the two versions

opw-2636447

closes odoo/odoo#76834

X-original-commit: 7f3b65bb42444ccb02bfb80931b52a94924fcdb0
Signed-off-by: Rémy Voet <ryv-odoo@users.noreply.github.com>
2021-09-20 16:40:05 +00:00
Josse Colpaert 5d4e0210a0 [FW][ADD] l10n_es_edi_sii: send invoices to sii for G417 Llevanza de los libros
This module sends the taxes information (mostly VAT) of the
vendor bills and customer invoices to the SII.  It is called
Procedimiento G417 - IVA. Llevanza de libros registro.  It is
required for every company with a turnover of +6M€ and others can
already make use of it.  The invoices are automatically
sent after validation.

How the information is sent to the SII depends on the
configuration that is put in the taxes.  The taxes
that were in the chart template (l10n_es) are automatically
configured to have the right type.  It is possible however
that extra taxes need to be created for certain exempt/no sujeta reasons.

You need to configure your certificate and the tax agency.

closes odoo/odoo#76615

Task: 2492978
Forward-port-of: https://github.com/odoo/odoo/pull/70302
X-original-commit: ff4cb972b6a8b61caeac13d8eb5c6a4d43a62ccb
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2021-09-20 16:39:58 +00:00
sofiagvaladze 2341087469 [IMP] hr_holidays: Validity date on dashboard
After this commit, in the Time Off dashboard, the user can see the validity
period of the available days in case if the related allocation
has a validity end.

If the time off has more than one allocation, we display the validity of the closest one.

task - 2636403

closes odoo/odoo#76257

Signed-off-by: Kevin Baptiste <kba@odoo.com>
2021-09-20 16:39:54 +00:00
Xavier Morel 5e81361f80 [FIX] *: opt parent_path fields out of unaccent
closes odoo/odoo#76436

Related: odoo/enterprise#20822
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2021-09-20 12:53:01 +00:00
Xavier Morel b8da632e6e [IMP] core, base: allow disabling unaccent on a per-field basis
For searches, Odoo uses `unaccent` if it's available. On some
technical fields this is completely unnecessary and precludes the use
of indexes.

This PR provides:

* an opt-out (`unaccent = False`) on `String` and `Text` fields
* a warning if `unaccent` is enabled on *parent_path* fields as their
  performance can be rather critical and not using the index is quite
  an issue (note: the check that `parent_path` fields have been moved
  outside of the check for their existence as we want to check that
  the field is declared and correctly configured in all cases,
  probably)

Task 2627454

Part-of: odoo/odoo#76436
2021-09-20 12:53:01 +00:00
Xavier Morel b043d9fa64 [IMP] core, website: add psycopg2.sql support to get_unaccent_wrapper
`website` added its own sql-compatible version of
`get_unaccent_wrapper` in order to use `psycopg2.sql` for safety.

That is very sad.

Add a condition in the "standard" unaccent wrapper which checks
whether the input type is a `Composable`, and in that case return an
`SQL`. This increases the cost of the wrapper a tad but probably not
to a really sensible amount.

Task 2634851

Part-of: odoo/odoo#76436
2021-09-20 12:53:00 +00:00