Before this commit, there is no way to "void" model translations, i.e.,
discard a translation and let the value fall back on the 'en_US' value.
The API of methods write() and update_field_translations() can only
overwrite the translations for the specified languages.
After this commit, calling update_field_translations() with a falsy
value except the empty string discards the corresponding translation
value, and let the value of the field in the given language fall back on
the 'en_US' value of the field.
X-original-commit: 5434fb845c393327db377abf872c448f4860a7d3
Part-of: odoo/odoo#111869
All the messages on the "Payment Status" page were using the term
"payment". This could cause confusion in users when saving payment
methods, as a "payment" related message will appear even that no
payment related transaction is ocurring.
After this commit messages will use the more generic term "operation",
aiding in consistency and as a bonus avoiding confusion in users.
Task - 3050181
closesodoo/odoo#111868
X-original-commit: 14b5bc63a27ead3df882e5f9ebe15c0387c90844
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Signed-off-by: Horacio Tellez Perez (hote) <hote@odoo.com>
Before this commit, if you have some special char like a return line \n,
or \r the get_stream_from method will crash with exception:
```
File "/home/odoo/src/odoo/odoo/addons/web/controllers/binary.py", line 163, in content_image
return stream.get_response(**send_file_kwargs)
File "/home/odoo/src/odoo/odoo/odoo/http.py", line 578, in get_response
res = _send_file(self.path, **send_file_kwargs)
File "/home/odoo/src/odoo/odoo/odoo/tools/_vendor/send_file.py", line 156, in send_file
headers.set("Content-Disposition", value, **names)
File "/usr/local/lib/python3.9/dist-packages/werkzeug/datastructures.py", line 1218, in set
self._validate_value(_value)
File "/usr/local/lib/python3.9/dist-packages/werkzeug/datastructures.py", line 1182, in _validate_value
raise ValueError(
ValueError: Detected newline in header value. This is a potential security problem
```
Now we replace `\n` `\r` by `_` before to serve the stream to avoid this
security exception from a safe way.
We decided to not use secure_filename from werzkeug because we want to
continue the support of non ascii char.
closesodoo/odoo#111851
X-original-commit: 95584e71a898017a92112f89e8a94315dd9235ac
Signed-off-by: Jérémy Kersten <jke@odoo.com>
Before this commit:
- Let's say we are in January 2023
- User's TZ has an offset from UTC (say UTC+2)
- Purchase > Create an rfq
- Set order deadline to 1st of next month (February), at 0.05am
- Add some products
- Confirm order
- Go to Reporting > Purchase then pivot view
- Add a filter on Order Date for the current month (January)
- Collapse the row groupbys
- Group the rows by Order Data > Month
- You can see the record of February and it should not be seeable.
After this commit
- the date range is now properly computed
closesodoo/odoo#111847
X-original-commit: 20c9e473419b92bbed01617c494b75847c60eea9
Signed-off-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
Co-authored-by: Kristjan Tehu <kristjan.tehu@estpos.ee>
Following odoo/odoo@44a4cdb, account.edi.document `attachment_id`
now is restricted, so force getting it's value as superuser.
closesodoo/odoo#111839
X-original-commit: 98ae03c2a2e677643484b1988e3fc80fb8d85fc1
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Xavier Alt (xal) <xal@odoo.com>
Following odoo/odoo@44a4cdb, account.edi.document `attachment_id`
now is restricted, so force getting it's value as superuser.
X-original-commit: b805e90457ef57868b9742b622465ea823b05af2
Part-of: odoo/odoo#111839
Improve the wording of the sending confirmation
dialog and the sending test dialog for emails
Task-3098731
closesodoo/odoo#108410
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Purpose
=======
Extend the customization of the confirmation dialog
by creating 2 new optionnals attributes:
"confirm-title": To change the dialog title
"confirm-label": To change the dialog confirmation label
Task-3098731
Part-of: odoo/odoo#108410
It is only useful the first time to see the help tab.
And the content is already as docstring of the action.
closesodoo/odoo#111838
X-original-commit: 89f92d46e15aed91c535f78d2ec5f32ce11142c5
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Jérémy Kersten <jke@odoo.com>
With this commit, we allow _timesheet_preprocess to accept a list of
dict of values instead of dict of values.
This represents an important gain in performance.
With 6 projects, 17 tasks/project, 10 timsheet vals/task = 1020 'vals':
Queries : reduced from 110 to 7.
Time : divided by ≃2.5.
task-3030942
closesodoo/odoo#103458
Related: odoo/enterprise#32967
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
When opening the expense homepage without any demo data while the tooltip tour is activated, and the list view is shown, a visual bug occured (see task description for video). The issue occurs only in 16.0 and after.
The origin of the problem was that the tooltip tour placed the class o_tooltip_parent not at the right div and therefore added the attribute 'position:absolute ' which caused the css defect. Preventing the specific div to get the attribute o_tooltip_parent fixes the issue.
closesodoo/odoo#111824
Task: 3147125
X-original-commit: c84f2169f76921ed9226bb6c1a0b5500f9154c34
Signed-off-by: Nicolas Viseur (vin) <vin@odoo.com>
Nested lists should not have a bullet point in front of them, but the
current conversion of HTML for emails made them reappear.
opw-3136324
task-3166100
closesodoo/odoo#111822
X-original-commit: 11f44de490d7e9c59b76aaade1d31b3041c9fb3b
Signed-off-by: Antoine Guenet (age) <age@odoo.com>
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Purpose
=======
Add a new type on the working schedule, adding "Lunch" to Morning and Afternoon. It's mandatory, because, if you don't do that, you can't assume the difference between a time that should be recorded as extra hours and a time that should not be counted because it's lunch time.
A company is not another, so to be clear, they will define what are the imposed lunch time where the employee is not paid during the week.
Specification
=============
Lunch between Morning and Afternoon
When a time period is under Lunch :
- There is no working entry generated for that period of time.
- If you work before the lunch time and after it, it's not considered as extra time.
- The employee is not paid for the Lunch time.
closesodoo/odoo#108061
Taskid: 3102363
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Before this commit, clicking on message author opens chat with
author, including in a livechat conversation.
This feature is not useful in livechat, as there's already a
way to communicate with the visitor. In earlier versions,
click on author opens profile, which is quite useful.
This commit puts back this feature of opening profile from
author click in livechat.
closesodoo/odoo#111799
X-original-commit: 2b43fb452c28554d5b3659e8531ad4de11686153
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
- remove utf-8 encoding header in python scripts
- add missing odoo license and xml headers
- alphabetical order for imports
- rename files according to model names (+ split if needed)
- remove unused variables in tests
closesodoo/odoo#111748
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Before this commit, when editing a form view, when editing a html field,
the status indicator buttons (the save and discard buttons) didn't show
up until a click outside the html field was done (change event).
Now, the status indicator buttons shown as soon as the input field is
edited (input event).
This is was already done for the other fields in [1].
[1] : 0b2d82282d7f656a9177158fd6117cc2e7a1b4d4
task-id 3147130
closesodoo/odoo#111663
X-original-commit: f56e3bca2456f04616982a9a0e77b8d4c5a0abff
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
Before this commit, the bus worker would not subscribe to any channel
if the `_start` method was called before the socket was closed after
calling `_stop`. This is due to the fact that the close handler is
supposed to clean the last subscription when the socket is closed.
In this case, the handler is never called and the subscription is
considered already doned which is not the case.
closesodoo/odoo#111405
X-original-commit: 9e32c900e922674b4423407089cee58848ecdea1
Signed-off-by: Géry Debongnie <ged@odoo.com>
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
before this commit,
the wording of the visibility options can be quite confusing.
after this commit,
- Visibility has been updated
- Visible to all: I see those training to the public
- Visible to logged users only: I am a B2B business, and I do not want the
public to see what I offer + the pricing I have on those
- Visible to members only: I am a school, I want to invite my students but
external visitors should not be able to enroll
- Move the field above the "enroll policy"
- Enroll Policy has been set to invite when visibility is set as a Course
attendee and hide the enroll policy
task- 2862003
closesodoo/odoo#102085
Related: odoo/upgrade#3946
Signed-off-by: Stéphane Debauche (std) <std@odoo.com>
* the referenced commit didn't remove the used config parameter
* it's quite dumb to stop considering the parameters of a db out of nowhere
and force the usage of a specific template when a lot of databases were potentially
using another one.
This commit makes sure the parameter is still used when defined.
It is set to the forced valued in the data by default anyway.
task-2880950
closesodoo/odoo#97565
Related: odoo/upgrade#3965
Related: odoo/enterprise#30168
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
This commit reworks the display of the default SO values
in the settings to make it clear to the users what those
settings impact and that they are overridden by the quotation
template when specified.
task-2880950
Part-of: odoo/odoo#97565
Allow the feature activation by company instead of database.
It wasn't logical to specify the days by company but enable/disable
the feature by database.
task-2880950
Part-of: odoo/odoo#97565
When there is a problem in the peer to peer network where we try to
recover a connection, retry with exponential backoff instead of
potentially spamming the server indefinitely.
task-3164011
closesodoo/odoo#111802
X-original-commit: fd97295c9cf8b1b0c800f407bb5f538f78cc2665
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Before this commit, the image dimensions were not properly converted
when converting HTML for e-mails.
opw-3144322
closesodoo/odoo#111793
X-original-commit: 1d5c8c9adf18aded19d945cd9b0f72eb9b8bbc72
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
The custom table selection was not limited to the editable area bounds,
which means we could end up styling a table as selected, which did not
belong to the editor's scope. This sometimes happened when Firefox
triggered a selectionchange event during the instantiation of the editor
and the selection happened to be in a table outside the editor.
opw-3150654
task-3166078
closesodoo/odoo#111779
X-original-commit: d51aab54775ed541d7955cee032aceed143d3a08
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
When we change something in the DESIGN tab of mass_mailing, we edit a
stylesheet. This means we need to flush the rules cache so
convert_inline applies the new rules in its conversion.
opw-3114599
closesodoo/odoo#111778
X-original-commit: 4ebf106e65ae4901c03c76606a05d8cd2e0790d7
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
The CSS rules cache for convert_inline was stored on the edited
document, which is problematic since OWL destroys the document where we
used to just hide it (eg, when switching tabs in the form view).
X-original-commit: d432ebbddae7192eca7215a8489abb3ad91a45f2
Part-of: odoo/odoo#111778
When converting html for emails, contenteditable attributes should be
removed.
X-original-commit: 9b4cff9f6ab8e1738f3fc486875f9e4ab16cea9d
Part-of: odoo/odoo#111778
The video command is supposed to be forbidden in tag-sanitized fields. A
field gets tag-sanitized if sanitize_tags is true or by default if the
field is to be sanitized (and sanitize_tags is undefined). Before this
commit, the video command was not forbidden if sanitize was true,
regardless of the value of sanitize_tags.
closesodoo/odoo#111777
X-original-commit: 96b4edfd40a3c131a7709986fc3e1599c177f986
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
The images command was disabled in html fields if the field's view
didn't define the `allowCommandImages` option. This allows that option
to be undefined so it can be overridden by its default value when such
is the case. Before this commit however, the option was always set to
`false` when undefined (the opposite of the expected default value).
opw-3134660
X-original-commit: bf0f17d2c9f19b88d4db2f4e15423ec0c831167f
Part-of: odoo/odoo#111777
After this commit GST treatment will be only assigned to Indian invoices/bills.
closesodoo/odoo#111738
X-original-commit: 6ede766eab05b621bfee6e6af259c7d2d0bfbd94
Signed-off-by: Josse Colpaert <jco@odoo.com>