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.
closesodoo/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>
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.
closesodoo/odoo#67048
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
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
closesodoo/odoo#66432
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
We keep the codeownership in stable versions but disable it in master to
reduce the spam.
Will be added back at each freeze.
closesodoo/odoo#66150
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
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>
Since 14.0, 'currency_id' and 'amount_currency' should always be filled when creating account.move.lines.
X-original-commit: 7827875271adafbfc656fe09c87e37e7d1a3802f
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
closesodoo/odoo#67018
X-original-commit: 41b0d78c861a94630be28a16a13f2bae1b629777
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
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
...
closesodoo/odoo#67020
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
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.htmlclosesodoo/odoo#67025
X-original-commit: 9c2ce1f12c2bebb4a903058eac10c17ca562fda9
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
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
closesodoo/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>
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
closesodoo/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>
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
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
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
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
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
closesodoo/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>
- 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
closesodoo/odoo#66635
X-original-commit: bb411a2f125a09713eb749b6884308a8c2f15f36
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
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
closesodoo/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>
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
closesodoo/odoo#66429
X-original-commit: f540976c8751e2bf402fed8db830ec0fbf98f654
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
- 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
closesodoo/odoo#66956
X-original-commit: a08ba4be6518dd99ce93a803724165f62cbef032
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
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.
closesodoo/odoo#66950
X-original-commit: 03a4137cc3fa398dbd0cb214dc5472a083ae33b8
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
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) {
closesodoo/odoo#66929
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
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
closesodoo/odoo#66931
X-original-commit: 95ba17ae86886dcf7bf22fd9500c71ee5df55b35
Signed-off-by: Adrien Widart <adwid@users.noreply.github.com>
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
closesodoo/odoo#66247
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
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
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
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
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
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
closesodoo/odoo#62292
Taskid: 2348332
Related: odoo/enterprise#14959
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
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
closesodoo/odoo#66920
X-original-commit: 73f5781
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
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.
closesodoo/odoo#66919
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
During the resolution of conflicts in odoo/odoo#66784, a typo was
introduced in debian/control file.
closesodoo/odoo#66916
X-original-commit: ccadcba6f0828aff43e94eb59ac97238eef7a4b3
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
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
closesodoo/odoo#66888
X-original-commit: a430c06ec6ec286a2d9ef55de6eebec60feeae3f
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
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
closesodoo/odoo#66906
X-original-commit: b05a72d3cc181c601807b5e633766d504e06bb3a
Signed-off-by: Adrien Widart <adwid@users.noreply.github.com>
* 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.
closesodoo/odoo#65967
Related: odoo/enterprise#16278
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
Co-authored-by: ged-odoo <ged@odoo.com>
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
closesodoo/odoo#66882
X-original-commit: 1b729171c5deac4fadebcff013aa061a96860b09
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
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
closesodoo/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>
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
closesodoo/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>
A move with type 'entry' cannot be posted in a 'sales' journal. It should be
the default 'miscellaneous' journal instead.
closesodoo/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>