Commit Graph
147686 Commits
Author SHA1 Message Date
Aurélien Warnon 6638b79c5e [IMP] website_slides: improve sharing control when slide is embedded
This commit improves the sharing control when the slide is externally embedded,
meaning embedded outside of the Odoo website, on a third party.

Previously, there were several buttons to share (by email / social / embed),
but the end result was really strange with some kind of overlay content
displayed on top of the PDF viewer that was almost unreadable.

Now, we simply re-use the "slide_share_modal" template to get a consistent
sharing feature whether it's embedded externally or not.

Side note: this removes the ability to share by email, which was not working
anyway since it requires the user to be logged-in to the system, which will
most likely never happen if said user is actually viewing the slide on a third
party website.

Task-2654009

Part-of: odoo/odoo#77736
2021-11-24 10:18:17 +00:00
Aurélien Warnon 1ab9455a9a [IMP] website_slides: refactor slide.slide embed detection
This commit slightly changes the embed detection for slides.

Currently, we use the same URL to embed slide content within the e-learning
module and when the end-user wants to embed that content on an external
website.

However, we want to know whether the slide is embedded externally or not to
show different controls and update some statistics.
The code previously relied on the presence of the "referer" header to achieve
that detection, if the referer URL comes from a domain that is not this Odoo
website -> then it's embedded externally.

The issue with that strategy is that it's not very reliable, indeed some modern
browsers now completely avoid passing the referer header (mostly for security
and privacy reasons).

Instead, we change this to let users embed on external websites with a
*different* URL.

When the embed comes from '/embed_external/', we now easily know that it comes
from an external embed and don't have to do some further and potentially tricky
processing.

We introduced a computed 'embed_code_external' field that is computed the same
way as the embed_code except for that small route distinction.

This also easily solves any issue that could come with multi-website /
different root URLs etc.

Task-2654009

Part-of: odoo/odoo#77736
2021-11-24 10:18:17 +00:00
baa 61d7af7611 [ADD] pos_l10n_sa: include a qr code on the pos receipt for SA
New Saudi law starting 1 of december 2021 mandate the presence of a qr code on the pos receipt

closes odoo/odoo#80299

X-original-commit: 8de297258eb6bdeabc179b365b2ff0513ae364ad
Signed-off-by: Masereel Pierre <pim@odoo.com>
2021-11-24 09:32:07 +00:00
baa ea91b778c9 [ADD] pos_l10n_gcc: arabic/english pos receipt for GCC members
Most GCC member countries have laws that mandate all receipts to include arabic

X-original-commit: a76274fbd18e2f9edb0a653e75b5e81f3411af20
Part-of: odoo/odoo#80299
2021-11-24 09:32:07 +00:00
Nicolas Bayet 10385a2aac [FIX] web_editor: keep table styling
Before this commit, the styles of the table were not kept when
copy/pasting a table generated by the Odoo editor. Now it is.

Task-2657445

closes odoo/odoo#80246

X-original-commit: 6f4eff378fc24bdd5e8a84ee485832162108a400
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2021-11-24 09:32:00 +00:00
Nicolas Bayet 74ffa03861 [FIX] web_editor: prevent link dialog to close upon error
Before this commit, if the link dialog had unvalid form data, and the
user clicked on the "save" button, the link dialog tried to close
and save with no data.

Now, it is not possible to close the dialog if the form data is invalid.

Task-2583696

closes odoo/odoo#80245

X-original-commit: c7f574c1044d5710c156f747c9b8647d6aeb3ff7
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2021-11-24 09:31:56 +00:00
Goffin Simon 7a5466a8ec [FIX] hr_expense: Wrong tax in multi companies
Steps to reproduce the bug:

- Let's consider two companies C1 and C2 where C1 is the parent of C2
- Let's consider an expense product P with T1 as tax in C1 and T2 as tax in C2
- Let's consider an expense alias A defned for C1 and C2
- Let's consider an employee E in C2 with work email address W
- Send from W to A an email with subject [internal reference of P] Test Expense 1000€

Bug:

An expense is created in C2 with T1 and T2 as supplier taxes instead of only T2

Inspired from function _compute_tax_id defined in model sale.order and purchase.order

opw:2507162

closes odoo/odoo#80250

X-original-commit: a3daaf4d3a22e403ca891a1d396380e118020164
Signed-off-by: Laurent Smet <las@openerp.com>
2021-11-24 07:56:13 +00:00
stefanorigano (SRI) 539ccabe4f [FIX] website_sale: snippet_filter demo image url
Update some missing urls that should have been adapted with https://github.com/odoo/odoo/commit/d063d99e1590856561f0fffe5acf38747e359d86

closes odoo/odoo#80178

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-11-24 06:59:53 +00:00
Florent de Labarre a805e0cf53 [FIX] point_of_sale : impossible to reversea paiement after reload
1. add an electronic payment, send it
2. you show "reverse paiement"
3. reload the POS
4. go back on the payment
--> Issue "reverse payment have disappear"

closes odoo/odoo#80283

X-original-commit: 0816dbd99ad8a394542057aab9618a5504c68e64
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Masereel Pierre <pim@odoo.com>
2021-11-23 18:34:54 +00:00
Florent de LabarreandJoseph Caburnay caf7eb2090 [FIX] point_of_sale: singleton error
Issue 1: fix singleton error if open pos session en batch
Issue 2: in large database to search all pos.session to get just one

closes odoo/odoo#80277

X-original-commit: 63500d6357f6f27724d1cda44db071aba968515a
Signed-off-by: Masereel Pierre <pim@odoo.com>
Co-authored-by: Joseph Caburnay (jcb) <caburnay.joseph@gmail.com>
2021-11-23 18:34:50 +00:00
baa 37dd08d776 [FIX] l10n_gcc_invoice: fix traceback on invoice when a section is present + fix arabic display on the section subtotal
having a section or a note on the invoice would trigger a traceback when printing the invoice for a GCC company. The arabic/english label inside that element would not display properly either

closes odoo/odoo#80276

X-original-commit: b8af5a493d8b1735735f5edee14be4a117cb66b8
Signed-off-by: Josse Colpaert <jco@openerp.com>
2021-11-23 17:53:53 +00:00
Joseph Caburnay 1e15908622 [FIX] pos_{hr,restaurant}: show opening cash control popup at the right time
1. pos_hr: Show the popup when an employee is logged in.
2. pos_restaurant: Show the popup already in the FloorScreen, no need
to click a table to see the popup.

closes odoo/odoo#80268

X-original-commit: eacfd60b1acfb6b793ac9d65c1cf63c24930cf2e
Signed-off-by: Masereel Pierre <pim@odoo.com>
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2021-11-23 17:53:49 +00:00
Louis Wicket (wil) 2cb3f774a1 [IMP] mail,*: change model declaration syntax
* = calendar, crm_livechat, hr, hr_holidays, im_livechat, mail_bot, sms,
     snailmail, website_livechat

This commit will change the declaration of the models with the aim of
getting closer to a plain JSON-object. It allows us to eliminate a wide
portion of boilerplate code, making the declaration shorter, more
declarative, and less redundant, but mainly, it prepares the ground for
further changes.

Task-2695223

closes odoo/odoo#79259

Related: odoo/enterprise#22042
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-11-23 17:53:46 +00:00
William Henrotin 9a19583700 [FIX] purchase_stock: create and confirm the same day
Testing purchase order creation assumes the whole test is done the same
day. The assert could failed if the test is run right before midnight
and end the day after.

This commit ensure the time is frozen during all the tests about
purchase order creation.

closes odoo/odoo#80264

X-original-commit: 438e47cdc87fc0f13c61a1ede29a190120dea117
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2021-11-23 17:06:47 +00:00
Aktiv Software b27d1176f8 [FIX] website_crm_partner_assign: fix template variable usage
Fixed error on rendering template of email_template_lead_forward_mail when
clicking Forward to partner.

Issue is
'dict' object has no attribute 'lead_id'.

This was because in Odoo v14, jinja was used and using a dict like properties
was ok. With QWeb it crashes and we have to correctly handle the dict.

Fixes #79492
Task-2657930

closes odoo/odoo#80259

X-original-commit: 7facd634328ad2038a13f75a3616b753e8fef147
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-11-23 14:42:12 +00:00
jbw 82763d81bf [FIX] account: fix manual reconciliation widget
- set journal_id, tax_ids, analytic_account_id, analytic_tag_ids & force_tax_included as optional hide
- fix _get_write_off_move_lines_dict to make clicking a reconciliation model button have the same result as doing the operation manually :
    - add journal_id parameter
    - use reco line label in new aml name

closes odoo/odoo#80176

Task: 2611348
X-original-commit: 4514f0ec4a1eebb4652c34c4926d0cd1ff336e17
Related: odoo/enterprise#22435
Signed-off-by: Florian Gilbert <flg@odoo.com>
Signed-off-by: Laurent Smet <las@openerp.com>
2021-11-23 14:42:05 +00:00
thcl-odoo f09482c57f [FIX] payment: use correct target on onclick event
Current behavior :
If we click on the icon rather than the label we got a crash

Steps to reproduce :
- Enable Online Payment and configure an acquirer and add the possibility to save the card
- Go to the Website and Log in (e.g. as `Marc Demo`)
- Go to your account (from dropdown menu > `My Account`)
- Manage you payment methods and add a new one
- Try to delete the newly added payment method by clicking on the trash icon in the button

Reason :
Currently, we rely on the `target` property of the event (triggered after clicking on the button).
The problem is that, as in this case, if a button has an HTML element as a child and we click on this child, `target` property will target the child whereas in this case we want to retrieve the button and not the child.

Using `currentTarget` property instead of `target` allows us to retrieve the button no matter what since `currentTarget` always refers to the element to which the event handler has been attached.

OPW-2660186

closes odoo/odoo#80253

X-original-commit: e8ec4fb6aa9ee4796d486a3d32e6a9a5e1382548
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Signed-off-by: Claude Thibault (thcl) <thcl@odoo.com>
2021-11-23 13:55:05 +00:00
Florent de Labarre 49a23bb3fa [FIX] base: simplify field dependencies to avoid costly invalidation
Consider upgrading module 'base' on a database with millions of 'res.partner' records.
The upgrade of country and country state data makes a very costly search to reverse
the dependencies of the non-stored computed field 'contact_address', just for the sake
of invalidating its value from cache, which is most probably not present at all.  The
cost of the search is so high that it may prevent from upgrading the module (timeout).

closes odoo/odoo#80251

X-original-commit: b7f9d0b7c3dfbca0f4897a650983a298da811ce1
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2021-11-23 13:55:01 +00:00
Didier (did) e1084c4536 [IMP] mail: create activity_box model
This PR introduce activity_box_model to handle the activity_box component logic.

part of task-2579306

closes odoo/odoo#79993

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-11-23 13:54:57 +00:00
Cedric Prieels (cpr) 0d2c09a938 [FIX] project_account: fix the analytic accounting setting
Before this fix, the "Track costs & revenues by project" option is missing
from the project module if both project and invoicing are installed.

Now, this setting is shown on the project module until accounting is installed,
as expected. It is then shown in the settings of the account module.

task-2695812

closes odoo/odoo#80045

Related: odoo/enterprise#22370
Related: odoo/upgrade#3051
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2021-11-23 13:09:47 +00:00
Guillaume (guva) aa5d7358fa [FIX] l10n_fr: tax data for tva 10%
Steps to reproduce:

-In a database with french accounting,
- The fields cash_basis_transition_account_id and invoice_repartition_line_ids are not well configured

opw-2669061

closes odoo/odoo#80229

X-original-commit: 17b9a2046502fffd9a21d6da3fff82a7dae54256
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
Signed-off-by: Guillaume Vanleynseele <guva@odoo.com>
2021-11-23 12:04:16 +00:00
Bonis ModiandKartik Chavda f4c054e473 [IMP] project, hr_timesheet, *: improve generic ux
Purpose of this commit to improve generic UX for the project app.

So, In this commit done following changes:

- add 'subtask_effective_hours' and 'total_hours_spent' fields in the page of
subtask in task form view.
- change invisible attrs to column_invisible attrs for block_by page in task
form view.
- add 'task in progress' subtype for project.task and move 'stage changed'
subtype above 'task blocked'.
- remove the 'is_close' field and all its references from project.task.type.
- unarchive all of its tasks when the user unarchives the task stage.
- sort projects on 'is_favorite'.
- internal users following the project automatically follow its updates and
their notification preferences propagated accordingly.
- duplicating a task will duplicate all of its subtasks.
- move parent task field in extra info page of task form view.
- change the label of 'edit' to 'view' in the burger menu of project kanban view.
- user can delete task without sale_order validation error.
- add constraints for 'seller_ids' field.
- add remaining_hours_so field in task tree view.
- add unusual_days in task calendar view.
- add 'no content helper' in action of burndown chart.

task-2536044

closes odoo/odoo#74018

Related: odoo/enterprise#19880
Related: odoo/upgrade#2801
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Co-authored-by: Kartik Chavda <kcv@odoo.com>
2021-11-23 12:04:00 +00:00
Benoit Socias 6b9183a322 [FIX] website: accept default template key in dynamic snippets
Before this commit the "first" template key was selected by default
before the default options were being considered. Because of this,
setting a specific default template key was always ignored since a
template was already selected.

After this commit the widget keeps track of which value is actually a
default one, allowing for setting a specific default for the template
key.

task-2680578

closes odoo/odoo#80207

X-original-commit: 84130ffb5c7f728e7e61d6979d78c496c473947e
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-11-23 11:12:18 +00:00
Cedric Prieels (cpr) ea038c6b19 [IMP] project: follow up the project overview removal
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-2646234
See odoo/enterprise#20936

closes odoo/odoo#76553

Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2021-11-23 11:12:14 +00:00
Aurélien Warnon 1e25946a76 [IMP] utm: globally improve UTM records management across all apps
PURPOSE

This commit consolidates UTM usage across all applications.

Global purpose is to avoid having undesired side-effects, such as unlinking an
utm.source/utm.medium/utm.campaign and at the same time cascading the deletion
to various records without noticing.

SPECS

ALLOW MORE PEOPLE TO CLEAN UTM RECORDS

Currently, not even the system administrator can delete utm.mediums and
utm.sources (he can only delete campaigns).

These were considered as "technical records", but allowing some cleanup is
a good idea since these records are often automatically generated and can
create a lot of unnecessary noise in the database.

That's why we now allow the following groups to delete all UTM records
(sources, mediums and campaigns):
- group_system
- group_mass_mailing_user
- group_social_manager (enterprise)

PREVENT DELETION

For some use cases, removing an utm.source/utm.medium/utm.campaign would
cascade delete the related record, which was unintended / hidden side effect.

These combinations were secured by preventing to unlink:
- mailing.mailing source_id field
  Trying to delete the utm.source will throw an error message
- mailing.mailing medium_id field
  Trying to delete the utm.medium will throw an error message
- hr.recruitment.source source_id field
  Trying to delete the utm.source will throw an error message

ADDING CLEAN ERROR MESSAGES

When trying to delete an UTM record that is linked with ondelete="restrict", we
improved the error message to give a clear explication to the user, e.g:

"You can't delete these UTM sources as they are linked to the following
mailings in the Mass Mailing APP, and deleting the source would break the
statistics: Newsletter"

SPECIFY 'ondelete' strategy

For a lot of uses of sources/mediums/campaigns, the 'ondelete' strategy was not
specified, leading to the confusion of "is this really how we want to handle
this?".

A lot of ondelete="set null" have been added in various field definitions to
ensure that this is the desired and logical strategy we want for that
specific model.

PREVENT REMOVING HARDCODED UTM RECORDS

In some functional flows, UTM records are hardcoded using their direct
record reference.
This is notably the case for the recruitment process and its creation of
aliases, and for the Email / SMS Marketing flows.

As deleting them would break these flows, we prevent their deletion in a
"api.ondelete" method.

ENFORCE NEW RULES WITH TESTS

A lot of python tests have been added to make sure we enforce the decisions
taken here above.

LINKS

ENT PR odoo/enterprise#19048
Task-2459480

closes odoo/odoo#72239

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-11-23 11:12:04 +00:00
Vincent Schippefilt 66ba6987ba [IMP] web: provide lazy_loaded bundle endpoint
In this commit I provide a way for any part of the webclient to load a complete bundle of assets, JS and CSS.
The primary goal is to lazy load the complete o_spreadsheet package, including the library and all the custo that odoo includes
in it.

the endpoint /web/bundle/bundle_name will return a json structure describing the path to the JS and CSS files that have been generated by the client.
Those can then be loaded with the loadJS(...) function like any library.

The advantage of using a bundle, is that all the dependencies are respected inside that bundle.

closes odoo/odoo#76361

Task-id: 2576814
Related: odoo/enterprise#21804
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2021-11-23 10:26:08 +00:00
Odoo's Mergebot d3fef88a10 [MERGE] mail, crm: allow to log a feedback when marking as lost
PURPOSE

Allow sales reps to add a closing note to their lead while it is being marked
as lost. This is currently already done by a lot of sales reps but manually
with the "Log a Note" button.

SPECIFICATIONS

In ``Lost Reason`` model: add a new html field allowing to log a note on the
lost leads. Below the m2o, add an Extra Comment field where users can add a
"closing note". When the wizard is submitted, log this message as a note on
selected records.

Allow to link this feedback to the tracking done when marking as lost to have a
single message. Tracking is currently done by accumulating changes in a
structure (see ``env.cr.precommit.data`` usage with ``mail.tracking.<name>``
key). In the end those values are used to generate a message with tracking
value and a subtype. In this merge we allow to manually set a body used as a
message for the tracking message. This is used in the lost wizard to merge the
tracking and the feedback message.

Correctly name lost_reason field on lead. As this is a many2one, it should end
with an ``_id`` suffix. Otherwise we may think this is a char field, which was
probably the case at one point.

While working on tracking, rename tracking methods and clean dead code.
This should not change anything, just renaming some old code.

Task-2671709

closes odoo/odoo#78648

Related: odoo/upgrade#2944
Related: odoo/enterprise#21795
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2021-11-23 10:39:53 +01:00
Thibault Delavallée 1341d52540 [IMP] mail, crm: allow to give a body to tracking
PURPOSE

Concatenate feedback message and tracking when marking a lead as lost. This
currently generates 2 consecutive message about the same change, having a
single one is better from an UI point of view.

SPECIFICATIONS

Allow to link a body to a value change tracking. Tracking is currently done
by accumulating changes in a structure (see ``env.cr.precommit.data`` usage
with ``mail.tracking.<name>`` key). In the end those values are used to
generate a message with tracking value and a subtype.

In this commit we allow to manually set a body used as a message for the
tracking message, adding a new ``mail.tracking.message.<name>`` key. It is
used when posting or logging the tracking message, simply propagated as body
to ``message_post`` or ``message_log``.

In crm we use this when losting a lead through the dedicated wizard. A bit
of custom html allows to have a nice display.

Task-2671709

Part-of: odoo/odoo#78648
2021-11-23 09:39:52 +00:00
Thibault Delavallée 869ada08a0 [IMP] mail: rename tracking methods and clean dead code
Purpose is to have tracking methods beginning with ``_track``, indicating
those are tool methods used for tracking. It helps organizing the mail thread
file and having short but precise method names.

We also remove the usage of ``mail_track_log_only`` context key that is not
used anymore in the code. It allows to shorten a bit the code and make it
easier to read.

Task-2671709

Part-of: odoo/odoo#78648
2021-11-23 09:39:52 +00:00
Thibault Delavallée d1edc9e6a7 [REF] crm: correctly name lost_reason field on lead
As this is a many2one, it should end with an ``_id`` suffix. Otherwise we
may think this is a char field, which was probably the case at one point.

Task-2671709

Part-of: odoo/odoo#78648
2021-11-23 09:39:51 +00:00
Thibault Delavallée a830ceaaf9 [IMP] crm: allow to log a feedback when marking a lead as lost
PURPOSE

Allow sales reps to add a closing note to their lead while it is being marked
as lost. This is currently already done by a lot of sales reps but manually
with the "Log a Note" button.

SPECIFICATIONS

In ``Lost Reason`` model: add a new html field allowing to log a note on the
lost leads. Below the m2o, add an Extra Comment field where users can add a
"closing note". When the wizard is submitted, log this message as a note on
selected records.

Add tests, allowing to test both the wizard and this new feature.

Task-2671709

Part-of: odoo/odoo#78648
2021-11-23 09:39:51 +00:00
Thibault Delavallée d348c5e880 [IMP] crm, test_mail: flush tracking in tests involving tracking
Tracking is generated using commit hooks, meaning they are really sent when
the commit ends. This is done to ease values aggregation and accumulation
through various record updates. In some tests we therefore have to manually
flush the tracking, otherwise it is not created and posted. Notably tests about
lead lost wizard were not flushing and therefore not generated the tracking
messages. Those tests will be improved in future commits, cleaning them is
therefore a necessary step.

We also specifically add some tracking flush in mail performance tests. This
is to be sure we measure impact of a write and tracking separately from
previous transactions. Seems everything is working as intended as warmup and
query counters already perform flushes. Here we simply flush at the end
of the setup to be sure all base is clean before starting tests.

Task-2671709

Part-of: odoo/odoo#78648
2021-11-23 09:39:50 +00:00
Odoo's Mergebot 30844b713f [MERGE] website_slides(_survey/_forum): improve standard and reporting views
PURPOSE

Improve eLearning list views and settings UI. Better split standard views from
reporting views.

SPECIFICATIONS

- Lighten the "operational" list views which should not be cluttered with a ton of KPIs.
    Keep those for the reporting views (which in turn need to display some data).
- Reorder settings options for a better cleanup.

See sub commits for more details about the changes.

Task-2607467

closes odoo/odoo#76930

Related: odoo/enterprise#22072
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-11-23 10:39:36 +01:00
ijas ahammed 4566e1b23d [IMP] website_slides: improve content list view under reporting menu
This commit improves the list view of the contents under reporting menu
to make it simpler. Since we don't want to allow multi-edit here this commit
adds a different list view for reporting and binds it with the action.

Also, the action now excludes the sections from the result, and applies
default filter to see 'Published' content while landing as other content will
probably have no interesting statistics.

Also added float time widget for `completion_time` field.

TaskID-2607467

Part-of: odoo/odoo#76930
2021-11-23 09:39:35 +00:00
ijas ahammed 8f800a5ec0 [IMP] website_{slides,sale_slides}: improve course list view under reporting
This commit makes the reporting courses list view simpler, which now has
following fields:

- name
- user_id
- total_views (updated string to `# Views`)
- rating_avg_stars (updated string to `Average Review`)
- total_time (displays total)
- members_count (displays total and updated string to `# Attendees`)
- members_done_count (displays total and updated string to `# Completed`)
- product_sale_revenues (added from website_sale_slides with monetary widget)

This commit also adds a 'Published' filter to course search view
which is applied by default in report action for the courses.

TaskID-2607467

Part-of: odoo/odoo#76930
2021-11-23 09:39:35 +00:00
ijas ahammed a85f02a31f [IMP] website_{forum,slides_forum}: improve forum and forum post list views
This commit improves forums and forum posts list views. The changes are listed
below.

Forums list view:
  - optional hidden `total_answers` and `total_favorites`
  - added `slide_channel_id` and `visibility` fields
  - added sum for `total_posts` and `total_views`

Forum posts list view:
  - added badge widget on `state` field for better decoration
  - added sum for `views` and `child_count`, updated their label to
    '# Views' and '# Answers'
  - removed `favourite_count` field
  - moved `website_id` field at last as optional hidden
  - added title for the demo data in which title was missing.

TaskID-2607467

Part-of: odoo/odoo#76930
2021-11-23 09:39:35 +00:00
ijas ahammed d41a32e1d9 [IMP] survey,website_slides_survey: improve certification list view
This commit improves the survey list view in eLearning certifications to make
it simpler. This is done through a new primary view, inheriting from the base
one in order to keep changes localized. The main changes are:

- removed the trophy icon from 'Certification' button as each of them
  here are certificates only
- improved string of `title` field to 'Certification Title'
- added `user_id` field with many2one_avatar_user widget after `title`
  in the base tree view (survey.survey_tree)
- updated strings from 'Success Ratio' and 'Avg Score %' to
  'Success Ratio (%)' and 'Avg Score (%)'.
- moved `answer_done_count` field after `answer_duration_avg`
- removed the field `answer_count`
- added float time widget to the field `answer_duration_avg`
  in the base tree view (survey.survey_tree).

TaskID-2607467

Part-of: odoo/odoo#76930
2021-11-23 09:39:34 +00:00
ijas ahammed ac3c4e6f67 [IMP] website_slides: improve content list view
This commit makes the content list view simpler, which now has following fields

  - name
  - channel_id
  - category_id (optional, default hidden)
  - user_id (with "many2one_avatar_user" widget)
  - is_published
  - date_published
  - completion_time (displays total and added float time widget)

Note that the view is now multi-edit, but we only want to update 'user_id' and
'is_published' fields in batch. So all other fields are readonly.

We have removed tracking from `date_published`, `website_published` field and
added tracking for `is_published` field. This information is sufficient.

TaskID-2607467

Part-of: odoo/odoo#76930
2021-11-23 09:39:34 +00:00
ijas ahammed fb372a69de [IMP] website_slides: improve course list and form view
This commit makes the course list view multi-edit (except 'name' field)
and moves the 'website_id' next to 'user_id'.

In form view: inside options page we have moved `enroll_msg` under to
`enroll_group_ids` to have all enroll options well displayed.

TaskID-2607467

Part-of: odoo/odoo#76930
2021-11-23 09:39:34 +00:00
ijas ahammed ce21cfb99c [IMP] website_slides: reorder eLearning settings
This commit reorders eLearning settings blocks, which now looks like

+----------------+-------------------+
| eLearning      |                   |
+================+===================+
|                |                   |
+----------------+-------------------+
| Certifications | Paid Courses      |
+----------------+-------------------+
| Mailing        | Forum             |
+----------------+-------------------+

TaskID-2607467

Part-of: odoo/odoo#76930
2021-11-23 09:39:33 +00:00
Laurent Smet 6227007b7a [FIX] account: Fix Receive bank account on register payment wizard
- Create a partner with 2 bank accounts: BNK1 and BNK2

Wrong flow with vendor bill:
- Create an vendor bill => BNK1 is set by default
- Change BNK1 to BNK2
- Register a payment
=> BNK1 is proposed by default instead of BNK2

Wrong flow with customer invoice:
- Set BNK3 on your company
- Create a customer invoice
- Register a payment
=> BNK1 is suggested instead of BNK3

closes odoo/odoo#80175

Issue: 2683197
X-original-commit: ec0d807b2b6ff3596d9b591bd8ec7d8889d41d8a
Signed-off-by: Olivier Colson <oco@odoo.com>
Signed-off-by: Laurent Smet <las@openerp.com>
2021-11-23 08:53:39 +00:00
Mathieu Duckerts-Antoine 64c8e4eadd [FIX] board: graph height
The commit 3862d5aae1df72d3585f915e8a2a2626322e74ad has changed the class
set on the root node of the graph renderer but has not adapted a css rule
used in the board app to ensure that the graph views have the correct
height. We fix that situation.

closes odoo/odoo#80047

X-original-commit: b08bc57d5ba2e0da17a452189d584574fb2f9832
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2021-11-23 06:46:52 +00:00
Mathieu Duckerts-Antoine e0cbf4739d [FIX] board: save correct domain
Since 40f1ae87e1436192a70a8a7432eb72d379cfa6dc, a view added to the board application would not
have the correct domain:
    - the action domain was not kept in the saved domain
    - the saved domain was kept dynamic, leading to possible crashes
      e.g. a condition like ("user_id", "=", uid) in the saved domain
      would make crash the dashboard app.
We fix the problem and add a test.

X-original-commit: 7e77bb74bfa1bfef92c6d385dedc2d89e0040780
Part-of: odoo/odoo#80047
2021-11-23 06:46:52 +00:00
Mathieu Duckerts-Antoine b87448356b [FIX] board: keyboard navigation
During the refactoring of the legacy control panel done in d679cd0d8ba9a2420e81a42a698763e9be2327e1,
the method "_addToBoard" was renamed as "addToBoard", but a call to _addToBoard
was left, breaking the keyboard navigation. We fix that situation.

X-original-commit: 6aa10e8c9118eba3c19563431c57912108fe12b9
Part-of: odoo/odoo#80047
2021-11-23 06:46:52 +00:00
Michael (mcm) 3ce226dd85 [FIX] hr_holidays: fix date range picker
Before this commit, picking a range of dates by clicking on
the end date field set the wrong date on the start date field.
This was because the option "related_end_date" was used
on the end date field instead of "related_start_date"

Replacing the "related_end_date" by "related_start_date"
on the end date field fixes the issue.

closes odoo/odoo#79997

X-original-commit: 8402e55e0db474ee64e641866d8c76302fb1ef4e
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2021-11-23 06:46:46 +00:00
Goffin Simon e4cb8fc426 [FIX] website_crm_partner_assign: Coding error
The state value 'open' does not exist on model  account.invoice.report

opw:2666887

closes odoo/odoo#80206

X-original-commit: 2e7c667f56f84c9bd516711685ca886ff25a5965
Signed-off-by: William André (wan) <wan@odoo.com>
2021-11-22 19:31:51 +00:00
Philippe Wauthy 5cdb8f51a3 [FIX] hr_holidays: fix time off with allocation of one day
As an HR officer, when you create an allocation of one day for a user,
you need to be able to put a time off on that person, following the allocation.
But for the moment, we got an error saying there is no valid allocation on that day.

If you create an allocation of 1 day, you need to be able to put a time off on
that specific day without any error message.

task-2696771

closes odoo/odoo#80196

X-original-commit: 60f691bbac660d47404b35242303288880f084f7
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2021-11-22 17:26:53 +00:00
Jeremy Kersten 5945e8e4e3 [FIX] http_routing: don't remove trailing / during redirect
Before this commit, since we promote the use of route without trailing / for
best SEO (fee0113), we remove the trailing / during a redirect to avoid an
extra request.

Unfortunately, it will break some route with trailing / in case of multi lang.

So we remove this optimization, it will increase potentially number of http
request before to get the final url, but it will allow to continue to support
trailing slash in v15.

This commit partially revert the commit ae35117

closes odoo/odoo#80191

X-original-commit: 84d2f5b57ccf3dbcefebdbc795ab1872bc1504b9
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-11-22 16:27:09 +00:00
Kamlesh Pathekar 760a226495 [FIX] sale_project: fix sales order stat button traceback
Currently, when we click on 'sales order' stat button of 'project.update'
it shows traceback because action name is incorrect.

In this commit, action is renamed-https://github.com/odoo/odoo/commit/3d10c7c70884993f1290a4fd430a1c52247a8420#

closes #79739
task-2689432

Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2021-11-22 16:27:01 +00:00
Audric Onockx (auon) 91633b6008 [FIX] sale_timesheet : fixed Credit Notes for Vendor Bills not taken into account in project overview profitability
Reproduce :

- Install modules Purchase, Accounting, Project, Sales Timesheet
- In Accounting settings, activate option Analytic Account
- Create a Project and link it with an Analytic Account
- Create a PO then Vendor Bill with this Analytic Account
- Check the Overview for the Project associated with that Analytic Account
- The amount of the bill will show in the "Other Costs" field of the Profitability section
- Go back and add a Credit Note for the vendor bill

Issue :

- The amount of the PO still shows in the "Other Costs" section, where it is expected to be balanced (zeroed) by the Credit Note.

Solution :

- Don't take into account the Vendor Bills for whioch a Credit Note exists.

opw-2527655

closes odoo/odoo#80187

X-original-commit: 848f71f22d50d443adfa7c5544e48d25e80dabd9
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2021-11-22 15:34:37 +00:00