Commit Graph
145015 Commits
Author SHA1 Message Date
Raphael ColletandWilliam André 71fc2e55f9 [FIX] core: inherited computed fields in onchange
Assume that model A has a computed field G that depends on both fields
F1 and F2.  Assume that model B inherits from A (_inherits).  When G is
computed during an onchange, it must use the form values for all its
dependencies F1 and F2.  Before this commit, only the field triggering
the onchange was assigned on the parent record (see (*) below.)

                      record        parent
    --- ------------+-------------+------------
     initial state  | F1=0, F2=0  | F1=0, F2=0
     assign F1=1    | F1=1, F2=0  | F1=1, F2=0
     assign F2=2    | F1=1, F2=1  | F1=0, F2=1 (*)

The commit also includes another patch: when assigning the parent
record, the ORM determines the dependent records (in this case, the main
record in the onchange).  If the delegate field (many2one from B to A)
has an inverse one2many field, the ORM uses that field to determine
dependent records.  However, in the case of a new record, that field is
not in cache, and its value is determined to be... empty!  The patch
consists in "fixing" the value of that field when we determine the
parent record (when the delegate field is accessed.)

Part-of: odoo/odoo#76042
Co-authored-by: William André <wan@odoo.com>
2021-09-06 18:29:03 +00:00
qsm-odoo 9f33d7dcac [REF] website, web_editor: confine 'NULL' "hack" into website
Commit [1] introduced a "hack" to transform `'NULL'` values into `null`
values in some maps as normally-defined `null` values are automatically
removed (replaced by a fallback). This hack did not need to be general
and in web_editor but can rather be confined to website only for the
user palette maps (especially since the fix made by the parent of this
commit here).

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

closes odoo/odoo#76033

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-09-06 18:28:53 +00:00
qsm-odoo 0ebf956edb [FIX] web_editor, website: allow to define 'null' values in palettes
When [1] was introduced, we prevented to define a 'null' value for a
parameter P in a palette and forced a fallback to a default value X
defined in a "base" palette (value X which could be null). That allowed
to ensure that all final palette values were consistent as always
fallbacking to a "safe" value. However, since then, we introduced [2]
which makes it so a parameter P in the "base" palette is defined to X
(not null) while null is a valid value for P. We could keep the old
system and define that paramater P to a 'null' value in the "base"
palette and add the default X value in all palettes explicitely... but
with this commit we are choosing to be less tolerant (but in fact more
tolerant to custo) and rely on the fact palettes are well defined with
valid values (e.g. not defining a value to null while only X or Y are
allowed for example). Indeed, an exception for the "null" value did not
make much sense: if only X or Y are allowed as value for a parameter P,
setting a random Z value was not prevented, only null was.

[1]: https://github.com/odoo/odoo/commit/05d17089c4a604cb49f1a263b68f39aeffecccda
[2]: https://github.com/odoo/odoo/commit/a48a30f954afcb6ff3a59c4f32b05fd0c2cfcd2b

Part-of: odoo/odoo#76033
2021-09-06 18:28:53 +00:00
qsm-odoo ba499b2973 [REF] website: remove useless calls to o-map-omit (simplify SCSS)
Each time we use/merge the user palettes maps, we called o-map-omit
first... this is in fact useless since they are defined using a call to
the function since the beginning (see [1] for instance)

[1]: https://github.com/odoo/odoo/commit/5c9d313007a4300a05d6b049d7b69c8e61491555#diff-710a97aa2aa056e3cafae7c01c365ee0e1351999fdce197addcc8d19b38a8090R2

Part-of: odoo/odoo#76033
2021-09-06 18:28:52 +00:00
ijas ahammed 7791a49e3e [FIX] link_tracker,test_mail_full: fix traceback while converting links
Currently, when we try to shorten the links from content with help of
`_shorten_links_text` method, it throws traceback if the body(content)
we pass is `False`(might happen when we directly pass a model field of
textual type but the field doesn't have a value yet). It's because
the `re` expects the content to be string / bytestring.

This commit fixes the issue by adding a check in this method, which
will simply return `False` if there's no body.

Task-2628586

closes odoo/odoo#76041

X-original-commit: 3cc5217f1196108d5c7a52202054263a480963b2
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-09-06 16:53:05 +00:00
Thibault Delavallée 8e0632d69a [IMP] mail: add test for portal group log
Purpose is to add some tests for newly added feature logging portal access
granting. Some code is also cleaned to avoid unnecessary computation when
groups are not modified on user model.

closes odoo/odoo#76040

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-09-06 16:53:00 +00:00
Hubert Van de Walle (huvw) 4c3393931c [FIX] l10n_de_skr04: bad debt accounts have wrong type
Bad debt accounts should be of expenses type like the ones in the l10n_de_skr03 addon

opw-2512526

closes odoo/odoo#76039

X-original-commit: 5780e50c0baf7c4b0c2799c38fd532a6772f6a1d
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Hubert Van De Walle <hubvd@users.noreply.github.com>
2021-09-06 16:52:55 +00:00
qsm-odoo 7ffff1d6a3 [FIX] website: restore pricelist snippet options
Commit [1] did a shameless copy-paste of a <template> definition to
define the new masonry snippet options... forgetting to rename the xml
ID. This ends up with two website.s_product_catalog_options views
since [2], the second one overriding the first one.

Thanks to @bvr-odoo for spotting the issue.

[1]: https://github.com/odoo/odoo/commit/c90ab7b6646b603dcd0a49387b5eeba60ce17f59
[2]: https://github.com/odoo/odoo/commit/c90ab7b6646b603dcd0a49387b5eeba60ce17f59#diff-2a1ab0acc5a21712b0cd75d3f8d89815505f8341571bc3ab28c0c07bf549ceb2R253

closes odoo/odoo#76038

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-09-06 16:52:51 +00:00
Louis Baudoux 5d42dfcf33 [FIX] account: fix bank_id from another company
When using module `account_invoice_extract`, it would happen that a
bank account of another company was set on the `account.move`.
This happened when the extract update was done in background via the
cron.
A check on the company of the bank account fixes the issue.

opw-2631833

closes odoo/odoo#76024

X-original-commit: 12559929a551c7f837facb8242333e9b0285950b
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: Louis Baudoux <lobaudoux@users.noreply.github.com>
2021-09-06 15:47:29 +00:00
David Beguin eb2e328275 [FIX-MOV] auth_totp, auth_totp_invite: move 2FA invite mail to new bridge module
Since 29db699e9b, auth_top depends of mail module, which lead to delay auth_totp
installation - not during DB creation anymore. As mail module is not installed
during DB creation, once an app that depends on mail is installed after DB
creation, auth_top module is finally installed and the session token now depends
auth_top module. As a result, the user is automatically logged out.

This commit moves the invite mail (and the dependance to 'mail' module) to a
new bridge module. Auth_totp module will now be reinstalled during DB creation
automatically.

Task-2638538
Parent Task-2487630
COM PR: odoo/odoo#76022
UPG PR: odoo/upgrade#2808

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-09-06 15:47:23 +00:00
Thanh Dodeur e38c91748d [IMP] bus, mail: add bus presence for guest
Part of task-2494829

closes odoo/odoo#76012

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-09-06 15:47:19 +00:00
Thanh Dodeur 53c6ceb909 [FIX] mail: prevents video access traceback after ending a call
Before this commit, it was assumed that the call was still active when
the video permission was granted, this assumption was false and this
commit fixes this issue.

closes odoo/odoo#75999

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-09-06 15:47:14 +00:00
Raphael Collet 0d1908e644 [IMP] base: do partial validation of views
Here is the idea: when creating a view V that inherits another view, and
V only adds elements in the parent view, only the elements added by V
must be validated.  The other elements are not modified, and thus do not
need to be validated again.  However partial validation cannot be done
when modifying an existing view, or when the view replaces elements in
the parent view.  In such cases, the method _check_xml() validates the
whole combined architecture.

The time spent in method _check_xml() to install a database from scratch
with module sale_management went from 2.730s to 2.243s (-18%), and the
number of queries made in the method went from 2283 to 1614 (-29%).

closes odoo/odoo#75796

Related: odoo/enterprise#20633
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2021-09-06 15:47:03 +00:00
Raphael Collet c70c97b127 [IMP] base: refactor NameManager in views
Also speed up view validation by not calling fields_get when possible.
This avoids a call that is usually not necessary for validating a view.
Most of the time, fields can be found on the model itself.  Only
overridden fields_get() with fake fields are actually useful, like the
one of model 'res.users'.

The time spent in method _check_xml() to install a database from scratch with
module sale_management went from 3.510s to 2.730s (-22%), and the number
of queries made in the method went from 2995 to 2283 (-24%).

Part-of: odoo/odoo#75796
2021-09-06 15:47:03 +00:00
Raphael Collet eda3352cdd [IMP] base: refactor domain methods in view validation
The goal is to avoid calls to obscure methods, and make the code more
understandable.

Part-of: odoo/odoo#75796
2021-09-06 15:47:02 +00:00
Raphael Collet 5fad7a55dc [IMP] base: simplify view validation
Besides simple code improvements, remove node_info['attr_model'], and
check domain on specific elements.  Also refactor _validate_attrs.  The
changes have no impact on performance.

Part-of: odoo/odoo#75796
2021-09-06 15:47:02 +00:00
Raphael Collet 46f1912c9b [REF] base: split view validation from postprocessing
This makes it easier to optimize the algorithms for both cases:
postprocessing without validation, and validation without
postprocessing.  Also factor out some common bits like the editability
of nodes.

The net result is a speedup in performance.  The time spent in method
_check_xml() to install a database from scratch with module
sale_management went from 4.955s to 3.578s (-28%), and the number of
queries made in the method went from 3779 to 2995 (-21%).

Part-of: odoo/odoo#75796
2021-09-06 15:47:02 +00:00
Raphael Collet 331b54770e [REF] base: merge view methods _postprocess_view and postprocess, and simplify
This replaces recursive calls by a stack, which makes profiling
flamegraphs much simpler to analyze.

Part-of: odoo/odoo#75796
2021-09-06 15:47:01 +00:00
Raphael Collet 9ae8c1a7c9 [REF] base: split method handle_view_error() into _raise_view_error() and _log_view_warning()
This improves code readability but does not impact performance.

Part-of: odoo/odoo#75796
2021-09-06 15:47:01 +00:00
Raphael Collet 1de6c4e55a [IMP] base: extra optimization for safe_eval() in views
This generalizes an existing optimization and saves a few time to
validate a view.  The time spent in method _check_xml() to install a
database from scratch with module sale_management went from 5.145s to
5.044s (-2%).

Part-of: odoo/odoo#75796
2021-09-06 15:47:00 +00:00
Sébastien Geelen (sge) 8f51e54f30 [FIX] survey: email html field better height
Adjust the height of the HTML field for the email body
On the survey sharing email.

Regression introduced in 607c5ea4 (#75863)

task-2586137

closes odoo/odoo#76016

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2021-09-06 14:36:12 +00:00
Thibault Libioulle 28836f48a4 [MOV] project: move the dependent_ids fields to community
This commit moves the project.task dependent_ids field to the community
project module in order to take advantage of this relation for further
development.

closes odoo/odoo#76011

Related: odoo/enterprise#20623
Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
2021-09-06 14:36:08 +00:00
Victor FeyensandAntoine Vandevenne (anv) fbfd99e680 [REM] adyen_platforms, *: remove Odoo Payments modules
*: extensions of `adyen_platforms`, namely:
   - pos_adyen: remove related code, records, views, ...
   - payment_odoo: remove the module
   - sale_payment_odoo: remove the module

Modules related to Odoo Payments are already all merged since 14.0 and
14.4 (depending on the module). As the plan is to merge the final
version of Odoo Payments in 15.0 soon after the release, we want to
avoid all the complications that inevitably come with huge diffs, model
changes, XMLID collisions, etc. when merging in a stable version. Even
though it is possible to install these modules since 14.0, no
information could be lost during the upgrade since the entry point of
the application has never been activated.

task-2637770

closes odoo/odoo#75852

Related: odoo/upgrade#2804
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Co-authored-by: Antoine Vandevenne (anv)
2021-09-06 14:35:58 +00:00
Odoo's Mergebot 7cc67aecec [MERGE] project: remove project overview and improve analytic account
The project overview is a significant technical debt
as it is a custom qweb view. It is quite limited:
- It is not possible to group the data, to filter on dates,
SOs or Field Service projects.
- Improving this is very difficult and would require weeks
of development that are not worth it.
In any case, all the information provided by the project overview
can be found elsewhere. The stat buttons of the report are basically
duplicates of the ones from the project form view.
Therefore, we are removing this report and its twin,
the Project Costs and Revenues.

In addition, analytic items lack context for the user to understand
what generated a certain cost or revenue:
- there is no link to the source document;
- the entries are not categorized (e.g. it is not easy to understand
if a cost comes from a timesheet cost, a purchase order or an expense);
- the billable type group by works fine for timesheets but then all
the other entries are flagged as Undefined, which is not very helpful;
- there is no option to easily isolate costs from revenues.

task-2545084
See odoo/enterprise#19250
See odoo/upgrade#2706

closes odoo/odoo#72736

Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
2021-09-06 16:35:49 +02:00
Arnaud GonyandMartin Trigaux 2dee29a7dc [IMP] auth_totp: 2FA Trusted Devices
+ Added the 'Trusted Devices' feature
+ Added 'Remember this Device' checkbox on /web/login/totp
+ Added trusted device's OS / browser on Profile > Account Security

Added '2FA Trusted Devices' feature to allow users to remember their
device to bypass the 2FA for the next connections. The trusted devices
are displayed in a 'Trusted Devices' One2Many under the 'Developer API
Keys'. It is possible to revoke all the trusted devices at once with a
special button. It is also possible to revoke one at a time on the
desired one.

Task-id 2523092

closes odoo/odoo#75535

Related: odoo/upgrade#2800
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Co-authored-by: Martin Trigaux <mat@odoo.com>
2021-09-06 13:17:48 +00:00
Adrien Widart 717c178a5e [FIX] account: always set the account move name
On payment creation, when changing twice the payment's journal, if the
first journal already has some lines and the second one doesn't have any
lines, the payment name will be incorrect.

To reproduce the error:
1. (If present, delete all payments)
2. Create and save a payment P01:
    - Journal: Bank
3. Create a second payment P02 (do not save it):
    - Journal: Bank
4. Change P02's payment: Cash
5. Change P02's payment: Bank
6. Save P02

Error: The name of P02 is "CSH1/2021/08/0001", which would be correct if
it was a Cash payment. This error has a consequence: suppose the user
creates a third payment (journal: Bank) and confirms it, its name will
be "CSH1/2021/08/0002" (again, name linked to the incorrect journal)

On step 4, when changing the journal to Cash, since the latter hasn't
any payment, the server returns a new name ("CSH1/2021/08/0001"). Then,
on step 5, when changing back the journal to "Bank", since the latter
already has a payment (P01) and since the current record already has a
name ("CSH1/2021/08/0001"), the server doesn't change it and the
`onchange` response doesn't contain anything. As a result, when saving
the payment from the client side, the wrong name is included in the data
("CSH1/2021/08/0001"). Regarding the consequence: later, when creating
and confirming a third payment, the server will take the name of the
previous one in the same journal and will increment it
("CSH1/2021/08/0002").

OPW-2601668

closes odoo/odoo#75986

X-original-commit: 2024ff2b344d841cf775dbb14da9cc9e1e4c05e9
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Adrien Widart <adwid@users.noreply.github.com>
2021-09-06 12:03:50 +00:00
Hubert Van de Walle (huvw) cc744d1b12 [FIX] web: prevent error if subscriptions.update is undefined
Steps to follow

- Install web_dashboard,website_sale
- Go to the eCommerce Dashboard
- Click on Favorites
- Click on Add to my dashboard
- Go to the Dashboard app
- Click on orders
-> A traceback occurs

Cause of the issue

`this.subscriptions.update` is undefined

opw-2630849

closes odoo/odoo#75984

X-original-commit: 8ab700fc8e51631663443b6c8e81db9669375d82
Signed-off-by: Hubert Van De Walle <hubvd@users.noreply.github.com>
2021-09-06 12:03:46 +00:00
Raphael Collet 3a4d518303 [FIX] core: missing cursor commit in module installation
Right after some module operation (install, uninstall), the framework
looks for some ir.actions.todo to execute.  Currently those actions
cannot be found, because the cursor seems to see the database in the
state it was just before the operation.  Simply add the commit() which
was removed by revision 1595c0ee27.

closes odoo/odoo#75980

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2021-09-06 12:03:42 +00:00
Xavier Morel 759e2c5829 [FIX] core: avoid feeding client invalid XML-RPC documents
The XML-RPC interface has a compatibility shim for binaries as
historically Odoo has returned "binary" data as base64 strings. To
avoid breakages during the Python 3 transition, the shim was
introduced to decode the output binary data (under the assumption that
it'd be ASCII-compatible).

In the case where the data is *not* ascii-compatible, however, it can
generate invalid XML documents: "C0" control codes (with the exception
of tab, LF, and CR) are not valid in XML 1.0 (which XML-RPC is an
application of), however they're perfectly valid string characters and
the standard library's marshaller does not check for them, embedding
them directly in the output document and breaking the client's
decoding.

Work around the issue by replacing such binary data with an empty
string.

While at it, move the bytes shim to the customized marshaller, this
way everything's at the same place and it's not necessary to waste
time trying to understand why the marshaller is just not calling what
it's supposed to call.

Fixes #61919

closes odoo/odoo#75973

Forward-port-of: #75952
Forward-port-of: #74699
X-original-commit: 1a0b3f7
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2021-09-06 12:03:31 +00:00
Xavier-Do 68ea460f3f [IMP] profiling, base: add enable profiling wizard
When using profiling on a fresh test database, it can be tedious to
access settings to enable the feature. This commit adds a wizard to help
enabling profiling without accessing the settings when trying to
activate profiling on a administrator session.

closes odoo/odoo#75967

Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2021-09-06 12:03:27 +00:00
jbw 299ef94bcb [IMP] account: 'Import First Bill' Modal Improvement
Improve the wizard 'import your first bill':  usability + look & feel
    - Removed the PDF viewer interface which was ugly + useless in this context
    - Display an HTML preview instead which is dynamic
        - Current date
        - Company address depending on the Company
        - bill sequence depending on the date

In the modal of upload, detect if there is no hosting domain @false > then remove this third option

PR #75815

Task: 2581377
Related: odoo/upgrade#2806
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2021-09-06 12:03:10 +00:00
Nikunj Ladava 7a1345876a [IMP] mail: enable tracking on important partner fields
This commit enables tracking on vat, parent_id for the contact, because the
impact of changes of these fields are very important.

We also manually track portal status change. To avoid a costly computed
field, this is done through manually logging portal access change as a note
on the user partner's chatter.

VAT field naming is also updated to match view naming used in inherited
views.

TaskID-2586195

closes odoo/odoo#74692

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-09-06 12:03:05 +00:00
Thomas Beckers 50c8eb1f8b [FIX] base: manifest cache is empty using cron
When generating some sale order/invoices pdf automatically (via cron for example), the format of the
invoice is not correct (missing style, background image, etc). The html used to generate these pdf's
misses the asset lines (link to css and js files).

The asset lines are not generated because the manifest cache (http.addons_manifest) is empty if we
render a pdf from a cron.

This commit will generate http.addons_manifest if it's not yet done before.

opw-2581621
opw-2597990
opw-2542242

closes odoo/odoo#75092

X-original-commit: 3ae4db7fc8dbc404984e34ac532426d6bf2c6a0f
Signed-off-by: Julien Castiaux <Julien00859@users.noreply.github.com>
Signed-off-by: ThomasBeckers <ThomasBeckers@users.noreply.github.com>
2021-09-06 10:42:44 +00:00
Thibault Libioulle 741663f9de [FIX] project: fix project update default
Prior to this commit, the case where the update status was not set is
not handled in the STATUS COLOR mapping.

This commit associate a lighten dark color to the unset update status.

See PR : #68899
See task-2393768

PR : #70527

task-2458135
2021-09-06 10:41:14 +02:00
Thibault Libioulle 22cd824772 [FIX] account: fix invoice count
Prior to this commit, the count distinct on move_id called in the read
group was not used correctly.

This commit uses the move_id:count_distinct result of the read_group,
which represents the number of distinct invoices.

See task-2469742

PR : #70527

task-2458135
2021-09-06 10:41:14 +02:00
Cedric Prieels (cpr) c5048ebc6a [IMP] test_main_flows: improve test for project,timesheet
This commit improves the test to handle the changes made in the
project, sale_timesheet modules.

PR : #72736
See odoo/upgrade#2706

task-2545084
2021-09-06 10:41:14 +02:00
Cedric Prieels (cpr) fa88c5fd04 [ADD] account_sale_timesheet: extends project form and panel
This commit adds a bridge module in order to extend the project form
and panel.

PR : #72736
See odoo/upgrade#2706

task-2545084
2021-09-06 10:41:14 +02:00
Cedric Prieels (cpr) 69e34a253f [REM] sale_timesheet_purchase: remove bridge
This commit removes the sale_timesheet_purchase module which was meant
to extend project overview feature.

Since this feature is removed in previous commit, this bridge is now
useless.

PR : #72736
See odoo/upgrade#2706

task-2545084
2021-09-06 10:41:14 +02:00
Cedric Prieels (cpr) 2f77c86275 [IMP] sale_timesheet: remove overview and improve updates
This commit removes the project overview feature and views.
This commit improves the project updates right panel informations and
adds the buttons added in the project form view of this module.

/!\ This commit also improves the timesheet_invoice_type granularity
and precision.

The project overview view lacks of genericity and lacks of clarity
regarding the information to report.

PR : #72736
See odoo/upgrade#2706

task-2545084
2021-09-06 10:41:14 +02:00
Cedric Prieels (cpr) 66bf742c15 [IMP] sale_project{,_account}: extend project form and panel
This commit extends project form and panel in order to add buttons
which allow user to view documents linked to the project analytic
account.
This commit removes the computed field related to project overview
feature which is removed in the following commits.

This commit adds bridge modules in order to handle those extensions.

PR : #72736
See odoo/upgrade#2706

task-2545084
2021-09-06 10:41:14 +02:00
Cedric Prieels (cpr) 2b3e3a44a9 [IMP] project_{account,purchase,hr_expense}: extend form and panel
This commit extends project form and panel in order to add buttons
which allow user to view documents linked to the project analytic
account.

This commit adds bridge modules in order to handle those extensions.

PR : #72736
See odoo/upgrade#2706

task-2545084
2021-09-06 10:41:13 +02:00
Cedric Prieels (cpr) 0df93da823 [IMP] account,analytic: move the track cost setting
This commit moves the Track cost setting from account to analytic in
order to use it in modules depending on analytic.

This setting is based on a group defined in analytic
(analytic.group_analytic_accounting), this group is not moved.

PR : #72736
See odoo/upgrade#2706

task-2545084
2021-09-06 10:41:13 +02:00
Cedric Prieels (cpr) e8d0473b3b [IMP] hr_timesheet: remove activities from project update
This commit removes the activities from the project update default
description.

This commit prepares the removal of the project overview feature and is
a part of the global project update description improvement.

PR : #72736
See odoo/upgrade#2706

task-2545084
2021-09-06 10:41:13 +02:00
Cedric Prieels (cpr) 1ec2b3c0b0 [IMP] project: improve project updates
This commit improves the project updates panel and the data reported
in the update description.

This commit prepares the removal of the project overview feature.

PR : #72736
See odoo/upgrade#2706

task-2545084
2021-09-06 10:41:13 +02:00
Arnold Moyaux fd41a4e7a2 [FIX] stock: deadlock with scheduler
revert part of #4467734b77f19e3c4f4623e878d74c529a135bad

compute_qty_to_order is triggered manualy but not commited,
later in the scheduler task action_assign is call. However
product_id.stock_move_ids.state is a trigger of compute_qty_to_order
so it will be trigger a second time and deadlock itself

Also replace the cursor before procure_orderpoint_confirm,
so the procurement could have access to the data commited
by _compute_qty_to_order

closes odoo/odoo#75972

Signed-off-by: Rémy Voet <ryv-odoo@users.noreply.github.com>
2021-09-06 08:21:45 +00:00
Xavier Morel 972b6bc9d1 [IMP] web: don't check for bad dom after test on failure
Currently, if a test fails there's very high chances the DOM will not
be clean, because qunit doesn't have good cleanup APIs. This means a
test failure will always be prefixed by a dump of the page DOM which
is just confusing and makes it hard to find the actual error.

This change updates the OdooAfterTestHook handler to:

* Receive the `Test` itself, instead of adding more information to the
  synthetic object it currently receives.
* Only show the leftover DOM if the test otherwise succeeded.
* Do the entire reporting via `pushFailure`, rather than having
  duplication between an explicit `console.error` and a test failure.
* Update the QUnit.log handler to
  - not show `undefined`
  - try to improve readability by removing the bracketing and quoting

closes odoo/odoo#75951

Forward-port-of: #75939
X-original-commit: 8bceac8032f48ae77e8a2c0c038f3bc26489e0ac
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2021-09-06 08:21:42 +00:00
Louis Wicket (wil) 401fc7efe9 [IMP] discuss: add 'Start a meeting' feature
- Add a new stand-alone page "WelcomeView"
    - Redirect people who join using an invitation link to the WelcomeView
    - Add microphone/camera preview
    - Allow guests to choose a name from the WelcomeView
- Add "Start a meeting" button to the discuss sidebar
    - Create a new channel on click on the "Start a meeting" button
    - Display ChannelInvitationForm on click on the "Start a meeting"
button
    - Add a new field to `mail.channel` in order to define the display
mode to use for videos (e.g full screen) when joining a meeting

Task 2494829

closes odoo/odoo#75899

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-09-06 08:21:38 +00:00
Adrian Torres 9f11a84d71 [IMP] Order groups by selection declaration order in read_group
Before this commit, calling read_group on a model and grouping by a
selection field would return the groups in alphabetical order, meaning
that if your selection field's options were declared as:

('z', 'Z'), ('a', 'A')

read_group would return first group 'a' and then group 'z', instead of
groups 'z' and then 'a' which some might expect.

With this commit, it is now possible to set a fields.Selection
group_expand attribute to `True` when declaring it, which will use a
default group_expand implementation specific to Selection fields, this
means that when grouping by a Selection field with `group_expand=True`
it will always return the groups in the definition order of the
selection options.

We achieve this by leveraging the group_expand field attribute which was
designed for changing the groups returned by read_group.

Since this attribute was thought only to be implemented on a
Model-by-Model basis and here we need to use it as a generic function
for all Selection fields (explicit group_expand declarations have higher
precedence), the generic method has been implemented inside
fields.Selection and takes an extra records parameter which holds a
reference to the recordset/model on which read_group was called. This
extra parameter only applies to field implementations of group_expand
and in this case is what allows this specific feature to work with
dynamic Selection fields (function as options).

A side-effect of this implementation is that a read_group call that
groups by a Selection field with `group_expand=True` that uses the
default group_expand will always return all possible groups, even
empty ones.

Task-ID 2635052

closes odoo/odoo#75856

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2021-09-06 08:21:34 +00:00
Odoo's Mergebot 1d553043b5 [IMP] crm,{sale}s_team: improve the sales team kanban/list/form UI
PURPOSE

Walk around in the CRM to improve some UI.

SPECIFICATIONS

- In Visit to Leads changing the icon from fa-handshake
   to fa-star, Handshake is for the app, stars are for the leads

- CRM>Configuration>Tags
   Updating the action helper to:
   Create CRM Tags
   Use Tags to manage and track your Opportunities (product structure,
    sales type, etc.)

- CRM > Sales > Customers
   Updating the action helper to:
   Create a Contact in your address book
   Odoo helps you track all activities related to a contact.

- CRM > Sales > Teams
   - The grey bottom border in the Teams kanban card should appear only
      when they have a invoice target.

   - Increase the size of the alias in Teams kanban card a bit because it's hard
     to read.

   - The Teams kanban card is very meh if you have no data. So add some dummy
      data.

- CRM > Configuration > Sales Teams
   In Sales Teams list view add alias and avatar on the team leader.

- If you go CRM>Team>Pipeline, you get a strange action helper
  Instead, display the normal Pipeline action helper one except the gateway
  address is always  the alias of the team.

- Sections should be the same for all columns in team kanban view.
   if leads are activated, they should be in View, New & Reporting
   Activities should be at the bottom of the Reporting list since it has no
   counterpart.

- CRM > Sales > Teams (Select invoice from Kanban view)
  added new action helper in Teams/Invoice.

-  CRM > Reporting > Activities
   Rename Action to "Activities" (no "Pipeline" because it's confusing).

LINKS
PR #73530
Task 2582208

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-09-06 10:21:30 +02:00
ijas ahammed ea1b009386 [IMP] crm: move 'crm_menu_views.xml' to last in manifest
Usually, the actions are defined before the menu items. So with this
commit, we load the 'crm_menu_views.xml' file at the last.

TaskID-2582208

Part-of: odoo/odoo#73530
2021-09-06 08:21:29 +00:00