Currently, the boxed and striped document layouts still pass in the
default background image when set to Blank. This image is mostly hidden, but
displays artifacts when printing or changing background color in program
like Paint. This fix removes the background image from these layouts when
"Layout Background" is set to "Blank".
In v15, Odoo changed the way that Document Layouts can be configured by
allowing the Geometric background image to be set on any of the base layouts.
A conditional was added to the standard and bold layouts to check the
selection for the "Layout Background" setting, and to set an empty string
for Blank. This conditional is missing for boxed and striped, causing
the artifacting issue. This fix adds in that conditional, which
removes the artifacting.
opw-3232991
closesodoo/odoo#118921
X-original-commit: 92f28da10e4fa3c80be0759c131febb5e6289e20
Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
Before this PR:
The 'public_views' field is editable by the user.
After this PR:
The 'public_views' field is not editable from now onwards.
Task-3262249
closesodoo/odoo#118989
X-original-commit: b9b133dab12db9ec3d7231ea8d50f5188e98b5a6
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
In Indian government required audit trail report for private limited companies
So from this commit user can't delete journal entries after posting once.
Create an audit trail report from mail.message to show a full log of journal entries
task - 3239932
closesodoo/odoo#118945
X-original-commit: f4365ee1c6e979e352ece66b03f3c00e830f2117
Signed-off-by: Josse Colpaert <jco@odoo.com>
Customers can add rentable and not soldable product
to their wishlist but can't see it in the wishlist page.
opw-3252518
closesodoo/odoo#118931
X-original-commit: ea126a2bee271ae2d80814cdf081833015870229
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
This commit fixes a use case where a user would not be able to access the
property field values of a record because he did not have access to that
record's parent (from the property field definition configuration).
In a concrete example:
- In the Knowledge App
- Marc Demo has access to the "Article B".
- The parent article of "Article B" is "Article A".
- Marc Demo does not have access to "Article A".
- Article B has some property fields values configured.
- If Marc Demo tries to open "Article B" -> crash
This is caused by the framework having to read the property definition from the
parent record, which we don't have access to.
A "sudo" was added to allow that use case (which is supported).
In addition, this commit also adds further checks on the web client side to
gracefully handle a special use case where the end-user could not write on the
parent record because of record rules.
(It only checked *access rules*).
To avoid making an extra RPC every time we load the record (to check if we can
write on the parent), we only make that check when the user tries to modify
(add/edit/remove) a property and show a proper error message.
(This also applies when creating new property field tags).
Task-3062064
closesodoo/odoo#118929
X-original-commit: bc538f6944461a642bac0f757ec96d7f8cc14c9a
Related: odoo/enterprise#39946
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
Before this commit, the term used to filter the powerbox commands was
split with a simple .split('') call, separating each character. This was
erroneous as it disregarded the fact that special characters are first
escaped with a leading backslash (e.g. '\['), the combination actually
representing a single character '['. Separating those pairs would render
the constructed regex invalid when using such characters, resulting in a
traceback.
This commit replaces the use of split with a match, regognizing the use
of backslashes for escaping.
closesodoo/odoo#118922
X-original-commit: e34e908a06c18ecee5d762f6fca785b23977f47d
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
The way the live HTML editor for html_field works means the header
(and other nodes that should only appear once) are removed
and the content inserted inside the body.
This results in values being edited without the user being aware.
For emails, this results in any email using 'style' in the header
to break on GMail and other clients that do not support 'style'
outside of the header.
When an html_field is passed a value containing a header
the html_field appears readonly and the user is able to toggle
the code view. Which enables them to edit the 'raw' HTML and see changes
while preventing the presentation view from affecting the database value
task - 3035163
closesodoo/odoo#118920
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Thiry Renaud (reth) <reth@odoo.com>
As the original PR was forgotten, let's achieve the JCVD style big gap
beteween Ubuntu stable and Debian stable 11.6 Bullseye.
closesodoo/odoo#118889
X-original-commit: f21c159d9f0c1a3f3f1f3a013c7bf0fc8fa8b554
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
before this commit, after running an older version,
lets say odoo 14 and trying to access 16 in the
same browser return traceback without redirecting
to db selector page
and this happens due to the missing env in request,
which returns as None.
after this commit, no traceback wont be shown and
will open the db selector page
closesodoo/odoo#118851
X-original-commit: 900303c18243e3b97414b3dbf5eb7ee5b8c9c080
Signed-off-by: Julien Castiaux (juc) <juc@odoo.com>
Replaced _.each() functions (average 235 occurences)
Description of the refactoring this PR addresses:
Current behavior before PR:
There are underscore.js function enumerated above used in odoo.
Desired behavior after PR is merged:
These functions has been replaced by native javascript
prototypes/methods/functions.
TaskId : 3246238
closesodoo/odoo#118565
Signed-off-by: Georis François (fge) <fge@odoo.com>
A new `_track_set_author` method is now available to explicitly set the
author of the tracking messages.
Related Enterprise PR: odoo/enterprise#38986closesodoo/odoo#117073
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
On Chrome, and while adding a new image to Images Wall snippet (on
"masonry" layout), The layout adaptation method will remove the snippet
content to reinsert new images.
Sometimes, the appended images are invisible and not correctly loaded
(only when Chrome cache is enabled).
In this commit, we append a "clone" of each image to the snippet
container to prevent this behaviour.
opw-3240231
closesodoo/odoo#118658
X-original-commit: https://github.com/odoo/odoo/commit/0d43aec24baad6420e0fe150a9c19d33c0b74198
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Steps to reproduce (the issue occurs only on Chrome):
- Go to website > Add an "Images Wall" block > Add images and save.
- Then try to add more images > new images are removed immediately.
Right after adding a new image to the snippet, the whole content will
be removed (see `registry.gallery` > `mode()`) and replaced with new
images in the current layout.
This adaptation will trigger a `historyStep()` on the editor side while
the "unbreakable protection mechanism" is detecting node changes inside
unbreakable ancestor and setting `_toRollback` to a truthy value,
leading to undo the last updates...
The goal of this commit is to fix this behaviour by preventing the
unbreakable protection code to be applied on image wall layout
adaptation.
opw-3240231
X-original-commit: https://github.com/odoo/odoo/commit/93b1751ff10374e21750da71ad84b7607f30371f
Part-of: odoo/odoo#118658
This PR fixes a bug where the author avatar of the parent message of
a reply had the wrong avatar (the one of the of the reply
author instead of the one of the parent message author).
closesodoo/odoo#118878
Signed-off-by: Debondt Didier (did) <did@odoo.com>
The method `_find_or_create_bank_account()` is defined for an
account.bank.statement.line so that it returns either the bank
account found or created. The extension made by l10n_ch does not
return the record found/created by a call to super(), which may
break reconciliations.
The code for the reconciliations in which a record is expected to
be returned can be seen at: https://github.com/odoo/odoo/blob/
c0eb0d41a3e6c1c766278884a745d45952799393/addons/account/models/
account_bank_statement.py#L1232.
The original implementation of `_find_or_create_bank_account()`,
where a record is returned always, is at: https://github.com/
odoo/odoo/blob/c0eb0d41a3e6c1c766278884a745d45952799393/addons/
account/models/account_bank_statement.py#L1282-L1291.
closesodoo/odoo#118451
X-original-commit: 6c7385c74fafbe84042261e29565a77e2ca0c03c
Signed-off-by: Laurent Smet <las@odoo.com>
When clicking on a button from the link popover, the popover gets
hidden, which pauses the editor's mutation observer until the popover is
fully faded out. This is problematic when the button in question calls
an editor command which we need to be able to undo, since the mutation
observer will still be paused during the command execution. This lets
the buttons' listeners handle the hiding of the popover themselves to
prevent this race condition.
closesodoo/odoo#118248
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Before this commit when a button containing a text then an icon was
unlinked in Chrome, all further buttons were also unlinked (see steps
below).
It turns out this bug is due to the browser's `execCommand`
implementation so this commit reimplements the feature without relying
on it.
Steps to reproduce (in website module):
* drop Text+Image snippet twice
* inside first button type /image and insert a pictogram after the text
* click on the text of the first button => the link popover appears
* click on the unlink button of the popover
=> both buttons become flat texts in Chrome
=> nothing happens visually in Firefox, but the <a> actually gets
turned into a <span>
task-2778912
Part-of: odoo/odoo#118248
Co-authored-by: Antoine Guenet <age@odoo.com>
Co-authored-by: Benoît Socias <bso@odoo.com>
After this commit, we will be using float_compare function to compare
points. This will ensure that any floating point errors are properly
handled and that we receive correct responses from the
`validate_coupon_programs` function.
opw-3264681
closesodoo/odoo#118829
X-original-commit: 48013733a6e8b655cbc81211b1010e76102b9c2a
Signed-off-by: Heinz Robin (rhe) <rhe@odoo.com>
Signed-off-by: Pedram Bi Ria (pebr) <pebr@odoo.com>
Before this commit, the cancel button is visible in the done state and
on clicking showing the validation that it cannot be cancelled.
by the commit:
https://github.com/odoo/odoo/commit/8d37cf462badc25d911d3fa6d3382c6f7418904f
one of the cancel button in the form is made hidden in the done state,
similarly applying for the other cancel button also.
also currently on trying to delete a done repair order, it says to
cancel first and then delete the order, from the commit:
https://github.com/odoo/odoo/commit/8d37cf462badc25d911d3fa6d3382c6f7418904f
cancelling a done record is prevented, thus modifying the warning
message and its related pot file
After this commit, the cancel button will not be visible in the done
state.
closesodoo/odoo#118726
X-original-commit: 981f804ff507f693a395bb1146a33eb5f06d84a3
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
As a display line does not need to fulfill the dropship check, we skip those
and we do give the user a hint which lines are potentially not fulfilling
the check.
Reproduce:
- Create a purchases order with a picking type for dropshipping
- Add a different destination address (i.e. of another subcontractor to follow up the next manufacturing process)
- Add products with a defined BoM with type subcontractor and vendor
- Additionally add a section or a note
- Try to confirm the purchase order
Result:
- A user error will be triggered about a line which does not fit the current use case
Solution:
- as a section or a note should not be checked we do not trigger for those
- for other products which do not fit the use case we let the user know which lines are blocking
closesodoo/odoo#115044
X-original-commit: 5ba435d1ece208453fc73993b8018c68bb5f889d
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
When creating an employee with a private contact,
the contact will not be automatically added to the employee's followers.
The desired behavior is that the contact is added
to the followers even if it has a private address.
Commit: 8760a4d0575ecdb175f73a2f2674d93962fe905d
However, this behavior will not be possible because
adding a contact with a private address is forbidden.
Commit: 20536e1bbeb641539c0de44364f8376e7cef651b
Solution:
The solution is to use the private method `_message_subscribe`.
This is not a problem in the business case.
Indeed, the people who have access to the employee's file
also have access to the private contacts.
Moreover, the access rights of the public method `message_subscribe`
do not concern this business case.
opw-3249646
closesodoo/odoo#118843
X-original-commit: f53d4a28d46baaed4c862392b36bcaa73b642336
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Signed-off-by: Lefebvre Thomas (thle) <thle@odoo.com>
Before this commit: if the partner belonged to "Company B" and the
default company was "Company A", it would cause an issue during
the creation of the record (opportunity, ticket, ...) from the mail plugin.
Community PR: https://github.com/odoo/odoo/pull/112088
The solution is to use the partner's company to create.
opw-3141578
closesodoo/odoo#118831
X-original-commit: 21dc6cd01d9262fdf0007249194857e4b75e695e
Related: odoo/enterprise#39903
Signed-off-by: Stéphane Debauche (std) <std@odoo.com>
The field `requires_allocation` is a selection field
that is required.
Using it in an if statement without a comparison
operation will always return true.
opw-3274826
closesodoo/odoo#118854
X-original-commit: 486498ddf1d29c7fc58107e83421686ace30ff4f
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Signed-off-by: Lefebvre Thomas (thle) <thle@odoo.com>
Steps to reproduce:
- Go to accounting > journal entries > create a new journal entry.
- Add a line with an account.
- Add a second line.
Previous behavior:
We are going to get in the second line a suggestion of the first line
introduced, also even if we don't select the suggestion the taxes of
the suggestion will be applied.
Current behavior:
As discussed with the PO, we only want to get suggestions when we used 2
accounts in a row, so the 3rd line will be the one getting the
suggestion. And we also avoid seting the taxes of the suggestion if we
don't select it.
Related to #39784
opw-3098361
closesodoo/odoo#118865
X-original-commit: 927890d0178c361ef8d80fe6a1ec2ffaefaf73fd
Related: odoo/enterprise#39921
Signed-off-by: William André (wan) <wan@odoo.com>
Before this commit, the project onboarding tour: the step to create a new stage
get validated if the user clicks on the 'add' button without actually creating a
new stage
After this commit, it will point first to the text area for the name and then
add tooltip will be highlighted so tour does not consumed without adding the
stage.
task-3049636
closesodoo/odoo#118825
X-original-commit: 255fa6245114531d3a0fad4f4f0739e5ab57d3b8
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Before this commit, when the user changes the access rights of another
user, he will see a warning message the other access rights will change
with his changes. In that warning message, `Other` category could be
displayed and that category is only displayed in the user form view if
the user is in debug mode since it is a Technical category.
This commit hides the `Other` category in the warning message when the
user is not in debug mode to be consistent with the visibility of that
category in the form view.
task-3049636
X-original-commit: 9998ec50652a0c9b66e5f2b2c0ef5ce30861b79f
Part-of: odoo/odoo#118825
An error is raised when trying to set the date of a note in the
activities
Steps to reproduce:
1. Install Notes
2. Click on the activities icon (top right of the screen)
3. Click on 'Add new note'
4. Set a date to the note
5. An error is raised
Solution:
Use the eventDate only if the input is set, get the locale from the
getOptions function and set the datepicker warning regardless of where
we get the date from
Problem:
`this.date` can be undefined
closesodoo/odoo#118824
X-original-commit: eeae6c92bf7343d046a81ef2ae8b80443b353ad0
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
Signed-off-by: Guillaume Merlin (megu) <megu@odoo.com>
Previously, the "Other applications" smartbutton was incorrectly
matching with the applicants with '' on the fields. We don't want
applicants to match if both of them has '' on the matching fields.
Moreover, record rules were not correctly applied for application_count
calculation, as current record will not match with similar record
which has no company defined on it.
This commit fixes the above mentioned issues.
task - 3266694
closesodoo/odoo#118805
X-original-commit: e8263e56423432e9465f70d26fce60c021eabaa2
Signed-off-by: Kevin Baptiste <kba@odoo.com>
At the moment, XSD files are automatically downloaded at database
initialization, which is quite unnecessary.
The idea is to change Odoo's use of XSDs from being systematically
downloaded and used for validation to simply being available if desired
(e.g. for development or for customers who want them).
To achieve this, this commit does the following:
- remove the XSD download crons;
- provide a 'download XSDs' button in the Settings (next to the debug
mode button) which is available in debug mode;
- skip XSD validation if any required XSD file is not present; and
- deprecate the 'force_reload' option.
Entreprise PR: odoo/enterprise#38350
Task id: 3010716
closesodoo/odoo#118790
X-original-commit: c8174c7914e567489de74b574b076467440bdb2d
Related: odoo/enterprise#39879
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Antoine Dupuis (andu) <andu@odoo.com>
The 'Generate payment link' action on account move records was only
shown to the users of the group 'Show Full Accounting Feature'
(and to salesman when sale is installed).
This means that if you only have invoicing app (`account` module) installed,
you don't see the action.
This commit makes sure the action is visible to all accounting users, like
the refund wizard.
closesodoo/odoo#118800
X-original-commit: 8cf2aebe9582a12b0f2309f25844e0b2d82ed3e2
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
This update contains the following commits:
[FIX] components: solve missing update (concurrency issue)
[DOC] remove old references to comp for useRef hook
[FIX] devtools: Fix build commands for windows users
[FIX] devtools: Fix devtools in detached window
[IMP] devtools: Add a button to navigate to the doc
[IMP] devtools: Add devtools documentation
[IMP] Allow app to be mounted in shadow DOM
[IMP] playground: allow sharing playground links
[IMP] runtime: allow validating object values using a type description
[FIX] devtools: Increase vertical padding of the search bar
[FIX] devtools: Hide the collapse all button
[FIX] devtools: Fix bad computation of highlight boxes on the page
[FIX] package: Auto-update package-lock.json
closesodoo/odoo#118798
Notes: https://github.com/odoo/owl/releases/tag/v2.1.1
X-original-commit: a57cd7b2f84a4ebc06f93cabb903d1ff6f23e23c
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Géry Debongnie <ged@odoo.com>
Steps to reproduce
==================
This only seem to happen on Firefox
- Go to Email Marketing
- Open a campaign
- Go back to the homepage by using the topleft square button
-> `$(...).offset() is undefined`
Cause of the issue
==================
The ResizeObserver used in MassMailingFullWidthViewController is still
triggered, even though it shoudln't.
Solution
========
Disconnect the observer when the component is unmounted.
opw-3271101
closesodoo/odoo#118785
X-original-commit: d5f6bc2b33c3b83520ed2ed710610b69dbe67b75
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
When updating the recipient bank on a posted vendor bill the chnages
will not be saved.
Steps to reproduce the error:
1-Go to accounting
2-Create a vendor bill and confirm it
3-Change the bank recipient and click manual save
4-Reload and you can see the changes disappeared
The error was happening because the recipient bank was not displayed as
readonly on a posted state of the account move.
opw-3247282
closesodoo/odoo#118783
X-original-commit: 7e7ca95080a601ccf5c0da679aae00a61a9f8ccf
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
Signed-off-by: Mahdi Cheikh Rouhou (macr) <macr@odoo.com>
When new records are used to precompute some fields, the computations
are expected to use the "right" values for floats, in particular float
fields are expected to be rounded.
closesodoo/odoo#118518
Signed-off-by: Raphael Collet <rco@odoo.com>
Edi format is going to be removed eventually - `account_edi_proxy_client` should not depend on it and be more flexible in general.
This commit:
- Removes edi_format field from `account_edi_proxy_client.user` model. We still have to add them in `l10n_it_edi` as it still heavily relies on edi format for now.
- Adds a way to have a unique edi user per company, proxy user, edi mode combination.
This is a necessary step before adding peppol, which will also depend on the account_edi_proxy_client
closesodoo/odoo#116059
Related: odoo/upgrade#4458
Signed-off-by: Laurent Smet <las@odoo.com>
Since the Owl conversion of the partner autocomplete widgets, the search
by VAT number on a `Many2one` field of `res.partner` wasn't working
anymore.
closesodoo/odoo#118784
X-original-commit: 6229674b1788b4e9b62ebc5393e2d09b68b4a56e
Signed-off-by: Florian Daloze (fda) <fda@odoo.com>
Signed-off-by: Louis Baudoux (lba) <lba@odoo.com>
This commits aims to improve the search feature in the export dialog.
Now, the search isn't resetted when a field is added to the export list
anymore. It is also possible to search in the list of fields using the
technical name of the field.
A test has been added for the search feature in debug mode, and another
one has been adapted to verify that the search input still contains the
string previously entered.
task-3266632
closesodoo/odoo#118767
X-original-commit: 83e58a0e7e1a6f50ad03a098829946d56393d496
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
This commit fixes the search feature of the export dialog. Before this
commit, it was impossible to display subfields that would match the
search pattern, since the filter was only applied to look for fields
at the 'root' of the available fields.
Now, it is possible to search and find subfields that matches the
pattern, and they are displayed inside their expanded parent(s).
A test has been added and verify the search feature.
task-3245492
X-original-commit: cd581aa41874dadb5c87605ed49b105959f1b222
Part-of: odoo/odoo#118767
before this commit, the form view of
ir.actions.act_window.view was not properly aligned.
* open any menu linked with type ir.actions.act_window
* click on Edit Action from debugger button
* click on Add a line from the View one2many field
after this commit, the view will be
aligned properly.
closesodoo/odoo#118764
X-original-commit: 369a8cfca3f8165d6a7b6849b65564e396de9e76
Signed-off-by: Julien Castiaux (juc) <juc@odoo.com>
Steps to reproduce:
- Configure incoming mail server and set it to create X record
on incoming mails (X can be any model with a chatter)
- Create a CSV file and set the encoding to UTF-16
- Send the CSV file through Gmail to the Odoo instance
- Go to model X and open the created record
- In the chatter, click/download the CSV file
- Open the downloaded file with Geany (or any file editor that can
show the file encoding)
Issue:
The file encoding is not the same as the original file (utf-8 instead
of utf-16).
Working with Outlook.
Cause:
The difference between Outlook and Gmail is that Gmail provides the
charset of the file.
The content of the mail is retrieved using `email` python lib.
The lib will try to retrieve the charset of the file and fallback
on `ASCII` if not available, then return the decode content.
```python
def get_text_content(msg, errors='replace'):
content = msg.get_payload(decode=True)
charset = msg.get_param('charset', 'ASCII')
return content.decode(charset, errors=errors)
```
Example:
content = b'd\x00a\x00,\x00,\x00,\......'
Outlook:
charset = 'ASCII'
return => 'd\x00a\x00,\x00,\x00...'
Gmail:
charset = 'UTF-16LE'
return => 'da,,,,,\n,,,,,\....'
In the post process of the attachment, the content is encoded in
'utf-8' (to then encoded in base64) before creating the attachment
record.
Content encoded to 'utf-8':
Outlook: b'd\x00a\x00,\x00,\x00...'
Gmail: b'da,,,,,\n,,,,,\n....'
Therefore, when writing the file on the disk, the encoding is based
on the binary content.
Solution:
When parsing the mail, add the encoding charset to the `info` variable.
Then, when creating the attachment, use the charset in `info` (or
fallback on 'utf'8' if no charset set) to encode the content.
opw-3089009
closesodoo/odoo#118694
X-original-commit: 2d1b13e68d8bb204ecfe12a9d3db519c4264592c
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Nasreddin Boulif (bon) <bon@odoo.com>
This PR adds a banner on archived channels in detailed view
It also adds a banner on archived channels in kaban view, and
reduces the space available for description in case of banner.
Task-2494469
closesodoo/odoo#117619
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>