Purpose
=======
Since 68182baff4bdf4b3bcc1f46b361f5a5b8ac9aa11 , Jinja mail templates
have been replaced by QWeb templates. But some reference to Jinja
in the mail settings have been forgotten.
Task-2701037
closesodoo/odoo#86409
X-original-commit: ad366762cb4c2086dd3f3398a19d10c9c01579a0
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
During the merge of qweb/ir.qweb at commit 9ce5bc8881,
the behavior of qweb was preserved instead of the one from ir.qweb.
Rendering inline templates should not be allowed as it is not needed and
include security risks.
Also, minimizing the number of possible types for template arguments
simplifies the API. An error message allows the developer to know how to
adapt his code.
closesodoo/odoo#86404
X-original-commit: 31f3152a1328ec8e2dd28f15433a2cc3ccc80f81
Signed-off-by: Olivier Dony <odo@odoo.com>
Current behavior:
Public user have access to payment method that require tokenization wich leads to error when they use it.
We should not show those payment methos to the public users (e.g We shouldn't show sepa direct debit because this method uses tokenization)
Steps to reproduce:
- Activate SEPA Direct Debit in the payment acquierers
- Select Bank as payment journal
- In the bank payment journal create an account number (e.g BE71096123456769), and select a Bank (e.g BNP)
- Create a new customer (type : company, country : spain, and an email)
- Create a quotation with this new customer
- Click on the "action" icon and click on generate payment link
- Open the link in an incognito window (to make sure you'r not connected in Odoo)
- Try to use the sepa direct debit
- An access error appears because public user do not have access to payment.token.
opw-2754505
closesodoo/odoo#86415
X-original-commit: 2a084c4810c6d1af82901882d1588c8449ebdc78
Signed-off-by: Grazioso Andrea (agr) <agr@odoo.com>
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
Before this commit, since the refactor of some base64 decoding flows and
the addition of the raw field*, reading the content of a field that was
related to the `raw` field of `ir.attachment` was treated as reading a
base64 encoded content. This commit fixes this issue.
*https://github.com/odoo/enterprise/commit/680db8197731dae175027f81a705c38b0abf94da
task-2785146
closesodoo/odoo#86403
X-original-commit: 6aa984f072dde5667d07516888c6a4bf19aead8e
Related: odoo/enterprise#25272
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
This commit moves the logic associated with the composer placeholder for two
reasons:
- move business logic from components to models
- allow to easily override the placeholder in other module.
This is uselfull for the feature allowing to leave comments on a spreadsheet.
Task 2638411 (spreadsheet comments)
Task 2793280
closesodoo/odoo#86381
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Step to reproduce:
- Create an accrual plan with the option "at the end of the year,
unused accruals will be lost" and that can be allocated every year
(in this example, 3 days)
- Create an allocation for Marc Demo based on that accrual plan
and starting in 2020.
- Run scheduled action
"Accrual Time Off: updates the number of time off"
- Connect as Marc Demo
Current behaviour:
- Marc Demo has receive a 6 day allocation
- While loop over the elapsed period doesn't take lost time into account
Behaviour after PR:
- Marc Demo receive 3 day allocation
opw-2769066
closesodoo/odoo#86369
X-original-commit: fc18355158b6724aeb3f900cae50cdab3e6d707b
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Modifying the signature of a method in a children module breaks things,
as other modules not being aware of the change will call super method
without the proper arguments. This also applies to adding new keyword
arguments, as these arguments are not propagated through the super call
chain, and you'll lose the value in the best case, or have a crash in
the worst one.
This overwrite is not only adding 2 new keyword arguments, but also
removing an existing one (`date=None`).
Closes#85269closesodoo/odoo#86367
X-original-commit: c933da43a890d4691391757b8760c80d8e70b1fc
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Signed-off-by: Xavier <xbo@odoo.com>
Step to reproduce:
- Render negative duration with the duration widget
Example V15:
- Create timesheet entry with negative duration (e.g. -00:30)
- Print the timesheet entry
Current Behaviour:
- Time is rendered as Time-1h (in e.g. -01:30)
Behaviour after PR:
- Time is correctly rendered (in e.g. -00:30)
opw-2731186
closesodoo/odoo#86360
X-original-commit: a45e2c03e26034f683a692d9c93e26925f7c2a21
Signed-off-by: Damhaut Florian (flda) <flda@odoo.com>
A duplicate of SMS rule for SMS template model for admins exist in calendar_sms
application.
Followup of odoo/odoo@23c82340c1 that broke some rule and was fixed with
odoo/odoo@13bf64b376 where a dummy rule was used to avoid removing data
in stable.
We can now remove some useless rule data.
closesodoo/odoo#86254
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Purpose is to cleanup some remaining notes in code to better know some cleaning
is long awaited, planned but still not in WIP. Brol is not a recognized word
in the whole world. Also add some query counters explanation as counters are
a bit different depending on accounting, community and enterprise runs.
Part-of: odoo/odoo#86254
Changes the previous attendance report override to use the new function
instead.
TaskId-2764844
closesodoo/odoo#85404
Related: odoo/enterprise#24765
Signed-off-by: Kevin Baptiste <kba@odoo.com>
This commit makes it simpler to override the action executed when
clicking on pivot cells or graph bars.
This is a nice to have for reports where we don't want to open the
report model but the model the report is based on.
TaskId-2764844
Part-of: odoo/odoo#85404
Currently when we click on external links from a PDF opened in our
PDF viewer, you are redirected to the link, means you are leaving
the record which is not ideal.
With this commit, external links in PDF document will be opened in
new tab so that the opened record is not lost. For that we need to
change the default option of the pdfjs lib, because we cannot pass
this parameter in iframe (link of the documentation is available in
task pad). For that, we changed the value of 'externalLinkTarget'
from 0 (which sets target to NONE) to 2 (which sets target to BLANK)
in 'getDefaultPreferences' function.
taskID-2752002
closesodoo/odoo#84594
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Purpose
=======
eLearning users may want to easily reuse a course to create a new one.
The user might want keep the section structure,
only part of the content and change the rest,
create an exact copy except documents are in another language,
or reuse a course for a few attendees.
Specifications
=============
Write copy_data function to add "copy" at the end of the name and
copying all the course content when duplicating a course.
Task-2704325
closesodoo/odoo#80980
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Added a new 'Sent' status, meaning the orders have been made to the
supplier. Once an order is 'Sent' it cannot be modified anymore.
It's no longer possible to order a product after the automatic email has
been sent.
closesodoo/odoo#80584
Taskid: 2678064
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Prior to this commit, the multi company rules were bypassed due implicit
sudos (compute_sudo and self.env.user).
The function computing the number of days will now make sure to include
the right domain.
TaskId-2791030
closesodoo/odoo#86361
X-original-commit: dbcb37ec80bb0fef0115c879c15bdc7073894290
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
Step to reproduce:
- Have the same menu items in the different locations
- Order one item for Office 1 click " Order now"
- Choose different office
- Select the same item
Current Behaviour:
- There is no 'Order now' and you can see that both orders were made
from Office 1.
- If you select two different items, you can click 'Order now' twice,
but there is no button if items are the same
Behaviour:
- If you change location before adding an item already present
you create a new line link to the new location and the 'Order now'
button is present
opw-2769168
closesodoo/odoo#86351
X-original-commit: f7075de6479487b6d4b4648ace3d62bf50df396c
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Part of the overall v16 SCSS optimization/restyle (task-2704984).
task-2753905
closesodoo/odoo#84058
Related: odoo/upgrade#3228
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
Prior this commit the rainbow man was built with many separate SVGs and
a lot of raw SCSS.
This commit refactors the rainbow man in order to use less raw SCSS and
more SVG attributes instead.
It also improves the overall animation with a little rotation of the
rainbow man's head during the fade in animation.
task-2742831
closesodoo/odoo#83403
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Define "Bootstrap v5 ready" utility-class to handle the property
overflow: visible.
This class definition can be safely removed after migrating to v5.
task-2742831
Part-of: odoo/odoo#83403
Before this commit, the animation of the rainbow, in the rainbow man
component, didn't work well in Firefox and Safari.
After this commit, this animation works well in every modern browsers.
task-2742831
Part-of: odoo/odoo#83403
The goal is to make it easier to link employees to users.
We can now directly create an employee from the 'invite' user form view
As well as create a new user from a form view using an action.
TaskId-2762247
closesodoo/odoo#85428
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Before this PR, only author of the message and admin could delete attachments
inside the chatter.
This behavior is now restricted to the channels and allow users to delete
attachments inside the chatter.
task-2753295
closesodoo/odoo#86302
X-original-commit: 5934dc08b32b422a11324743148083d4daa34350
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
The Time model is deleted and replaced with the new Clock model. The
differences are that there can be several clocks, whereas Time was a
singleton, and that a clock must define the frequency at which it
updates.
The new model ClockWatcher is added to model a record that makes use of
a clock. This is currently useful for the clocks to set or clear intervals
as needed.
closesodoo/odoo#86219
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
A Payroll tab needs to be added on the hr_job form as part of task-2693292.
This commit adds a name to the tab to be able to add the Payroll tab.
task-2693292
closesodoo/odoo#85270
Related: odoo/enterprise#24700
Signed-off-by: Kevin Baptiste <kba@odoo.com>
This collects all external links on clean the editor so as to make them
open in a new tab.
task-2740021
closesodoo/odoo#86289
X-original-commit: 8d2c8b4bad7a7aaa313aad361b48d77823841dbe
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
The background color option was applied to .card instead of .card-body.
As a result, the color appeared to be applied to the border rather than
to the card itself.
task-2788893
closesodoo/odoo#86288
X-original-commit: 55795bd2b807c40575bd2b1c23848eed252f2feb
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
after this commit:
- you are able to create new skills from an appraisal form
- you select skills more easily
taskID #2766619 [Appraisals] Skills usability
closesodoo/odoo#84892
Related: odoo/enterprise#24518
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Purpose
=======
Add "Activate" button when selecting multiple languages, select multiple
languages when clicking on "Add languages" in settings.
Specifications
=============
`lang` variable in `base.language.install` changed from Selection to
Many2many to allow multiple languages being activated at once.
Hide globe icon for language fields from view mode (only visible when
editing). Remove state in base.language.install since it's no longer
need to keep track of the installation step.
Task-2662548
closesodoo/odoo#78287
Related: odoo/upgrade#2921
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Purpose
=======
Add globe button next to language for leads and opportunities if the
database is in multi language mode and user has enough access rights.
User is also unable to edit language from view
PR: odoo/odoo/pull/78287
Task-2662548
Part-of: odoo/odoo#78287
THe price shown on the order line was not taking into account the
quantities ordered.
closesodoo/odoo#85872
Taskid: 2678064
X-original-commit: f9243560e667c319a1710ded98f157634b0fa2dd
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Current behavior:
When you use a workcenter with start and stop time in a BoM the start/stop time is applied for each quantity in the BoM report and workorder. For example if you have 3 quantities the start/stop time
will be applied 3 times.
Steps to reproduce:
- Create a product to manufacture (With atleast 1 operation)
- Create a workcenter that has positive Start/Stop time values
- Start and stop time are multiplied by the quantity in the BoM report
opw-2779381
closesodoo/odoo#86321
X-original-commit: 3bb32903f90fa86eb28b4551b07a5817f8e9f528
Signed-off-by: Adrien Widart <awt@odoo.com>
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
This commit aims to allow assigning tags to the taxes
created by the OSS feature by providing the xml_id of their
report.line in the eu_tag_map.py file.
Before this commit:
In l10n_be, the taxes created by OSS (l10n_eu_services) didn't set
the tag +47 on invoice_repartition_lines nor +49 on
refund_repartition_lines.
This make the VAT report for Belgium wrong.
After this commit:
Taxes created by OSS for a company using the belgian CoA will get
their tags set properly and thus will the taxes impact the
belgian tax report correctly.
task: 2770182
ticket: 2768622
Community-PR: https://github.com/odoo/odoo/pull/85607
Design choices:
This fix is currently solving the issue for l10n_be but we have
no doubt that it will be raised for other EU countries too.
In order to provide the tags, we decided to be consistent with
what as been done regarding the tax mapping. Thus we decided to
create and maintain a simple mapping file and to test it.
several other methods were explored:
- create a global variable and update it from all localization
modules. This method would work but is ugly and error prone.
- create a templating method and override it from localization
modules.
The problem is where to set the root of the template method?
The naïve solution would be to create a bridge module between
l10n_eu_services and l10n_be but that would lead to an explosion
in the number of bridge modules which we don't want.
In order to keep things simple and generic, we could put the
template method directly into the account module. But it is kind
of ugly because account shouldn't know anything about the oss
feature and it would encourage such a leaky design to happen
again in the future.
closesodoo/odoo#86314
X-original-commit: 7dcc2ae4665d2d7b577ed10160691775b86a848f
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Brice Bartoletti <bib@odoo.com>
Before, when sending an invoice for the first time, it would give
a "cannot find savepoint" traceback upon wanting to release it.
We avoid that error by putting less code in the with statement,
so the savepoint gets released a lot earlier while the record
remains locked for the rest of the transaction.
We also put a nice error message if the user can not send at the
moment because another process is already sending. (might happen
more often in v15)
We also updated the translation .pot as we added a new message
and some messages were missing anyways in the .pot, so we added
those as well.
closesodoo/odoo#86317
X-original-commit: a135ef6c78a5ddd1eed36bbb91ee01d82c18e592
Signed-off-by: William André (wan) <wan@odoo.com>
The purpose of this commit is to include SMS templates. Templates allow people to
customize the content of sent SMS. When the project/task stage changes, the user will
be notified and there will be a track in the chatter.
- add this field on the right of the 'email template' one in list view.
optional and hidden by default.
- add it below the 'name' quick search in the search view.
task-2683575
closesodoo/odoo#81311
Related: odoo/enterprise#22853
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
The issue is simply creating a related stored many2many field, which is
pretty easy to do with Studio. When creating the field, Odoo crashes
with a traceback caused by ondelete being None on the field.
The source of the bug is the fact that the attribute field.ondelete is
set to a sensible default ('cascade') on non-related fields only. The
fix consists in setting the default value on the attribute itself, so
that the setup of the field never falls on a case where field.ondelete
is unset.
closesodoo/odoo#86303
X-original-commit: d0e0d80806a1b63ac986e9bcbaf88f9fc5243319
Signed-off-by: Raphael Collet <rco@odoo.com>
Steps :
Create a recurrent task.
Delete it.
Run the cron "Create Recurring Tasks".
Issue :
IndexError: tuple index out of range.
Cause :
The cron calls a method which takes the last task of the recurrence
as a model. As there is no such task, an python error is thrown.
Fix :
Do not display the "Continue Recurrence" button when deleting the last
task of it.
opw-2743788
closesodoo/odoo#86309
X-original-commit: 9cfe0042dd6846cf8b52aebeb9dd6e7432b32322
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Currently, when making an import on the project. task and trying to enable the
'recurring_task' to True, the field is updated but a recurrence record is not
created.
Steps:
1. Create an import file of a new task record
2. Add 'recurring_task' field set to true
Technical Description:
The default value is not set when the file is imported. Such as repeat_interval,
repeat_unit etc. So we have called the default_get method.
task-2733539
closesodoo/odoo#86283
X-original-commit: e24ae464caa068fa0a9b87fd7573528973eb25a4
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
The smartbutton for the number of hours in the attendance smart button
on employees and user did not use the right widget and could display
invalid data like '1.8 hours last month'.
TaskId-
closesodoo/odoo#86280
X-original-commit: 230f9185a7de214a0f3d445617bb9b0496d6fc49
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
Steps to reproduce:
- On bank journal, set at least two manual
outbound_payment_method_line_ids
- Set a vendor X with manual property_payment_method_id
- Create a Vendor Bill with vendor X, confirm it, and register payment
OR
- Create a payment with outbound method and select vendor X
Issue:
Got a traceback
The reason is we expected one value instead of several.
With this commit, we take the manual payment method with the
highest priority based on its sequence number.
opw-2743110
closesodoo/odoo#86270
X-original-commit: 6235466e70cefd5d948ce06dd39fb04d88387a43
Signed-off-by: William André (wan) <wan@odoo.com>