Fields with widget `radio` and `boolean` can't be edited
Steps to reproduce:
1. Install Discuss
2. Connect as demo and go to your preferences (top right)
3. You can't edit your notification type
Solution:
Use widgetOptions' mode along with hasReadonlyModifier to disable the
fields
Problem:
This PR https://github.com/odoo/odoo/pull/88223 modified the value of
hasReadonlyModifier which is used to disable radio and boolean fields
opw-2898464
closesodoo/odoo#97106
X-original-commit: 6befccd7c8ac22fe4da2a741efeecde2d036a7b9
Signed-off-by: Guillaume Merlin (megu) <megu@odoo.com>
Steps to reproduce the bug:
- Create a storable product “P1”:
- routes:
- MTO
- Manufacturing
- Create a SO:
- Select the product “P1”
- Confirm the SO
Problem:
The created MO is in confirmed state instead of draft.
This blocks the user, for example imagine that he has configured
the product with a first BOM without components and 2 others with
components. when the MO is created, the first bom will be selected,
and as the MO will be confirmed, the user will not be able to
select another BOM
Solution:
Since the MTO rule is not linked to an order point, we could be more
flexible, so the production created via `_run_manufacture()` without
bom or with a bom without component and operation via the MTO mechanism
will not be confirmed
opw-2897267
closesodoo/odoo#97099
X-original-commit: c623478aba040c0493e6da8a67c9742880572199
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Djamel Touati (otd) <otd@odoo.com>
In the context of an action, one can specify the "dialog_size" key
(only useful for actions in target="new"), which impacts the size
of the dialog. Before this commit, the corresponding bootstrap
classname wasn't applied. As a result, the dialog size was always
"large". This commit fixes that issue.
closesodoo/odoo#97085
Signed-off-by: Géry Debongnie <ged@odoo.com>
An X2many always has at least 4 lines. If the X2many contains less
than 4 filled lines (Record or "Add a line") empty lines are added
to make up the difference.
For example, an X2many in edit mode containing only one record:
- Line containing a record
- Line containing "Add a line
- Empty line
- Empty line
closesodoo/odoo#97070
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Odoo may resize attachment image with side larger than 1920 pixels.
But for animated gifs, this resizement seems to in general increase size
file which is not what we want (in some case making it grow from 3MB to
60 MB).
So with this change, we only resize and optimize images that are not
gifs.
Reasoning: pillow doesn't seem to resize GIF (and seems to only increase
their size, especially animated GIF, because each frame is not
optimized) so we should just not touch them.
Note:
- currently tiff were not resized (because of a mimetype typo)
- currently image dimensions were not resized (from our test, resizing
on the dimension does not change the size much, quality is most
important).
both of these issue have been solved in this commit.
opw-2897291
closesodoo/odoo#97083
X-original-commit: 6d903d61adba11c9e46009511fd4065dbc8a9e0c
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Since the migration to BS5 at [1], the feature that makes a "+" button
appear at the end of the website menu was not properly working anymore
(the "+" button appeared while there were still enough spaces for more
menus).
This is because the logic uses regexes to match ml-auto and mr-auto
classes which do not exist in BS5 anymore, as they have been replaced by
ms-auto and me-auto classes (for "start" instead of "left" and "end"
instead of "right"). This also adds the new XXL breakpoint to the regex
(to match ms-xxl-auto and me-xxl-auto classes). This also adds a comment
so that if we were to grep searching for ms-auto or me-auto classes in
the future, we will find this code.
[1]: https://github.com/odoo/odoo/commit/971e5a91aab96d36129a823e03f1f9f1b1293968closesodoo/odoo#97081
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Before this commit, in a ListView, a field containing an invisible
attribute using an expression to be evaluated was never displayed.
Example:
<tree>
<field name="foo" invisible="context.get('notInvisible')"/>
</tree>
The foo column is never displayed.
The solution is to use the column_invisible modifier to know if the
column should be displayed or not. column_invisible contains the
evaluated expression of the invisible attribute by the server.
closesodoo/odoo#97066
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Steps to reproduce:
- Open Settings
- Add Languages
- Select a language
- Click Add
=> Text in the "Switch to..." button is miss-aligned and color is
unreadable.
This commit fixes the alignment by removing an exception to the dialog
footer's buttons alignment selector which is no longer needed and to
avoid confusion between inner-fields and buttons container.
Also, it fixes the color by rendering the language name as a readonly
text instead of a link inside a button (sic).
closesodoo/odoo#97007
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Before this commit : When using the cutoff option (e.g. on journal
entries), the percentage in the wizard is displayed with 6 digits precision
After this commit : The percentage is displayed using only 2 digits precision
opw-2896143
closesodoo/odoo#96876
X-original-commit: d71e46dc8369b4d4c929321277a104f6db3fa7a8
Signed-off-by: Laurent Smet <las@odoo.com>
Before this commit, the checkValidity of a record did not wait for
the application of the current updates. This was causing crashes or
records being abandoned despite an update being in progress. It is
necessary to wait until all updates have been applied before checking
the validity of a record.
For an x2many in list mode:
- create a new line
- edit the line in a valid way
- click outside the x2many while the onchange is in progress.
Result before:
- display a crash
Result after:
- X2many correctly updated
For a list view:
- Create a new record
- edit a field of the record in a valid way
- click outside the list view
Result before:
- abandon the record
Result after:
- the record was saved
closesodoo/odoo#96725
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
After [1] moved the website edition in the backend, we feel that the
code required to make the additional debug icon in the footer of the
frontend still work is not worth it.
Before this commit, on a website page, it was not working: clicking on
it from the WebsitePreview client action would only remove the debug
mode of the frontend, and the backend would keep it.
The user can now leave the debug mode from the debug menu systray item
and we consider that leaving debug mode as a visitor (from the
frontend) is not a feature worth keeping.
[1]: https://github.com/odoo/odoo/commit/31cc10b91dc7762e23b4bde9b945be0c4ce3fe3b
task-2687506
closesodoo/odoo#95499
Related: odoo/upgrade#3721
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
This commit redesigns the `TrackingValue` component.
Part of the ChatWindow/Discuss redesign
task-2823627
closesodoo/odoo#92872
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
This commit redesigns the `Message` component for the ChatWindow,
Discuss and the Chatter. The purpose is to make the chats more
user-friendly.
task-2823627
Part-of: odoo/odoo#92872
Prior to this commit the placeholder color was different when inputs
used the `.form-control` class.
This commit fixes this color difference.
task-2823627
Part-of: odoo/odoo#92872
In this commit we fix the tax calculation
when applying a global discount in PoS.
Before this commit, when applying a discount
tax was calculated properly only in the use
case where in one order we had:
- products with a single one tax
After this commit, the calculation of discount
and taxes is extendeted to include these additonal
use cases:
- products with more than one tax applied to them
ex. Product A -> 10% + 20%
- products with different taxes in the same order
ex. Product A -> 10%
Product B -> 20%
- products with taxes that are included in prices
ex. Product A -> 10% (included in price) + 20%
Overall, we tried to follow a general approach
that will include as many use cases as possible
and every combination between them.
task-2421429
closesodoo/odoo#90505
Signed-off-by: Masereel Pierre <pim@odoo.com>
When making transaction with 'validation' type and where fees
were active, fees were added to the amount.
This behaviour is problematic because
validation operations are used for tokenization for example where
no credit should charged to the customer.
Now validation operations have no fees even if fees are active
on the acquirer.
Task - 2784765
closesodoo/odoo#96712
X-original-commit: 69b04e753ab4e90e68b9d3e678ebea277586e7ac
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Steps to reproduce the bug:
- Go to Inventory→ Configuration→ Warehouse Management →Operations Types
- Go inside “Manufacturing”, and disable the checkbox
“Create New Lots/Serial Numbers for Components” under the traceability
section
- create a MO with a traceable component
- Confirm the MO
Problem:
You can create a new SN for the component without any warning,
while the user is supposed to be blocked by a user error:
https://github.com/odoo/odoo/blob/master/addons/mrp/models/stock_lot.py#L11-L16
The solution:
We need to add the `active_mo_id` key in the context so that the user
error will be triggered
opw-2900256
closesodoo/odoo#96648
X-original-commit: 6d0ddc388d1c389e1911a6bb1c59c252870da1a7
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Signed-off-by: Djamel Touati (otd) <otd@odoo.com>
Steps to reproduce:
- install approvals
- in the approvals app go to filters>add custome filter> approval type
Issue:
- traceback
Cause:
- When no other module is installed, there is nothing to display under
the approval type filter. Even if the field is not required,
the javascript try to access the first element of the selection array
to auto-fill the menu.
Solution:
Add a check, if empty and not required, do not display it and leave the
field empty
opw-2895516
closesodoo/odoo#96617
X-original-commit: 7fdbb1783ec65919a709e5fcac111994d0eb3cd5
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Vranckx Florian (flvr) <flvr@odoo.com>
Co-authored-by: nle-odoo <nle@odoo.com>
This commit adds an 'Add To cart' snippet to the 'Web Editor'.
The snippet works as follow:
1. You choose the `product template` that you wish your users to buy.
2. If the product has more than 1 `variant`, a widget will offer you to either
let the visitor choose - this will open a modal for him to choose the variant
by himself - or select a variant yourself.
3. if `visitor choice` is not selected, a `buy_now` or `add_to_cart` action can
be configured; this will determine the behaviour of the button after the user
clicks it.
task-2824359
closesodoo/odoo#91882
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
Co-authored-by: Morgane <morm@odoo.com>
explicit-rank class
Before this commit, on all buttons without an explicit rank class (that
means, a button that don't have any of the following classes:
btn-primary, btn-secondary, btn-link, btn-success, btn-info,
btn-warning, btn-danger) the class on the props.defaultRank or the class
btn-secondary was applied.
Now, the class on the props.defaultRank or the class btn-secondary are
applied as following these rules:
- if there is no explicit rank class and there exists a
props.defaultRank, the class on the props.defaultRank will be
applied;
- if there is no explicit rank class and the props forceRank is set
(for instance, on the headers on the form view), the class
btn-secondary will be applied;
- if the button don't have any class, the class btn-secondary will be
applied.
closesodoo/odoo#96655
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
This change moves the compute of the available pricelists to the compute of
the default pricelist. This reduces complexity in the compute of the pricelists
in response to the changes in the journal and/or it's currency.
This also avoid using the default method in the compute field that lead to errors.
closesodoo/odoo#97032
Related: odoo/enterprise#29931
Signed-off-by: Masereel Pierre <pim@odoo.com>
With this change, we are now assuming each field that starts with
'pos_' to be a 'pos.config' field that has value that will be saved
to the 'pos_config_id' record. We made that modification because by keeping
some related fields not written at the same time can trigger contraints at the
wrong moments that would lead to validation errors when not supposed to be.
Part-of: odoo/odoo#97032
When we are validating a pos configuration, a constraint is triggered to check
that the payment methods in cash have a journal with the correct currency. Since
there is also a journal_id on bank methods, we should also check those ones, and
also correctly set the defaults payment methods according to the current journal_id.
Part-of: odoo/odoo#97032
*: website_livechat
This commit is a step towards refactoring the JS of public livechat,
so that it reuses the same architecture as the code of Discuss.
This implies code that uses JS models and OWL components.
Task-2937174
closesodoo/odoo#97030
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Step to reproduce:
- Enter edit mode
- Drag & drop Cover snippet
- Select height 100% in the right panel
- It will now show the "Scroll btn" option (toggle), enable it
- Now click on footer (to focus out of the Cover snippet options)
- Click on the scroll btn, it will disappear
There were 2 portions of code now in charge of handling that button
removal when a different height is chosen, since [1] was introduced. It
actually made the original portion of code obsolete. This commit removes
it as it was the cause of the bug described above.
[1]: https://github.com/odoo/odoo/commit/85ae7fe56e93fcc18b3842e6c116bcb6968988e3
opw-2920287
closesodoo/odoo#96719
X-original-commit: f777abf697adcadcf717976edd88a3b4bae0ad79
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
The DateRangePicker on mobile has a few caveats (sic) like its
positionning which prevents the user from accessing the buttons (cf. out
of the viewport).
Steps to reproduce (on small device like iPhone 5/Moto G4):
- Open Time Off
- Click on New Time Off
- Click on From/To field
=> buttons are inaccessible
This commit fixes it restyling the daterangepicker on smaller screens to
display it as Bottom Sheet-like element (cf. popping from the bottom of
the screen and growing upto 90% of the viewport).
opw-2803227
closesodoo/odoo#97024
X-original-commit: dd2bd3c22c22c49a60ca0541f84a64c3a613971c
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
An enterprise without apps would crash on launch because of a template
web_enterprise would inherit but was only there with base_setup
installed.
closesodoo/odoo#97017
Related: odoo/enterprise#29919
Signed-off-by: Simon Genin (ges@odoo) <ges@odoo.com>
Before this commit:
Onclicking quote icon of BlockQuote generates traceback
After this commit:
Now on clicking quote icon doesnot generate traceback
Task-2920794
closesodoo/odoo#96944
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
On the commit 69dcdd4, the order='create_date desc'
was removed and the way of getting the MO for the notification changed. Now, the context is used, it should be written_after instead of written_date.
In addition, the now declaration should be at the beginning of the method action_replenish.
(The MO created is correct, only the notification is wrong)
Should be forwarded
OPW-2877457
closesodoo/odoo#96986
X-original-commit: 029da238a2baaf59bdf9ae828a4739ee4a9f3ede
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Since BS5 migration, clicking on the backdrop of a "static" modal
triggers a weird scaling-up/down effect on the modal.
Steps to reproduce:
- Open Livechat Channels
- Open a channel
- Click on operator which opens a modal
- click on backdrop
=> scale-up/down effect
This commit fixes it by disabling the scaling transform effect on
modals.
closesodoo/odoo#96958
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
This commit adds more functionalities to the web editor when editing a
product's page in order to make it more user friendly to add change or
resequence the many images a product may have.
TaskId-2692189
closesodoo/odoo#85686
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
Before this commit, in a field selection, it was possible to have two
blank options.
To reproduce this problem, you need to have a non required selection
field and one of the selection sent by the server has the value false.
Our solution is to ignore the false selection returned by the server
and add the false option only if the field is not required.
closesodoo/odoo#96951
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Before this commit, in a kanban view, if you try to create a new record
while another one is being saved, then a crash is displayed.
To avoid this problem, when we create a new record in quickCreate mode,
we will first wait until the first one has finished saving before
creating the new one.
closesodoo/odoo#96826
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Follow-up of [1].
With [2], the contact us page was made entirely static to ease and allow
more things in its customization. The customize_show option of the
website_crm app which added the possibility to switch between sending
emails or creating opportunities was to be removed to rather be done via
the standard edit-mode option, by clicking on the form itself. Part of
this option view was however kept (the auto-fill of some more values)...
but it was not supposed to be kept as a customize_show view. With this,
a customize_show option with the same name "Contact Form (Opportunity)"
still appeared and gave the illusion that this is the way to make the
form create opportunities instead of sending emails. In master with [3],
the customize_show was removed but refactored to appear in the editor
panel.
After this commit, we remove the editor panel option that was converted
by mistake.
We also re-enable the view automatically via the 16.0 migration scripts.
[1]: https://github.com/odoo/odoo/pull/69888#discussion_r921081562
[2]: https://github.com/odoo/odoo/commit/417138b44311a05aa206b6e2e38bb67863843c74
[3]: https://github.com/odoo/odoo/commit/31cc10b91dc7762e23b4bde9b945be0c4ce3fe3b
Related to task-2462993
closesodoo/odoo#96145
X-original-commit: 8620c3bc71183b5ebd7801c139eab1736070d846
Related: odoo/upgrade#3690
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
PURPOSE:
The whole process depends on `thread_view` render, not `discuss`. So, it's
unnecessarily making `discuss_view` observe and rerender on a lot of useless
values.
SPECIFICATION:
Remove method from `discuss_view`. Make some onChange methods for handling
the functionality.
Task-2869417
closesodoo/odoo#94147
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
In this commit we make it possible for a user to
download/print the Sales Report of the current
session by clicking at the "download"/"printer"
icon at the lower right corner of the closing pos
popup. This is a commonly used feature. Thus, we
make the UI more usable.
In general, the sales report can be generated by two
different ways:
- either by providing a start and end time (products
within that time span will be included).
- or by providing a session_id (products that are sold
during this specific pos_session will be included) which
is used in some localisation modules (e.g. pos_l10n_se).
To achieve this, we generalized the `_get_report_values`
function to consider both possibilities. As a result,
the inherited version of the function at the
pos_l10n_se module was made reduntant, so we deleted
it.
NOTE: the "Printer" button will be displayed only when
a printer is connected to the IoT box.
task-2755384
Part-of: odoo/odoo#88006
In this commit we modify the ClosePosPopup
so that we make it more usable.
For this reason we expose less info in order
to keep it simple for the user and we rename
the footer buttons respecting the Odoo standards.
Finally, since we want to make it more obvious
to the user and avoid unwanted acceptance of the
payment difference, we show ConfirmPopup with the
relevant information.
task-2755384
subtask of task-2669747
Part-of: odoo/odoo#88006
Steps to reproduce:
- switch to any language other than English
- go to a page where you can use the text editor,
for instance you can try to edit a project's description.
- type `/` in the editor
You should see that some commands are not translated.
Some files modified in this commit are located in the
web_editor/static/lib/web-editor directory.
However, only the JS code located into /static/src/ is considered for
export of translations. This is done to avoid polluting translations for
code not managed by Odoo.
We have to update the .pot file manually. A good workaround is to copy
the web-editor folder inside to static/src, export the
translations and then delete the copy folder.
However, this means that those updates to the .pot file will be lost in
the next translation export.
opw-2918128
closesodoo/odoo#96939
X-original-commit: 0cc5505b27f29d44c25af83653b09b1b49cfec79
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Nshimiyimana Serge Séna (sesn) <sesn@odoo.com>