Commit Graph
141300 Commits
Author SHA1 Message Date
Laurent Smet 7791a0bf1e [FIX] account: Fix tests depending the date after 18 months
Tests are crashing when the number of months between the data date and today is higher than 18 months due to the 'past_months_limit' field on account.reconcile.model.

closes odoo/odoo#67051

X-original-commit: fd2c14374598b7009b70196ccc6ac3607b30245a
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2021-03-02 11:32:27 +00:00
Géry Debongnie 3915a3f00e [FIX] web: display better tracebacks in debug=assets
A previous commit (934e0896160272542dd00) modified QUnit to make sure we
can display better tracebacks in debug=assets mode.  However, this
commit did not apply to errors coming from failing promises.

To fix this, we can simply keep a reference to the error in that
specific case.

closes odoo/odoo#67048

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-03-02 11:00:30 +00:00
Dhruv Patel 4c54cfc52e [IMP] mail: increase systray message dropdown menu height
The goal of this task to increase the height of the systray message dropdown
to simply allow more messages to be displayed at once for better readability.

Currently, we can see a maximum of 6 chat listing in the dropdown at once and
then need to scroll down for more chats to be listed
but with this commit, We can see more number of chats based on the viewport
height for better readability.

Task : 2428779

closes odoo/odoo#66432

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2021-03-02 11:17:50 +00:00
wan 81bf7d266c [IMP] codeowner: disable codeowner for accounting in master
We keep the codeownership in stable versions but disable it in master to
reduce the spam.
Will be added back at each freeze.

closes odoo/odoo#66150

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2021-02-15 10:48:50 +00:00
Sapan Zaveri 4f508676c2 [IMP] website_sale(_product_configurator): disable quantity everywhere.
Purpose of the commit is too make the customize option
"Select Quantity" works everywhere.

When we disable it, it's only disabled from the product page. it's
still active on the cart and on the product config modal.

So if the user decide to disable the "Select Quantity", disable it everywhere
(cart, product config modal, product itself)

Task-2008472

closes odoo/odoo#37951

Closes: #37951
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-03-02 09:06:05 +00:00
Laurent Smet 75df756751 [IMP] account: Use currency rate when populating journal entries
closes odoo/odoo#67036

X-original-commit: f6761a7e8b012f5357711303af532fa0ac5bd77a
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2021-03-02 09:16:29 +00:00
Laurent Smet 4eb1cb2fd7 [FIX] account: Fix always set currency_id on aml with populate
Since 14.0, 'currency_id' and 'amount_currency' should always be filled when creating account.move.lines.

X-original-commit: 7827875271adafbfc656fe09c87e37e7d1a3802f
2021-03-02 09:16:29 +00:00
Goffin Simon b69e6f2308 [FIX] payment: Error when creating a transaction
The field partner_id on model payment.transaction is not required
So in some cases if the field partner_id was not in the values
It raised a traceback.

opw:2467971

closes odoo/odoo#67018

X-original-commit: 41b0d78c861a94630be28a16a13f2bae1b629777
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2021-03-01 16:07:40 +00:00
Francois (fge) fa4b646fcb [FIX] web: traceback issue in firefox
In Firefox, the error stack generated by anonymous code (example:
erroneous code in a template) is not compatible with the stacktrace lib.

The error stack could contain lines like :
"anonymous web.assets_common.js line 9786 > Function:442".
In order to make it usable by the stacktrace lib, we will remove
the words "lines", ">", "Function:442" to get:
"anonymous owl.js:1695".

Traceback:

Before:
    Error: QWeb error: Invalid loop expression
        anonymous web.assets_common.js line 9786 > Function:442
        fn owl.js:1567
        render owl.js:1617
        renderFn owl.js:4595
        __render owl.js:4391
        __prepareAndRender owl.js:4379
        __prepare owl.js:4325
        anonymous web.assets_common.js line 9786 > Function:175
        ...

After:
    Error: QWeb error: Invalid loop expression
        anonymous owl.js:1695
        fn owl.js:1567
        render owl.js:1617
        renderFn owl.js:4595
        __render owl.js:4391
        __prepareAndRender owl.js:4379
        __prepare owl.js:4325
        anonymous owl.js:1695
        ...

closes odoo/odoo#67020

Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2021-03-02 08:46:07 +00:00
Odoo's Mergebot 64749aaeaf [FW][FIX] *: various localisation issues
Cf commit messages, courtesy of Erwin van der Ploeg

closes odoo/odoo#66983

Forward-port-of: odoo/odoo#66940
Forward-port-of: odoo/odoo#66790
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-03-02 10:30:29 +01:00
Christophe Monniez 11db495938 [FIX] packaging: include all odoo files in src build
Since this old commit 735924878f, the files that are packaged are
chosen by a list of allowed extensions. This list have to be maintained
each time that a developer adds a new kind of file in a module. This is
error prone [0] as most developer are not aware of that and it's difficult
to monitor.

Moreover, there is no reason to have a different list of installed files
when one install from the git repo instead of the source package.

With this commit, all [1] odoo sources files are included in the source
packaging and the only thing to maintain is a small black-list of file
extensions like for Python bytecode files and for version control files.

[0] see commit d33c05b62a9c6 that fix `.json` missing files.
[1] graft command: https://docs.python.org/3/distutils/commandref.html

closes odoo/odoo#67025

X-original-commit: 9c2ce1f12c2bebb4a903058eac10c17ca562fda9
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2021-03-01 17:25:18 +00:00
nouraellm 4028868229 [FIX] mrp: avoid done and cancelled MO from todo filter
Description of the issue/feature this PR addresses:
- Fix tends to hide done/cancel MOs from mrp.production form
- A planned MO is already a confirmed MO

Current behavior before PR:
- To-do filter displays all MOs

Desired behavior after PR is merged:
- To-do filter hides MOs with done/cancel state

Task ID: 2442058

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

closes odoo/odoo#67008

X-original-commit: b7064d9a0bf6cc78399b61cdf862db961bbf4d5c
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Signed-off-by: Noura <nouraellm@users.noreply.github.com>
2021-03-01 14:28:37 +00:00
xO-Tx de351e4873 [IMP] website: add theme loader tips
The goal of this commit is to add tips when theme is loaded
to encourage users to follow the tour (in Edit mode).

task-2440450

closes odoo/odoo#67007

X-original-commit: f5f9f336b052ddc4bd327618bad6d2a3284aa3ff
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-03-01 14:27:27 +00:00
Martin Trigaux 098569761c [FIX] sale: don't force date format
Use a regular t-field that respect the date format of the language.
Before this commit, the quote in another language was something like

   Deze offerte vervalt op
   04 March 2021

X-original-commit: 469b3c66013ff57341bbcb26c3e7c84dabebed8e
2021-03-01 10:31:35 +01:00
Martin Trigaux d2043167af [I18N] website_forum: avoid conflict with "All" of web
Cf odoo/odoo#61641 there is a conflict with the "All" string
from website_forum and the one from web
This is a workaround to make the term from website_forum a openerp-web
translation and avoid an untranslated "All" on the runbot but the real
patch should be done at the framework level

X-original-commit: 0d8bb4463012a4414e0d3373a4b39a9643cdf595
2021-03-01 10:31:34 +01:00
Martin Trigaux 80e168b2e7 [I18N] stock_account: forced fetch terms from Transifex
Some terms were translated two months ago but were not present in the files
Somehow the synchronisation failed at one point

X-original-commit: 88f5e5391b34b52abc92cd3edbd58a963b97dda3
2021-03-01 10:31:33 +01:00
Martin Trigaux f1f41b68b7 [FIX] account: translate "Balance Sheet" selection
Was using the wrong method to translate

X-original-commit: 57611ac95718643b2cb03871e655864dbd74967a
2021-03-01 10:31:33 +01:00
Martin Trigaux 831aef2a00 [FIX] digest: translate field labels
Don't access through self._fields, these are the static labels.
Refer to the ir.model.fields record that has a translated label

X-original-commit: 7fc9546ca616b5a8dcb8a8927f780ac8c197dfc5
2021-03-01 10:31:32 +01:00
Martin Trigaux 4a1c2e3607 [FIX] web: translate "View ..." title
And remove code content

X-original-commit: 65cc90107d176e349bdedfebeb6f92d7312ef202
2021-03-01 10:31:32 +01:00
Martin Trigaux 9bed319507 [FIX] website_mass_mailing: translate default toaster
When creating a new mailing, it was always in English, even if English
was not activated

X-original-commit: f8308e72d9f158c17bafa3bb09cb2915ff8ba37a
2021-03-01 10:31:31 +01:00
Martin Trigaux 706ff8fbff [FIX] account: translate selections
X-original-commit: 4b6e933d5826830b24297355a9cea8a8615bc646
2021-03-01 10:31:31 +01:00
Martin Trigaux 52a7efbaf5 [FIX] account: translate wizard line message
X-original-commit: 2f3701d97568d965a7665bf7126032d3b7527ae4
2021-03-01 10:31:30 +01:00
Andrea Grazioso (agr-odoo) 442dd05854 [FIX] hr_recruitment: display recruitment analysis when no data
Have an empty database
Install Recruitment
Employee>Departments>Administration(3 dots)>Recruitments

Missing record message raise
This occur because of an access to a record that may not exists

opw-2431929

closes odoo/odoo#66764

X-original-commit: 911aec8465a4a796297a465e96b3033d1c415628
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
2021-02-24 15:02:48 +00:00
Andrea Grazioso (agr-odoo) cdb15266ae [FIX] stock: fix rounding issue on available quantity
- Have a storable product with 3140.0 quantity on hand
- Make a sale order for 3106.40, confirm and validate delivery
- Reserved quantity will be 3106.40
- Make another sale order for 33.60, confirm and go to delivery
- Reserved quantity will be 33.59 because of a rounding issue when
calculating the available quantity

opw-2449732

closes odoo/odoo#66635

X-original-commit: bb411a2f125a09713eb749b6884308a8c2f15f36
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
2021-02-22 17:14:18 +00:00
Djamel (otd) 62c849521e [FIX] survey: fix the function extract comment from the answers
Steps to follow to reproduce the bug:
	-Go to survey
	-Choose any survey with at least one "single text box" question
	-In the survey form
	-Click on the button test
	-Complete the survey, but in a "single text box" question, write the word "comment"
	-Validate the survey
	-An error is triggered.

Problem :
In the function which extracts comments from answers, it doesn't check the type in which the answer is stored.
When there is a comment, it is stored in a dict under the key: "comment".
To find the comment, the function checks if "comment"(key) is in the answer.
But in the case of "single text box" question, the answer is stored in a string.
If the word "comment" is present in the answer, the function looking for the key "comment" will return True and try to extract the comment.

Solution :
Add a check to ensure that we are looking for the key "comment" in dict type.

opw-2446194

closes odoo/odoo#67002

X-original-commit: 7064d46a804ab86d1bc50d003b8ae63490a1ef9c
Signed-off-by: Anh Thao PHAM <kitan191@users.noreply.github.com>
Signed-off-by: Djamel Touati <DjamelTouati@users.noreply.github.com>
2021-03-01 12:58:44 +00:00
Stefan Rijnhart 2861cf29b6 [FIX] Purchase double validation can be circumvented by RPC call
closes odoo/odoo#66606

X-original-commit: 99f891f0d1614b7a783fd55c0a9fdcb1ae6251da
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
2021-02-22 13:01:59 +00:00
Thibault Francois 9b4c101484 [IMP] crm|mail: Use flanker to check email correctness
Context
-------
Lead assignement is now based on PLS probability.
We want to avoid giving the same score to real email addresses
and email addresses that are just well formed

Flanker try to acheive that be checking specific
criteria according to the domain, check the dns and mx record

Improvement
-----------
Define a mail_validate function seach as phone_validate.
If flanker is installed, use flanker for validation of
email addresses else use email_normalize.
It should help the PLS to give a bad score to well formed addresses
that flanker suspect to be wrong.

Setup
-----
NB: flanker is not available as debian package, we make it optional

To install flanker
```
pip install flanker
pip install redis
pip install dnsq
```

If you have installed it as root you may need to run
```py
from flanker.addresslib import address
```
as root for the first initialisation

closes odoo/odoo#66429

X-original-commit: f540976c8751e2bf402fed8db830ec0fbf98f654
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-02-18 09:15:35 +00:00
Denis Ledoux e00277fb5b [FIX] purchase_stock: on_time_rate product other company than PO
- User in company A,
- Purchase order in company A,
- Product in company B

```
  File "/home/odoo/src/odoo/14.0/addons/purchase_stock/models/res_partner.py", line 23, in _compute_on_time_rate
    ]).filtered(lambda l: l.product_id.product_tmpl_id.type != 'service' and l.order_id.state in ['done', 'purchase'])
  File "/home/odoo/src/odoo/14.0/odoo/models.py", line 5279, in filtered
    return self.browse([rec.id for rec in self if func(rec)])
  File "/home/odoo/src/odoo/14.0/odoo/models.py", line 5279, in <listcomp>
    return self.browse([rec.id for rec in self if func(rec)])
  File "/home/odoo/src/odoo/14.0/addons/purchase_stock/models/res_partner.py", line 23, in <lambda>
    ]).filtered(lambda l: l.product_id.product_tmpl_id.type != 'service' and l.order_id.state in ['done', 'purchase'])
  File "/home/odoo/src/odoo/14.0/odoo/fields.py", line 2483, in __get__
    return super().__get__(records, owner)
  File "/home/odoo/src/odoo/14.0/odoo/fields.py", line 998, in __get__
    record._fetch_field(self)
  File "/home/odoo/src/odoo/14.0/odoo/models.py", line 3072, in _fetch_field
    self._read(fnames)
  File "/home/odoo/src/odoo/14.0/odoo/models.py", line 3183, in _read
    raise self.env['ir.rule']._make_access_error('read', forbidden)
odoo.exceptions.AccessError: Due to security restrictions, you are not allowed to access 'Product' (product.product) records.
```

If you do not share products between companies
(if the multi-company record rule for `product.template` is enabled)
then you are not supposed to use a product from another company in a purchase order.

However, this is possible to land in the case if you enable
the multi-company record rule after you created some purchase orders,
using products from other companies.

Adding `sudo()` just to get the type of product
doesn't cost much to support that case

upg-8277

closes odoo/odoo#66956

X-original-commit: a08ba4be6518dd99ce93a803724165f62cbef032
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
2021-02-26 17:40:45 +00:00
Raphael Collet b652d84cd1 [FIX] core: convert_to_write() of x2many field with new records
When comparing the values of a new record with its origin, x2many fields
are always different because we compare new records with real records.
For instance, converting the value of a one2many field where lines have
a many2many field always returns update commands for the many2many
field.

closes odoo/odoo#66950

X-original-commit: 03a4137cc3fa398dbd0cb214dc5472a083ae33b8
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2021-02-26 16:32:16 +00:00
Francois (fge) 7b53bb4b6f [FIX] base: @odoo-module alias ending with **/
When you define an @odoo-module with an alias without any space between
the alias and the **/, the alias contains the **/.
The purpose of this commit is to no longer add the **/ to the alias.

Example:
/** @odoo-module alias=web.base**/

Before:
  odoo.define(`web.base**/`, function(require) {
After:
  odoo.define(`web.base`, function(require) {

closes odoo/odoo#66929

Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2021-02-26 16:06:43 +00:00
Adrien Widart 84ce701bec [FIX] website_sale_digital: ignore Note/Section
When downloading the digital file, if there exists one SO linked to the
current customer and that contains a Note/Section, the web page will be
redirected to the "Internal Server Error" web page.

To reproduce the error:
(Need sale_management)
1. Create a customer C
2. Grant C portal access
3. Create a product P
    - Add a digital attachment
4. Create a SO
    - Customer: C
    - Add product P
    - Add a note
5. Save, Confirm, Create Invoice, Register Payment
6. Sign in with P
7. Consult the SO web page
8. Download the file attached to the SO line

Error: The page is redirected to the "Internal Server Error" web page.

When downloading the document, the module checks the customer's access.
To do so, it gets all relevant invoices and free products. Here is the
problem, when getting the free products, the domain includes the SO
lines used for Section and Note. As a result, when it tries to read the
product of such a line, this will raise an error.

OPW-2419478

closes odoo/odoo#66931

X-original-commit: 95ba17ae86886dcf7bf22fd9500c71ee5df55b35
Signed-off-by: Adrien Widart <adwid@users.noreply.github.com>
2021-02-26 14:26:25 +00:00
Jeremy Kersten 3e238439f2 [FIX] http_routing: url_rewrite return now a tuple
Fix of refactoring 91b9dce

closes odoo/odoo#66927

X-original-commit: 03a318ff36949c80008ae35b4c744272c9986b9e
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-02-26 14:03:30 +00:00
Odoo's Mergebot 0275085d3a [MOV] hr_work_entry_contract,hr_work_entry_holidays: move from enterprise to community
Before this commit, hr_work_entry_contract and hr_work_entry_holidays were defined in enterprise but those modules could be integrated with some community applications, like hr_attendance.

taskid: 2222790

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

closes odoo/odoo#66247

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-02-26 15:04:31 +01:00
Arnaud Joset 333e06a7f5 [IMP] hr_work_entry_holidays: Remove enterprise features
Before this commit, the hr_work_entry_holidays had remaining enterprise views.
These views are now provided by the hr_work_entry_holidays_enterprise module.

taskid: 2222790
2021-02-26 08:42:24 +01:00
Arnaud Joset 793fe22f8a [IMP] hr_work_entry_contract,hr_work_entry_holidays: cleaning style
Before this commit, the imported module would trigger some runbot warnings.

taskid: 2222790
2021-02-26 08:42:24 +01:00
Arnaud Joset 7f126cec5d [IMP] hr_contract,hr_work_entry_contract: remove enterprise features
Before this commit, the hr_work_entry_contract contained enterprise views/features that could not be integrated in community.
These features are now provided by the hr_work_entry_contract_enterprise module.

taskid: 2222790
2021-02-26 08:42:24 +01:00
Arnaud Joset baa4dde1bb [MOV] hr_work_entry_holidays: move to community.
Before this commit, the module dependencies: hr_holidays and hr_work_entry were already defined in community.
As they could be integrated with some community applications, like hr_attendance or hr_holidays, it is more coherent to move them to community.

Taskid: 2222790
2021-02-26 08:42:24 +01:00
Arnaud Joset c6998b3b14 [MOV] hr_work_entry_contract: move to community.
Before this commit, the module dependencies: hr_contract and hr_work_entry were defined in community.
As they could be integrated with some community applications, like hr_attendance or hr_holidays, it is more coherent to move them to community.

Taskid: 2222790
2021-02-26 08:39:43 +01:00
Shahnawaz Idariya 8591b4f6ab [IMP] fleet: Improve the kanban view and mobile UI.
Purpose of the task is to improve the mobile UI and kanban view of
the service, contract, odometer, menufacturer and vehicle.

So in this commit,
 - Remove the record link from odometer and service kanban view.
 - Added the stage in service kanban view.
 - Display the Expiry Date in red when contract is expired.
 - Redirect to model view when we click on kanban card of the
manufacturer and add the properties dropdown to open the record
 - Also improve the some ui for small screen

closes odoo/odoo#62292

Taskid: 2348332
Related: odoo/enterprise#14959
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-02-26 04:40:58 +00:00
Nicolas Lempereur 3eb61dca64 [FIX] web_editor: have video button even if sanitized
If a field is sanitized, a6e2b48 would hide the video button because
the video does not show in backend. It is better for the consistency but
if the field appear in frontend, the video would still show so we
prevent something that worked (but is very not user friendly when
editing in backend).

This changeset go back to the previous behavior (keeping the code
simplification), at one point there should be a fix so at least when
editing we see the video (currently we see an empty div in given
conditions).

opw-2463746

closes odoo/odoo#66920

X-original-commit: 73f5781
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2021-02-26 12:32:37 +00:00
Jeremy Kersten 2c3106c365 [IMP] website: make refresh routes less visible
Primary color lets imagine that it is the primary action to be done to update
the routing. While it is just to refresh the url_from list if you have missing
route (new module installed, ...)

Maybe we should just remove this button at the end.

closes odoo/odoo#66919

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-02-26 10:28:00 +00:00
Christophe Monniez 766717d3fc [FIX] packaging: fix typo in control file
During the resolution of conflicts in odoo/odoo#66784, a typo was
introduced in debian/control file.

closes odoo/odoo#66916

X-original-commit: ccadcba6f0828aff43e94eb59ac97238eef7a4b3
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2021-02-26 11:43:08 +00:00
Goffin Simon f78e04e026 [FIX] mrp: Existing operations can only be added to one BOM
Generic operations will be applied for every manufactured product passing
through the work center.

An operation linked to a bom will only be applied when the specific manufactured bom is produced

So on a BOM, every operations must be created for this specific BOM

The widget many2many is wrong because it will overwrite the generic operations

opw:2458974

closes odoo/odoo#66888

X-original-commit: a430c06ec6ec286a2d9ef55de6eebec60feeae3f
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2021-02-25 21:49:19 +00:00
Adrien Widart d2c9629a40 [FIX] website_form: display attachment on form web page
When submitting a ticket, if the user adds an attachement, he will not
be able to see it on the ticket web page.

To reproduce the error:
(Need helpdesk,contacts)
1. Go to the settings of a Helpdesk Team (e.g., "Customer Care")
2. Enable "Website Form", Refresh
3. Go on Helpdesk web page and Publish the form
4. Create a partner P and grant him the portal access
5. Sign in with P
6. Submit a ticket with one attachment
7. Consult the ticket's web page

Error: in "Message and communication history", OdooBot's message with
the attachment is not displayed. However, when consulting the
same page with the admin account, this message is considered as
"Published". Thus, P should see the message and the attachment.

When getting the messages, if the user is not an employee, the domain is
restricted:
https://github.com/odoo/odoo/blob/e92ac60a75462dfd830254a3d0dd5d7effe1528e/addons/portal/controllers/mail.py#L128-L130
with
https://github.com/odoo/odoo/blob/cc32b7d1b396a42dd4575c681ceb422f99b6015a/addons/portal/models/mail_message.py#L30-L32
Problem is that, when creating the message with the attachement,
`subtype_id` is not defined.

OPW-2440069

closes odoo/odoo#66906

X-original-commit: b05a72d3cc181c601807b5e633766d504e06bb3a
Signed-off-by: Adrien Widart <adwid@users.noreply.github.com>
2021-02-26 10:21:29 +00:00
Michael Mattiello (mcm)andged-odoo 7086488064 [REF] web, *: remove patchMixin + imp utils.patch
* hr, hr_holidays, im_livechat, mail, snailmail, website,
  website_livechat

This commit removes `patchMixin` and improve `utils.patch`.
`utils.patch` now supports native classes and has a new parameter
used to patch class members.

`utils.patch` is now used everywhere `patchMixin` was and it must
be used to patch classes.

closes odoo/odoo#65967

Related: odoo/enterprise#16278
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
Co-authored-by: ged-odoo <ged@odoo.com>
2021-02-26 10:39:21 +00:00
Denis Ledoux b5e158c3c6 [FIX] purchase_stock: on_time_rate in multi companies
Because of the weird behavior of the ORM regarding
related field pointing to computed fields,
`on_time_rate` was taking account of all companies
when asking it through `purchase.order.on_time_rate`
but it was single-company when asked through `res.partner.on_time_rate`.

It was observed during an upgrade request issue analysis,
and in that case the problem was not even the fact
it was miscomputed, but the fact this computed field,
computed as sudo, leaded to fill the cache for
`purchase.order.line.move_ids` with `stock.move` belonging
to other companies than the user one,
and then when attempting to read values from these stock moves
a multi-company access error was raised.

upg-8106

closes odoo/odoo#66882

X-original-commit: 1b729171c5deac4fadebcff013aa061a96860b09
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
2021-02-25 18:21:45 +00:00
Romeo Fragomeli 965eed79b9 [FIX] website: o_cp_top_left class doesn't exist on mobile
Before this commit, the selector 'o_cp_top_left' was used to target
a descendent element. The 'o_cp_top_left' class was added in this commit
odoo/odoo@533db5991a
But 'o_cp_top_left' class is only available on desktop.
On mobile the layout of the control panel is different.
This produce a bug on Mobile.

After this commit, we use a less restrictive querySelector to match
the element in mobile too.

Note: we remove the 'div' for clarity/consistency

Steps to reproduce:
* Open Odoo in "Mobile mode" (small screen)
* Go to Apps
* Install a module that need website or website it self
* You are redirect to the "chose theme" => Bug

closes odoo/odoo#66870

X-original-commit: 3d401a30ee7d673776c129b27dd3b298a4c7a3fe
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Signed-off-by: rfr-odoo <rfr-odoo@users.noreply.github.com>
2021-02-25 16:17:18 +00:00
Csaba Tóth dc276a569b [CLA] Update Online ERP Hungary Kft. CLA
Add new members

closes odoo/odoo#66871

X-original-commit: 3d7663616c3524354d4bda03609b457b31d0e23c
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-02-25 16:18:52 +00:00
Alexandre Kühn 14eed232cf [FIX] mail: this.env.services.bus_service is undefined
Before this commit, a page reload or a redirect could raise following
error:

```
Uncaught (in promise) TypeError: this.env.services.bus_service is undefined
```

This happens due to `Messaging` model relying on `bus_service` in its
teardown method `_willDelete`. This is sometimes unsafe because the
bus service may not have been deployed yet.

Task-2468469

closes odoo/odoo#66857

X-original-commit: a444f9c89bb8d5790b8a068a8f120f6ea9d1b17f
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2021-02-25 14:28:20 +00:00
alt-odoo f241fc6504 [FIX] account: wrong journal in test_match_multi_currencies
A move with type 'entry' cannot be posted in a 'sales' journal. It should be
the default 'miscellaneous' journal instead.

closes odoo/odoo#66851

X-original-commit: 1c45685922b5561b8bce1c91b158184837391089
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Alex Tuyls <alt-odoo@users.noreply.github.com>
2021-02-25 13:40:32 +00:00