Before https://github.com/odoo/odoo/commit/254d40ffcc21f56a80a1814da7f6355d44e5670b it was possible that when a user cropped an image
using the crop tool, a copy of the original image was created that
had both original_id and theme_template_id carried over, therefore
find could be multi-record. We strengthen that search by adding
original_id=False, which ensures we always fetch the record of the
original image and not also its copies. In addition, databases that
happen to have this issue of corrupted data will be fixed
during an upgrade with https://github.com/odoo/upgrade/pull/3110.
closesodoo/odoo#82725
X-original-commit: e4bb0cd4466404e2fba62ae2d3bbaebd831fbcb2
Signed-off-by: Christophe Simonis <chs@odoo.com>
Before this commit, the server version used to detect whether the client
assets are outdated relied on the `odoo.release.version` string directly
imported at the root of the `assetsbundle.py` file.
The problem is that this string is altered by web_enterprise and we must
wait for these changes before using the string.
This commit dynamically imports the `release.version` string to use its
final version.
closesodoo/odoo#82705
X-original-commit: 9eccbd884853fddab8a17d28779d670e7d48bbc3
Signed-off-by: Olivier Dony <odo@odoo.com>
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
* indentation
* group records by models
* products records (& attributes, values, ...) in the `product_demo.xml` file
* group SO & SOL records together
* group SO's confirmation in one place
* ...
* move `model_sale_order_action_share` server action to the correct `views` folder
* remove useless nodes/indentation
* split security files by models
--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
closesodoo/odoo#82719
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
This reverts commit 11fd24856e436136236d67f01dd88acc00105e9b.
Removing the "21% S." tax made sense for Belgium,
but created an issue for the mapping fiscal positions.
A task is being created to use the tax_scope instead (in master).
closesodoo/odoo#82713
X-original-commit: 136808203545eb5d7056d941f3fc250f2871f95b
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: John Laterre <jol@odoo.com>
Apparently a migration error in
0fd773a486, probably never noticed
because nobody ever tries to copy config objects since there's a
bespoke widget, and it's specifically forbidden.
Also fix the signature of the method itself to match the normal one.
closesodoo/odoo#82711
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Whenever adding a snippet from the powerbox, the postprocessing was not
made. This could result in unexpected behavior of the snippet.
Task-2601600
closesodoo/odoo#82694
X-original-commit: bcbf8e59c83200cb079ef15cb1fa5f7783023d88
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Before this commit a "List" command hint was set as placeholder in
navigation items without content upon selection of the header menu. This
showed up when using the sidebar template of the header menu.
After this commit the command hints are blacklisted for nav-items in
website.
task-2677310
closesodoo/odoo#82693
X-original-commit: e0cc23b44d798a5bf79d3e8f7e183f5e8a3c6901
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
There was some confusion about all the types of hybrid vehicles.
Also changes the order in which they are displayed.
TaskId-2629318
closesodoo/odoo#82672
X-original-commit: 73171da60059c85355e8675061db485e84aedb05
Related: odoo/enterprise#23460
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Steps to reproduce the bug:
- Create two batches, one with picking and one without
- Try to compute their state together with an RPC call
Problem:
If the first has no picking, the second batch does not compute state because we use `”return”` instead of `”continue”`
opw-2725988
closesodoo/odoo#82671
X-original-commit: 0242fcee2618425bd87846d818cffcd368c25121
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Djamel Touati (otd) <otd@odoo.com>
Since auto-retry, real errors will lead to doubled errors on runbot.
This can be noisy and hard to understand.
This commit will help with this by using a lower log level on the first
execution. Log 25 are kepts.
closesodoo/odoo#80378
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Traceback on the ticket:
https://pastebin.com/mCAFJVWG
A browse should take an id or a list of ids as parameter.
```python
record = env['mail.compose.message'].browse(1)
attachments = env['ir.attachment'].sudo().browse(record.attachment_ids)
print(attachments)
attachments = env['ir.attachment'].sudo().browse(record.attachment_ids.ids)
print(attachments)
```
OPW-2728748
closesodoo/odoo#82664
X-original-commit: 74cfe2bc95827b52232995cd075757f54041d289
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
When computing the todo fields of maintenance requests, we could get a
`MemoryError` since we are fetching more fields that we actually need.
Here we rework the way the compute is done in order to avoid too much
prefetch.
closesodoo/odoo#82662
X-original-commit: 510831013ba081edd83191a01d562485b6ceca38
Signed-off-by: Christophe Simonis <chs@odoo.com>
* make sure full content is translated in partner language
* drop useless product param (use line product_id field instead)
* delegate order lines name computation to computes for ecommerce carts
closesodoo/odoo#82620
Related: odoo/enterprise#23432
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Steps :
- Install Planning
- Users > Mitchell Admin > Preferences > Timezone :
Europe/Brussels
- Settings > Employees > Company Working Hours > Timezone :
Japan
- Planning > Gantt View > Week > Mitchell Admin x Friday > Click "+" button
Issue :
- Start date is set by default to Thursday 05:00
whereas it is expected to be set on Friday 00:00
Cause :
- When we want to plan a shift on a day,
we look into the 00:00 to 23:59 range for this day in calendar's tz
to get the closest work time inside of it.
- Yet, this doesn't take the "resource user" into account.
Fix :
- Set these limits for the day in resource's tz.
opw-2678221
closesodoo/odoo#82555
X-original-commit: 1b248ebd58e0a57b070ebf7d67c6da78351a720a
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
We have our own html2plaintext, already used in lot of use cases instead of
just a few for the html2txt library.
Notably for emails: most emails going through Odoo stack use our simple
html2plaintext to format the body alternative. When no body alternative
is given to ``build_email`` an alternative is built using the library to
remove. Using our own parser allows to have the same results compared to
using ``MailMail.send()``. Difference lies in spaces and new lines as well
as markdown. Our html2plaintext is a bit simple and does not try to generate
Markdown but generates a simple plaintext version.
This also helps solving some issues with depending on that library.
Task-2702034
closesodoo/odoo#82486
X-original-commit: b3b9627b655cd7cb928925affed6cc8d92661e8d
Related: odoo/enterprise#23364
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Purpose of this commit is to add some tests about body alternative done
in build_email when none is given. It uses a library we are about to
remove and testing it is therefore necessary.
Task-2702034
X-original-commit: 92b102c87bbdb9073f794a414a41460e4146acd2
Part-of: odoo/odoo#82486
Creating employee from applicant was not providing the default
home_address_id
closesodoo/odoo#81121
X-original-commit: 68cdf057a9e769071fab6726eaf3b37d16959bf1
Related: odoo/enterprise#23443
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
This commit show alias_name field span in read only, whether it is emtpy
or not. The field is displayed in bold if not empty.
task-2722863
closesodoo/odoo#82649
Closes: https://github.com/odoo/odoo/pull/82065
X-original-commit: bbc4ff1059d161414ef4338981eb015871ac46c5
Related: odoo/enterprise#23445
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
The purpose of this commit is to:
- Open the form view if there is only 1 blocking task.
- Prevent the project update button to show in the view opened
through the action_dependent_tasks action.
task-2722863
Closes: https://github.com/odoo/odoo/pull/82065
X-original-commit: 22078a6a0ee0f059db8aef3a283485bc192ce0a1
Part-of: odoo/odoo#82649
The purpose of this commit is to only show 'Gross Margin' stat button
in right side panel of project update when analytic account is set
on that project.
So, in this commit we add a condition in order to only show that stat button
if an analytic account is set on that project.
task-2722863
Closes: https://github.com/odoo/odoo/pull/82065
X-original-commit: 95c1deb34330db98e24f70fceae85038d47217e7
Part-of: odoo/odoo#82649
Il during the scheduler an exception append, the error is not correctly logged.
This PR allow to catch the error with logger analyser (like sentry).
closesodoo/odoo#82648
X-original-commit: c68e1d1c13d116bda6b91fcbbcd61a26739a9894
Signed-off-by: Raphael Collet <rco@odoo.com>
Co-authored-by: Raphael Collet <rco@odoo.com>
Current behavior:
When using spanish language in PoS the "," decimal separator was ignored
Steps to reproduce:
- Create a sale order with a discount
- Change profile language in spanish
- Open PoS and load the order created before in the PoS
- The discount is not correct, for example 18.2 will become 100
opw-2718260
closesodoo/odoo#82593
X-original-commit: ac4d985c35109b82df4f095bfe84627b290d185d
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
Purpose of this commit to hide rating warning in project task
stage form view.
So, in this commit add customer ratings group to rating warning
div.
task-2696911
closesodoo/odoo#80232
Related: odoo/enterprise#22470
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
website{_*}: website, website_blog, website_event, website_forum,
website_sale, website_slides
Since the generic search bar was introduced in [1] all text fields were
truncated in search results.
This caused problems for long URLs which were truncated as well, and
therefore could become invalid.
After this commit URL fields specify `'truncate': False` in their search
detail metadata, which informs the rendering to skip the text truncation
step for that field.
Also added previously missing controller-level tests of the
autocompletion.
Steps to reproduce:
- start odoo with website_forum and demo data
- go to the Help forum
- search for "configure" in the Help forum
- click on the auto-complete suggestion
- => redirected to a 404 page because the URL was shortened
To test the fix on other models, use a long enough name that causes the
problem. E.g.: "This product has such a long name its URL would have
been truncated without the fix contained in this branch".
Note that the problem did not occur on blogs because the URL does not
contain the name, but the same fix was applied for consistency.
[1]: https://github.com/odoo/odoo/commit/7559626c54e34b41e1549e28276a650accec6986
task-2727788
closesodoo/odoo#82621
X-original-commit: 045f741be35e62f5e3a636490c6c1d475b5d78eb
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
When adding an hotkey callback through the service's API, the `activeElement` option had no effect at all and in fact was relics of the hotkey service's development process.
It has been removed as it was broken anyway and not tested.
closesodoo/odoo#82625
X-original-commit: 0e3663f28fd012d0fced14759f9f38592014c076
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Prior to this commit:
- Some of the project update right panel values were wrong (the number of sold and
effective hours were wrong if the service is in units, and eventual down payments are
now removed from the list of SOLs)
task-2703516
closesodoo/odoo#82607
X-original-commit: d1a06012c629f075b6faeaad2b17670e6c0e2aa5
Related: odoo/enterprise#23429
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
- Create two record with state == 'one' and with activities
- Create an automated action if state == 'two' then record.sudo().activity_ids.action_done()
- Set state == 'two' in same time of two record
In the loop line 261, for the first record self.action_record_id is in cache, but for the second record it is not in cache because of the unlink made by action_done(). When the orm raise during put in cache because he have no access to self.
closesodoo/odoo#82574
X-original-commit: 2207d8adbd37c6758f350cced68f285f8960c3aa
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Raphael Collet <rco@odoo.com>
Use theme_default instead of theme_common.
Instead, theme_common is not available when only website is installed as it
depends of the design-themes repository.
closesodoo/odoo#82587
X-original-commit: a10522c6509caf7f09f21e6da3224d5865f0ba6a
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
This commit will change the setting of the emptyMessage and the
footer of the main command palette.
In order to make the command palette footer more customizable, we will
replace it with a Component. For example, using a footerComponent in the
main command palette allows us to adapt its text based on the namespaces
used.
Setting up an empty message:
Before:
```
registry.category("command_empty_list")
.add("@", _lt("No user found"));
```
After:
```
registry.category("command_setup")
.add("@", {
emptyMessage: _lt("No user found"),
});
```
With this commit, it is possible to add a namespace to the footer tips:
```
registry.category("command_setup")
.add("@", {
name: _lt("channels"),
});
```
closesodoo/odoo#82541
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Purpose of this commit is to show only task that
has project_id set in 'Task Analysis' menu.
So, in this commit select only those tasks that has
project_id set in 'Task Anamysis' menu's query.
task-2722863
closes odoo/odoo#82565
Closes: #82442
X-original-commit: d8f3a0c4722d299f73892403b4ef5800913ea2a8
Related: odoo/enterprise#23409
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Steps to reproduce the issue:
- Install eCommerce module
- Go to Settings
- Ensure `Product Prices` is set to 'Tax included'
- Create a new Product as storable
- Set `Sales Price` to $1.0 and `Customer Taxes` to 10.00 %
- Under `Variants` tab add an Attribute with 2 values
- Set "Price Extra" to $2.0 to one of the variants
- Go to the Shop and select the product
Issue:
The extra price badge does not include the taxes
($2.0 instead of $2.2), however the final price does.
Cause:
The price_extra field from ptav (used in the badge) does not include
the taxes.
However, when calculating the final price, we do first the sum of all
prices (including the extra prices) and then apply the taxes.
Solution:
In the template, for each 'variants', we call `_get_combination_info`
to get the variant.price_extra with taxes included/excluded
depending the `Product Prices` setting.
opw-2669871
closesodoo/odoo#81949
X-original-commit: 6f04935d14d595faa3bb8dd6ba9e0dcf1d694886
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: Nasreddin Boulif (bon) <bon@odoo.com>
Before when we do `reserved(records)`, it iterates in a reverse
order of `records`. Unfortunately, the `__reserved__` method don't
exist explicitly in BaseModel then Python fallback on
its own implementation using `__getitem__` and `__len__` (coming from Sequence): https://github.com/python/cpython/blob/3.10/Lib/_collections_abc.py#L1047-L1049
Because it uses __getitem__, it breaks the prefetch of the recordset.
Example:
-------------
```
partners = self.env['res.partner'].browse(1, 2, 3, 4, 5)
for partner in reversed(partners):
partner.name
```
will generate 5 SQL requests to fetch data (one by record)
Then create our own `__reversed__` and handle the prefetch correctly
(like `__iter__`). Now in the example it will correctly generate only
1 SQL request because of the prefetch.
task-2687953
closesodoo/odoo#79622
Signed-off-by: Raphael Collet <rco@odoo.com>
Co-authored-by: rco-odoo <rco@odoo.com>
If an error append during an automation made by a standard user, the error is not correctly show.
closesodoo/odoo#82591
X-original-commit: d76d896400016f4ec504b34e113d5f42951970a1
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>