This reverts commit 27158a0f612897e41601bf9e9d20861e9b87279f
Why keep a new option now that it has been developped ?
X-original-commit: bd4628e69df1e27498f88f348812a269cc9d3648
This commit attempts to update the old "website.ThemePreview.Loader" style
by integrating a loading animation when theme is being installed
Common code used to add loader and install the selected theme in both
ThemePreviewController & ThemePreviewKanbanController.
(preview theme and pick a theme)
task-2338062
closesodoo/odoo#58068
X-original-commit: fbe89b8617c17a3fa93970b4d706a7f0d6421ae5
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Solves https://github.com/odoo/odoo/issues/56803
Use case:
1) Create accounts ACC TAX A, ACC TAX B, with reconcile = True, internal_type = other
2) Create Tax A, with tax_exigibilty = on_invoice and account_id = ACC TAX A, 20%
3) Create Tax B, with tax_exigibilty = on_payment and account_id = ACC TAX B and cash_basic_account_id = ACC TAX A, 20%
4) Create invoice A, account_id = Tax A, unit_price = 1000, Valide invoice
5) Create invoice B, account_id = Tax B, unit_price = 500, Valide invoice,
6) Register full payment for invoice B. The cash basis tax creates a miscellaneous operation MISC A, containing a line on ACC TAX A.
7) Create a mis operation MISC TVA, like this:
line 1 : account_id = ACC TAX A, credit = 300
line 2 : account_id = 401100, debit = 300
8) Reconcile the following move lines:
line of MISC A with account ACC TAX A (300)
line of invoice A with account ACC TAX A (200)
line of MISC TVA with account ACC TAX A (100)
==> When doing that, not full reconcile object was created between the reconciled lines, while it should have been.
X-original-commit: ff35a49
[IMP] account: reintroduce a test that should have been forward-ported …
This test was made together with a bugfix by https://github.com/odoo/odoo/pull/51529 . The fix did not need to be forward-ported to 13.0, but the test should have been, so that we are sure it does not break again in the future.
closesodoo/odoo#58072
X-original-commit: 5d00592f7d803888d8d5befd5a8cd1b096067860
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
A statement line can't have a zero amount except after a migration.
In that case, the residual amount of the statement line is also zero and then, the line having the suspense account has a balance of zero.
When opening the bank reconciliation widget, it leads to a float division by zero because we try to compute the paid percentage of the statement line.
closesodoo/odoo#58069
Task: 2341850
X-original-commit: ecc8f8be6ee09cb0fdfae0c4b35a933541d41292
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Write guidelines on how to write secure code and avoid commons
mistakes.
Update outdated information and move existing security guidelines to
the same section.
closesodoo/odoo#58065
X-original-commit: 10184274fb6be1639d2047e863654ed5c7bef9f0
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Bug description:
Installing Invoicing on a database whose company is configured in the
SEPA zone, results in installing Accounting
Steps to reproduce on the Runbot:
- Start from a base enterprise database
- Go to Settings > Users & Companies > Companies and configure the
address of MyCompany to the SEPA zone (e.g. Belgium)
- Go to Apps and install Invoicing
- The Accounting application has been installed
Explanation:
The module account_sepa depends on account_batch_payment, which depends
on account_accountant.
The post_init_hook of account, _auto_install_l10n, adds the account_sepa
module to the installation if the country_code of the company is in the
SEPA zone.
The same side-effect is observed with account_bank_statement_import_camt
which depends on account_bank_statement_import, which depends on
account_accountant.
The fix is to remove the installation of these modules from the
post_init_hook of the module account, and add them to a new
post_init_hook of the module account_accountant, that will be in a PR in
the enterprise project.
closesodoo/odoo#58073
X-original-commit: db4ce56641c75403be935efa072687bff65c7bb2
Related: odoo/enterprise#13362
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
Signed-off-by: Paul Morelle <madprog@users.noreply.github.com>
Make the method work when the value to test is `False`.
closesodoo/odoo#58064
X-original-commit: 6fb19219d333dc324603bcb2a937e977eecb037e
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
Chrome recently changed their SameSite policy default value from None to Lax,
the session is no more shared between the webpage and the iframe.
As a result, the csrf check systematically fails.
After this commit, the csrf_token check is only made when you have a session.
In case you are using your form in an iframe on another site, with the new
cookies policy, your cookies with the session_id (linked to the csrf token)
is not sent to the server and the check csrf always fails.
Since the purpose of the csrf is to prevent another website to submit a form
with your 'authenticated account', we can consider that if you are not logged
and so have no session_id, it is no critical and we can ignore the csrf check.
opw-2330286
closesodoo/odoo#58050
X-original-commit: 9a0c9f3192bc7043add89446cbe6c2650499a654
Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Disabled livechat in blog query count
if website_livechat is installed before website_blog, the get_livechat_channel_info add
unrelated query for the current test. So we disabled it.
Courstesy of @Xavier-Do for analyse
closesodoo/odoo#58044
X-original-commit: 86f065e3571a1339798501156804fda6c57c6989
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Tax closing requires the use of tax_line_id field on the lines it needs to take into account. This new config ensures such a line is created for 100% taxes. An empty, 0-balanced line is also created for the base line, but this is acceptable.
[IMP] l10n_ch: add new 100% tax for investments and other expenses
OPW 2333144
closesodoo/odoo#58014
X-original-commit: 0cc190ad302f98f7ae198166983ac40532d1d5ee
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
The field `project_id` is not defined in the inherited view (from `sale`
module) but by another inherited view from the `sale_project` module.
This cause issues during upgrade where the inherited views can be
applied in a different order.
Moreover, this overwrite of the context is now wrong and unneeded as the
base view already defines a more complete one.
See commit odoo/odoo@ed2e18f3c9.
closesodoo/odoo#58020
X-original-commit: 7acb868ca1eff53ba30028a2ab002b62a9ad33be
Signed-off-by: Christophe Simonis <chs@odoo.com>
ACLS file was missing in the manifest. This commit adds the file
to the module's manifest and rename the acls according the groups they are
referring to.
Task ID: 2339073
closesodoo/odoo#58012
X-original-commit: 6e83898e17d4aac93ce11b20d589b5a637eb6a8c
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
Before this commit, the z-index of the thread window was too low
compared to the z-index of the topbar, which prevented users to close
the window on mobile.
task-2312878
closesodoo/odoo#58011
X-original-commit: fadadd90c124197187ffe0013718ac2ffaab3cb8
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
In reserved field of stock move, instead of showing expected
date of coming moves without enough quantity,
show "Not Availaible".
closesodoo/odoo#58003
X-original-commit: 54c326e87ef2ed43cc89180c4f53baef0fcd569d
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Signed-off-by: Rémy Voet <ryv-odoo@users.noreply.github.com>
This prevents some code (in controllers) to retrieve an attachment for a
field that is not stored, as the code only relies on `field.attachment`.
This also makes the field definition more consistent.
closesodoo/odoo#57980
X-original-commit: 7325c3f8c538a8b8c0435963cdda3ced6fe4b324
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
Before this, a one2many relation in a settings view would not work.
After the save, the added data in the field would be cleared.
Now, the data is still present.
With the change made to BaseSettingsModel the 'base_settings_tests' need
to only use the res.config.settings as fake data model. (relations towards
other models are still ok though). The test file is therefore altered
to comply to this new rule.
Note that this commit only validates the good behavior on the frontend side,
as a one2many relation towards a res.settings can't be done simply in
python as it is a transient model (forbidden).
Task ID: 2274168
closesodoo/odoo#57401
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
More precisely the template which asks for the permission to generate
a key. The message was changed, and the possibility of adding a
description for the key was removed. The link to manage databases
was removed.
closesodoo/odoo#57951
X-original-commit: a7acf158cca892624df5beda21438c5fcb2973b3
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
The path to folder of images of IoT has change.
So we adapt the path for the upgrade of IoT
closesodoo/odoo#57978
X-original-commit: 9512a23f48176fe0e7970039c824281c4af18162
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
With evdev version 1.3.0 we have a lot of Traceback in IoT Box.
A RuntimeError in the library with the function 'get_event_loop()'
So we roll back to version 1.2.0
closesodoo/odoo#57977
X-original-commit: cbe0463cc129dcbda6d7966048ec5f7fc7e85040
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
If IoT Box is on access point mode the box try to reach https://iot-proxy.odoo.com
to get pairing code. So the box try while 5 minutes to reach iot-proxy
and send request on network every 10 secondes.
Now we add a condition 'if not access_point()' to send these request.
closesodoo/odoo#57976
X-original-commit: 901dc987c0204a7df2b811bb430f31eabf204fbb
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
Usecase to reproduce:
- Launch 2 procurements for 2 manufactured products.
Only the last MO created has finished moves.
It happens since the list is wipped at each iteration.
closesodoo/odoo#57972
X-original-commit: d654c05f3e06898a5de025c1b830ba29c039f781
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Assume field B depends on A, and searching on B is rewritten as a domain
that mentions A. If A is modified, and then we search on B, one has to
flush A to the database before searching.
closesodoo/odoo#57963
X-original-commit: b242b7b1382ee39ebefa58c556931b7dae77f669
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
Steps to reproduce the bug:
- Create a customer invoice I for customer C with no payment term and no invoice date
- Set a payment term date to a date D in the futur
- Validate I
Bug:
The payment term date was changed to today as the invoice date instead of keeping D
opw:2328668
closesodoo/odoo#57630
X-original-commit: d0789e41af212866f2884cd011a501876f45e438
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
- channel_seen is now called even for own message and only when needed
- channel_seen is now called with a message_id which transfer the
decision of what is seen to the client which makes more sense
task-2282235
task-2282248
closesodoo/odoo#57956
X-original-commit: 04edfa50ccea305050d017c4a1996e561bc7bd57
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
When one constucts a custom filter in the search view and clicks
on the "ADD A CONDITION" button, the new condition dropdowns always
start with the top of the lists.
This commit will instead default a new condition to the same field and
operator as the previous one.
Presetting the dropdowns used in the previous condition is a better
guess for what a user tries to filter than starting the dropdowns each
time at the top of their lists.
closesodoo/odoo#56918
Taskid: 2222545
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Current behavior:
Auto-generated SQL fails with ERROR: missing FROM-clause entry for table when table alias names exceed the target length of 63 characters. This is because odoo.osv.expression.py handles shortening the table name alias in generate_table_alias, but not in get_join_conditions. In the resulting SQL, shortened aliases are used in the FROM clause, whereas in the join conditions, the full alias is used, which is both exceeding the Postgres limit and not matching the table name alias in the FROM clause.
Expected behavior:
auto-generated SQL runs without errors.
Implementation of fix:
- refactor alias shortening into new function _shorten_alias to make it reusable
- Use _shorten_alias in both generate_table_alias and get_join_conditions
closesodoo/odoo#57944
X-original-commit: 40b97b37e2188b082cd70eec1cdf14bf9366377e
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
due to breaking changes in https://github.com/odoo/odoo/pull/55995/commits/bf32b22ce247c19fda94ded74e37f7c6120ce2c4
and especially the part:
"NOTE 1. If the default_get within the onchange returns a value for
a field that is not in the view, we ignore it, and it won't be saved.
Before, that value was kept and sent upon save. This change in behavior
may prove problematic, although the overall risk is small. Decision has
been made to keep heavy comments and code snippets if we were to revert
back somehow to the previous situation."
the wizard to update user password was broken as the field user_id
which is required was not present in the view and was thus ignored by
to web client when calling 'create'.
closesodoo/odoo#57937
X-original-commit: 641ae07dbce1d0515fb0710a3363db47b27548e7
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: Cedric Snauwaert (csn) <csn@openerp.com>
Fine-tuning of 9d7d618220e27024321a75be0058db2289115af2
Although the mentioned commit delays the consumption of a sequence
number at creation, it has the drawback to not generate one if the user
modifies the name.
In practice, we still want to generate a RMA number even if there is a
custom name. A good balance is to generate the RMA number if the user
leaves the `/` at the beginning of the name. If the user removes the
`/`, we don't generate the RMA number.
opw-2301412
closesodoo/odoo#57932
X-original-commit: 2ad9b4b2b5780c20a0cd77c48b24dcb76d69f912
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Issue
- Install 'hr_timesheet' module
- Go to any employee and click on stat button 'Timesheets'
- Create timesheet
- Remove employee from filter then add it back
No timesheets displayed for current employee.
Cause
There is no "employee_id" in list view. However, 'timesheet_view_tree_user'
view (who inherit from concerned list view) does have an "employee_id" field
but the mode is "primary" and therefore not available for the main view.
Solution
Add "employee_id" in main list view and alter inherited view to
update attributes of "employee_id" field.
opw-2338055
closesodoo/odoo#57930
X-original-commit: cae352a90b2d8a562fbf57391ce88fde4488e8cf
Signed-off-by: bon-odoo <nboulif@users.noreply.github.com>
The attribute Exception.message is no longer available in Python 3, and
newer versions of pylint check for this and raise an error during
test_lint, with this commit we take care of these codesites in the
following manner:
* For test_convert, the access was in a function that is effectively
dead code, and thus it has been removed.
With this, we can upgrade pylint to the newest version and fix a
longstanding bug with MRO building in pylint.
closesodoo/odoo#57921
X-original-commit: 6a989445fdda811f854003a62fd564061d088963
Signed-off-by: Adrian Torres (adt) <adt@odoo.com>
This commit aims at fixing a random bug on the runbot.
When loading the webclient, if there is no hash, a rpc is done to
read the default action of the user. When this rpc comes back, we
execute the given action (if any), or the first action (typically
Discuss). The navbar is displayed as soon as possible, it doesn't
wait for the first action to be executed. This means that the
user can open the user menu and click on 'My Profile' before the
first action is executed.
Before this commit, if the user clicked before the read rpc on
'res.users' returned, the default action (or the first) one, was
executed, even though the user clicked on 'My Profile' and thus
asked for a specific action. So basically, the user form view was
briefly shown, and then replaced by the default or first action.
Whereas this is a very rare usecase in practice (the timing is
really short), this sometimes made the totp tour fail. However,
even if it is unlikely, the client must be robust and correctly
react to concurrent requests.
This commit fixes the issue by executing the 'My Profile' action
in the DropPrevious. That way, if any 'doAction' is performed,
other pending operations (also done in DropPrevious) are dropped.
This commit also ensures that the "brand name" part in the navbar
(containing the name of the current app) is hidden when there is
no current app, as in the scenario described above, we land in
a webclient with no current app. Note that not being in an app was
something that was already handled, but not at startup.
closesodoo/odoo#57913
X-original-commit: 9ad4a3d4b735e9666034a60f4349e3fea46fed61
Related: odoo/enterprise#13314
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Since 9f82605df1, any call to `_login_redirect()` without previously going
through `web_login()` method would crash, as `login_success` is set there.
In this case, it was:
Dispatch -> web_login -> redirect (new dispatch) -> _login_redirect()
task-2340941
closesodoo/odoo#57881
X-original-commit: 448fcb3c702c3346ca5af922bbf457231a7330f5
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Before this commit it was not possible to remove a channel from the followers.
task-2324263
closesodoo/odoo#57817
X-original-commit: 9a065048bbdd09072084d03e67fd012766ddbe23
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
The original feature was introduced in commit #8248f0e153a and works
well for internal transfers, but fails for dropship.
For latter, if quantity is changed on confirmed PO line, new picking is
created, even if the quantity was decreased not increased, leaving the
new draft picking empty.
closesodoo/odoo#57893
X-original-commit: 77a96b2dd0fab4c6b6136d0f23422d8a2bc68bca
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Meeting_room_allow_creation field is declared in website_event_meet.
event.event.view.form.inherit.track.quiz uses this field in module
website_event_track_quiz. This module depends from website_event_track but not
from website_event_meet.
Meeting_room_allow_creation was already added ot the event view in
website_event_meet module.
This commit fix this issue by removing the addition of the field in
an inappropriate module.
Task ID: 2339901
closesodoo/odoo#57866
X-original-commit: c0f0f9f47573b74ca6b1fcdc3383e43f28f7a2e1
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: David Beguin <dbeguin@users.noreply.github.com>
*: website, web_unsplash, website_blog
We have recently created an odoo media library that exposes a public API
for searching for open-source media, including dynamic SVGs that can be
used with the dynamic background-shape system to create illustrations
whose colors can be changed by the user. This commit adds the
corresponding client-side functionalty: search for the images in the
media-library, creating a corresponding attachment when selected, as
well as an option to customize the colors of the dynamic SVGs.
In the process, adaptations have been made in the web_unsplash module to
avoid duplicating code and to adapt code that was making assumptions
that are no longer valid.
To make new users more aware of this feature, all default images have
been hidden from the media-dialog, so that the user is prompted so
search for images. Some tests and tours that were relying on having
default images in the media-dialog (eg in website_blog) have been
adapted to match.
task-2316651
Linked to: odoo/iap-apps#235closesodoo/odoo#57888
X-original-commit: 7a1308b426f94b33e2bd55e5d58e661067e26ff3
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
- Share the code for tab switching loading and slow option loading.
- Now add a loading effect over the content when the content is changed
and a loading effect over the editor panel when the editor panel is
being changed
Part of https://github.com/odoo/odoo/pull/55614
task-2213114
closesodoo/odoo#57879
X-original-commit: e126cd3bb2b20bc993d2472eee5fe16cc7a74ea9
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Add a loader over the editor if an option takes some time to be applied
to indicate that something is being done.
In this commit, the following changes have been made:
- Add "_execWithLoadingEffect" method (will be used to add actions
to the mutex queue and set a loading screen over the editor 1s later).
- As soon as the mutex is unlocked (all computations are completed),
the loading effect will be removed (or canceled).
Part of https://github.com/odoo/odoo/pull/55614
task-2213114
X-original-commit: a4a745cf4f9ccade9876d885ab0774d3ec0bbf69
The overridden payment_transaction() method needs to accept positional
arguments as well, otherwise it will break any other override that would
use positional arguments, and will fail with:
payment_transaction() takes 1 positional argument but 6 were given
Introduced by 4d3f2fbdcda68d4f0e0bb3bb34d51e71d963621b via #51898closesodoo/odoo#57890
X-original-commit: a4f5f811aba02cb29e344a576fbae9305481dd73
Signed-off-by: Olivier Dony (odo) <odo@openerp.com>