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>
Before this commit:
Currently, the 'Re-Invoice Expenses' field visible when 'Can be Expensed' is
true but after the module sale_timesheet installation, it is not working.
After this commit:
The 'Re-Invoice Expenses' field visible when 'Can be Expensed' is true even
when we have a sale_timesheet module.
LINKS
PR https://github.com/odoo/odoo/pull/57259
Task-2328493
closesodoo/odoo#57856
X-original-commit: 92ef9e1198090aa51556a63f42d91282d2070c0a
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Currently, method _apply_timesheet_label will add label on field
unit_amount with widget timesheet_uom but the widget on this
field is changed in another module as timesheet_uom_timer so it will
not work when that module is installed.
So in this method pass the view_type as argument so it can be easily
override in another module based on view_type.
closesodoo/odoo#57847
Taskid: 2287390
Related: https://github.com/odoo/enterprise/pull/11884
Related: odoo/enterprise#13279
X-original-commit: 6ce434b6d6ab686c91c111d2f86503176fec6517
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Purpose
=======
Some fields weren't editable, even when the option is enabled on
the settings.
closesodoo/odoo#57842
X-original-commit: 57d595e87642fa6f7bec62cbb88a39c35cc72589
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
The raw error message from psycopg2 wasn't clear for users and led to
multiple support tickets.
In case of such "concurrency" errors, the user should retry later, it's
not a "real" bug.
closesodoo/odoo#57851
X-original-commit: 9f7f1db5add5b8a940e53707091133c0bcadd350
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
On runbot the tour shows transient failures related to race
conditions.
The issue here is that when a user updates their own TOTP status, if
hr is not installed this will close the Preferences dialog requiring
reopening the dialog in order to check that everything worked.
However if hr is installed there is no dialog ("My Profile" opens as a
full action, which will not disappear on TOTP updates).
We still reopen the My Profile action, but if the server is a bit too
slow the tour may see the "old" version of "My Profile" which has not
been unloaded, click the tab to go to the next step, but because it's
already there the action has no effect, the next step is triggered
when "My Profile" finally (re)loads at which point we're back on the
first tab while the tour believes it should be on the second, and the
tour breaks.
Fix this by forcing a full reload of the action: between updating TOTP
status and checking for the status change, navigate to the Discuss
application then back to the preferences / profile screen.
closesodoo/odoo#57843
X-original-commit: 7a1dc71186d00ece21cede205a045fa93cd6dcfb
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
1. Login as admin
2. Go to any product page and click Personalize > Enable recently viewed
products
3. Login in another browser session as portal user
4. Open some products until you start seeing the recently viewed
products
5. With the admin account unpublish one of the recently viewed
6. On the portal account browse more to display the recently viewed
Access error will raise because an unpublished product is requested by
the user.
Filtering the product to allow only published products fix the issue.
opw-2336699
closesodoo/odoo#57836
X-original-commit: 668778125c2d4231d9b48456c3397edb8d04acb3
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
This commits solves different rendering issues in the javascript reference
documentation, following the work done in #57270, but for issues added in
further versions and missed in the forward-port.
Forward-port of #57758
Forward-port of #57775closesodoo/odoo#57835
X-original-commit: 8885cf578468d34e740bada95440f092f10c6268
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
- Create a SO
- Add a line with a lead time != 0, e.g. 7 days
=> the Expected Date is today + 7 days
- Add a note or a section on the SO
The Expected Date is today
This happens because we do not filter out notes and sections when
computing the minimum date.
opw-2340419
closesodoo/odoo#57792
X-original-commit: d3a6afe51fc4b864368acbc40a86ac6974d328dd
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Add back the default filters when opening the WO view from the work
center kanban views.
opw-2329401
closesodoo/odoo#57813
X-original-commit: 15ed2b92b83929becfd50334c7a31282c46d44d6
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Virtual keyboard has been removed in c6397ab, but the field to activate
it still existed. We remove it from the view and delete the field.
closesodoo/odoo#57794
X-original-commit: 0979435d6612f4de8b7c94e09be1302cec53e706
Related: odoo/upgrade#1773
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
According to the Spanish accounting rules, this commit tries
to set more appropriate account types to the different
account_account templates.
closesodoo/odoo#57741
X-original-commit: 970d9bf10283e770c984d78fe145fd61a2be43dc
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>