Commit Graph
151421 Commits
Author SHA1 Message Date
Thibault Delavallée 741a7e376e [IMP] sales_team: improve default team fetch tests
Purpose of this commit is to improve a bit tests about default team computation.
Coverage is improved, notably about default context value usage that is about
to be updated.

Task-2852947

X-original-commit: 8e18a27352d2fd9e68cd2b54e49dfca6fb658eaa
Part-of: odoo/odoo#94045
2022-06-20 16:51:13 +02:00
Rahul Prajapati 71a68c5923 [IMP] *: remove support for empty create with pyenv
* hr, im_livechat, mail, sms, snailmail, test_mail_full, website_livechat,
  website_slides

PURPOSE:

Creating a record with no values has no sense but is sometimes useful during
tests.
The support should be dropped for `default` parameter in `create`.

SPECIFICATION:

All the occurrences of `create()` have been replaced by `create({})`.

Task-2869394

closes odoo/odoo#93917

Related: odoo/enterprise#28538
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-06-20 15:31:51 +02:00
Touati Djamel (otd) c7ba64ebbf [FIX] stock: allow “apply all” with grouped list
Steps to reproduce the bug:
- Go to inventory > reporting > inventory report
- Add any “group by”, for example: ‘product’
- Click on the “Apply All”  button

Problem:
A Missing record error is triggered.

When we click on the button, the `active_ids` key is added in the
context, but it does not represent the ids of the `stock.quant`
but rather the ids of the grouped records, "product" in our case:
https://github.com/odoo/odoo/blob/bec3c58df303df6ac508bdfbb9b317d5019b858a/addons/stock/static/src/js/inventory_singleton_list_controller.js#L127

Then, They are added in the context of the wizard with the key:
`default_quant_ids`: https://github.com/odoo/odoo/blob/262b49d85a95bc445e954741224305ebaa7f545b/addons/stock/wizard/stock_inventory_adjustment_name.xml#L27-L28

So when we get the `stock.quant` records, we do a search with the ids
of the products instead of the `stock.quant`
https://github.com/odoo/odoo/blob/8f12dbc00fdc96732fd2ec9104ed6bf057327ef4/addons/stock/wizard/stock_inventory_adjustment_name.py#L14

Therefore, if there is no `stock.quant` with the same id
as the products, an error will be thrown

opw-2879590

closes odoo/odoo#93870

X-original-commit: 8ec3d1484ddcb1dbca14df850dfe1490309c461e
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Signed-off-by: Djamel Touati (otd) <otd@odoo.com>
2022-06-20 15:31:43 +02:00
momegahed 28caa8fccc [FIX] sale_project_account: Analytic account is overridden
Steps to reproduce:

1- install sales ,accounting, project, timesheets
2- create a new service product p1 that triggers a project and a task
3- create a new sales order so with p1 and validate 1 hour in the task
4- create an invoice from so, an anayltic account is added
5- edit any field of product_id, account_id, partner_id, date
6- the analytic default rule is applied (in this case none) so the
anayltic account is removed

Bug:

the `compute_analytic_account_id` method forces the analytic default
rule even if the field is already set before the changes

Fix:
apply analytic default rule only if the analytic acount is not set and
if it is not a project generated move

OPW-2833912

closes odoo/odoo#94034

X-original-commit: 7f69d623265a53be854eca474876bde2a0b14df6
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-06-20 13:26:56 +02:00
Arnaud Joset f57ca6f07d [FIX] sale: adds id in portal template to ease overriding
Before this commit, some element did not had id in the portal sale order
template. This commit intruduces them to allow easy override.

closes odoo/odoo#93859

Taskid: 2855699
X-original-commit: e829e4353574a1226163ba22b02d3080a8f75c69
Related: odoo/enterprise#28509
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: Arnaud Joset <arj@odoo.com>
2022-06-20 12:16:16 +02:00
Arnaud Joset d5a7d156d6 [FIX] sale_management: allow to edit quotation template in sale view
Before this commit, it was not possible to open the template for the so.

Taskid: 2855699
X-original-commit: 9ddb0fa53639205cffaaa81cecbb376071f7787a
Part-of: odoo/odoo#93859
2022-06-20 12:16:15 +02:00
Adesh Jolhe (adjo) 8f192a9b57 [IMP] project(_sms),hr_timesheet: generic improvements for project
Purpose of this PR to improve generic UI of project app.

So, in this PR done following changes:
  - Added group by assigned to under reporting -> customer ratings
  - In quick search, changed "rated rated" operator to "assigned to" under
    project.project search view
  - Removed rating_status field from project > configuration > settings > customer
    ratings
  - Switched the 'timesheets' and 'planning' features from place from
    project > configuration > settings
  - In project.task  extra info notebook:
     - Added the 'parent task' field above the 'analytic account' field
     - Added the 'company' field above the 'sequence' field
  - Added send mail and sms action in project.project and project.task
    list view.

task-2806292

closes odoo/odoo#88446

Related: odoo/upgrade#3459
Related: odoo/enterprise#26207
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-06-20 12:16:04 +02:00
Tiffany Chang (tic) f533e40f0e [IMP] purchase_requisition{_stock}: add new alternative POs option
Previously the "call to tender" flow involved creating a
`purchase.requisition` record, creating each RFQ via that record, and
then manually going through each RFQ to compare the prices/dates/etc.
By linking the "call to tender" POs within the POs, we remove an
unnecessary `purchase.requestion` record and makes it easier to track
which RFQs are related to each other as an Alternative RFQ.

On top of this, we add some comparision features to make it easier to
determine the best RFQ, specificially the ability to compare PO lines in
the same view with some visual aids (best price/date colored green +
buttons to check these lines to make them easier to view). We also add
an extra feature to set the qty of selected/non-chosen PO lines to 0 to
aid in the RFQ selection process (only applies to non-confirmed/done/
cancelled POs).

Some other features included with this:
- option to cancel alternative POs when confirming one, which purposely
  does not cancel ones that have already been confirmed/completed.
- new wizard for creating alternative POs so user can select whether or
  not they want to copy the products/qtys from the original PO.

Important Notes:
- JS Customizations:
  - custom many2many widget added so user:
    - can click between alternative POs in same window + keep breadcrumb.
      This is because all alt POs are interconnected and long breadcrumb
      chain is possible (+ we want to avoid windows within windows.) It
      is expected that user will be aware that unsaved changes will
      auto-save when alt PO is clicked on.
    - cannot unlink a PO from itself (this is automagically done during
      the write) since this will remove all of its linked POs and might
      confuse users.
  - custom view js for Comparing Order Lines to help highlight best
    options, including ensuring that the best options are still
    highlighted after clicking on Choose/Clear buttons (since the best
    option can change afterwards, we recalc + update via RPC)
- General implementation warnings:
  - Anytime any button/alternative PO is clicked on within a PO, the
    form will auto-save. This is due to how the current action service
    handles changing views.
  - POs created via "Create Alternative" button purposely:
     - require a vendor to ensure correct lead times/prices
     - show all vendor/product warnings in wizard because we cannot
       reproduce the pop-up warning that would occur in the PO when
       they are selected. We also purposely block the PO creation when a
       blocking warning is set since we cannot remove the values
       (especially in the case of a blocking vendor message) from a
       newly created PO.
  - Technical purchase.order.group model created to help with difficult
    management of complicated behaviors:
     - unlink from self if a PO is no longer linked to any other POs
     - linkages must be symmetric (i.e. linkage PO1 => PO2 must
       reflect PO2 => PO1 in their form views)
     - don't lose existing linkages (i.e. PO1 => PO2 and PO2 => PO3
       should auto-link PO1 => PO3)
    These last two behaviors are difficult to do without grouping due to
    possibility of remove and adding linkages at the same time. To avoid
    complex code to ensure these complexities hold when when creating a
    new PO, linkaging to alternatives is not allowed when PO is not yet
    saved as a record.

Task: 2695116
Upgrade PR: odoo/upgrade#3586

closes odoo/odoo#87656

Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2022-06-20 12:15:59 +02:00
Tiffany Chang (tic) 863c5090f0 [REF] purchase{_various}: make onchange_quantity computed
Instead of having to repeatedly manually call `onchange_quantity` at
different points in the code, it is better to have it be computed
instead.
- Logic is left unchanged,
- onchange calls from other methods are removed, and
- tests are adjusted to properly handle compute. I.e. remove
'date_planned': datetime.today().strftime(DEFAULT_SERVER_DATETIME_FORMAT)
  from when PO lines are created since this sometimes resulted in
  inconsistent date_planned values for PO line and the PO date_order
  (by 1 sec), which could lead to inconsistently created 'date_deadline'
  values for stock_moves' created by PO line qty changes. Issue
  previously didn't exist because onchange was not always called.

Part of Task: 2695116 (to avoid adding more onchange calls for new
feature)

Part-of: odoo/odoo#87656
2022-06-20 12:15:59 +02:00
Tiffany Chang (tic) 00689e7fc6 [REM] purchase_requisition{_stock}: rem old call to tender pt2
This commit removes the call for tender feature via a
purchase.requisition. This feature is to be replaced with the ability to
directly compare prices/options of POs/RFQs within a PO to remove extra
steps to compare them. The linkage between POs previously provided by a
purchase.requistion is replaced by the POs being directly linked to each
other. Feature to auto-create call to tenders via a product option is
removed and the user is expected to know/be responsible for when they
should do a call to tender themselves.

All references to old Call to Tenders replaced with Blanket Order, and
we remove/rename the menu items since Blanket Order is now the only
purchase.requisition.type option (we expect minimal customizated types).
Follow-on refactoring to switch purchase.requisition to
purchase.blanket.order to come later. Follow-on refactoring to switch
purchase.requisition to purchase.blanket.order to come later.

Part of Task: 2695116
Upgrade PR: odoo/upgrade#3586

Part-of: odoo/odoo#87656
2022-06-20 12:15:58 +02:00
Tiffany Chang (tic) eabf047055 [REM] purchase_requisition_stock_dropshipping: rem old call to tender pt1
The Call to Tender purchase requisition is being removed and implemented
as something managed completely within a PO. This includes removing the
'tenders' option for products which means the dropshipping + auto-create
call to tenders use case no longer exists => this module is no longer
needed.

Part of task: 2695116
Upgrade PR: odoo/upgrade#3586

Part-of: odoo/odoo#87656
2022-06-20 12:15:58 +02:00
Martin Trigaux 9458eedbd6 [I18N] *: create a saas-15.3 specific project
Until know, Transifex projects were organised as:
- odoo-14
- odoo-15
- odoo-master

with odoo-master changing frenquently to reflect the
last used saas version, to prepare the future odoo-16 version.

This was ok as most people used stable versions at that time.

Now the saas versions are frequently released and many users of
odoo.com are running these versions, the quality of translations is
more important and preparing for the future version is not the only
goal.

Having only one project synchronised with a saas version is not enough
as we frenquently have to support multiple versions in parallel
(e.g. saas-15.2 for users and saas-15.3 for odoo.com).

Switch to a project for each saas release to be more flexible.
Hopefully, it won't be too much additional work for translators thanks
to TM.

New organisation
- odoo-14
- odoo-15
- odoo-s15-2
- odoo-s15-3

and delete projects when it is no longer supported

closes odoo/odoo#94010

X-original-commit: bb071a903d5f0b2de4c3f945ed5f4ed7d13b1e94
Related: odoo/enterprise#28588
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2022-06-20 11:15:02 +02:00
Laurent Smet e2178ba796 [REV] account: 0% tax not in tax report due
This reverts commit 65b5ec4ad65f798b1d647978b5b42a49e760139a.

closes odoo/odoo#93717

X-original-commit: 09eb1b725e2f8b86dc671d0f77503e49d106d14c
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
Signed-off-by: Laurent Smet <las@odoo.com>
2022-06-20 11:14:55 +02:00
Kartik Chavda fa753bd0f5 [IMP] hr_timesheet_attendance: improve generic UX for timesheet
Purpose of this commit to add the measures in timesheet/attendance report.

task-2782768

closes odoo/odoo#85798

Related: odoo/enterprise#24982
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-06-20 09:06:25 +02:00
Iryna Vyshnevska d86528b528 [CLA] Add Iryna Vyshnevska to C2C CLA
closes odoo/odoo#93985

X-original-commit: 7fe2a02e99da99dc3dad7bd04461ae68c1088624
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2022-06-20 07:05:23 +02:00
Guillaume (gdi) a9eae10af8 [FIX] website_mass_mailing: hide newsletter thanks btn before saving
Before this commit the "Thanks" button of the newsletter block could be
saved as visible. This meant that a visitor who did not subscribe to the
newsletter would see the "Thanks" button on loading before it
disappeared. This commit solves this problem by:
1. hiding the "Thanks" button before saving
2. having an option to show/hide the "Thanks" button in edit mode
3. hiding the "Thanks" button before switching to edit mode

Steps to reproduce the fixed bug:
 - Drop a newsletter block.
 - Save and register to the newsletter.
 - Edit
 - Change anything in the newsletter block.
 - Save and Logout.
 - Now the Thanks button appears and disappears when the page is loaded

opw-2802139

closes odoo/odoo#94002

X-original-commit: 57793ff912ac5aab8f3d3e014992965d06290bf0
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-06-18 12:42:37 +02:00
Christophe Simonis 6f521fcf19 [FIX] stock: always close created cursors
Avoid leaks in case of exception.

closes odoo/odoo#93993

X-original-commit: 1a1a10b7ce53f24eabed3e3a38f34b354d2d1911
Signed-off-by: Christophe Simonis <chs@odoo.com>
2022-06-18 11:20:30 +02:00
Christophe Simonis 03c954b5b0 [FIX] core: always close cursors at the exit of context managers
The call to `commit()` can fail during the flush of the environment
and raise an exception before the actual `COMMIT;`, leaving the
cursor unclosed.

This leaked cursor may hold locks that only be released when the GC
collects it. On low-traffic workers like the CronWorker, this can
lock usual database usages.

X-original-commit: 3cb3cec67c28ca147288103adb219e6da8694248
Part-of: odoo/odoo#93993
2022-06-18 11:20:29 +02:00
Fabio Barbero dc66b7aec3 [IMP] mail, various: use overridden method in message_notify
Purpose
=======

In message_notify, when called on a recordset, call model methods instead of
base one defined on MailThread. This allows to use internal methods overrides.

Also perform some linting on calls to ``message_notify`` in order to better
spot calls, parameters, ...

Task-2852908

closes odoo/odoo#92868

Related: odoo/enterprise#28038
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-06-18 10:23:03 +02:00
Thibault Delavallée c4133ec2eb [FIX] mail: do not fetch followers in user_notification mode
When fetching recipients information for user_notification we don't need to
check for followers, as only explicit recipients are considered.

Task-2859935

Part-of: odoo/odoo#92868
2022-06-18 10:23:02 +02:00
Julien CastiauxandRomain Derie fd5c6a861c [FIX] http_routing: missing 301/302 on access err
Install website and website_hr_recruitment, open /web with ?debug=1, go
to website > configuration > redirect, create a temporary (302)
redirection from `/jobs/detail/experienced-developer-4` to `/404`. Open
the `/jobs/detail/experienced-developer-4` as admin and unpublish the
page. Open the same URL via private browsing (so that you are not
connected), you get the default 403 - Forbidden page, you were not
redirected to the 404 - Not Found page.

Custom 301 (permanent) and 302 (temporary) redirections are fallback
redirections when the requested page does not exist or is not accessible
to the current user. The HTTPocalypse broke the later case, it was not
checking for existing redirection upon access error.

The use case is the one supported with [1] where people want/need to
display something better than a 403 when they unpublish a record like a
job position for instance (most of the requested cases on opw).
Indeed:
- People have link to that record/job everywhere on the internet
- The job position / record is no more relevant, and people need to
  unpublish it
- People don't want to delete it (or can't sometimes due to record
  relations)
- People don't want visitors to land on a 403, mainly because it is a
  non customizable advanced/technical page (it displays a technical
  message including the record name etc)
- Their need is to either land a their customizable friendly 404 or
  sometimes on another record to promote it.

[1]: https://github.com/odoo/odoo/commit/3b9cd536607b1631dd375ab2e5cc94eb814a6e9b

closes odoo/odoo#93981

X-original-commit: eb7eecec976570ae3301c17a04adc9c110d5b14a
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Julien Castiaux <juc@odoo.com>
Co-authored-by: Romain Derie <rde@odoo.com>
2022-06-18 00:50:34 +02:00
Julien Castiaux c1a1eeb2aa [FIX] core: wrong controller name
closes odoo/odoo#93959

X-original-commit: 6eb4214bc1ed1b9410e6971677106d5835421146
Signed-off-by: Julien Castiaux <juc@odoo.com>
2022-06-18 00:50:30 +02:00
qsm-odoo 9da34ef78e [FIX] website_mass_mailing, *: fix race condition in newsletter tour
*: website, test_website

Since [1], a race condition seems to have become more dominant. It is
actually due to a tour not properly awaiting the editor to be loaded
before using it.

This commit fixes all occurrences of such 'trigger' selectors, even in
tours were it could actually be not a problem. That will prevent devs to
copy paste the problematic trigger.

[1]: https://github.com/odoo/odoo/commit/57793ff912ac5aab8f3d3e014992965d06290bf0

closes odoo/odoo#94000

X-original-commit: 38f3a94263b9cf48e9f5a8de553b8602310bcddd
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-06-17 23:52:01 +02:00
dbkosky 9092274610 [FIX] l10n_it_edi: use currency amounts in edi
When adjusting the currency rates, the amounts in the edi invoice become
incorrect and the Italian EDI system rejects them (due to contraints on
the content of these fields).

This commit changes the referenced amount to the 'amount_currency' (for
the taxes and the base) for the fields in the EDI templates.

closes odoo/odoo#93991

X-original-commit: 34315a9114eff6fa8ce3b16bb081ad026816a08c
Signed-off-by: Josse Colpaert <jco@odoo.com>
2022-06-17 22:38:33 +02:00
Alexandre Kühn 1e72215353 [IMP] im_livechat, *: Refactor JS Public Livechat (step 1)
*: website_livechat

This commit is a step towards refactoring the JS of public livechat,
so that it reuses the same architecture as the code of Discuss.
This implies code that uses JS models and OWL components.

Task-2887296

closes odoo/odoo#93966

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-06-17 21:37:35 +02:00
Wolfgang Taferner 873add0dd6 [FIX] payment: if image is missing icon view will crash
closes odoo/odoo#93533

X-original-commit: e0fe725df5e2522c1abf3e7c1fec6f3c1696e35c
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Signed-off-by: Wolfgang Taferner <w.taferner@wtioit.at>
2022-06-17 19:30:58 +02:00
Victor Feyens 952d5c1076 [FIX] website_sale: public user doesn't have access to fpos
In commit d4b046e238, a sudo was lost,
leading to 403 errors shown to public users browsing the ecommerce.

closes odoo/odoo#93947

X-original-commit: 96f491dafe9b247638db04ecfb33f3dbbc36e73c
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2022-06-17 18:31:54 +02:00
TheAlekLuna 261b781d0c [CLA] Update Vauxoo's Contributor CLA
closes odoo/odoo#93936

X-original-commit: 7e2e92dda51cc74f1d0b5c1ec5b132f7a730af89
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2022-06-17 17:31:04 +02:00
InCeyN 72444f13ee [IMP] stock: Replenishment report: Fix decimal issue
Currently, certain fields take the decimal accuracy of the product_uom
whilst other's don't follow this logic.
This causes a discrepancy between the decimal accuracy of all fields
where there should be none.
The purpose of this commit, is to stay consistent across all fields in
the view.

closes odoo/odoo#93935

Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2022-06-17 17:31:00 +02:00
Pierrot (prro) d2bd3427b6 [IMP] account: improve Journal Items UX
Journal items:
- 2 list views were available for the journal items. As these changes
    make them very similar, the "grouped" view is dropped and only
    the simple/normal list view is used.
- As the usefull information is now available from the list items,
    the more complex name that was previously used on the group by
    lines is not useful anymore.
- Removed duplicated filters.
- Added and modified columns of the list view.
- Removed the button opening the move form from the move line, and
    made the move name clickable (with same behaviour as the button).
- Removed edit button on some group by lines, as it can lead to
    unwanted access errors.
- Removed 2 filters and added 1.
- Added a field to use for the matching widget.
- `move_id` was replaced by `move_name`, because the sorting of the
    Many2One `move_id` is not based on its name and was thus not
    working as intended.

task 2855459

closes odoo/odoo#93586

Related: odoo/enterprise#28361
Related: odoo/upgrade#3598
Signed-off-by: Cedric Snauwaert <csn@odoo.com>
2022-06-17 16:31:00 +02:00
Prakash Prajapati 5a4220ef2c [IMP] hr_timesheet: add missing test of timesheet
In this commit, added test of timesheet analytic tags

Test Case:
--------
   1. Create analytic tags
   2. Add analytic tag in project
   3. Create timesheet
   4. Check the default analytic tag of the project and timesheet
   5. Add analytic tag in task
   6. Check the analytic tag of the timesheet and task

task-2878938

closes odoo/odoo#93214

Related: odoo/enterprise#28209
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-06-17 16:30:55 +02:00
Vincent Larcin 8d6960a706 [FIX] project: fix project privacy_visibility tooltip
The project privacy_visibility tooltip doesn't reflect the actual behavior
for the "Invited portal users and all internal users" selection.

This commit rephrases the tooltip of that field in order to correctly match its behavior.
It also slightly changes the name of the options to match the new tooltip.

Task-2871771

closes odoo/odoo#93911

X-original-commit: 9ef7030e3346eda267bc27b47a8a168acdc4a7b9
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-06-17 14:14:52 +02:00
Damien Bouvy 594567c62c [IMP] sale: make quote/order report fully editable in Studio
The lack of a div container between the 'page' div and the payment
terms/note/fiscal position section made it impossible to add blocks
at the end of the report, after these elements.

opw-2885434

closes odoo/odoo#93893

Signed-off-by: Bouvy Damien (dbo) <dbo@odoo.com>
2022-06-17 14:14:42 +02:00
Jeremy Kersten 6ee8ee2183 [FIX] web_unsplash, website: fix deps between website and web_unsplash
Website has no dependency to web_unsplash, we cannot warranty the order
of the execution of the overwrite done in 5ef8300.
So to avoid to create a new module bridge, with a lot of code, we prefer
to make a check for website user directly in unsplash module.
It is 'safe' since if you don't have website, the group
`group_website_designer` doesn't exists and so it will do a `or False`.

closes odoo/odoo#93885

X-original-commit: 05f9f5db372b1a3644f85cb1de3c443b722ef309
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-06-17 14:14:38 +02:00
Sébastien Theys 4d41afd0ef [IMP] mail: rename PartnerImStatusIcon to PersonaImStatusIcon
Now that it potentially contains guests, the previous name is no longer correct.

Part of task-2883466

closes odoo/odoo#93731

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-06-17 14:14:33 +02:00
Sébastien Theys 0e8b1721b5 [IMP] mail: introduce Persona model for guest and partner
And use it on partner im status.
This will allow displaying the im status of guest without any other change to
components.

Part of task-2883466

Part-of: odoo/odoo#93731
2022-06-17 14:14:33 +02:00
Sébastien Theys e8023a1c89 [IMP] mail: introduce PartnerImStatusIconView model
In preparation to move common code of guest and user to dedicated model.

Part of task-2883466

Part-of: odoo/odoo#93731
2022-06-17 14:14:32 +02:00
Sébastien Theys c0d8ed8196 [IMP] mail, hr_holidays: adapt im_status test to use real code/data
In preparation of refactoring the component to include guest.

Part of task-2883466

Part-of: odoo/odoo#93731
2022-06-17 14:14:32 +02:00
Antoine Vandevenne (anv) 06084a8420 [FIX] payment: stop preventing non-admin users from deleting views
closes odoo/odoo#93532

X-original-commit: bc90dbb577c974c5b9c3a429ef8379e8af1a9ca7
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2022-06-17 14:14:19 +02:00
Louis Wicket (wil) d91f7852db [IMP] mail, *: user settings improvements
* = im_livechat, test_discuss_full

Various improvements to user settings, including:

+ Introduce new js models `res.users.settings` and `res.users.settings.volumes`
to mirror the python models.
+ Avoid reformatting server data and simplify the way notifications are handled.
+ Clean dead code (unused convertData).
+ Reword and add documentation.

closes odoo/odoo#93390

Related: odoo/enterprise#28291
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-06-17 14:14:14 +02:00
Ahmed Khalaf (ahkh) 0a6f0bb760 [FIX] delivery: commodity product country code
Commodity now uses product county of origin code instead of
country of origin field directly since its a res.country model
and breaks the request if set on a product

closes odoo/odoo#93195

X-original-commit: 980d103050fee552a9f68421cf119c119397bbe2
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2022-06-17 14:14:06 +02:00
D J 2a21d0c2d6 [IMP] sale_crm: improve the dependency
Currently, 'sale_crm' depends on 'sale_management' and not on 'sale'.
However, it does not include the features linked with the real 'Sales'
app(sale_management). Just the 'sale' core is enough.

Apart from that, when 'sale_renting_crm' is installed, we want to
separate the regular quotations / orders linked leads from the
rental ones. Now, 'sale_renting_crm' depends on 'sale' only, and
can be installed independently of 'sale_crm' which makes it difficult
to separate the rental and regular quotations / orders.

To correct behavior (split the rental and regular orders), we now make
'sale_crm' dependent on basic 'sale' instead of 'sale_management'. And
in the enterprise PR, we make 'sale_renting_crm' dependent on 'sale_crm'.

Also, to ease the splitting, this commit introduces two methods that
returns domains to filter out sale orders/quotations, which can be
overridden when needed (mainly from 'sale_renting_crm' to exclude rental
orders).

taskID-2627580

closes odoo/odoo#83030

Related: odoo/enterprise#20708
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2022-06-17 14:14:00 +02:00
Gorash 418a8bcf33 [IMP] website_sale_wishlist: quantity in js sessionStorage
The session value is updated each time the user modifies the wishlist.
The number is also updated when the user go on the wishlist page or if
the value is different from that of the HTML content (if the user does
undo in his history).

opw-2737985

closes odoo/odoo#92962

Signed-off-by: Vincent Schippefilt (vsc) <vsc@odoo.com>
2022-06-17 11:13:44 +02:00
Gorash a0a0feabf6 [IMP] website_sale: quantity in js sessionStorage to avoid server calls
The session value is updated each time the user modifies the cart.
The number is also updated when the user hovers the mouse over the cart,
and if the value is different from that of the HTML content (if the user
does undo in his history).

opw-2737985

Part-of: odoo/odoo#92962
2022-06-17 11:13:43 +02:00
Gorash 9d5cfe4f34 [IMP] website_sale: quantity in the session to avoid sql queries
The session value is updated each time the user modifies the cart.

opw-2737985

Part-of: odoo/odoo#92962
2022-06-17 11:13:43 +02:00
Nicolas (vin) d40a118250 [IMP] l10n_fr_facturx_chorus_pro: new module for Chorus PRO
Add a new module that makes three new fields available on the invoices.
These fields are required when using facturx to send invoices to
public services through Chorus PRO.

The original template is updated to make it easier when integrating
the ubl refactoring coming soon, and avoid template issues that would
happen with an inherit if the inheriting module isn't updated after the
refactoring deployment.

opw-2714544

closes odoo/odoo#93877

X-original-commit: 4978d90cda34fd6c0b21bacb8462e1b9d4fb1241
Signed-off-by: Laurent Smet <las@odoo.com>
2022-06-17 09:18:20 +02:00
david ada4acf334 [FIX] website_sale: recently viewd multi company
If a user has a website.track with a product from another company than
the one he is currently using, an access rule error will popup.

Several scenarios can trigger this error, but the easiest one would be:

- Activate recently viewed products in the e-commerce.
- Create a product and publish it.
- The portal user visits it and a website.track linked to that product
is created.
- From backend, change the company of the product to one that is
unreachable for the portal user or the website environment he is in.
- Now when the portal user visits another product, an error will show up
warning about the unability to load the recently viewed product.

So only products in the context of the request should be loaded as
recently viewed.

TT36698

closes odoo/odoo#93589

X-original-commit: bded9cc3649e0178d95452d5ef861285d5558478
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2022-06-17 09:18:16 +02:00
Philippe Wauthy 4ced83fa8b [FIX] hr_holidays: fix traceback when changing duration of time off
When the duration of an approved time off is changed from the time off dashboard,
the holiday_status_id field is no longer editable in the form, only the duration of the leave.
This causes a traceback due to the custom form controller to update the name of the time off type
based on the allocations available.

closes odoo/odoo#93858

X-original-commit: b87e672e1e5367d774dee2de6a7c76374cc2da39
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: phwa-odoo <phwa@odoo.com>
2022-06-17 07:45:01 +02:00
Xavier BOL (xbo) 84e17847fe [FIX] project: stringify the domain list before using Domain.and
Before this commit, when we use a domain list made by the old
implementation of the Domain in js and in this domain we have a date in
a right leaf then this date is an object of Date class. However, with
the new implementation of the Domain, the date will be converted into a
PyDate/PyDatetine object and so when we create a domain with the new
implementation by giving a list containing the result of the old
implementation. The date will be converted as a plain object instead of
a date formatted or instead of a date object.

This commit converts the list in string before using `Domain.and` with
the new implementation to having a date formatted as a string to avoid
the issue.

for instance, when the user choose a filter containing a date in the
right of a leaf in the domain. The old implementation of domain class
will return `[['date', '=', new Date(1970, 1, 1)]]`
```js
new Domain([['date', '=', new Date(1970, 1, 1)]]).toList()
// result: [['date', '=', {day: 1, month: 1, year: 1970}]]
```
if the list is converted as a string before passing the result will be:
```js
new Domain(JSON.stringify([['date', '=', new Date(1970, 1, 1)]])).toList()
// result: [['date', '=', '1970-01-01']]
```

closes odoo/odoo#93884

X-original-commit: 44d4a44dc4695b40a52c7d4cfccf0e9238d39b19
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Signed-off-by: Xavier <xbo@odoo.com>
2022-06-16 22:34:33 +02:00
Maximilien TANTIN (MTantin) 99f1dbfb3b [FIX] auth_signup: define 'disable_database_manager' value in qcontext
Before this commit, the link "Manage Databases" was present in the
/web/reset_password screen, even if it is disabled.

Fixes odoo/odoo#93678

closes odoo/odoo#93881

X-original-commit: 3a1f41f2c42957a10cdd96a59c62ddd83fbdecd8
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2022-06-16 22:34:29 +02:00