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
Steps to reproduce the bug:
- Create separate contacts and sales orders.
- Go to contact
- Click the smart button for sales.
Bug:
All the sales orders in the system were displayed instead of displaying
only the sale orders of the contact.
opw:1891796
closesodoo/odoo#27675
When you run the setup wizard to add a bank from the setup bar, it will write 'file_import' on the field 'bank_statements_source'. But in the module 'account_bank_statement_import', the possible values of the field 'bank_statements_source' was updated with 'file_import' ONLY if additionnal account_bank_statement_import_xxx modules are installed.
So, prior this fix, if you only had the module 'account_bank_statement_import' and no additionnal bank statement import modules, you were getting a traceback.
Fixes#27423closesodoo/odoo#27672
Run odoo-bin using "--without-demo=all"
Install any module (I used CRM)
On the main page, a droplet should appear under the newly installed module
As admin, using the debug mode, click on the "Disable tour" button
The action is restricted due to the missing ACL
opw-1890350
closesodoo/odoo#27655
### [FIX] web_settings_dashboard: load a translation
Before this commit, there was an issue when trying to load
a translation from the 'Settings' application.
- Go to 'Settings'
- Click on 'Load a translation'
> It redirects to 1st app (community) or (enterprise)
This is not a big issue in enterprise, because the modal is
that let the user load a translation is still prompted.
This is however not the case in the community version.
This issue is caused by 'Load a translation' being a `<a>` with
`href='#'`. The purpose of the `href='#'` is to have the pointer
cursor on mouse hover. However, when clicking a `<a>` with `href`,
the browser changes the URL in the address bar with the content of
the `href`, which for the value `'#'` is linked to the top of the
main page. In community, this redirects to the 1st installed app
(usually 'Apps' or 'Discuss'), whereas in enterprise it redirects
to the home menu.
This commit fixes this issue by preventing the default browser
behaviour when clicking on "Load a translation", so that it does
not change the URL in the address bar.
### [FIX] web_settings_dashboard: set up your company
Before this commit, it was not possible to set up a company.
This is caused by the clickable DOM element being a `<a>` with
`href='#'`. This redirects to the 1st app in community (usually
the 'Discuss' app), which prevents opening the form view to
set up information about your company.
This commit fixes the issue by preventing the browser to change
the URL in the address bar when clicking on 'Set up'.
### [FIX] web_settings_dashboard: browse apps
Before this commit, it was not possible to access
apps from 'Browse apps' in the Settings menu when
at least one app was installed.
This is caused by the clickable DOM element being a `<a>`
with `href='#'`. This redirects to the 1st app, usually
the 'Discuss' app, which prevents opening the kanban view
with apps.
This commit fixes the issue by preventing the browser to
change the URL in the address bar when clicking on
'Browse apps' from the 'Settings' application.
### [FIX] web: `self.menu.change_menu_section` is not a function
Revision on https://github.com/odoo/odoo/commit/19eacf7d23c9413de4430a3422b5ed74b37ef242
The commit above changed the menu in community, so that it
looks like enterprise. To do so, it copies the menu management
from the enterprise repository to the community repository.
Some code about the home menu has been removed, since it is replaced
with the app menu in community. However, some functions have been
removed by accident, such as `change_menu_section`.
Closes#27436closesodoo/odoo#27442
Revision on https://github.com/odoo/odoo/commit/19eacf7d23c9413de4430a3422b5ed74b37ef242
The commit above changed the menu in community, so that it
looks like enterprise. To do so, it copies the menu management
from the enterprise repository to the community repository.
Some code about the home menu has been removed, since it is replaced
with the app menu in community. However, some functions have been
removed by accident, such as `change_menu_section`.
Closes#27436
Before this commit, it was not possible to access
apps from 'Browse apps' in the Settings menu when
at least one app was installed.
This is caused by the clickable DOM element being a `<a>`
with `href='#'`. This redirects to the 1st app, usually
the 'Discuss' app, which prevents opening the kanban view
with apps.
This commit fixes the issue by preventing the browser to
change the URL in the address bar when clicking on
'Browse apps' from the 'Settings' application.
Closes#27434Closes#27442
Before this commit, it was not possible to set up a company.
This is caused by the clickable DOM element being a `<a>` with
`href='#'`. This redirects to the 1st app in community (usually
the 'Discuss' app), which prevents opening the form view to
set up information about your company.
This commit fixes the issue by preventing the browser to change
the URL in the address bar when clicking on 'Set up'.
Closes#27434Closes#27442
Before this commit, there was an issue when trying to load
a translation from the 'Settings' application.
- Go to 'Settings'
- Click on 'Load a translation'
> It redirects to 1st app (community) or home menu (enterprise)
This is not a big issue in enterprise, because the modal is
that let the user load a translation is still prompted.
This is however not the case in the community version.
This issue is caused by 'Load a translation' being a `<a>` with
`href='#'`. The purpose of the `href='#'` is to have the pointer
cursor on mouse hover. However, when clicking a `<a>` with `href`,
the browser changes the URL in the address bar with the content of
the `href`, which for the value `'#'` is linked to the top of the
main page. In community, this redirects to the 1st installed app
(usually 'Apps' or 'Discuss'), whereas in enterprise it redirects
to the home menu.
This commit fixes this issue by preventing the default browser
behaviour when clicking on "Load a translation", so that it does
not change the URL in the address bar.
Closes#27434Closes#27442
What was designed as a new feature appeared as a regression: users were
not able to choose a bootstrap gray as a background color anymore but
instead got the possibiility to choose a hardcoded gray. This commit
restores the use of the custom gray palette that themes can customize
and which automatically uses the correct text color when used as a
background. This also allows to remove ugly inline style from snippet
definitions and allows to solve bugs like the described below one:
---------------------------------------
Also add bg-* classes on snippet cards:
---------------------------------------
Snippet cards are often put (or may be put by the user) in an element
which have a bg-* class on it. This means that the card will still have
a white background (as chosen by BS4 by default) but the text color will
be adapted to that ancestor bg-* classed element.
This commit forces the card background color (as suggested by BS4) with
bg-* classes.
closesodoo/odoo#27637
Reason: This feature currently has unfixed bugs, does an unnecessary RPC and
was functionally replaced by a button inside the chatter in commit
7f97c9f and the menu inside the debug manager in commit d12b88315.
This commit disables the JS part of the document module to prepare
for the complete removal of the whole module and the MOV of
the indexation to base.
Closes#27613
In case a report has no template defined, the fallback is on the first
body_parent that matched the xpath '//main'
xpath method returns a list
Fixes#27406closesodoo/odoo#27630
If no value is specified on the datefield, do not set a warnfuture message
Remove code comment that was referring the condition present at b51b0d66c2
but no longer present.
Add tests
Fixes#27551closesodoo/odoo#27593
If a deferred field, for example with auth_user_policy installed:
<field name="f" password="True" widget="password_meter"/>
is inside the res_config_settings view, the rendering will be deferred
which is not taken into account when initializing the content
(_initModules) or attaching to DOM (after start).
Thus we would would get an error and have no access to settings.
The issue that happened in 12.0 was solved with 23bec7fb7 and refactored
in between in 5bbbd25ed, but the heart of the issue was not solved in
the case of a customization.
With this commit, we do not lose the deferred when it is necessary to
keep them in the case of deferred while rendering.
Without fix, the added test fails with a traceback and message:
TypeError: Cannot read property 'settingView' of undefined
opw-1890343
closes#27589
Targets commit d3530eb07e
References task id 1892022
Purpose
=======
- When there is only one attribute value for an attribute configured in a product's variants,
it should be hidden in the product configurator.
e.g: The only value selected for the "Material" attribute is the "Wood" value for the "Customizable Desk".
The radio selection is hidden and "Material: Wood" is displayed in the product's description.
- Fixed a class name typo
closesodoo/odoo#27604
* base, website
An image URL may be like "/web/image/<xml_id>" where <xml_id> is the
xml id of an ir.attachment. In fact, the route does not use the xml_id
but the 'key' field, which is normally equal to the xml_id for standard
attachment. In the context of themes + multi-website, the value used as
an xml_id may refer to a theme.ir.attachment instead of an ir.attachment
and this led to a bug as those must not be used the same way.
The crop route which gets image information is adapted by this commit to
always look for the *current website* *ir.attachment* related to the
given xml_id/key.
Thanks to @kig-odoo for spotting the issue.
Closes https://github.com/odoo/odoo/pull/27588closesodoo/odoo#27611
Accessing one2many items by their index seems to produce issue regarding the order. This commit fix the potential issue in the test by summing the two quant quantity instead of comparing them one by one.
closesodoo/odoo#27627
Targets commit d3530eb07e
Purpose
=======
- When a product variant is archived by the user, it should not be selectable in
the product configurator for both webshop and sale order
- Fixed a typo in the name_get method of ProductTemplateAttributeValue
closesodoo/odoo#27385
Actually, in normal conditions, the test last a little bit less than 30
min as Admin user in enterprise edition.
This is to close of the timeout and as expected, the timeout was
reached.
With this commit, the Admin test in increased of 2 minutes.
The Demo test duration is slightly faster and does not need an increase.
closesodoo/odoo#27608
The view_mode attribute is automatically set to the 'action' nodes
when the action is added to the dashboard using the 'Add to
dashboard' button in the searchview. However, other dashboard views
can be written by hand (see openacademy tutorial), and in this
case, we don't want to hardcode action's params (like context or
domain), as the dashboard can directly retrieve them from the
action. Same applies for the view_type, as the first view of the
action can be used, by default.
Before this rev., the second usecase wasn't handled, and it crashed
when no view_mode was specified. This rev. also ensure that the
context and domain are correctly retrieved from the action.
Closes#24088closesodoo/odoo#27519
Revision on https://github.com/odoo/odoo/commit/a47f6093f80cefa51c5a1bc1301db01007f97761
The commit above introduced a visual 'password strength' next to
the password wizard in Settings > Users, when the module
`auth_password_policy` is installed.
However, there was an traceback when trying to access the 'General
Settings' when some specific apps and modules were installed.
This issue comes from the small design issue with the new
PasswordField: it was designed as a field object that was
instantiated and returned in the `init` function of an InputField
with the password attribute set. This is not a solid design,
because the documentation of the `init` function does not
specify that it should return the newly instantiated object.
As a result, the implementation was very fragile and only worked
on FieldChar but not FieldText.
This commit fixes the issue by turning the FieldPassword a field
widget. As a result, the enabling of the password meter next to
a password input has changed:
Before this commit:
```
<field name="new_passwd" password="True" options="{'password_meter': True}"/>
```
With this commit:
```
<field name="new_passwd" password="True" widget="password_meter"/>
```
Closes#27440closesodoo/odoo#27586
The test_tags is stored as None by default in the config file,
but 'None' is interpreted as a string when read.
This is a dirty fix in order to avoid to launch tests when using
a config file, we should do something cleaner in master and refactor
part of this code (substitute 'None' in the load method as it is
done for boolean)
closes#27498closesodoo/odoo#27564
If the selected project has no task (e.g. new project), still make a search.
The previous code was making a KeyError on the filterby as the read_group
returned no result.
Introduced at d5bc0e57cd
As a portal, a user may have access to some projects (when set explicitly as
the customer on the project configuration).
Make this with a first search and add the other tasks also with the read_group
in case the user has access to some tasks but not the project.
Fixes#27457closesodoo/odoo#27581
Commit cf853a785b removed all yml tests
and the yml import engine from Odoo forever, however PyYAML remains a
dependency even though it's not used anymore.
This commit removes any reference to this lib that could be found.
closesodoo/odoo#27563