This PR prepares the ground for the one introducing the new environment in the discuss
app. Indeed, the discuss widget will be removed since it was used as an action. The discuss container
will instead be added to the action registry. Now that the logic has been moved to the discuss_view
model, we can move the logic inside the init function to the discuss_container setup.
task-2582313
closesodoo/odoo#91890
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Purpose of the commit is to reword the rating submit page
into "Rate our Services"
task-2823445
closesodoo/odoo#90979
Related: odoo/enterprise#27152
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
This commit removes the unnecessary condition on modelName as the code
stands in `ProjectTaskKanbanColumn` which is only used in the
`project.task` kanban view.
closesodoo/odoo#91965
X-original-commit: cb55586bd3da19a6fbbb22728f9d2961830e1592
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
A new report was created for timesheets, also introducing new measures regarding
the (non-)billable time (percentage) and the timesheets revenues/costs. Some general
improvements were furthermore introduced in the timesheet apps.
See task-2783955
closesodoo/odoo#88072
Related: odoo/upgrade#3509
Related: odoo/enterprise#25922
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Before this commit, users may saw the capture and void buttons but
couldn't use them.
As capture or void actions need to access acquirer-related fields,
these actions are now sudoed to allow any users that see the button
to use it.
The access rules and rights are also checked before executing the action
to avoid abusive RPC calls.
task-2785144
closesodoo/odoo#91923
X-original-commit: 2e351d6ff9b7f72b486e83c827ff6e15a05c3331
Signed-off-by: Valentin Chevalier <vcr@odoo.com>
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Users without the right permission see the buttons but can't use them.
Capture and void buttons are now only visible and usable for admin or
users in account.group_account_invoice group (for invoicing module).
task-2785144
X-original-commit: db6b54cc49ba7d9266e766112017604ed98c2cb3
Part-of: odoo/odoo#91923
Since PR #90855, we add extension if mimetypes doesn't match the type.
Since guess_type don't know some extension, we prefer considere all string
of less of 8 char as an extension before to fallback on the mimetypes lib.
With this commit, a filename filename.scss will be considered with an
extension .scss by our own helper instead of a fallback on .bin or .a as
returned by guess_extension of mimetype.
closesodoo/odoo#91905
X-original-commit: ca49c314970f32d051a449b0c0aa1aef30ca9a8b
Signed-off-by: Jérémy Kersten <jke@odoo.com>
Signed-off-by: Julien Castiaux <juc@odoo.com>
This commit refactors the protected fields out of the hardcoded list in
the account_move_line model, and into a function that can be overriden
in inherited models.
This allows for account_intrastat to specify that the intrastat
transaction code field and the intrastat product origin country field
should not be editable after the accounting lock date.
(In the corresponding commit these intrastat fields are added to the
journal views)
related PR: https://github.com/odoo/enterprise/pull/27049closesodoo/odoo#91134
Task-id: 2753542
Related: odoo/enterprise#27049
Signed-off-by: William André (wan) <wan@odoo.com>
This commit aims to improve the time off experience by:
- fixing the "cancelled" ribbon on time offs
- removing the archive dropdown action
- removing the "off until" banner in discuss if the user's leave is not validated
TaskID 2800647
closesodoo/odoo#87650
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Currently when user purchases a course and completes the payment, the
card of the purchased course is shown with 'Start Learning' button.
However, the layout can be improved.
This commit adds the short description of the course, duration and
steps of the purchased course to provide a bit more information to
the user. Apart from that, the title is now clickable and the
information part now occupies a bit more space than the image.
taskId-2790996
closesodoo/odoo#86873
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
One of the discuss_tests assumed that pyEnv.create returns a record while it returns an id.
Therefore, this test was setting a relational field to undefined instead of the id of
the related record.
closesodoo/odoo#91885
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Before this commit:
There is an obsolete method 'channel_fetch_listeners' which is not needed now.
After this commit:
Removed this obsolete method.
Task-2827899
closesodoo/odoo#91876
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
*: account_payment, sale, website_sale
Users should not be able to discard the tokenization of their payment if
they pay for a subscription.
This commit introduces a new helper method to better predict when the
tokenization checkbox should be shown or hidden. This also ensures that
the behavior will be the same across all modules.
task-2695201
closesodoo/odoo#91860
X-original-commit: 1d8dc53f8ed2a967b35213bc913cdfbc42ff15bc
Related: odoo/enterprise#27568
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Prevent edition on e-commerce products header bar.
Since we cannot save any change done in the header object anyway,
And some edition would trigger error.
We put the all bar in a read-only mode.
task-2745151
X-original-commit: e2f7b8fad76dc816b2f6864340d3740446117cdb
Part-of: odoo/odoo#91840
Set `phone` and `mobile` fields on `res.partner` to unaccent=False since phone
numbers are unlikely to have any accent. This will also make it easier
to add indexes on these fields in the future.
Part of task-2832241
closesodoo/odoo#91788
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
In some case, when removing format on element with multiple textNode,
the code generate a traceback.
The loops in `toggleFormat` provide a limit element `closestDecorated` to
the `splitAroundUntil` util. However this limit element can be split and
dumped by the format removal. In this case the reference was never encountered
in the DOM by the `splitAroundUntil` code and will bubble all the way to the
`<html>` TAG an try to split it, which generate an error.
We fix it by getting the `closestDecorated` in every loop.
task-2850686
X-original-commit: 2d93345c38f55c276370d0059d562d28320db2fb
Part-of: odoo/odoo#91786
Add some unit test for strikeThrough format.
Those tests reveal some bug in the current formating code.
task-2850686
X-original-commit: 4d8e1dc381d01bb254d2e806a335a40733608f2e
Part-of: odoo/odoo#91786
This commit improves the layout of the `o_RtcActivityNotice_button` to
increase its visibility.
task-2853027
closesodoo/odoo#91289
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Purpose
=======
In this commit, we will fix the loops that occur when you send an email
to an alias (to create a ticket e.g.). In that case Odoo can reply
"Your ticket has been created" and then the auto-replier of the user
can reply to this email and the loop occurs.
Specifications
==============
To solve this issues, we add 2 system parameters
- <mail.gateway.loop.minutes>, 120 minutes by default
- <mail.gateway.loop.threshold>, 20 by default
When an email is sent to an alias, we look on the last records created
<mail.gateway.loop.minutes> minutes ago. If we overcome the limit
<mail.gateway.loop.threshold> the email is ignored.
Alias creation detection
========================
To detect the number of records created by a specific email address we
use the `_primary_email` attribute set on the model.
Task-2294034
closesodoo/odoo#78597
Related: odoo/enterprise#21772
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
When customer pays for the order and cashier validates it and creates new order, customer screen does not update.
This means that new customer can still see the previous order until cashier starts adding new products to empty order.
With this fix customer screen will update after cashier clicks on "New Order" button.
fixes OPW-2734487
closesodoo/odoo#91868
X-original-commit: c8c7a2f9da1d0f5b6e0725f56269d7e4b4802d80
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
Total invoiced is computed with `active_test=False` [1], however the
corresponding action didn't have that context. Since Odoo 14 `child_of` domain
filters out unaccessible records (including archived ones) [2].
Fix it by adding the context to the action.
STEPS:
1. Have a active contact that has an amount invoiced (invoices pointing to this contact name).
2. Click through on the amount invoiced button, and receive a list of relevant invoices.
3. Now go back to the contact, and archive the contact.
4. The smart button containing the amount invoiced stays the same.
5. Click through on the smart button again
BEFORE: no invoices
AFTER : listed invoices corresponds to the computed total value
[1]: https://github.com/odoo/odoo/blob/574ca75ab6fa583aabc0c1cfc65206e72864e546/addons/account/models/partner.py#L379
[2]: https://github.com/odoo/odoo/commit/3e1b960acf3f6a726338476ba9e62e5ef5c84ef9
opw-2853525
closesodoo/odoo#91828
X-original-commit: bf96188abbf8ad19d1a2f8f82a1e6248245778b5
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Ivan Elizaryev (iel) <iel@odoo.com>
This commit adds a test to make sure the timesheet linked to
the task is no-billable.
task-2723662
closesodoo/odoo#88889
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
This commit adds a test to check the email is correctly sent when the email
is linked to a project stage and a project arrives in that stage.
task-2723662
Part-of: odoo/odoo#88889
This commit adds a test to ensure the timesheet linked to a SOL is
linked to the invoice of the SOL when the SO containing this SOL is
invoiced.
task-2723662
Part-of: odoo/odoo#88889
tasks assigned to the current user should be in the 'inbox' stage by default.
tasks with no project set should only be visible to the users assigned to them.
task-2723662
Part-of: odoo/odoo#88889
-Test the creation of sub-tasks through the notebook
-Set a parent task on an existing task
-Test the creation of sub-sub-tasks
-Check the correct nb of sub-tasks is displayed in the 'sub-tasks' stat button
and on the parent task kanban card
-Sub-tasks should be copied when the parent task is duplicated
-The parent task should take into account the timesheets of its sub-tasks
task-2723662
Part-of: odoo/odoo#88889
Step to reproduce:
Install purchase, stock and accounting
Create a product in a database with USA localization.
Create a new product category and select the manual valuation option.
Purchase the item, receive the item and create the Vendor bill
Current Behavior
On the journal entries you will see that the stock interim accounts
are impacted (the accounts uase for an automated stock valuation)
Expected Behavior
The used account is expenses
Explanation:
The problem comes from the fact that we don't reset/set these accounts
when changing the property valuation of a product category.
opw-2746384
closesodoo/odoo#91811
X-original-commit: 2cb9c7afb2d9e096f0c8e1ada2908b720b6e5ade
Signed-off-by: Arnold Moyaux <arm@odoo.com>
Signed-off-by: Fockedey Martin (mafo) <mafo@odoo.com>
This feature isn't available as of now, and users that wants to do
this would have to use the similar report in Sale as a workaround.
As this is not always possible nor great, introduce this new measure
to display the line total tax included.
task id #2831312closesodoo/odoo#89654
Signed-off-by: Florian Gilbert <flg@odoo.com>
Upon deleting a column in the project task view a popup will be
displayed warning the user that the stage will not be deleted but
instead archived.
Prior to this commit that popup would be displayed regardless of the
group by option that is selected. However this could lead to issues when
opening the archive wizard with an id from another record.
closesodoo/odoo#91872
X-original-commit: 24d307716cbd9e05a32dde108838e16d04309116
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
* use the latest translation API (with fallback on english text if
translation doesn't include expected placeholders)
* indent/split translations to avoid excessive line lengths
closesodoo/odoo#91743
Signed-off-by: Julien Castiaux <juc@odoo.com>
The pa index should only be XXXXXXX when the foreign partner is not
identified. In this commit we change the condition on the template such
that if the pa index is defined, we always utilise it. If the pa index
is not defined but the partner is italian, we use '0000000', and when it
is not defined and the partner is not italian, we use 'XXXXXXX'.
closesodoo/odoo#91871
Task-id: 2858092
X-original-commit: bf468affa2d86967b3b63a0be62063061b7b263c
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Daniel Kosky (dako) <dako@odoo.com>
Add move_reverse_cancel=cancel back to context when reconciling moves with reverse moves.
Bug introduced in commit https://github.com/odoo/odoo/commit/e9262bfc8c775953ebe150f36ce0ab8dcb04d4bd
Database : Reproducible in v14, v15
On a Mexican company (with l10n_mx) with multi currencies enabled.
- Set rates for USD to be different at invoice and at payment date
- Create an invoice at date 1 in USD
- Create a payment at date 2 in USD for invoice generating a difference exchange move
- Try to reset the payment to draft
-The traceback (ZeroDivisionError: float division by zero) will appear.
Tickets : 2857549, 2856162, 2855038, 2852663, 2852859, 2857381
closesodoo/odoo#91841
X-original-commit: 7be0fc1d611d54f27ebd7e7b1fef9b1842cc9ae2
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: de Wouters de Bouchout Jean-Benoît (jbw) <jbw@odoo.com>
Since Chromium 97, folded `<details>` content has non-zero computed
width and height which returns false-positive QUnit
`assert.isNotVisible()` calls.
In a nutshell, this was introduced in https://bugs.chromium.org/p/chromium/issues/detail?id=1185950
when Chromium implemented the ability for "Find in page" to search in folded
`<details>`. To do so, the `content-visibility` rule was used instead of
`display: none` which, even if functionally similar, has an impact on the
values returned by `getBoundingClientRect()` (i.e. used in
`assert.isNotVisible()`.
A regression report was filled in https://bugs.chromium.org/p/chromium/issues/detail?id=1276028
to highlight this change of behavior. What emerged from this report's
discussion is that Chromium has no intent to revert this change and
instead put the emphasis on avoiding to use `getBoundingClientRect()`
and similar methods for visibility check (even pushing a proposal for a
`Element.isVisible()` API; cf. https://github.com/w3c/csswg-drafts/issues/6850).
This commit works around this issue by forcing the content to `display:
none`, like in the previous Chromium versions.
closesodoo/odoo#91833
X-original-commit: b718e7eb5ceb827f59ac395577408b7bc54aa3f9
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
Purpose of this commit to improve generic usage of project
app.
So, in this commit done following changes:
- change the placeholder of the name to 'e.g. Monthly review' in
project_update_view_form
- set the 'analytic account' of the project on the tasks by default
- change the placeholder to 'e.g. Product Launch' in project_milestone_view_form
- the 'cabinets' milestone should be linked to a milestone service,
not a manual one so change data to milestone in demo data
- rename the 'rating' stat button into 'last rating' in view_task_form2
- set another employee than Mitchell for the 'customer care (prepaid hours)'
SOL field in sale_service_demo_data
- display a separator on the right of the stat button so remove unwanted
properties in project_rightpanel.scss
- add the 'name' field to the 'fields to export' when 'i want to update data'
is set to true
- remove the 'Getting Things Done (GTD)' example from kanban examples wizard
- add a 'tasks due today' filter that should return tasks whose deadline falls on
today's date in view_task_search_form
task-2809188
closesodoo/odoo#88271
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Profiling: creation of ir.profile records for each models population
Rollback: allow triggering multiple times the same population,
without any risk of records conflicts (& having to recreated a clean database)
Note: those two options are mostly recommended for small models population.
Indeed, profiling slows down the population, and large/medium population is
already quite slow for some models (and it seems that the rollback breaks as well
for some advanced models).
Part-of: odoo/odoo#85537
When moving some products between two warehouses thanks to an internal
transfer, the forecasted inventory becomes incorrect
To reproduce the issue:
1. In Settings, enable "Multi-Warehouses"
2. Let WH01 be the existing warehouse. Create a second one WH02
3. Create a storable product P
4. Update the quantity of P:
- 3 in WH01/Stock
5. Create a planned and internal transfer T:
- Source: WH01/Stock
- Destination: WH02/Stock
- Ignore the warning
- Operations:
- 1 x P
6. Mark T as todo
7. Open the Forecasted Inventory:
- Filters:
- Forecasted Stock
- Product: P
- Group By: Warehouse
Error: The report is incorrect, it says there are 3 P in WH01 and 0 in
WH02 (should be 2 and 1). It becomes worst if T is done (the quantities
in the past become incorrect)
We should be able to move a product between two warehouses thanks to an
internal transfer (so the warning of the step 5 should be removed).
Moreover, the `report.stock.quantity` should consider that use case.
When processing a stock move, the SQL view translates it as an in-move
or out-move for a specific warehouse. For instance, if the SM comes from
a warehouse and goes to a location without any warehouse (e.g., customer
location), the SM is considered as an out-move. But here is the issue:
in case of an inter-warehouse SM, both source and destination have a
defined warehouse.
Therefore, we need to:
- Duplicate the inter-warehouses SM (so we have one in and one out)
- Fake the values (no destination warehouse for the out move, no source
warehouse for the in move)
Also, before duplicating all SM, we filter out some useless SM:
- Draft and cancelled ones
- SM done more than 3 months ago (because the report only works for [-3
months; +3 months])
Considering some tests:
(SM are confirmed. Each test has been repeated 5 times to get an
average)
| | |
|:-------------------------------------:|:--------:|
| 5000 SM, 0% inter-wh, without the fix | ~715 ms |
| 5000 SM, 0% inter-wh, with the fix | ~710 ms |
| Impact | 0.99x |
| | |
| 6666 SM, 0% inter-wh, without the fix | ~911 ms |
| 5000 SM, 33% inter-wh, with the fix | ~999 ms |
| Impact | 1.10x |
| | |
| 7500 SM, 0% inter-wh, without the fix | ~1004 ms |
| 5000 SM, 50% inter-wh, with the fix | ~1097 ms |
| Impact | 1.09x |
The impact is not that significant
OPW-2752017
task-2822157
closesodoo/odoo#91772
X-original-commit: b1efc0243bbf886bbef42a32587f4a818fa34e64
Signed-off-by: Arnold Moyaux <arm@odoo.com>
Signed-off-by: Adrien Widart <awt@odoo.com>
When creating a quiz, the answers were not displayed in the
many2many_tags and void tags were displayed.
This commit ensures that the answers is always displayed even
if the record is not yet created.
task-2849896
closesodoo/odoo#91770
X-original-commit: d9223a280ad386e671359a9633efddf424b371d6
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>