Remove button is shown when the view of our field is in kanban mode.
When our field is one2many it will delete the record and when our field is
many2one it will remove the record.
So many times user get confuse that they are deleting the record or removing
the record.
So to clear out the confusion this commit changes the label of remove to
to delete if the field is one2many.
A test was added to ensure this ux change.
Task-3185967
closesodoo/odoo#126112
X-original-commit: 008f3e792bd377499fdac5b16de356f9e03b230f
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
Before this commit, to refine the choose of the best existing purchase
order on which we could add the commission, we need to recopy the
query and add new constraint on it.
Now the method return all purchase orders valid, and a simple override
of this method will allow to refine adding filter on current result.
Use the company from the PO and not the company of the current env.
It should be 'more' correct to compute taxes with real used company and
it will also allow to force another company on the po and respect it.
closesodoo/odoo#125572
X-original-commit: 082938d254e9d7fc4ae442412077b9019b2394d0
Signed-off-by: Paul Morelle (pmo) <pmo@odoo.com>
Add a lot of hook to allow a custom module to reuse the standard
sale_purchase module.
X-original-commit: 89a761bdf84f3a9b06f3504f7ee66540ec0e9f0e
Part-of: odoo/odoo#125572
In the course fullscreen view, a black overlay is
hovering the content on medium screen size and lower
when the sidebar is active.
Fix the black overlay which is still showing after
closing the sidebar. When the sidebar is close the
overlay shouldn't be displayed.
As the content is translated to the right and still
fully visible on medium screen size, a black overlay
isn't needed. Only show the black overlay for small
screen size and lower.
Task-3371743
closesodoo/odoo#126118
X-original-commit: f8c45330605837c61f20bed962532b339afc4460
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
Context: the subtask button should not be clickable
when all the subtasks are in a closed stage.
The change in this commit fix a problem of the subtask
button, where it would not be clickable even when it
should have been (it had open subtasks).
Also it fixes a tooltip "e" that appeared on hover when
the button was not clickable.
Task-3283488
closesodoo/odoo#126090
X-original-commit: 831d48f1ef301d6f64d53a247515a41cc250f678
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Currently, when selecting tags for a task with no project (private
task) on mobile, a warning is displayed. On top of that, the amount
available tags is way more limited than in classical view and the
selection of some exesting tags is impossible.
Steps
=====
1. Warning when selecting tags
- Install module project
- In mobile view, go to the view "Tasks -> My Tasks"
- Open or create a private task (task with no project)
- Click on the tags field
A warning is displayed (on the server logs) stating:
"The domain term '('project_ids', 'in', False)' should use the '=' or
'!=' operator."
2. Limited tag choice
- Install module project
- In mobile view, go to the view "Tasks -> My Tasks"
- Open or create a private task (task with no project)
- Click on the tags field
- The tags that are only related to project(s) are not displayed in this
view
- Try to create a tag with the same name than an existing tag that does
not appear.
- A traceback is displayed because this tag already exists.
Cause
=====
As noted from the test of expression.py, M2M fields in the domain should
be compared to list of elements. It is not the case here. When a
project_id exits in the context, nothing happens, but there exists a
check in the ORM to ensure that '=' or '!=' operator is used if the
second element of the domain leaf is a boolean. In this case, there is
not project_id set in the context for private task, resulting in
the previous warning (False used instead of project_id).
Fix
===
We use the improved implementation of _name_search to get the ordered
list of id of records project.tags to display. This list has the
advantage to not be restricted to the current project, while still
presenting the tags of the current project at the top of the list. The
mobile view uses the method search_read to get the list of project.tags
record values, therefore we call the _name_search in this method and use
an optimized sorting function to sort the resulting records accordingly.
task-3302370
closesodoo/odoo#126091
X-original-commit: a03a93aa8cf5567f79dd66ced5911721b82a3802
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Ever since iOS 16.4, going back and forth through a website with the
cache enabled, creates an error in the console which Odoo tries to
handle but fails to do so. Therefor a generic CORS error message
appears.
There is unfortunately no proper way to fix this bug on our end so
instead, this commit tries to mitigate the error by returning early and
not showing the traceback dialog.
I (ARD) have submitted a feedback through Apple's Feedback Assistant app
and will subsequently remove this commit when Apple releases an update
that fixes this.
opw-3281727
closesodoo/odoo#126094
X-original-commit: ff78ee498fe858e2564262df13600c64a4e2f418
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
- steps to reproduce bug:
In project.task sharing form view, When clicking on any of the stat buttons (subtasks or parent task)
when you arrive on the actual task formview a MissingError saying 'missing record' appears
- Issue:
The record loads accordingly but the Missing Error shouldn't appear
- Cause:
It is coming from the project_sharing_form_compiler which gave the projectSharingId props to the ChatterContainer element
but the projectSharingId is equal to the "props.record.context.active_id" of the action, and in the context of the
chatter we want the active_id to be equal to the project_id, which was the case when we are coming from the KanbanView and
sub-list views but when coming from the task stat button the active_id is equal to the task_id and the env can't find
the document 'project.project' with the id of the task. (in portal.py _document_check_access())
- Fix:
We simply change the projectSharingId to take the "props.record.contect.active_id_chatter" the give an
active_id_chatter= active_id in the Project Sharing task_action which will always equal the Id of the project
Task-3284755
closesodoo/odoo#126092
X-original-commit: 22c0825b70bbe8234dee57060bdd5640001f74d7
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Adds more tests to the chart_template update of taxes with children_tax_ids.
closesodoo/odoo#126083
X-original-commit: 747b6498ca86c65ad63fd934e4f57f0c85e56461
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
Signed-off-by: Claire Bretton (clbr) <clbr@odoo.com>
Before this PR, the mouse event click was automatically passed has behavior to
the jumpToPresent function. This cause a TypeError.
This PR use an arrow function in the template to avoid passing the event.
closesodoo/odoo#126073
X-original-commit: bfc6be4b9129e8fa103efd6de57eb1cc9903b780
Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Before this commit, the unpin message was different depending on whether
the message was unpinned from the “pinned messages panel“ or from the
message action.
This commit unifies both flows by introducing a common method to pin and
unpin messages.
closesodoo/odoo#126072
X-original-commit: 9cf7ec443dce3a3d40a3e67533de60491bc9e7b6
Signed-off-by: Didier Debondt (did) <did@odoo.com>
Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
Description of the issue/feature this PR addresses:
In sale, when threshold value of product is not exceed than upsell activity is
created while creating invoice. upsell activity is only create when threshold
value exceed otherwise not.
Current behavior before PR:
When creating an invoice, an 'upsell' activity is created on the sales order and
assigned to the salesperson even if the threshold has not been exceeded.
Desired behavior after PR is merged:
Do not create a 'upsell' activity unless threshold is exceeded.
Fix:
super class is invoke before checking the upsell and create activity. so
now, we prevent super method from creating upsell activity via passing
`mail_activity_automation_skip` context.
task- 3330815
closesodoo/odoo#126067
X-original-commit: 9232093da48cbffe2c3a9d85106292082fdbdcce
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Before this commit, an error triggered in an action (with target=new)
was caught twice: the promise is rejected, and in the case of an
action with target=new, the error is re-thrown.
This caused the error to be caught twice, and the error message to be
displayed twice.
The issue is not visible when the view in the action is a form view
and the error is an RPC error because the error handler decide to do
nothing with an error which is already handled. It's because the form
view uses legacy rpc, which uses a custom error handler.
This commit fixes the issue by not re-throwing the error in the case
of an action with target=new, but only closing the dialog, which was
the reason why the rethrow was done (0cec54b92c).
closesodoo/odoo#126013
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
There were two cases that caused the issue:
Consider a cash rounding with Precision 5 and only cash.
If you have an order that the total amount is 40 and pay 38 by
bank and 0 with cash (cash rounding), it will raise an error.
If you have an order that the total amount is 41 and pay 38 by
the bank and 5 with cash, it will raise another error.
opw-3302114
closesodoo/odoo#125980
X-original-commit: c06b55a69667fc311427d688191c403609eb2f6f
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Pedram Bi Ria (pebr) <pebr@odoo.com>
Add a new section in the settings dedicated for Dutch company settings.
Used in the new Dutch SBR module (l10n_nl_reports_sbr).
closesodoo/odoo#125965
X-original-commit: 049bf22be2edc62f0f85d895423b7d404716ba80
Related: odoo/enterprise#42942
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
Signed-off-by: Pierre-Rodéric Roose (prro) <prro@odoo.com>
This PR improves the search on livechat session's history:
- Rename "Name" into "Attendee"
- Add quick filters:
- My sessions
- My Team
- Session Date
- Ratings: Good / Bad / Unrated
- Rename "Creation Date" into "Session Date"
At the same time, this PR fixes the livechat channel demo
data since they were not realistic:
- Older messages should have lower ids
- Operators should be members of the channel
- Rating must be the last message of the channel
- Missing `email_from` for visitor messages
part of task-3332872
closesodoo/odoo#125891
Signed-off-by: Didier Debondt (did) <did@odoo.com>
Previous test performed with a tour failed underterministicaly. It is
therefore replaced by a test method in the test class TestSaleTimesheet.
closesodoo/odoo#125813
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Correction of the order in which categories are displayed in the self
following the deletion of the "order" argument on the product search
in a previous PR.
closesodoo/odoo#125743
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Improvement of several aspects of the self-order UX:
- Changed the sentence indicating that the self-order is menu only.
- Added a shadow to the header.
- Reduced the size of the product image in the product list.
- Reduced the size of the product title in the product list.
- Reduced the size of the product image when you are on the page to add
it to the shopping basket.
- Added a shadow above the sticky area on a product's main page.
- The quantity of a product already added to the basket has been moved
from next to the title to next to the price.
- The review button now floats above the product list and no longer has
a background colour.
- In the basket, taxes and the total are now displayed after
orderlines and no longer sticky at the bottom.
- When the quantity of a product in the cart is changed to 0, the button
is now called "remove from cart".
Part-of: odoo/odoo#125743
Previously in the front-end there was a notion of "tag" which used
product categories. This led to misunderstandings, because in the
backend there was a notion of tag and category for the products.
Now, the name of the category field is aligned in the backend and
the frontend.
The product model ID field has also been changed from product_id to
id during loading.
Part-of: odoo/odoo#125743
Here is the list of bugs that have been fixed:
- Search, when you click on the search button, the input isn't
autofocused.
- The tag list now scrolls automatically so that the selected tag is
always visible on the screen.
- The back button did not work when the self was opened from a page
containing the back button. This is because we are using the browser
history. In this case, when the user clicks back, we send them to
the home page.
- Automatic tag selection during scrolling has been improved.
Part-of: odoo/odoo#125743
This commit adds the ctrl+enter shortcut to dialogs which will trigger
a click on the first visible button in the dialog's footer.
Task-3369676
closesodoo/odoo#125330
Signed-off-by: Mathieu Duckerts-Antoine (dam) <dam@odoo.com>
In the pos one might often need to see the orders of a specific customer.
In order to accomplish this, a pos user would need to search for the
customer's name in the orders screen.
In order to simplify the flow, this PR introduces a new button on the
customer's page that can be used to navigate directly to the orders page
with the customer's name prefilled in the search bar.
closesodoo/odoo#125222
Task: 3298155
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
This commit adds a margin top on the we-alert to make it prettier.
Otherwise, the alerts are too close to the elements above them.
task-3302433
closesodoo/odoo#120874
Signed-off-by: Benjamin Vray (bvr) <bvr@odoo.com>
Users are not supposed to be able to change the field type for fields
that are required by the model. This commit removes the option to change
the field type for fields required by the model.
Steps to reproduce the bug fixed by this commit:
- Put a form on the page of a website
- Set the form action to "Send an E-mail".
- Click on the "Your Email" field
=> The user can change the type for this field. We don't want this
because this field is linked to the `email_from` field in the
`mail.mail` model. This commit fixes this issues for every model
required fields.
task-3302433
Part-of: odoo/odoo#120874
When a user puts a form on his site, depending on the action of it, some
fields of the form become necessary. These fields cannot be deleted.
Unfortunately, some users do not understand this. This commit helps
users understand that these fields are required for the action by adding
an alert in the required fields options and by improving the tooltip
displayed when the delete button is hovered.
task-3302433
Part-of: odoo/odoo#120874
*: web_editor, website
The goal of this commit is to add the reorder option on the carousel
slides. Because the option is now shared between the "Carousel", the
"Image Gallery" and the "Images Wall" snippets, a common super option
(`GalleryHandler`) has been created to handle this reordering.
task-2930786
closesodoo/odoo#117369
Signed-off-by: Outagant Mehdi (mou) <mou@odoo.com>
Before this commit, purchasing a gift card along with applying a free
product promotion in the same order resulted in the gift card balance
being decreased by the free product price.
Steps to reproduce:
1. Create a buy x get y promo program.
2. Open the POS and use this program and sell a gift card in the same transaction.
3. Activate the promo program and complete the transaction.
The promo program discount will take money of the gift card amount.
Also there is another issue with Loyalty Cards points:
When the reward's product in not valid of the rule, it will decrease
the point when you add the reward.
opw-3284636
closesodoo/odoo#126014
X-original-commit: 975ffef9d1fa7a41b223859e5355e05bdba1d11c
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Pedram Bi Ria (pebr) <pebr@odoo.com>
Steps to reproduce:
- Add a form.
- Setup a conditional visibility on one field, using the "contains" or
"does not contain" operator.
- Save.
- Open the HTML editor and voluntarily break the form by changing the
"data-visibility-dependency" attribute to a random text (non existing
field used as a dependency).
- Save => Crash on page load.
One customer apparently reached that case of receiving a `null` value
(actually possible when retrieving a form data which is an unchecked
checkbox for example) but combined with an operator which really
requires the received value to be a string... but not sure how this is
possible. In any case, it should not make the form crash: it's just a
problematic *visibility* dependency, it should not prevent using the
form. For now, let's prevent this case to crash and add an error in the
console so we may investigate the issue if it ever shows up in a test.
opw-3243345
closesodoo/odoo#125981
X-original-commit: 27144695ff4cd5fc026332c324cfdf8498d5ef14
Signed-off-by: Guillaume Dieleman (gdi) <gdi@odoo.com>
Before this commit, website and email editing was very limited on
devices that have a touchscreen. The blocks tab, the we-lists, ... were
unusable.
Example of issues (on a device that has a touchscreen):
- The users cannot drag & drop snippets in the page.
- The users cannot reorder the values of a multiple checkboxes field.
- ...
This commit allows to handle touchscreen events by translating them
into mouse events to allow users to fully use the editor.
opw-3195487
closesodoo/odoo#125976
X-original-commit: 142684dbe7e5c9d5c5fc1baa00b1027367a45213
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Guillaume Dieleman (gdi) <gdi@odoo.com>
Post counts were not updated when a post was created or deleted
because of missing dependencies in the _compute.
Note that while "active_test" is included when counting without
specifying it, the field must be explicitly added to the `_compute`'s
dependency list to trigger it.
Task-3358143
closesodoo/odoo#125968
X-original-commit: 6e1d976131dccecec35d12b8a03328ce9882d055
Signed-off-by: Stéphane Debauche (std) <std@odoo.com>
Signed-off-by: Florian Charlier (flch) <flch@odoo.com>
The class btn-fill has been move from the common bootstrap review and
only set in frontend. So we add the class in the backend to keep the
existing HTML fields containing btn-fill- class correctly working.
As there were small differences btween btn and btn-fill, we only use the
same design.
Since the classe btn-fill has been moved to only
closesodoo/odoo#125966
X-original-commit: 8ffc79624eef80d3dfdb9ad38c6faea1187a3b70
Signed-off-by: Pierre Masereel (pim) <pim@odoo.com>
'ZeroDivisionError: float division by zero' is generated if the user prints
an invoice pdf without including an invoice line or invoice line with the
product price 0.
Steps to Reproduce
- Install the 'l10n_gcc_invoice' modules.
- Go to the current company and change the country to any Gulf nation, such
as Bahrain, Kuwait, Oman, Qatar, Saudi Arabia, or the United Arab Emirates if
it isn't already.
- Go to Accounting > Configuration > Accounting > Currencies
- Activate another currency.
- Open an 'Invoices' module
- Add the 'currency_id' field in the invoice form view.
- Create a new invoice except including the invoice line or invoice line with
product price 0 and select a currency that does not equal the current company
currency.
- And print this invoice.
Applying this commit will resolve this issue.
sentry-4210558233
closesodoo/odoo#125502
X-original-commit: ae9de44b91b7e80b4a44d69afa69ca95d8f528fe
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
Signed-off-by: Josse Colpaert <jco@odoo.com>
Previously, any call to `IapAccount.get` during testing would lead to
the creation of a new `iap.account` record as this was done in a
separate transaction which is commited.
As we don't want any database modification resulting from a test
execution, we will now check if we're in test mode or not.
During testing, a new account will be created in the current transaction
so that it can be properly rollbacked at the end of the tests.
This commit also modifies how the `iap_jsonrpc` function is disabled
during testing as the old implementation used some pretty obscure
manipulations of the `BaseCase` class.
The tests of the `website` module needed to be updated to take those
changes into account.
closesodoo/odoo#122663
Signed-off-by: Florian Daloze (fda) <fda@odoo.com>
Commit b30afcbdb9 introduced
a strange logic where the invoice status was magically considered
invoiced on locked orders if there was no pending stock logic and
the full delivered qty was invoiced.
Following our removal of the locked status, replaced by another boolean field,
we consider it's wrong to rely on the locked status for functional logic,
therefore removing this old logic.
If it's really a problem (and comes back in the future), another clean solution
will be thought and implemented.
task-3163931
Part-of: odoo/odoo#115871
It's not a specific state, it should be considered separately,
as a boolean.
This allows to reduce code complexity (flows should not rely (much) on
the locked logic) and to have a clearer flow.
Task-3163931
Part-of: odoo/odoo#115871
This commit moves and adapt the res.users.settings model from mail to base and
and allows to access and modify its content with web's user service.
This allows to access user settings without needing the mail module.
closesodoo/odoo#116005
Related: odoo/enterprise#38360
Signed-off-by: Michaël Mattiello (mcm) <mcm@odoo.com>
This commit:
- adds a "delay" parameter to the `draggable_hook_builder`, waiting for
that delay on pointer down events before triggering the drag sequence
(making it possible to use "long mousedown" events);
- changes the event detection in `draggable_hook_builder` to listen
for pointer events instead of mouse events, effectively supporting the
drag and drop feature on touch devices;
- adapts the test helpers (with some refactors to `triggerEvent` and
other utility functions) to make them use pointer events instead for
drags and drops;
- adapts the tour utils to use a tone-downed version of the refactored
test utils `dragAndDrop` function;
- also changes events in list view which does not yet uses the draggable
hook, but should still work with the same helpers in tests.
Part-of: odoo/odoo#116005
Fixes an issue introduced in a forward-port:
https://github.com/odoo/odoo/commit/db0c092973f480f3336a44e5f6868dc5a79f0e3a
The listener was not set on the correct target, `historyStep` event is triggered
on `odooEditor` and not `odooEditor.editable`.
This meant that the FormStatusIndicator was not properly notified and
the `save/discard` button was not visible after an editor `historyStep` on form
views
task-3373603
closesodoo/odoo#126006
X-original-commit: f76585530d7387ff2f44639252829aa4546cea1b
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Before this commit, When you click-on the discard button while creating the task
it gives traceback.
This error occurs due to the absence of the chatter when creating a new task.
As a result, 'inputRef.el' becomes null and attempts to access its value and
fail because it does not exist.
This commit will only change the value of the chatter if it exists.
task-3268923
closesodoo/odoo#126004
X-original-commit: 28c9cdbed72a9feaca72fcf24b059211939a345e
Related: odoo/enterprise#42967
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Before this commit:
The mass mailing footer had no padding top.
After this commit:
Added 1rem / 16px of padding top to the footer.
Task - 3323881
closesodoo/odoo#125989
X-original-commit: 2085057a17409f4e1c33728b709cedbf23146b2b
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Issue:
------
The "Launch Plan" button appears for an archived employee.
It causes a traceback.
Solution:
---------
Do not display the button for an archived employee.
opw-3366815
closesodoo/odoo#125988
X-original-commit: ecc32425ff71d5e65597ca1424a9b356f97fa0f8
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Signed-off-by: Thomas Lefebvre (thle) <thle@odoo.com>