There was two issues with the previous code:
1. It was using a weak heuristic to determine whether the
current thread is a channel (ID is a number)
2. For any channel, it was always passing `moderated_channel_ids`
with some values to the server, even though the channel
is not moderated at all.
This commit solves both issues by passing `moderated_channel_ids`
only for moderated channel. Also, this logic has been moved from
SearchableThread to Channel, since moderation makes only sense for
channels and channels are aware of whether they are moderated or
not.
Before this commit, when a non-moderator user posts a message in a
moderated channel and refreshes the page, he could no longer see his
messages that are pending moderation.
Before this commit, a moderator of a moderated channel could see
commands on 'pending moderation' messages in a chat window, although
none of them work in chat windows.
Those commands only work in Discuss. Making them work in chat windows
is not trivial, because some code must be redesigned for this.
This commit disables moderation commands in chat window. Moderators
of such channel now see 'Pending moderation' on such messages in
chat window, and mouse-hovering on this annotation tells the user
to moderate those messages in the Discuss app.
Task-ID 1887963
Modules are automatically created with adequate state by introspecting
the addons available in addons-path during database initialization.
Auto-installable modules are also marked as `to install` at the same
time.
However, forcing their state as `uninstallable` will forbid them to be
installed.
This is the case of `web_mobile`.
The solution is to simply let the modules created via xml to have a
default state of `uninstallable`.
Moreover, this is a better default value.
closesodoo/odoo#27852
This revision aims to support the memory limits
on Linux, Windows and MacOSX according to their own spefication
regarding their memory management.
Among others, it brings the possibility to
use the multi-workers mode on Windows and MacOSX.
e.g.
- Windows does not support `resource`,
and therefore we skip to set the hard limit
- MacOSX allocates a large virtual memory for each process
even if the memory is not actually used,
and therefore using the VMS to limit the memory is pointless
as it will always exceeds the default soft memory limit.
We therefore choose to use the RSS to limit the memory
closesodoo/odoo#27848
* website
Default web_editor/website colors and other bootstrap related variables
took precedence over some bootswatch overriddes. While we have the
control with Odoo themes, theme bootswatch is a library we do not want
to modify. This commit removes the web_editor and website customizations
when bootswatch is installed.
Closes https://github.com/odoo/odoo/issues/27821closesodoo/odoo#27855
The animation that made all the carousel items have the same height
automatically was broken. This commit fixes it and improves its behavior
during edition.
closesodoo/odoo#27801
- Create a product sold by Dropshipping
- Create a SO, validate
- Validate the corresponding PO
- On the picking, print the 'Picking Operations' or the 'Delivery Slip'
There is no delivery address printed.
The root cause of the issue is that the field `dest_address_id` of the
PO is empty. This is because `partner_dest_id` is not used anymore since
1e160dffd3.
opw-1892990
closesodoo/odoo#27850
In website dashboard, 'DateRangeButtons' are pushed into control panel's
SearchView and breaks the UI in small devices.
This commit fixes the issue by hiding them in small devices.
task-1884038
closesodoo/odoo#27082
The goal of this commit is to handle 3 cases:
===============================================================================
- Correct loading of downstream themes for existing themes at (auto)install
eg. If we have `theme_A` loaded on a website and we install `website_sale`,
then `theme_A_sale` must also be loaded automatically on that website.
- Allow migration of every theme/website from the command line -u
When there is such an explicit upgrade, the Odoo framework was already
handling the upgrade of the modules, but it did not take care of reloading
the appropriate themes on the websites using them.
- Allow upgrade of only one theme from the interface
When using the UI to upgrade a theme, we want the user to be able to upgrade
only the current website and not any other. This will upgrade the modules
of all themes in the stream, but reload them only for the current website.
===============================================================================
- Move install/upgrade logic into the `write` method to automatically take
advantage of base features such as correct order of dependencies.
- Create methods to correctly compute the dependency stream of a theme:
upstream, downstream, and both ways.
Upstream: limited to modules with name starting with `theme_`.
Downstream: limited to modules with name starting with current theme name.
- Change `_update_records` method to better look for dependencies
- Change `button_choose_theme`:
- Always upgrade the stream before installing a new theme.
- Move `_convert_to_base_model` logic into `theme_models.py`
================================================================================
There are a lot of flows to take into account, some of which may be combined
with others.
- Dependencies such as website_sale or website_blog can be:
- already installed when loading a theme
- (auto)installed later when the theme is already in use
theme_A_sale and/or theme_A_blog has to be loaded on every website using
theme_A as soon as it is needed.
Not all themes have such dependencies.
- A theme can have other themes as dependency.
- The proper dependency chain must be taken into account when installing
or upgrading.
- Some themes do not have any dependency at all (theme_default, theme_bootswatch).
- Different websites can use the same theme.
- All of them have to be upgraded when using -u
- Only the current website must be upgraded when doing it from the UI
- Different websites can use different themes, including intermediary themes.
eg. - website1 may use theme_A
- website2 may use theme_B (depending on theme_A)
Moreover, theme_A and theme_B might have downstream themes such as
theme_A_sale and theme_B_sale (which depends on theme_A_sale).
In that case it is important when manipulating theme_B to also take into account
the relation it has with theme_A_sale even though theme_A_sale doesn't start
with the same name as theme_B and it is not in the direct stream of theme_B.
Authored by @seb-odoo with contributions from @dbh-odoo and @JKE-be
and precious help from @rde-odoo
PR: #27511closesodoo/odoo#27838
Make sure to hide the Account Holder field only when coming from a
Parter view, where it is pre-filled thanks to the context key.
opw-1892758
closesodoo/odoo#27832
Before this commit, we tried to hide some labels depending
of the available size of the graph.
However, it doesn't worked when the graph is updated.
A much simpler solution is to use the scale’s automatic tick
generator implemented in D3.
So, in this commit, we realized that 'tickValues' is unnecessary
because data are passed correctly (see 'svg.datum(data);') and
labels are defined in 'ticksLabels'. There is nothing else to do.
We had to remove the skipped test because 'renderEnd' is not triggered
for line chart. We need to update nv.d3.
We already tried to fix this issue in the following commit:
https://github.com/odoo-dev/odoo/commit/c4937132a38873761fa0ac0b41c983b917cb52f1
Documentation:
https://github.com/d3/d3-axis#axis_tickValuesclosesodoo/odoo#27828
Some snippet options uses an image or icon as description instead of
text (like the gradient option in some themes). Those were not working
anymore as the user click was considered on the image/icon instead of
the option itself.
closesodoo/odoo#27807
- Set the compay currency in USD
- Set the rate of USD to 1.0, the rate of EUR to 2.0
- Create a EUR pricelist and associate it to the POS
- Sell a product in the POS at 200 EUR (= 100 USD)
- Go to Sales > Reporting > Sales
The POS order is evaluated at 200 EUR instead of 100 USD.
Since the sales report has been merged among the various sales channels,
we must keep the same logic when it comes to currency conversion.
opw-1890778
closesodoo/odoo#27786
Rev. dcb56412d6
introduces limits for the threadedserver
It uses `resource` to set the hard limit,
but unfortunately `resource` is not available on Windows.
As in the GeventServer, we therefore set the resource
hard limit within a `if os.name == 'posix'` block,
as in rev.
c68b41bff2
Sending email to addresses containing unicode characters
cannot be parsed by python and result in a UnicodeEncodeError.
This PR catch that specific exception and output a meaningful
error message.
Decision has been taken to not trigger any error message
client-side has it would have needed modifications on some
sensitive low-level backend code.
To reproduce:
- Configure odoo so it uses an email server
- Send an invoice to a partner whoose email address contains
some unicode characters (exemple: æøåÇÀ@example.com)
opw-1892409
closesodoo/odoo#27804
Revision on https://github.com/odoo/odoo/commit/b7cf456560dc4fd7c1217ba90f0b5609466ede50
The commit above assumed the function `change_menu_section` was
mistakenly removed. However, it was turned into a handler function
and renamed according to our JS guidelines `_onChangeMenuSection`.
This commit removes the duplicated logic by removing the
function `_onChangeMenuSection` and using `change_menu_section`
as the handler for the bus event `change_menu_section`.
closesodoo/odoo#27809
on the webiste sale, have a category with a subcategory
Then in the customize menu, enable "ecommerce categories"
Before this commit, the option to have collapsible categories wasn't there
This was because, due to multi_website, the children views of the "categories"
that were inactive weren't written upon when copying their parent
After this commit, the functionality is back
OPW 1893169
closesodoo/odoo#27796
- Set the compay currency in USD
- Set the rate of USD to 1.0, the rate of EUR to 2.0
- Create a SO for a product costing 100, validate
- Go to Sales > Reporting > Sales
The product is evaluated at 400.
This is because the currency rate sotred is incorrect. The rate stored
is 0.5 instead of 2.0.
opw-1890778
closesodoo/odoo#27769
Don't forward context from mass mailing to partners view.
When grouping mass mailing by state, passing context makes
Odoo trying to group partners by state, and then get a traceback.
closesodoo/odoo#27775
Class `.hide` was replaced by `.d-none` with BS4 7f10b55a50
But the JS selector was still trying to retrieve the `.hide` form which lead to
an unexisting element, thus sending empty form.
Fixes#27714, closes#27774
The /shop route can take a `category` argument (a model converter).
`/shop/category/<model("product.public.category"[..]):category>`
But if that `category` argument is passed through URL query string
(?category=9), it will raise an error when doing
`category.can_access_from_current_website()`
as it is an integer since it did not went through the model converter
Note: Among probably others, that type of route is used when changing product
order on shop
Closes#27490, closes#27724
Before this commit, the compute sequence was relying on the fact the ID was used
as a secondary order key to get the right result.
This is necessary when adding items between pages because we don't resequence
the following elements.
However this was not necessary when adding new elements on the last page since
there are no following elements to resesquence in that case.
PR: #27639
'Write-off' is a wrongly used term in the reconciliation model.
A write-off occurs when a client owes money to you but is unable to pay.
closesodoo/odoo#27518
Grouping mail activities by "Created by" was grouping on the
"create_uid" field which is always the admin user. New groupby
groups using the "create_user_id" field which is the real id
of the creator.
opw-1886369
closesodoo/odoo#27718
Targets commit d3530eb07e
Purpose
=======
Users within the "sales_team.group_sale_salesman" group should be able to
access/add/edit/delete custom attribute values.
closesodoo/odoo#27654closesodoo/odoo#27679
As commit 066cfc9598 did for other website_module, this commit make theses
2 modules multi-website compatible.
Mostly by:
- Adding website_id in form/list views
- Preventing routes from being accessed by wrong website (only needed for
admin as portal users will get a 403)
- Adapt search([]) with multi website domain
- Add domain in model converter in routes for URL autocomplete (eg menu URL)
Note that it is not needed for sitemap.xml
closesodoo/odoo#27528
This rev. ensures that the group name is vertically centered inside
the group header row. Padding rules have been moved from enterprise
to community.
Task 1878254
closesodoo/odoo#27603
Before this commit, if you ask for a small image, you was waiting a picture of
64x64 but in case this image was not found, a placeholder with an other size
was returned.
Now, we try to guess the asked size, and return a resized placeholder.
This bug appear since we change the default placeholder picture with a big one
This will fix several issue and avoid to hard code size everywhere in the code
Eg: commit 92f837c and commit https://github.com/odoo/odoo/commit/154fc7d9dd550d35b7266af024e54c20e18938fc#diff-9af1af2039d16d6b544d481b4ee1ed7cR144closesodoo/odoo#27695
Commit https://github.com/odoo/odoo/commit/8caf84f70ada259f041b424d37686845604d182a
was not handling the case where there was an invisible DOM element
between the button box and the alert component. Let us clear all alerts.
This commit also introduces a way to properly fix/extend bootstrap in
future fixes/updates (some of our rules may already be moved in that
file once it is forward-ported to master).
closesodoo/odoo#27662
Instead of returning False directly when comparing a non-model, return
NotImplemented that will trigger the __eq__ test from the other side.
This allows third party objects (for instance a serialization/deserialization
scheme) that cannot be a Model to be considered equal is some scenarios.
closesodoo/odoo#19977
Before this fix the creation of task assigned to admin was leading
to the creation of mails.
This is a generic fix to avoid to notifiy a user when he is add as a
follower when creating data from odoo data files.
closesodoo/odoo#27682
Adding bs4 `.is-invalid` class is supposed to add red borders on the
`form-control` element.
But the mixin `o-w-preserve-forms` prevents that style to be applied as it adds
`border: 1px solid $o-we-color-text-light;` on `.form-control`.
As the mixin selector has more strength (specificity), the bs4 is simply not
applied.
This is the case for `form-control` inside `o_technical_modal`.
closesodoo/odoo#27691
- Install a new DB without demo data, with only the `point_of_sale`
module
- Do not configure the accounting
- Open the POS, sell a product
At payment, an error is thrown at `this.cashregister.journal_id[1]`
because `this.cashregister` is `undefined`.
We throw a proper error instead.
opw-1891901
closesodoo/odoo#27683
As per fpodoo specification:
- decrease max width of logo (from max 33% of header width, to max 22%)
- decrease font-size of tagline by 30%
So logo is smaller, and company address has less probability to get
pushed lower (since sum of contents are larger than width).
Sizing the header works as follow:
If the header is equal to wkhtmltopdf page width or bigger, it is zoomed
out until it fits. So with current configuration:
- 100% of width is 900px,
- company tagline is at maximum 33% (300/900),
- company logo is at maximum 20% (200/900),
- remaining (company address) is remaining space of 44% (400/900)
closes#27641