The graph view of product margins cannot be displayed because it raises
an error
Steps to reproduce:
1. Install Accounting
2. Go to settings and enable Margin Analysis
3. Go to Accounting > Reporting > Management > Product Margins
4. Go to the graph view
5. A User Error is thrown
Solution:
Remove the `:sum` operators for non-stored fields in read_group
Problem:
The graph view tries to sum up the total_margin with `total_margin:sum`
but as the field is not stored, it is not possible to compute it and it
raises the error
opw-2738456
closesodoo/odoo#92719
X-original-commit: fbaedeb18e49e5ed055c597cab33061153aaf1da
Signed-off-by: Guillaume Merlin (megu) <megu@odoo.com>
If a picking is owned by the company and if the user receives a FIFO
product, a SVL will be created without any journal entry
To reproduce the issue:
(Need account_accountant)
1. In Settings, enable "Consignment"
2. Create a product category PC:
- Costing Method: FIFO
- Inventory Valuation: Automated
3. Create a product P:
- Type: Storable
- Category: PC
- Cost: 1
4. Create and validate a receipt:
- Owner: <The company of the picking>
- With: 1 x P
5. Open the generated SVL
Error: There isn't any journal entry associated with the SVL
When validating the picking, a method filters the SML that will be
considered during the SVL creation process. This method filters out the
SML that has an owner and if this owner is not the company:
https://github.com/odoo/odoo/blob/f8e2f2a4836d23fe507cad3bd5cac92d41ca91a3/addons/stock_account/models/stock_move.py#L69-L70
However, the filter in the journal entries creation is not that accurate
and does not correspond to its comment line:
https://github.com/odoo/odoo/blob/f8e2f2a4836d23fe507cad3bd5cac92d41ca91a3/addons/stock_account/models/stock_move.py#L475-L476
OPW-2859144
closesodoo/odoo#92716
X-original-commit: 13d4963d10e14c0295a1c7abeefd52b070cd4a58
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Adrien Widart <awt@odoo.com>
Journal entries of a bank statement can be reset to draft even if the
bank statement has been validated
Steps to reproduce:
1. Install Accounting
2. Go to Accounting dashboard, click on the 3 dots of Bank and go to
View > Statements
3. Create a new statement with a transaction of 100, correctly set the
ending balance, save and post
4. Click on reconcile then validate the reconciliation
5. Go back to the statement and validate it
6. Open the journal entry of the statement
7. You can reset it to draft but you shouldn't be able to
Solution:
Prevent the user from resetting a journal entry to draft if the
statement has been confirmed
opw-2827117
closesodoo/odoo#92713
X-original-commit: 5622bc103e063d62f75625ca413a06aa7395d654
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Guillaume Merlin (megu) <megu@odoo.com>
This commit updates the taxes in Belgium.
- Tax names will use the following nomenclature
Rate (Territory) (Scope).(Special)
- Label on Invoices should not mention TVA, only the rate
closesodoo/odoo#92711
X-original-commit: b06b7c8be812f1e920703b55f0c9185976c6c769
Related: odoo/enterprise#27960
Signed-off-by: William André (wan) <wan@odoo.com>
If a public holiday is created, modified or deleted,
all declared (non-refused) leaves related to that period will have
their duration re-evaluated and individual remaining time offs will
be computed accordingly.
If the duration of the leave is evaluated at 0 after the creation
of the public holiday, the leave will be set as cancelled.
task-2636215 [Time Off]Grant back time off when public day off is created
closesodoo/odoo#81225
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Purpose: Sometimes, taxes are distinct on parts of the expense
(for example alcohol and food).
Therefore the expense should be split in two.
In order to split the expense, we added an wizard.
When creating a new expense from the split, we also
copy the attachments.
'hr.expense.split' has to have the similar logic and dependencies between
the fields as 'hr.expense' does. For example, in case we change the
product_id to the product that has cost defined on it, it should have
the same behavior as expense has. In particular, the 'total_price'
will be set and the user should not be able to modify the amount.
Similarly, if we change the product_id to the one that has no tax defined
on it, then split tax_ids should be cleared out and be set to readonly.
Similar logic goes to sale_order_id (Customer to Reinvoice'),
we should not be able to set it, in case the product can not be re-invoiced.
All of the above constraints leads to the amount of similar code to to the 'hr.expense.split' side.
But it could not have been avoided, if we want the smooth flow.
task - 2831024
closesodoo/odoo#90770
Signed-off-by: Kevin Baptiste <kba@odoo.com>
When instrumenting the Chrome Browser and asking to navigate to a
location, it happens that the 10 seconds timeout is exceeded.
This happens particularly when executing qunit tests by navigating to
`/web/tests`. This route has an average loading time around 7 seconds
but when the runbot is loaded, it can exceed 10 seconds.
With this commit, the timeout is set to 15s. It would be better to split
the qunit tests by module in order to avoid the huge assets bundle
generation.
closesodoo/odoo#92699
X-original-commit: 6c0fa6b72bf5d15e8323b81cf930a01d4c0f3291
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
This commit improves tax name search by ignoring punctuation and spaces.
This allows faster searching for taxes (while editing an invoice line or
while configuring them)
Example:
Searching for `21M` should match `21% M.` , `21% EU M.` and `21% M.Cocont`.
Searching for `0EUT` should match `0% EU T`.
Task id: 2851341
closesodoo/odoo#92683
Signed-off-by: William André (wan) <wan@odoo.com>
Purpose
=======
The goal of this PR is to create a link between milestones and tasks. Indeed, milestones usually contain a set of tasks. Once all of these tasks are done, the milestone can be considered as reached. This link would help users organize their projects more efficiently and have a better overview of what needs to be done when.
## Implementation details
- A new many2one field is added in the `project.task` called `milestone_id` to link a milestone to tasks.
- Add `Milestones` as global setting and project setting. It means the user will can globally enable the feature and choose in which project he wants to use the feature.
- In the form view of milestone, a stat button is added to display the tasks linked to current milestone.
- Add `Late Milestone` filter in tasks, when this filter is applied the user will see the tasks linked to a milestone with a deadline in the past. This filter is also added in the Burndown chart and Tasks analysis report.
- When the user set a milestone on a task and no SOL is found in the project and/or parent task related then set the SOL of the milestone as a default SOL for the task.
- Display in green the milestone in project update view if all tasks linked to that milestone are in a closed stage.
- When a user changes a stage of a task to a closed stage, a wizard will be displayed if the task is linked to a milestone and all others tasks are in a closed stage too. This wizard will allow the user to reach the milestone since all tasks linked to that milestone are considered as finished.
- Remove `delivered_milestone` option in the `invoice_policy` selection field in `product.template` model when the Milestones feature is globally disabled. If some products are milestone one than they will be converted into a manual service ones to allow the user to manually set the quantity delivered for those products.
- Display the milestone field in task in Project Sharing feature.
task-2829542
closesodoo/odoo#90972
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Purpose
=======
Avoid having "dead-ends" when registering to an event.
Specifications
=============
Add link to event to registration confirmation for free events.
Display list of each bought event on the confirmation page for paid
events.
PR: odoo/odoo/pull/78599
Task-2657635
closesodoo/odoo#78599
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Before this commit, in the editable form view of mass mailing, the
emoji widget is outside of the subject field, which is not optimum.
This issue was re-spawned after a recent commit that enabled saving
the mailing as a template, which changed the layout to add a star
next to the subject field.
With this commit, emoji widget is now inside the subject field.
task-2826521
closesodoo/odoo#92672
X-original-commit: 09991b477353e6167d576779b7364408b2109cd6
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Ensure the selection in the fonts tags after `applyColor`, otherwise an
undetermined race condition could generate a wrong selection during
multiples call of `_processAndApplyColor` from the color picker.
task-2822221
closesodoo/odoo#92654
X-original-commit: 2b2aba49550cf7c2ba1914f03beef9cbdf60b166
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
When manfacture in 2 steps is setup on warehouse, transfers are created
when confirming an MO, manual moves added did not have a warehouse and thus not
included in the picking. The default warehouse is set to the source location
warehouse in MO.
closesodoo/odoo#91879
Related: odoo/enterprise#27577
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
This commit adds a couple improvement to the "publish" flow of courses:
- Improve the published synchronization between the course and its product
- Adapt wording when the course is unavailable on the frontend view
See underlying commits for details.
task-2842624
closesodoo/odoo#90736
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
When a product linked to a course is unpublished, the course is not
buyable. This commit improves the design in this case.
- Change the text of disabled button into "Course Unavailable"
- Add an alert message to group_website_slides_officer letting them
know that the course is not buyable because the product is unpublished
task-2842624
Part-of: odoo/odoo#90736
Before, each time we created a course "on payment". The product
linked to it was automatically unpublished. If multiple course
share the same product this leads to issues. Indeed, with the
product unpublished all the courses depending on the product are
no longer buyable.
To avoid this, we synchronise the published value when the
course is published which published the product.
If we create a new course or unpublished a previous course linked
to a product, we don't update the published value of the product
unless all courses linked to this product are unpublished.
We also fix a Forbidden error raised when the product was unpublished
but not the course. This was leading to a previous member to not have
access to a course he previously buyed.
task-2842624
Part-of: odoo/odoo#90736
SPECS
1. Change the default content of the modal opened after the installation
of a module
When the installation of a suggested module from the upload dialog is
completed, the page is reloaded and the upload dialog is opened on load.
Since the user installed the module to add content of the category related to
this module, it is more convenient to open the modal directly on this category.
2. Replace the notification displayed when the user creates a new
certification by a permanent button allowing to add questions
When a user creates a certification, he must then add questions to this
certification. Instead of showing a notification after the creation
proposing to add questions that was shown only once, a permanent button
has been added to the view of the certification so that anyone with the
sufficient access rights can add questions, at any time, from the certification
view.
Task-2727654
closesodoo/odoo#86721
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
PURPOSE
This commit slightly changes the wording and improves the website editor
integration.
SPECS
Reword "slide" to "content"
As slide is a technical term that does not mean much to end-users.
Make some elements not editable by adding "o_not_editable", or non visible
in edit mode by adding "css_editable_mode_hidden".
The e-learning website interface allows the course editors to modify the course
content using various buttons ("Add Quiz", "Add Content", ...).
Those buttons should not be edited by the web-editor, as it could mess up the
display and break potential future changes to the module / features.
Task-2727654
Part-of: odoo/odoo#86721
In mass mailing, when an iframe is loaded, the `contentDocument.body`
could be `undefined` this caused a traceback when trying to observe
the iframe.
Observing the `contentDocument` is safer as it will always be defined.
task-2869490
closesodoo/odoo#92630
X-original-commit: 00a2843216128df6454d5c6ced3a34cd02e7d6d9
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Before this commit: if a user is the attendee of an event containing
a private contact, the user couldn't sync with google calendar. Because
of the "res.partner.rule.private.employee" record rule restriction.
Steps to reproduce the issue:
1. Create users A and B
2. Enable "Access to Private Addresses" for user A and disable it for B
3. Login with user A
4. Integrate with Google Calendar in setting
5. Create a contact with private address (type = 'private')
6. Sync with Google Calendar in the calendar module
7. Create an event with user B and the private contact as attendees
8. Reset account of google calendar from user A setting
9. Login with user B
10. Try to sync with Google Calendar
=> You will receive an access error
The solution is not to allow any user to add private contacts as an
attendee. Also, create a new contact with the same email if it wants to
match existing private contact with a google event attendee.
opw-2850552
closesodoo/odoo#92624
X-original-commit: 96ee1ef45954bd27632da9c2cef3cf9ba44caca0
Signed-off-by: Arnaud Joset <arj@odoo.com>
Signed-off-by: Pedram Bi Ria (pebr) <pebr@odoo.com>
Before this commit, sales orders/invoices that had been canceled could
still be paid from a payment link. Now, when trying to pay for a
canceled sales order/invoice, the amount to pay is set to zero.
Task - 2735019
closesodoo/odoo#85728
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Mollie supports multiple payments methods, these payment methods can be
enabled/disabled from the mollie dashboard. When you activate only one payment
method from mollie dashboard, you will get 404 page instead of payment page.
This commit will fix that issue by providing necessary query parameters in url.
closesodoo/odoo#92637
X-original-commit: 500be5b85d99ee4fa9590c18d3795977fbf48c4f
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
PURPOSE
The attachment icon in the chatter is too discrete, a lot of users easily miss
it.
SPECIFICATIONS
- Allow for file upload through drag and drop and the whole chatter.
It doesn't matter whether the file tray is unfolded.
Hence, removed DropZone on attachmentBox as now have DropZone on
the whole chatter.
- On the file tray, rename "Attachments" to "Files" and
"Add attachments" to "Attach files".
- When there are files attached to the record, display "X files".
- when there is no file yet, display 'Attach files'. Although clicking on it
opens the file explorer, but doesn't unfold the tray yet. Once the file is
submitted, the file tray unfolds to show confirmed upload to the user.
Task-2413814
closesodoo/odoo#91335
Related: odoo/enterprise#27763
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
DiscussContainer is specific component for content of Discuss app
in "whole screen" client action. The parent is not flex, so
it needs `h-100` to take the whole screen.
Consequently, `min-height: 0` is useless, hence this commit
removes it.
closesodoo/odoo#92613
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Users can now ask for a refund from Odoo for their transactions done
through Authorize.net. A refund will be triggered from Odoo when
necessary.
Only full refunds are possible.
Note that unsettled transactions will be voided as they cannot be
refunded.
Task - 2678757
closesodoo/odoo#92279
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Steps to reproduce:
- Create a Time off Type for which an allocation can be requested
by the employee and with approval "Set by Time Officer"
- Set a Time Off approver on the employee
- Create an allocation
Current behavior:
The allocation approval activity is assigned to the employee
Expected behavior:
The allocation approval activity is assigned to the time off officer
Explanation:
The first fix commit c2bac984f2de160008b27fb52b1d0ae7abd02abb didn't
take into consideration the "Set by Time Officer" approval, we add
here this possible value "set" in order to have a complete fix.
opw-2849972
closesodoo/odoo#92608
X-original-commit: 7239fad29c4b409097ba2a0d2f92d8b9fa8fd5ca
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Signed-off-by: Fockedey Martin (mafo) <mafo@odoo.com>
The discuss container used to have a flex parent but hasn't anymore (its parent
is now the actionManagerContainer instead of the discussWidget). The flex-grow
class has now become useless. This PR removes it.
closesodoo/odoo#92597
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Since [1] which tried to fix the data-oe-xpath branding on nodes in some
cases, the branding actually became potentially incorrect on siblings of
a node which is replaced multiple times. E.g.
Parent view:
```xml
<hello>
<world class="a"></world>
<world class="b"></world>
<world class="c"></world>
</hello>
```
Child view 1:
```xml
<xpath position="//world[hasclass('a')]" position="replace">
<world class="new_a"></world>
</xpath>
```
Child view 2:
```xml
<xpath position="//world[hasclass('b')]" position="replace">
<world class="new_b"></world>
</xpath>
```
No problem, two distincts elements are replaced, the system understands
that the `data-oe-xpath` of the third world of the parent view should be
`/hello[1]/world[3]`.
But in this other case:
Parent view:
```xml
<hello>
<world class="a"></world>
<world class="b"></world>
<world class="c"></world>
</hello>
```
Child view:
```xml
<xpath position="//world[hasclass('a')]" position="replace">
<world class="new_a"></world>
</xpath>
```
Child view of the child view:
```xml
<xpath position="//world[hasclass('new_a')]" position="replace">
<world class="another_new_a"></world>
</xpath>
```
The `data-oe-xpath` of the third world of the parent view (in the
resulting view) was wrong: `/hello[1]/world[4]` -> because the system
saw two replacements + the unreplaced second `<world>`, so the index "4"
was computed.
Now the system will understand that the double replacement in fact acts
as a single replacement.
Note: this was also the same with "cross inheriting" (if the "new_a"
`<world>` of the child view was replaced by another child view of the
parent view).
At last, another 4th case was found and worth mentioning because it is
in fact the root cause of the problem. The problem is not actually the
double replacement as mentioned above but simply the replacement of a
root level element of a child view (which is what is basically done in
the last two mentioned cases). In that case, the root level nodes added
by the first child view have already their `data-oe-xpath` branding
computed before they are potentially replaced. Indicating the location
of the replacement in that case was thus only leading to bugs. E.g.
Parent view:
```xml
<hello>
<world class="a"></world>
<world class="b"></world>
</hello>
```
Child view:
```xml
<xpath expr="//world[hasclass('a')]" position="after">
<world class="x"></world>
<world class="y"></world>
</xpath>
```
Child view of the child view:
```xml
<xpath expr="//world[hasclass('x')]" position="replace"/>
```
Before this commit, before the branding is distributed, the result is:
```xml
<hello data-oe-model="ir.ui.view" data-oe-id="1439" data-oe-field="arch">
<world class="a"/>
<?apply-inheritance-specs-node-removal world?>
<world class="y" data-oe-id="1440" data-oe-xpath="/data/xpath/world[2]" data-oe-model="ir.ui.view" data-oe-field="arch"/>
<world class="b"/>
</hello>
```
=> Hence the `data-oe-xpath` of the last `<world>` was computed to
`/hello[1]/world[3]` instead of `/hello[1]/world[2]` after branding
distribution because the ProcessingInstruction marking the node
removal location should not have been added: it could only be useful
to following siblings which are not branded, which is not possible as
the branding added on the second `<world>` of the child view
(`/data/xpath/world[2]`) was computed before any removal.
Tests are added in this commit for the 3 last mentioned cases. As
explained, the last case is actually the same of the 2nd and 3rd ones
but it was decided to keep the 3 tests as it helps to understand the
problems better and, if the code evolves, it could become different
cases (= this is 3 cases which are currently technically equivalent but
these are different functionnal use cases). A test was written for the
first case then removed as it is basically a pure copy of other existing
tests written in [2] (trying to be improved by [1]).
[1]: https://github.com/odoo/odoo/commit/f67832a3ae0d9a3b5b53129132762e6bc1aed874
[2]: https://github.com/odoo/odoo/commit/c077ef05575d9677bce284195683f96c68386788closesodoo/odoo#92589
X-original-commit: d6e0b3d570a4b27f72852eb261660ad09de12eeb
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
The legacyPatchUiSize function was supposed to be removed when introducing the
new environment in discuss. However, it appears it is still necessary for
form_renderer tests since it still relies on config.device.size_class. The
docstring has been updated accordingly.
closesodoo/odoo#92551
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Release notes:
https://github.com/odoo/owl/releases/tag/v2.0.0-beta-8
Fixes
-----
- portal: allow use of expression to describe portal target
- compiler: fix issue with identifiers with same name
- reactivity: fix memory leak
- app: validate props for root component in dev mode
Improvements
------------
- component: display nice error for wrong child component
- props_validation: have clearer error messages
- component: only useState on props that are already reactive
- compiler: add better support for "in" and "new" operators in templates
- misc: export the validate function
- app: add setting to warn if no static props object
- add static App.registerTemplate and update Portal to use it
- add basic infrastructure to buid owl-runtime without compiler
closesodoo/odoo#92599
X-original-commit: 7fc0cc7c3f1c770dd80e8c3f3316c249d0708fe4
Related: odoo/enterprise#27916
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Géry Debongnie <ged@odoo.com>
Continuity of b859d78c. The assets generated for project sharing feature
suffer from the same issue than `point_of_sale`. In master, we have to
properly declare every file we need instead of realying on the whole
`web.assets_backend`.
Part of task 2860257
closesodoo/odoo#92577
X-original-commit: 45db27c3230a7c341206e9f990e8e5a133342c9f
Related: odoo/enterprise#27914
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
PURPOSE
Improve how image attachments are downloaded from the chatter by adding the
`download` button when hovering image files
SPECIFICATIONS
add a `Download` button (icon) on the bottom right corner of image attachments
on hover
Task-2802810
closesodoo/odoo#92013
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
* = im_livechat, test_mail_full
Display the rating changes that generate a notification under the systray.
Using the rating faces to represent the result.
task-2794182
closesodoo/odoo#89537
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Steps to reproduce:
- In CRM seetings, activate Leads
- Create a sales team with "Pipeline" selected in Sales Teams Settings
- Set a form. The action is "create opportunity" and the Sales Team is the one you created
- Send a form
Issue:
A lead will be created. Not opportunity.
Solution:
Fetch the info related to the team
opw-2856520
closesodoo/odoo#92563
X-original-commit: 1e35d5a2f832901e1269c0f133eb846350f4ba0a
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: yosa-odoo <yosa@odoo.com>
Some user use home action to have internal users directly login on
the pos menu but trying to do so is difficult because of the current
misleading names:
"Open POS Menu" is a client action used in the code to reload the page
so a better fit would be "Reload POS Menu"
opw-2830883
closesodoo/odoo#90417
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
All the recipients of message were not always displayed in discuss and some
users were wondering if the message has been sent to everybody concerned.
This solves the problem by allowing to specify whether to display all
recipients based on the message sub type and defining for which sub type it
must.
Technical note:
- The added query count in some tests is due to the fact that the inbox
notification can now be displayed on the client. Before they were discarded
right away. Now additional check must be done. The added query is due to the
test self.res_partner_id.partner_share which is now also done on inbox
notifications (This has been determined by testing locally for all tests except
one: TestMailHeavyPerformancePost.test_complete_message_post, but it is likely
for the same reason).
- A speed optimization could be to add mail_notification.display as stored
computed field in order to avoid that extra read but it would add a little more
needed storage.
Task-2429708
closesodoo/odoo#90203
Related: odoo/upgrade#3487
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Some of the accounts in the finnish localization module add the wrong tag.
This commit modifies/delete/create the tags to have the right configuration.
opw-2702912
closesodoo/odoo#92542
X-original-commit: 643576233417eca9deaddcdbdfddc58932b6be9d
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Fockedey Martin (mafo) <mafo@odoo.com>
Steps to reproduce:
install crm and change a lead between two won
stages
Expected behavior:
The date_closed does not change
Current behavior:
The date_closed changes
opw-2839298
closesodoo/odoo#92534
X-original-commit: 0c55c0d31021abe966c453c4827d5873a7af485c
Signed-off-by: Fockedey Martin (mafo) <mafo@odoo.com>