If xlwt is not installed on the server, the option is disabled.
However, the first element was checked, even if it is disabled.
Trying to export record without xlwt was causing a traceback.
Introduced at b60de0db41 where xls is now the first choice
closesodoo/odoo#30724
On mobile, swiping right/left switches to next/previous record.
This feature prevents the horizontal scroll of the form notebook's tabs by
overtaking the swipe gesture on those elements.
This issue had different consequences depending on the platform:
- on iOS: the tabs cannot be scrolled at all.
- on Android: the tabs can only be scrolled by using a two-fingers
gesture
This commit restore the horizontal scroll on the tabs but also keep the
swipe-gesture to navigate records.
opw-1929267
closesodoo/odoo#30658
As of 12.0 the superuser account (UID 1) is only meant to be used for
advanced debugging, and non-superuser admin accounts are used for
day-to-day administration.
Adapts the admin detection system to allow non-superuser admins to
select the report layout as well.
The payment reconciliation screen can't be opened if there is no partner
on a payment, and currently crashes with a traceback.
Rather than hiding the button which could cause surprises for users, we
can raise a proper error to explain why it can't work, for the cases
where a payment has no related partner.
This could happen for example when a customer paid via a direct
/website_payment/pay link.
When we use "Send invitation again" on a survey.user_input, it will send
the first survey.user_input it finds corresponding to:
- the state "new" or "skip",
- the partner it must be sent to,
- the survey the user_input corresponds to,
- the email it must be sent to,
or if none found, it could be create a new one.
This is an okay behavior in most instance, but in the case of
hr_appraisal where a manager could have same survey to fill for
"employee A" and "employee B" and when you send them again, we would receive two
mails linking to the same employee.
With this changeset, the current behavior is kept but when an existing
user_input is resent, we prioritize itself before searching a matching
one.
opw-1934478
closes#30693
Following revision 61eef73b52
the fallback to the standard external layout when
the external layout is not set on the company has been removed.
It therefore leaded to the raise of the exception
```
The report's template '%s' is wrong, please contact your administrator.
Can not separate file to save as attachment because the report's template
does not contains the attributes 'data-oe-model' and 'data-oe-id'
on the div with 'article' classname.") % self.name)
```
when the external layout was not set,
which could happen quite easily in a multi-company environment,
if you do not set the company external layout after having created it.
This revision simply puts back the fallback as it was before.
opw-1931195
closesodoo/odoo#30687
When using the "test import" feature to import leaves request, odoo
fails with a 500 error and no error message.
The only difference with a real import is that the test dry-runs by
rollbacking. The issue here is that mails are sent *after* a commit
is done hense crashes because they do not exist anymore.
opw-1916913
closesodoo/odoo#30523
Before the control panel refactoring, whenever a user pressed ENTER in
the search bar (with no text), the current view was reloaded. This
untested behaviour was changed (not on purpose) with that refactoring:
instead of reloading, the search view add a useless filter in the list
of facets.
We restore the previous behaviour in this commit.
closesodoo/odoo#30503
Before this commit, clicking on an item from the
emoji menu of a composer was not putting the emoji
in the input.
Steps to reproduce:
- Open discuss app
- Select a conversation with a composer
- click on emoji menu in the right-side of the composer
- click on an emoji in the emoji menu
> the emoji has not been put in the input of the composer
This problem was caused by a race condition with the event
`focusout` on the emoji button and the `click` on an emoji
item. `focusout` always happens before `click`, and `click`
event following a `focusout` event can only happen when the
element is visible. This was not the case, because the emoji
container is removed from the `focusout`, so no `click` is
triggered on the emoji item.
This commit fixes the issue by listening on `mousedown` on
the emoji item instead of `click`, which is triggered before
`focusout`.
closesodoo/odoo#30694
When printing a delivery order in waiting state under MS Windows, the
produced PDF does not use the proper font for the warning line.
This leads to an unreadable line full of small rectangles.
The problem comes from the fact that the 'fa' class is applied to a full
paragraph.
With this commit, the proper 'i' tag is used to display the exclamation
triangle.
opw-1931892
closesodoo/odoo#30680
purpose:
when creating a writeoff from the manual reconciliation widget (invoices & payment matching), there's no way to specify the date of the writeoff journal entry
specs:
in v12, add a date field in the js and set the date of the writeoff entry accordingly
Was PR #29794
Was OPW 1896593
closesodoo/odoo#30676
OPW 1891131
closes#27497
When creating a new bank account/partner address, the view displays the 'state 'field before the 'country_id' field, which naturally leads users to select the state before selecting the country.
But there was problem: in order to select a state, one had to first select a country, which was confusing.
Done:
- allow the user to select the state before the country (without restriction on country)
- remove the state from the form when the country changes, if the state (name) is not in the country
- automatically set the country when the state is set
- always display the country code in the name_get of res.country.state, to deal with the case where different countries have a state with the same name
Task 1933763
Be able to reconcile this scenario :
- You invoiced 00 to a contact—> receivable 00
- You received a 0 bill from the same contact—> payable 0
- Contact pay you 0 (bank statement)
- You want to reconcile all the things easily from bank reconciliation
the story looks like (bank move is the one to be managed) :
```
journ n° compte contact DEBIT CREDIT Mach
sales 12 400000 Clients Azure Interior 100.00€ 0.00 € A1
sales 12 701000 Ventes Azure Interior 0.00 € 100.00 €
purchase 11 440000 Fournisseurs Azure Interior 0.00 € 50.00 € A2
purchase 11 600000 Achats Azure Interior 50.00 € 0.00 €
bank 3 550001 Bank Azure Interior 50.00 € 0.00 €
bank 3 400000 Clients Azure Interior 0.00 € 100.00 € A1
bank 3 440000 Fournisseurs Azure Interior 50.00 € 0.00 € A2
```
closesodoo/odoo#30664
Access rights issues are currently hard to diagnose (especially from
ir.rule) due to how little details they provide.
This makes a pass over various sources of access errors and:
* improve/clarify the base message
* provide an alternative message with more details in debug mode
- [x] ir.model.access
- [x] ir.rule
- [x] related fields
- [x] fields with groups
- [x] close#28451 (provide both _name and _description in access error messages)
Task [1886746](https://www.odoo.com/web?debug#id=1886746&model=project.task&view_type=form&menu_id=4720)
closesodoo/odoo#30144
When an access error bubbles through a related field (aka the user
doesn't have access to the delegate or the delegate's field), append
the "intermediate step" so that it's easier to understand e.g. that
the access error to a partner really comes from accessing a user or
somesuch.
In debug mode, if an access fails due to access rules, try to provide
a clearer error message & include a list of the rules which fail for
the record-set.
Note: for read() operations it'll be a bit misleading as failed
records will get a list of all the rules failing for the recordset,
only some of which might apply to that specific record.
Impacted modules: portal, rating, website_rating, website_slides
This merge modifies the some aspect of posting a message for public
document, in order to implement the rating (message+rating) on a slides
channel.
We now support the use case of posting without having the right to write
on a document, and force the author of the message (as it is required to
be logged to post a message). The security has been improved: to do so,
the document token is not leaked anymore. Only the signed token (by current
partner id) is used.
The rating mixin has been modified to handle displaying average and count
(per document), in an efficient way.
A new frontend message composer is born in website_rating (as it allow to
post a rating with a comment). To do so, a little refactoring of the
Portal Chatter has been done.
For more details, please have a look at the subcommits. They are well
explained and correctly split.
Task-1902304
closesodoo/odoo#30655
When a portal user post a message to review a channel, we
want to allow him to edit its own comment and rating.
This commit modifies the special check access method in
portal to extract the security check and reuse it to
allow user to update its comment on slide.channel only.
We decided to reuse existing widget (new rating popup
composer) to do the message modification.
Task-1902304
This commit fix the display of a label when the user add
a review; when selecting desired stars, the label corresponding
to the star is displayed in a badge.
The bug probably comes from the update to bootstrap 4.
This commit allows user to rate a slide channel: using the new Popup
Rating Composer, users having access to the slide channel can submit
a rating with a comment. Then, lower in the page, they can see the
ratings of other users.
Task-1902304
Before this commit, it was possible to post a message on a document
the user has no access, thanks to a token. In addition to this token,
if a hash (signed token with a partner id), the author_id of the message
was forced.
This commit change a little bit that logic by distinguish 2 cases:
1/ Token only: anyone with the token can post a message on the document. If
the user is not logged (public with token), the author_id will be the
customer of the document (or the public user). This case is moslty used
for business document, through the portal or with the "share link" for
instance.
2/ Signed token: user has no write access to the document, but can post a
message on it. The user have to be logged, as the token is signed with its
identifier. The goal here is to avoid leaking the access token's document
to all visitors. This case is mostly used for public content, such as blog
posts, slides, ...
The token case was already existing. The second is now working with this
commit. To do so, it was required to
- move `_sign_token` from the portal mixin to mail.thread.
- transfering 'pid' and 'hash' parameters from the controller to template
to js widgets.
This commit also change the `_message_post_helper` signature by making
the 3 first parameters required, as to post a message you need at lease
res_model, res_id and the message body. The optional argurments and kwargs
are here to check the bypassing access rights mecanism.
Task-1902304
Rating document available on a website will become more common, but
we want to do it with different UI widget. This commit introduces a
new "popup rating composer": the idea is the rating average is
displayed with stars, and when clicking on it, a popup with the
composer appears. The user can so submit its review.
To do so, we factorize the Portal Composer into a dedicated widget
(instead of natively inside Portal Chatter).
Task-1902304
This commit provides 1 more field on the rating mixin: the average of
the ratings of the document. Before that, the only way to get the
average was to call `rating_get_stats` record per record.
As we are on a mixin, this new field is not stored to avoid recomputation
each time a rating is added. To improve performance, we decided to
compute `rating_count` and `rating_avg` in one `read_group`.
This commit also set an extendable method to get the domain of the
rating to include in those statistics computation, called `_rating_domain`.
This way, each model inheriting the rating.mixin can define the subset of
pertinent ratings.
As consequence, this commit uniformized the way average is displayed:
instead of taking the closer value to the 0.5 value, it only round it
at 2 digits.
Task-1902304
Every new page was being considered an empty homepage with "Welcome to
your Homepage! Let's start designing." shown. Now only an empty homepage
shows that message.
closesodoo/odoo#30839
- if currency is set on vendor, and set that particular vendor to product, the currency will not being changed by vendor's currency.
- after this commit currency in pricelist will be changed by the currency of the vendor
This commit is related to Task ID 1826166
closesodoo/odoo#24468
Between 11.0 and master there was a mismatch in the legal values used to
compute the co2 fee and the ATN of a company car.
Task : 1937082
closesodoo/odoo#30841
* web, web_editor
See sub-commits for details.
Currently, when an user wants to edit the css of its website, he has
access to lots of files and, in debug mode, to even more files. While
the feature is nice for people who know what they are doing, a lambda
person can easily break its website by changing the wrong files. Also,
nothing warns the user that the files that are edited will never receive
updates anymore (unless if they are reset). The goal is to prevent
those behavior while still allowing the add custom css. Another goal
is to be able to *add* custom javascript.
Custom files created for the user:
SCSS: user_custom_rules.scss, user_custom_bootstrap_overridden.scss
JS: user_custom_javascript.js
task-1919350
closesodoo/odoo#29999
* web_editor
Currently, when an user wants to edit the css of its website, he has
access to lots of files and, in debug mode, to even more files. While
the feature is nice for people who know what they are doing, a lambda
person can easily break its website by changing the wrong files. Also,
nothing warns the user that the files that are edited will never receive
updates anymore (unless if they are reset). The goal is to prevent
those behavior while still allowing the add custom css. Another goal
is to be able to *add* custom javascript.
Custom files created for the user:
SCSS: user_custom_rules.scss, user_custom_bootstrap_overridden.scss
JS: user_custom_javascript.js
See https://github.com/odoo/odoo/pull/29999
task-1919350
Purpose of this commit is to prepare future code addition by making some
noise in a separate commit. In this commit we move compute methods below
fields definition because currently it is a complete mess and finding a
given field gives a headache.
Commit linked to task ID 1933820 and PR #30830.
In order to avoid spam and unwanted notification this commit limits auto
subscription on channel when
* creating a channel;
* automatically telling a channel a new publication has been done;
* creating a slide;
As being a follower of a slide channel means following its slides user should
choose manually to be follower of a channel, notably through the UI.
A new way of managing subscription will come with elearning in mind and
therefore auto subscription should be limited.
Commit linked to task ID 1933820 and PR #30830.
This fixes issues with CTRL+A then delete.
Now CTRL+A selects all the contents of the unbreakable node in
which the range is contained. Deleting it all will replace the contents
with `<p><br></p>` so the user can start editing afresh.
Note: Only CTRL+A is handled: ``select all`` in contextual and edit
menus are still handled by the browser.
closesodoo/odoo#30648
In the overrides of _name_search we should avoid creating domains with
huge lists of ids as it is inefficient.
We can also make sure that we optimize the empty search as in this case
the custom domain doesn't make sense, we can simply search on an empty
domain and, thanks to the limit argument, still keep a fast query.
Linked to task 1918906
Thanks to @odony and @nseinlet
closesodoo/odoo#30155
This merge improves the Dashboard app and make it more usable on mobile:
- The layout is fixed to 1 column.
- Embedded Kanban view is fitted to its content and handle correctly empty columns.
- Embedded Pivot view has smaller left indentation for readability purpose.
Task ID: 1904747
closesodoo/odoo#30467
-Moved the share Button to the dropdown Action menu as it was better suitable there.
-moved sale order item field to extra info as it was better suitable there.
-changed display of settings for project to give it organized look.
Related Task ID: 1928422
closesodoo/odoo#30310
Purpose
=======
It only makes sense to display 'Save' and 'Discard' if the user actually
changed something in the settings.
So after this commit, the 'Save' and 'Discard' buttons of statusbar in
general settings will only appear when you make any changes.
Also when there are changes, there will be a message shown that will tell
the user that he/she has unsaved changes.
The commit is related to Task ID: 1917637
Co-authored-by: Mohammed Shekha <msh@openerp.com>
closesodoo/odoo#29726
Purpose of this merge is to update main addons and set activity types used
for automated activities as master data. This means they cannot be removed.
Indeed those activity types are used in business flow to generate activities
and removing them may break some flows.
This commit is linked to task ID 1907970 and PR #29257.
Purpose of the task is to improve the usability of activity types and
activity scheduling.
Another purpose is alto to protect some master data activity types by flagging
them and preventing their deletion.
Containing
* make the activity type as master data so deletion will be prevented;
* improve the usability of the activity type;
* prevent the deletion of activity type which are used for automated activity;
* change the usability of activity scheduling modal;
This commit is linked to task ID 1907970 and PR #29257.